+ /// Returns True if the given text contains variable
+ /// \param theText a text string
+ bool hasVariable(const QString& theText) const;
+
+// /// Returns state of the control
+// State isValid(const QString&, double&) const;
+//
+// /// Returns True if the given value is within min and max of the control
+// bool checkRange(const double) const;
+//
+// /// Finds a variable by its name. Returns true in success
+// /// \param theName a name of variable
+// /// \param outValue an output value of the variable
+// bool findVariable(const QString& theName, double& outValue) const;
+
+signals:
+ void textChanged(const QString&);
+
+// protected:
+// virtual void showEvent(QShowEvent*);
+//
+// protected slots:
+// /// A slot called on text change
+// void onTextChanged(const QString&);
+//
+// private:
+// void connectSignalsAndSlots();
+
+private slots:
+ void insertCompletion(const QString&);
+
+ void onTextChanged(const QString&);
+
+private:
+ QString getPrefix(int& theStart, int& theEnd) const;
+ void showCompletion(bool checkPrefix);
+
+ bool myIsEquation;