X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetEditor.h;h=d9c0671f7e3087e55ccd48cd0c29bb669faf5148;hb=d0e479afb535cd9d6542d53302428a5c8e99485f;hp=5f26a60cc1dae3b96841998102e6933eb81b719e;hpb=294813d123259625eac77f1f611eda3eb7479f17;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.h b/src/ModuleBase/ModuleBase_WidgetEditor.h index 5f26a60cc..d9c0671f7 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 @@ -43,11 +41,23 @@ Q_OBJECT /// \return the state whether the widget can accept the focus virtual bool focusTo(); - /// Shous popup window under cursor for data editing - void showPopupEditor(); + /// 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 + /// \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); 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 @@ -55,6 +65,8 @@ private: ///< the kinds of possible features QStringList myFeatureKinds; + + int myXPosition, myYPosition; }; #endif