X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IPropertyPanel.h;h=516fdf3a6430e374fae22b2c022e58e6cb2dc8b0;hb=e67f27dc909fe58f932c551e030319ae0930db6e;hp=00ff516b8c3ac9dcca21e7fb545e028d86f90af0;hpb=1b8d9a406c6989ed8c12f927b0df520f64a9ee76;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IPropertyPanel.h b/src/ModuleBase/ModuleBase_IPropertyPanel.h index 00ff516b8..516fdf3a6 100644 --- a/src/ModuleBase/ModuleBase_IPropertyPanel.h +++ b/src/ModuleBase/ModuleBase_IPropertyPanel.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + /* * ModuleBase_IPropertyPanel.h * @@ -15,11 +17,20 @@ class ModuleBase_ModelWidget; +/** +* \ingroup GUI +* A class for Property panel object definition +*/ class MODULEBASE_EXPORT ModuleBase_IPropertyPanel : public QDockWidget { Q_OBJECT public: - ModuleBase_IPropertyPanel(QWidget* theParent) : QDockWidget(theParent) {} + /// Constructor + /// \param theParent is a parent of the property panel + ModuleBase_IPropertyPanel(QWidget* theParent); + + /// Returns header widget + virtual QWidget* headerWidget() const = 0; /// Returns currently active widget virtual ModuleBase_ModelWidget* activeWidget() const = 0; @@ -27,11 +38,38 @@ public: /// Returns all property panel's widget created by WidgetFactory virtual const QList& modelWidgets() const = 0; + /// Removes all widgets in the widget area of the property panel + virtual void cleanContent() = 0; + + /// Editing mode depends on mode of current operation. This value is defined by it. + /// \param isEditing state of editing mode flag + virtual void setEditingMode(bool isEditing) { myIsEditing = isEditing; } + + /// \return State of editing mode flag + bool isEditingMode() const { return myIsEditing; } + + /// Set Enable/Disable state of Cancel button + /// \param theEnabled Enable/Disable state of Cancel button + virtual void setCancelEnabled(bool theEnabled) = 0; + + /// \return Enable/Disable state of Cancel button + virtual bool isCancelEnabled() const = 0; + + /// Returns widget processed by preselection + virtual ModuleBase_ModelWidget* preselectionWidget() const = 0; + + /// Sets widget processed by preselection + virtual void setPreselectionWidget(ModuleBase_ModelWidget* theWidget) = 0; + signals: /// The signal about key release on the control, that corresponds to the attribute /// \param theEvent key release event void keyReleased(QKeyEvent* theEvent); + /// The signal about the widget activation + /// \param theWidget the activated widget + void beforeWidgetActivated(ModuleBase_ModelWidget* theWidget); + /// The signal about the widget activation /// \param theWidget the activated widget void widgetActivated(ModuleBase_ModelWidget* theWidget); @@ -47,10 +85,18 @@ public slots: /// Activate the next from current widget in the property panel virtual void activateNextWidget() = 0; - // Makes the given widget active, highlights it and removes - // highlighting from the previous active widget - // emits widgetActivated(theWidget) signal + /** + * Makes the given widget active, highlights it and removes + * highlighting from the previous active widget + * emits widgetActivated(theWidget) signal + * \param theWidget which has to be activated + */ virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0; + +protected: + + /// Flag which shows that current operation is in editing mode + bool myIsEditing; }; #endif \ No newline at end of file