Quark  0.1
FindPanel.h++
Go to the documentation of this file.
1 #ifndef __libquark_gui_FindPanel_hxx
2 #define __libquark_gui_FindPanel_hxx
3 
4 #include <QColor>
5 #include <QScopedPointer>
6 #include <QWidget>
7 
8 #include <quark/Quark.h++>
9 
10 namespace quark {
11 namespace gui {
12 
13 class Ui_FindPanel;
14 
22 class LIBQUARK_API FindPanel : public QWidget
23 {
24  Q_OBJECT;
25 
26  public:
27 
29  FindPanel(QWidget *parent = NULL);
30 
32  virtual ~FindPanel();
33 
34  signals:
35 
45  void find(const QString &text, bool caseSensitive, bool forward);
46 
52  void findTextChanged(const QString &text);
53 
54  public slots:
55 
57  void setEnabled(bool enabled);
58 
66  void setFindStatus(bool found);
67 
69  void focusTextField();
70 
72  void selectText();
73 
74  private slots:
75 
76  void next();
77  void previous();
78  void acceptText();
79  void changeText(const QString &text);
80 
81  private:
82 
83  QScopedPointer<Ui_FindPanel> _ui;
84  QColor _notFoundColor;
85  QColor _defaultTextFieldColor;
86  QString _findText;
87  bool _findBackward;
88 };
89 
90 } // namespace gui
91 } // namespace quark
92 
93 #endif // __libquark_gui_FindPanel_hxx
Definition: BarChartView.h++:6
A widget that provides a UI for doing forward and backward searches in a document.
Definition: FindPanel.h++:22
#define LIBQUARK_API
Definition: Quark.h++:18