aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/coreplugin/locator/locatorwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/coreplugin/locator/locatorwidget.h')
-rw-r--r--src/plugins/coreplugin/locator/locatorwidget.h42
1 files changed, 35 insertions, 7 deletions
diff --git a/src/plugins/coreplugin/locator/locatorwidget.h b/src/plugins/coreplugin/locator/locatorwidget.h
index 8a053e135f..29fa810ea9 100644
--- a/src/plugins/coreplugin/locator/locatorwidget.h
+++ b/src/plugins/coreplugin/locator/locatorwidget.h
@@ -54,33 +54,40 @@ class LocatorWidget
public:
explicit LocatorWidget(Locator *locator);
- void updateFilterList();
-
void showText(const QString &text, int selectionStart = -1, int selectionLength = 0);
QString currentText() const;
+ QAbstractItemModel *model() const;
void updatePlaceholderText(Command *command);
-private:
+ void scheduleAcceptEntry(const QModelIndex &index);
+
+signals:
+ void showCurrentItemToolTip();
+ void hidePopup();
+ void selectRow(int row);
+ void handleKey(QKeyEvent *keyEvent); // only use with DirectConnection, event is deleted
+ void parentChanged();
void showPopup();
+
+private:
+ void showPopupDelayed();
void showPopupNow();
void acceptEntry(int row);
void showConfigureDialog();
void addSearchResults(int firstIndex, int endIndex);
void handleSearchFinished();
- void scheduleAcceptEntry(const QModelIndex &index);
void setFocusToCurrentMode();
+ void updateFilterList();
bool eventFilter(QObject *obj, QEvent *event);
- void showCompletionList();
void updateCompletionList(const QString &text);
QList<ILocatorFilter*> filtersFor(const QString &text, QString &searchText);
void setProgressIndicatorVisible(bool visible);
LocatorModel *m_locatorModel;
- CompletionList *m_completionList;
QMenu *m_filterMenu;
QAction *m_refreshAction;
QAction *m_configureAction;
@@ -93,9 +100,30 @@ private:
bool m_possibleToolTipRequest = false;
int m_rowRequestedForAccept = -1;
QWidget *m_progressIndicator;
- QPointer<QWidget> m_window;
QTimer m_showProgressTimer;
};
+class LocatorPopup : public QWidget
+{
+public:
+ LocatorPopup(LocatorWidget *locatorWidget, QWidget *parent = 0);
+
+ CompletionList *completionList() const;
+
+ void focusOutEvent (QFocusEvent *event) override;
+ void resize();
+ QSize preferredSize() const;
+ bool event(QEvent *event) override;
+ bool eventFilter(QObject *watched, QEvent *event) override;
+
+private:
+ void showPopup();
+
+ CompletionList *m_tree;
+ QSize m_preferredSize;
+ QPointer<QWidget> m_window;
+ void updateWindow();
+};
+
} // namespace Internal
} // namespace Core