#include <QValidator>
+class QStringListModel;
+class QCompleter;
+
/**
* \ingroup GUI
* An extension of a double spin box which let to use parameters and expressions for value definition
\param thePrecision a precision of values display
*/
explicit ModuleBase_ParamSpinBox( QWidget* theParent = 0, int thePrecision = -12 );
+
+ /// Set list of completion strings
+ void setCompletionList(QStringList&);
+
virtual ~ModuleBase_ParamSpinBox();
virtual void stepBy(int);
/// Returns True if the input value contains variable
bool hasVariable() const;
- protected:
+protected:
/// Returns True if the given text contains variable
/// \param theText a text string
bool hasVariable(const QString& theText) 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. Rreturns true in success
+ /// Finds a variable by its name. Returns true in success
/// \param theName a name of variable
- /// \param outValue an output val;ue of the variable
+ /// \param outValue an output value of the variable
bool findVariable(const QString& theName, double& outValue) const;
protected:
QString myTextValue;
bool myAcceptVariables;
+
+ QStringListModel* myCompleterModel;
+ QCompleter* myCompleter;
};
#endif