X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetEditor.h;h=049188026867a320f4b08caff602ebfb513dbe02;hb=1490e92974d2c0bdcdbecd6fa9388e31dccfa363;hp=c992e60f9c406f9aed6fcb823c9f980c05449abc;hpb=72cb66f9c09b0f8fa224f6f8ab43548658015b49;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetEditor.h b/src/ModuleBase/ModuleBase_WidgetEditor.h index c992e60f9..049188026 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,14 +41,20 @@ Q_OBJECT /// \return the state whether the widget can accept the focus virtual bool focusTo(); - /// Creates an editor for the real value and set the new value to the feature - /// \param theFeature the model feature - /// \param theAttribute the feature attribute - static void editFeatureValue(FeaturePtr theFeature, const std::string theAttribute); + /// 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); - private slots: - /// Shous popup window under cursor for data editing - void showPopupEditor(); + void setCursorPosition(const int theX, const int theY); + +private: + /// 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 @@ -58,6 +62,8 @@ Q_OBJECT ///< the kinds of possible features QStringList myFeatureKinds; + + int myXPosition, myYPosition; }; #endif