source: ogBrowser-Git/qtermwidget/lib/SearchBar.h

jenkins
Last change on this file was fedf2a2, checked in by Vadim Troshchinskiy Shmelev <vtroshchinskiy@…>, 18 months ago

Update Qtermwidget to Qt6 version
Remove build files

  • Property mode set to 100644
File size: 1.7 KB
Line 
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 "ui_SearchBar.h"
23#include "HistorySearch.h"
24
25#if QT_VERSION < 0x060000
26#include <QRegExp>
27#else
28#include <QRegularExpression>
29#endif
30
31class SearchBar : public QWidget {
32    Q_OBJECT
33public:
34    SearchBar(QWidget* parent = nullptr);
35    ~SearchBar() override;
36    virtual void show();
37    QString searchText();
38    bool useRegularExpression();
39    bool matchCase();
40    bool highlightAllMatches();
41
42public slots:
43    void noMatchFound();
44    void hide();
45
46signals:
47    void searchCriteriaChanged();
48    void highlightMatchesChanged(bool highlightMatches);
49    void findNext();
50    void findPrevious();
51
52protected:
53    void keyReleaseEvent(QKeyEvent* keyEvent) override;
54
55private slots:
56    void clearBackgroundColor();
57
58private:
59    Ui::SearchBar widget;
60    QAction *m_matchCaseMenuEntry;
61    QAction *m_useRegularExpressionMenuEntry;
62    QAction *m_highlightMatchesMenuEntry;
63};
64
65#endif  /* _SEARCHBAR_H */
Note: See TracBrowser for help on using the repository browser.