]> SALOME platform Git repositories - modules/yacs.git/blobdiff - src/genericgui/SceneHeaderNodeItem.hxx
Salome HOME
Updated copyright comment
[modules/yacs.git] / src / genericgui / SceneHeaderNodeItem.hxx
index b43545da08ad8d8f23b96c57683fdca27c101c1b..2b82012287e31f270c945b0f32584f51c96fa845 100644 (file)
@@ -1,21 +1,22 @@
-//  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2024  CEA, EDF
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef _SCENEHEADERNODEITEM_HXX_
 #define _SCENEHEADERNODEITEM_HXX_
 
@@ -44,26 +45,30 @@ namespace YACS
       virtual qreal getHeaderBottom() const;
       virtual void autoPosControl(AbstractSceneItem *item);
       virtual void autoPosNewPort(AbstractSceneItem *item);
+      virtual void reorganizePorts(shownState ss);
       virtual void popupMenu(QWidget *caller, const QPoint &globalPos);
       virtual void adjustGeometry();
       virtual void adjustPosPorts();
       virtual QRectF getMinimalBoundingRect() const;
-      virtual void adaptComposedNode(qreal deltaY);
+      virtual void adaptComposedNode(SceneItem* port, qreal deltaY);
       virtual void setEdited(bool isEdited);
       virtual void setValid(bool isValid);
       virtual void setExecState(int execState);
       virtual SceneCtrlPortItem* getCtrlInPortItem();
       virtual SceneCtrlPortItem* getCtrlOutPortItem();
+      QColor getValidColor();
 
     protected:
       virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
-      QColor getValidColor(bool isValid);
+      virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
 
+      SceneNodeItem* _fatherNode;
       SceneHeaderItem *_header;
       SceneCtrlPortItem *_controlIn;
       SceneCtrlPortItem *_controlOut;
       std::list<SceneInPortItem*> _inPorts;
       std::list<SceneOutPortItem*> _outPorts;
+      int _maxPorts;
 
       QColor _sc;
       QString _stateDef;
@@ -72,12 +77,6 @@ namespace YACS
 
       bool _isValid;
       bool _isEdited;
-
-      static QColor _editedNodeBrushColor;
-      static QColor _normalNodeBrushColor;
-      static QColor _runNodeBrushColor;
-      static QColor _validNodeColor;
-      static QColor _invalidNodeColor;
     };
   }
 }