Salome HOME
1. Correction for perfomance problem by Apply button state update: do not listen...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetExprEditor.h
index 39ae9823546f07afd09c1960fe7ba6dd70f21c37..ef04f238603f630a194ba093bfc0486e43590934 100644 (file)
@@ -54,6 +54,18 @@ class ExpressionEditor: public QPlainTextEdit
   /// Perform completion
   void performCompletion();
 
+  /// A slot for processing text changed event
+  void onTextChanged();
+
+signals:
+  /// The signal about text change in the text editor
+  void valueModified();
+
+  /// 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(QObject* theObject, QKeyEvent* theEvent);
+
  protected:
   /// Perform completion by prefix
   /// \param theCompletionPrefix a prefix for looking for completion
@@ -70,7 +82,7 @@ class ExpressionEditor: public QPlainTextEdit
   /// Redefinition of virtual method
   virtual void paintEvent( QPaintEvent* );
 
- private:
+private:
   QStringListModel* myCompleterModel;
   QCompleter* myCompleter;
   bool myCompletedAndSelected;
@@ -92,21 +104,29 @@ class MODULEBASE_EXPORT ModuleBase_WidgetExprEditor : public ModuleBase_ModelWid
   /// \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;
 
- public slots:
-   /// A slot for processing text changed event
+  /// Returns true if the event is processed.
+  virtual bool processEnter();
+
+protected slots:
+  /// A slot for processing text changed event
   void onTextChanged();
 
 protected:
+  /// Do not initialize value on the widget activation
+  virtual void initializeValueByActivate();
+
   /// 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();