Salome HOME
#1150 Tab buttons problems
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetEditor.h
index 9f9358fae049cc2dae451cc1d2ef849ac2f55989..063dd2b2b33d56ddf980e940fadcb8662f0ecb55 100644 (file)
@@ -25,15 +25,14 @@ class MODULEBASE_EXPORT ModuleBase_WidgetEditor : public ModuleBase_WidgetDouble
 Q_OBJECT
  public:
   /// Constructor
-  /// \theParent the parent object
-  /// \theParent the parent object
-  /// \theData the widget configuation. The attribute of the model widget is obtained from
+  /// \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);
   /// Constructor
-  /// \theParent the parent object
-  /// \theParent the parent object
-  /// \theData the widget configuation. The attribute of the model widget is obtained from
+  /// \param theParent the parent object
+  /// \param theAttribute The attribute of the model widget
   ModuleBase_WidgetEditor(QWidget* theParent, const std::string& theAttribute);
 
   /// Destructor
@@ -44,18 +43,29 @@ 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
+  void 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);
+
+//protected slots:
+  //void onEnterPressed();
+
+private:
+   void editedValue(double& outValue, QString& outText);
 
  private:
-  FeaturePtr myFeature;  ///< the current widget feature
-  QStringList myFeatureKinds;  ///< the kinds of possible features
+   ///< the current widget feature
+   FeaturePtr myFeature;  
+
+   ///< the kinds of possible features
+   QStringList myFeatureKinds;  
+
+   //bool myIsEnterPressedEmitted;
+
+   int myXPosition, myYPosition;
 };
 
 #endif