blob: f59b4a0c2e85ce70546dfcda3ed1484a46834761 [file] [log] [blame]
Zack Rusinf04cf8a2011-04-12 23:21:52 -04001#ifndef SEARCHWIDGET_H
2#define SEARCHWIDGET_H
3
4#include "ui_searchwidget.h"
5#include <QPalette>
6#include <QWidget>
7
8class QShowEvent;
9
10class SearchWidget : public QWidget
11{
12 Q_OBJECT
13public:
14 SearchWidget(QWidget *parent=0);
15
16 void setFound(bool f);
Zack Rusinf54c4fc2011-04-12 23:39:13 -040017 void show();
Zack Rusinf04cf8a2011-04-12 23:21:52 -040018signals:
19 void searchNext(const QString &str, Qt::CaseSensitivity cs = Qt::CaseInsensitive);
20 void searchPrev(const QString &str, Qt::CaseSensitivity cs = Qt::CaseInsensitive);
21
22private slots:
23 void slotSearchNext();
24 void slotSearchPrev();
25 void slotCancel();
26
27protected:
28 virtual bool eventFilter(QObject *object, QEvent* event);
29 virtual void showEvent(QShowEvent *event);
30
31private:
32 Qt::CaseSensitivity caseSensitivity() const;
33private:
34 Ui_SearchWidget m_ui;
35 QPalette m_origPalette;
36};
37
38#endif