X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IPropertyPanel.h;h=f463cefbed9bf7fd657e2eecc3d90455d9859da9;hb=811681738727583c29043cd55903fb71cec19038;hp=12c96548e6a11cd27ed5b1be4152303d9a3b63dd;hpb=1a0d48211014d96db9125fe973eacbae895c4490;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IPropertyPanel.h b/src/ModuleBase/ModuleBase_IPropertyPanel.h index 12c96548e..f463cefbe 100644 --- a/src/ModuleBase/ModuleBase_IPropertyPanel.h +++ b/src/ModuleBase/ModuleBase_IPropertyPanel.h @@ -29,6 +29,9 @@ public: /// \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; @@ -45,6 +48,9 @@ public: /// \return State of editing mode flag bool isEditingMode() const { return myIsEditing; } + /// Set focus on the Ok button + virtual void setFocusOnOkButton() = 0; + /// Set Enable/Disable state of Cancel button /// \param theEnabled Enable/Disable state of Cancel button virtual void setCancelEnabled(bool theEnabled) = 0; @@ -58,10 +64,20 @@ public: /// Sets widget processed by preselection virtual void setPreselectionWidget(ModuleBase_ModelWidget* theWidget) = 0; + /// Returns the first widget, where canAcceptFocus returns true + /// \return a widget or null + ModuleBase_ModelWidget* findFirstAcceptingValueWidget(); + + /// Returns the first widget, where canAcceptFocus returns true + /// \return a widget or null + static ModuleBase_ModelWidget* findFirstAcceptingValueWidget( + const QList& theWidgets); + signals: /// The signal about key release on the control, that corresponds to the attribute + /// \param theObject a sender of the event /// \param theEvent key release event - void keyReleased(QKeyEvent* theEvent); + void keyReleased(QObject* theObject, QKeyEvent* theEvent); /// The signal about the widget activation /// \param theWidget the activated widget @@ -72,7 +88,8 @@ signals: void widgetActivated(ModuleBase_ModelWidget* theWidget); /// Emited when there is no next widget - void noMoreWidgets(); + /// \param thePreviousAttributeID an attribute key of the previous active widget + void noMoreWidgets(const std::string& thePreviousAttributeID); public slots: /// Activate the next widget in the property panel @@ -87,8 +104,10 @@ public slots: * highlighting from the previous active widget * emits widgetActivated(theWidget) signal * \param theWidget which has to be activated + * \param theEmitSignal a flag to prohibit signal emit */ - virtual void activateWidget(ModuleBase_ModelWidget* theWidget) = 0; + virtual void activateWidget(ModuleBase_ModelWidget* theWidget, + const bool theEmitSignal = true) = 0; protected: