fancylineedit: enforce conscious choice between history or special completer

Change-Id: Ia667895b619d0bb37561dce348adb7269df2fb9c
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
hjk
2012-08-23 14:10:12 +02:00
parent ec6929434d
commit 903eeaf42f
6 changed files with 37 additions and 11 deletions

View File

@@ -94,6 +94,12 @@ public:
void setAutoHideButton(Side side, bool h);
bool hasAutoHideButton(Side side) const;
// Enable a history completer with a history of entries.
void setHistoryKey(const QString &historyKey);
// Sets a completer that is not a history completer.
void setSpecialCompleter(QCompleter *completer);
signals:
void buttonClicked(Utils::FancyLineEdit::Side side);
void leftButtonClicked();
@@ -107,6 +113,10 @@ protected:
virtual void resizeEvent(QResizeEvent *e);
private:
// Unimplemented, to force the user to make a decision on
// whether to use setHistoryKey() or setSpecialCompleter().
void setCompleter(QCompleter *);
void updateMargins();
void updateButtonPositions();
friend class Utils::FancyLineEditPrivate;