]> git.cworth.org Git - apitrace/blob - gui/searchwidget.h
Add a search widget and fix go to.
[apitrace] / gui / searchwidget.h
1 #ifndef SEARCHWIDGET_H
2 #define SEARCHWIDGET_H
3
4 #include "ui_searchwidget.h"
5 #include <QPalette>
6 #include <QWidget>
7
8 class QShowEvent;
9
10 class SearchWidget : public QWidget
11 {
12     Q_OBJECT
13 public:
14     SearchWidget(QWidget *parent=0);
15
16     void setFound(bool f);
17 signals:
18     void searchNext(const QString &str, Qt::CaseSensitivity cs = Qt::CaseInsensitive);
19     void searchPrev(const QString &str, Qt::CaseSensitivity cs = Qt::CaseInsensitive);
20
21 private slots:
22     void slotSearchNext();
23     void slotSearchPrev();
24     void slotCancel();
25
26 protected:
27     virtual bool eventFilter(QObject *object, QEvent* event);
28     virtual void showEvent(QShowEvent *event);
29
30 private:
31     Qt::CaseSensitivity caseSensitivity() const;
32 private:
33     Ui_SearchWidget m_ui;
34     QPalette m_origPalette;
35 };
36
37 #endif