Version: 8.3.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
SceneHeaderNodeItem.hxx
Go to the documentation of this file.
1
// Copyright (C) 2006-2016 CEA/DEN, EDF R&D
2
//
3
// This library is free software; you can redistribute it and/or
4
// modify it under the terms of the GNU Lesser General Public
5
// License as published by the Free Software Foundation; either
6
// version 2.1 of the License, or (at your option) any later version.
7
//
8
// This library is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
// Lesser General Public License for more details.
12
//
13
// You should have received a copy of the GNU Lesser General Public
14
// License along with this library; if not, write to the Free Software
15
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
//
17
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
//
19
20
#ifndef _SCENEHEADERNODEITEM_HXX_
21
#define _SCENEHEADERNODEITEM_HXX_
22
23
#include "
SceneHeaderItem.hxx
"
24
#include "
SceneNodeItem.hxx
"
25
26
namespace
YACS
27
{
28
namespace
HMI
29
{
30
class
SceneInPortItem;
31
class
SceneOutPortItem;
32
class
SceneCtrlPortItem;
33
34
class
SceneHeaderNodeItem
:
public
SceneHeaderItem
35
{
36
public
:
37
SceneHeaderNodeItem
(
QGraphicsScene
*scene,
SceneItem
*parent,
38
QString label);
39
virtual
~SceneHeaderNodeItem
();
40
41
virtual
void
paint
(QPainter *painter,
42
const
QStyleOptionGraphicsItem *option,
43
QWidget
*widget);
44
virtual
void
setText
(QString label);
45
virtual
qreal
getHeaderBottom
()
const
;
46
virtual
void
autoPosControl
(
AbstractSceneItem
*item);
47
virtual
void
autoPosNewPort
(
AbstractSceneItem
*item);
48
virtual
void
reorganizePorts
(
shownState
ss);
49
virtual
void
popupMenu
(
QWidget
*caller,
const
QPoint &globalPos);
50
virtual
void
adjustGeometry
();
51
virtual
void
adjustPosPorts
();
52
virtual
QRectF
getMinimalBoundingRect
()
const
;
53
virtual
void
adaptComposedNode
(
SceneItem
* port, qreal deltaY);
54
virtual
void
setEdited
(
bool
isEdited);
55
virtual
void
setValid
(
bool
isValid);
56
virtual
void
setExecState
(
int
execState);
57
virtual
SceneCtrlPortItem
*
getCtrlInPortItem
();
58
virtual
SceneCtrlPortItem
*
getCtrlOutPortItem
();
59
QColor
getValidColor
();
60
61
protected
:
62
virtual
void
mousePressEvent
(QGraphicsSceneMouseEvent *event);
63
virtual
void
mouseDoubleClickEvent
(QGraphicsSceneMouseEvent *event);
64
65
SceneNodeItem
*
_fatherNode
;
66
SceneHeaderItem
*
_header
;
67
SceneCtrlPortItem
*
_controlIn
;
68
SceneCtrlPortItem
*
_controlOut
;
69
std::list<SceneInPortItem*>
_inPorts
;
70
std::list<SceneOutPortItem*>
_outPorts
;
71
int
_maxPorts
;
72
73
QColor
_sc
;
74
QString
_stateDef
;
75
int
_execState
;
76
bool
_isProc
;
77
78
bool
_isValid
;
79
bool
_isEdited
;
80
};
81
}
82
}
83
84
#endif
src
genericgui
SceneHeaderNodeItem.hxx
Copyright © 2006-2017 CEA/DEN, EDF R&D