Salome HOME
Issue #2079 : Select parent feature for default Constructions. Disable popup menu...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetEditor.h
index db9dd1cc422f65dbef5030a98a11c92daeadd860..51d7eff6095781c08fcc254a43c4fcb298bdf3d6 100644 (file)
@@ -36,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();
@@ -44,19 +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);
 
 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;  
+   QStringList myFeatureKinds;
 
    int myXPosition, myYPosition;
 };