| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef _SEARCHBAR_H |
| 20 |
#define _SEARCHBAR_H |
| 21 |
|
| 22 |
#include <QRegExp> |
| 23 |
|
| 24 |
#include "ui_SearchBar.h" |
| 25 |
#include "HistorySearch.h" |
| 26 |
|
| 27 |
class SearchBar : public QWidget { |
| 28 |
Q_OBJECT |
| 29 |
public: |
| 30 |
SearchBar(QWidget* parent = nullptr); |
| 31 |
~SearchBar() override; |
| 32 |
virtual void show(); |
| 33 |
QString searchText(); |
| 34 |
bool useRegularExpression(); |
| 35 |
bool matchCase(); |
| 36 |
bool highlightAllMatches(); |
| 37 |
|
| 38 |
public slots: |
| 39 |
void noMatchFound(); |
| 40 |
|
| 41 |
signals: |
| 42 |
void searchCriteriaChanged(); |
| 43 |
void highlightMatchesChanged(bool highlightMatches); |
| 44 |
void findNext(); |
| 45 |
void findPrevious(); |
| 46 |
|
| 47 |
protected: |
| 48 |
void keyReleaseEvent(QKeyEvent* keyEvent) override; |
| 49 |
|
| 50 |
private slots: |
| 51 |
void clearBackgroundColor(); |
| 52 |
|
| 53 |
private: |
| 54 |
Ui::SearchBar widget; |
| 55 |
QAction *m_matchCaseMenuEntry; |
| 56 |
QAction *m_useRegularExpressionMenuEntry; |
| 57 |
QAction *m_highlightMatchesMenuEntry; |
| 58 |
}; |
| 59 |
|
| 60 |
#endif |