blob: d10530327191012fa50484b8bee0ee4bd4c3e3b7 [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);
17signals:
18 void searchNext(const QString &str, Qt::CaseSensitivity cs = Qt::CaseInsensitive);
19 void searchPrev(const QString &str, Qt::CaseSensitivity cs = Qt::CaseInsensitive);
20
21private slots:
22 void slotSearchNext();
23 void slotSearchPrev();
24 void slotCancel();
25
26protected:
27 virtual bool eventFilter(QObject *object, QEvent* event);
28 virtual void showEvent(QShowEvent *event);
29
30private:
31 Qt::CaseSensitivity caseSensitivity() const;
32private:
33 Ui_SearchWidget m_ui;
34 QPalette m_origPalette;
35};
36
37#endif