forked from manyoso/qt-creator-terminalplugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfindsupport.h
More file actions
54 lines (41 loc) · 1.46 KB
/
Copy pathfindsupport.h
File metadata and controls
54 lines (41 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Copyright (C) 2017 Francois Ferrand. All rights reserved.
*/
#ifndef FINDSUPPORT_H
#define FINDSUPPORT_H
#include <coreplugin/find/ifindsupport.h>
QT_FORWARD_DECLARE_CLASS(QAction)
QT_FORWARD_DECLARE_CLASS(QLineEdit)
QT_FORWARD_DECLARE_CLASS(QTermWidget)
QT_FORWARD_DECLARE_CLASS(QToolButton)
namespace Terminal {
namespace Internal {
class FindSupport : public Core::IFindSupport
{
Q_OBJECT
public:
FindSupport(QTermWidget * termWidget);
virtual bool supportsReplace() const override;
virtual Core::FindFlags supportedFindFlags() const override;
virtual QString currentFindString() const override;
virtual QString completedFindString() const override;
virtual void clearHighlights() override;
virtual void highlightAll(const QString &txt, Core::FindFlags findFlags) override;
virtual void resetIncrementalSearch() override;
virtual Result findIncremental(const QString &txt, Core::FindFlags findFlags) override;
virtual Result findStep(const QString &txt, Core::FindFlags findFlags) override;
public slots:
void setTerminal(QTermWidget * termWidget);
private:
void setupSearch(const QString &txt, Core::FindFlags findFlags);
QLineEdit * m_textEdit;
QToolButton * m_findPreviousButton;
QToolButton * m_findNextButton;
QAction * m_matchCaseAction;
QAction * m_regexpAction;
QAction * m_highlightAllAction;
Result m_result;
};
} // namespace Internal
} // namespace Terminal
#endif // FINDSUPPORT_H