-// 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 _SCENEITEM_HXX_
#define _SCENEITEM_HXX_
{
namespace HMI
{
+ typedef enum
+ {
+ CurrentNode,
+ ChildrenNodes,
+ ElementaryNodes
+ } ShrinkMode;
+
class Scene;
class RootSceneItem: public GuiObserver
QWidget *widget) = 0;
virtual void setTopLeft(QPointF topLeft) = 0;
- virtual int getLevel();
- virtual qreal getMargin();
+ int getLevel();
+ void setLevel();
virtual void checkGeometryChange() = 0;
virtual void reorganize();
virtual QString getLabel();
virtual void addHeader();
+ virtual void addProgressItem();
virtual qreal getHeaderBottom();
- virtual qreal getWidth();
- virtual qreal getHeight();
+ qreal getWidth();
+ qreal getHeight();
virtual void setWidth(qreal width);
virtual void setHeight(qreal height);
- virtual qreal getInternWidth();
- virtual qreal getInternHeight();
virtual void popupMenu(QWidget *caller, const QPoint &globalPos) = 0;
virtual void activateSelection(bool selected);
virtual void setGeometryOptimization(bool optimize);
- inline bool hasNml() { return _hasNml; };
- inline qreal getNml() { return _hasNml*_nml; };
inline SceneItem* getParent() { return _parent; };
protected:
YACS::HMI::Scene *_scene;
QString _label;
int _level;
- qreal _margin;
- qreal _nml;
qreal _width;
qreal _height;
+ qreal _incHeight;
QColor _penColor;
QColor _brushColor;
QColor _hiPenColor;
QColor _hiBrushColor;
bool _hasHeader;
- bool _hasNml;
bool _optimize;
bool _dragable;
enum Qt::MouseButton _dragButton;
virtual void checkGeometryChange();
virtual void popupMenu(QWidget *caller, const QPoint &globalPos);
void setParent(SceneItem* parent);
+ virtual QString getToolTip();
+ void setEventPos(QPointF point);
+ virtual void updateChildItems();
+ virtual void updateLinks();
+ virtual void shrinkExpandLink(bool se);
+ virtual void shrinkExpandRecursive(bool isExpanding, bool fromHere, ShrinkMode theShrinkMode);
+ bool isAncestorShrinked() { return _ancestorShrinked; };
+ bool _blocX;
+ bool _blocY;
protected:
// virtual bool sceneEvent(QEvent *event);
virtual QColor getBrushColor();
QColor hoverColor(QColor origColor);
bool _hover;
+ bool _ancestorShrinked;
+ QPointF _eventPos;
};
}