-
Notifications
You must be signed in to change notification settings - Fork 1
/
cfindwindow.h
108 lines (65 loc) · 2.26 KB
/
cfindwindow.h
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**************************************************************************
Copyright (C) 2011 Claudio Cannatà.
This file is part of Magnum.
Magnum is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Magnum is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Magnum. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/
#ifndef CFINDWINDOW_H
#define CFINDWINDOW_H
#include <QtGui>
#include "cdocument.h"
class CFindWindow_Thread;
class CFindWindow_ListItem;
class CFindWindow : public QDockWidget {
Q_OBJECT
friend class CFindWindow_Thread;
protected:
QLineEdit m_whatLine;
QListWidget m_resultsView;
CDocument* m_target;
CFindWindow_Thread* m_searchThread;
QLabel m_searchInProgress;
QMovie m_searchInProgressMovie;
public:
CFindWindow(QWidget* );
~CFindWindow();
void setTargetDocument( CDocument* );
CDocument* targetDocument();
void focusFind( QString text = QString() );
signals:
void clearList();
void goTo(CDocument* target , int nline );
public slots:
void resultItemDClicked( QListWidgetItem* );
void loadMovie(bool on);
void whatChanged( const QString& );
};
class CFindWindow_ListItem : public QListWidgetItem {
public:
CDocument* m_document;
int m_lineNumber;
CFindWindow_ListItem(QListWidget * parent = 0, int type = Type);
~CFindWindow_ListItem();
};
class CFindWindow_Thread : public QThread {
Q_OBJECT
protected:
CFindWindow* m_findWindow;
public:
bool m_forceStopSearch;
CFindWindow_Thread( CFindWindow* wnd );
void waitForSearchStop();
void nth_run();
void run();
signals:
void loadMovie(bool on);
};
#endif // CFINDWINDOW_H