Salome HOME
Add ExchangeAPI, fillAttribute in ModelHighAPI_Tools, ModelHighAPI_Selection and...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetExprEditor.h
index 67d6453d64807eaf2d2cf00ce4eacc52b7dfb337..b542808f4e5b1ae99992e4da8bd51785e857bce6 100644 (file)
@@ -45,12 +45,6 @@ class ExpressionEditor: public QPlainTextEdit
   /// Returns placeholder list
   QString placeHolderText() const;
 
-  // Returns true if the current value is modified by has not been applyed yet
-  bool isModified() const;
-
-  // Clears modified state
-  void clearModified();
-
  public slots:
   /// Insert additional string for completion
   /// \param theCompletion a string to insert
@@ -64,14 +58,13 @@ class ExpressionEditor: public QPlainTextEdit
   void onTextChanged();
 
 signals:
+  /// The signal about text change in the text editor
   void valueModified();
-  /// A signal that is emitted by the "Tab" key event. It is emitted before the key is processed.
-  void valueStored();
-  void focusNextPrev();
 
   /// The signal about key release on the control, that corresponds to the attribute
+  /// \param theObject a sender of the event
   /// \param theEvent key release event
-  void keyReleased(QKeyEvent* theEvent);
+  void keyReleased(QObject* theObject, QKeyEvent* theEvent);
 
  protected:
   /// Perform completion by prefix
@@ -89,19 +82,11 @@ signals:
   /// Redefinition of virtual method
   virtual void paintEvent( QPaintEvent* );
 
-  /// The parent method that processes the "Tab"/"SHIF + Tab" keyboard events
-  /// Emits a signal about focus change
-  /// If theIsNext is true, this function searches forward, if next is false, it searches backward.
-  virtual bool focusNextPrevChild(bool theIsNext);
-
- private:
+private:
   QStringListModel* myCompleterModel;
   QCompleter* myCompleter;
   bool myCompletedAndSelected;
   QString myPlaceHolderText;
-
-  /// Boolean value whether the spin box content is modified
-  bool myIsModified;
 };
 
 /**
@@ -115,14 +100,15 @@ class MODULEBASE_EXPORT ModuleBase_WidgetExprEditor : public ModuleBase_ModelWid
   /// Constructor
   /// \param theParent the parent object
   /// \param theData the widget configuration.
-  /// \param theParentId is Id of a parent of the current attribute
   /// \param thePlaceHolder a placeholder string
   ModuleBase_WidgetExprEditor( QWidget* theParent,
                                const Config_WidgetAPI* theData,
-                               const std::string& theParentId,
                                const std::string& thePlaceHolder );
   virtual ~ModuleBase_WidgetExprEditor();
 
+  /// The methiod called when widget is activated
+  virtual void activateCustom();
+
   /// Redefinition of virtual method
   virtual QList<QWidget*> getControls() const;
 
@@ -139,7 +125,7 @@ protected:
 
   /// Saves the internal parameters to the given feature
   /// \return True in success
-  virtual bool storeValueCustom() const;
+  virtual bool storeValueCustom();
 
   /// Redefinition of virtual method
   virtual bool restoreValueCustom();