X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetEditor.h;h=51d7eff6095781c08fcc254a43c4fcb298bdf3d6;hb=3e6012473696e5fd94e3c8240e2e1eda8def1743;hp=063dd2b2b33d56ddf980e940fadcb8662f0ecb55;hpb=df51e63f5d87b0c8fa46f5cda0c7c92aad5da888;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.h b/src/ModuleBase/ModuleBase_WidgetEditor.h index 063dd2b2b..51d7eff60 100644 --- a/src/ModuleBase/ModuleBase_WidgetEditor.h +++ b/src/ModuleBase/ModuleBase_WidgetEditor.h @@ -27,9 +27,7 @@ Q_OBJECT /// Constructor /// \param theParent the parent object /// \param theData the widget configuation. The attribute of the model widget is obtained from - /// \param theParentId is Id of a parent of the current attribute - ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData, - const std::string& theParentId); + ModuleBase_WidgetEditor(QWidget* theParent, const Config_WidgetAPI* theData); /// Constructor /// \param theParent the parent object /// \param theAttribute The attribute of the model widget @@ -38,7 +36,8 @@ Q_OBJECT /// Destructor virtual ~ModuleBase_WidgetEditor(); - /// Set focus to the first control of the current widget. The focus policy of the control is checked. + /// Set focus to the first control of the current widget. + /// The focus policy of the control is checked. /// If the widget has the NonFocus focus policy, it is skipped. /// \return the state whether the widget can accept the focus virtual bool focusTo(); @@ -46,24 +45,27 @@ Q_OBJECT /// Shous popup window under cursor for data editing /// \param theSendSignals a flag whether the signals should be sent or the value /// is to be applyed directly - void showPopupEditor(const bool theSendSignals = true); + /// \return true if the editor value is accepted + bool showPopupEditor(const bool theSendSignals = true); + /// Set current cursor position + /// \param theX the X coordinate + /// \param theY the Y coordinate void setCursorPosition(const int theX, const int theY); -//protected slots: - //void onEnterPressed(); - private: - void editedValue(double& outValue, QString& outText); + /// Show editor + /// \param theOutValue a result value + /// \param theOutText a result text + /// \return true if the editor value is accepted + bool editedValue(double& theOutValue, QString& theOutText); private: ///< the current widget feature - FeaturePtr myFeature; + FeaturePtr myFeature; ///< the kinds of possible features - QStringList myFeatureKinds; - - //bool myIsEnterPressedEmitted; + QStringList myFeatureKinds; int myXPosition, myYPosition; };