summaryrefslogtreecommitdiff
path: root/src/filterwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/filterwidget.h')
-rw-r--r--src/filterwidget.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/filterwidget.h b/src/filterwidget.h
new file mode 100644
index 00000000..07e216f1
--- /dev/null
+++ b/src/filterwidget.h
@@ -0,0 +1,27 @@
+#ifndef FILTERWIDGET_H
+#define FILTERWIDGET_H
+
+class FilterWidget
+{
+public:
+ FilterWidget();
+
+ void set(QLineEdit* edit);
+ void buddy(QWidget* w);
+
+ void clear();
+
+private:
+ QLineEdit* m_edit;
+ QToolButton* m_clear;
+ QWidget* m_buddy;
+
+ void createClear();
+ void hookEvents();
+ void repositionClearButton();
+
+ void onTextChanged();
+ void onResized();
+};
+
+#endif // FILTERWIDGET_H