diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-29 10:08:46 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-05-31 11:54:31 -0400 |
| commit | 98b3be3e9bbca73640842f6dadaa159dcec04f7b (patch) | |
| tree | 8da1d56ae5e737197172856eecec45e1a1728743 /src/filterwidget.h | |
| parent | 4d90e502266dfb886e1d089fb26780d19a38e5a7 (diff) | |
removed buddy from FilterWidget, the intention was to hook a ctrl+f shortcut to it, but that won't work as a general solution, it would need to be on tabs for the modinfo dialog
added a simple matches() that just searches for the string
FilterWidget can cleanly unhook itself
Diffstat (limited to 'src/filterwidget.h')
| -rw-r--r-- | src/filterwidget.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/filterwidget.h b/src/filterwidget.h index 07e216f1..ca731dc1 100644 --- a/src/filterwidget.h +++ b/src/filterwidget.h @@ -1,21 +1,27 @@ #ifndef FILTERWIDGET_H #define FILTERWIDGET_H +class EventFilter; + class FilterWidget { public: + std::function<void ()> changed; + FilterWidget(); void set(QLineEdit* edit); - void buddy(QWidget* w); - void clear(); + bool matches(const QString& s) const; + private: QLineEdit* m_edit; + EventFilter* m_eventFilter; QToolButton* m_clear; - QWidget* m_buddy; + QString m_text; + void unhook(); void createClear(); void hookEvents(); void repositionClearButton(); |
