Debian Codegraph @

lib/SearchBar.h

raw symbols SCIP
1 /*
2 Copyright 2013 Christian Surlykke
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301 USA.
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 /* _SEARCHBAR_H */