summaryrefslogtreecommitdiff
path: root/src/filterwidget.h
blob: 07e216f1169648994000c5a61857f09dd863265a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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