void setCompletionList(QStringList&);
+ void setPlaceHolderText( const QString& );
+ QString placeHolderText() const;
+
public slots:
void insertCompletion(const QString&, bool isSingleWord = false);
void performCompletion();
void performCompletion(const QString& theCompletionPrefix);
virtual void keyPressEvent(QKeyEvent* theEvent);
bool handledCompletedAndSelected(QKeyEvent* theEvent);
+ virtual void paintEvent( QPaintEvent* );
private:
QStringListModel* myCompleterModel;
QCompleter* myCompleter;
bool myCompletedAndSelected;
+ QString myPlaceHolderText;
};
/**
/// \param theParent the parent object
/// \param theData the widget configuration.
/// \param theParentId is Id of a parent of the current attribute
- ModuleBase_WidgetExprEditor(QWidget* theParent,
- const Config_WidgetAPI* theData,
- const std::string& theParentId);
+ ModuleBase_WidgetExprEditor( QWidget* theParent,
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId,
+ const std::string& thePlaceHolder );
virtual ~ModuleBase_WidgetExprEditor();
- virtual bool restoreValue();
-
virtual QList<QWidget*> getControls() const;
public slots:
/// \return True in success
virtual bool storeValueCustom() const;
+ virtual bool restoreValueCustom();
+
private:
/// A line edit control
QLabel* myResultLabel;