-
Notifications
You must be signed in to change notification settings - Fork 3
/
otherwindow.h
101 lines (83 loc) · 2.61 KB
/
otherwindow.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
#ifndef OTHERWINDOW_H
#define OTHERWINDOW_H
#include "weh.h"
#include "topbarwindow.h"
#include "bkeSci/bkemarks.h"
//打开文件视窗
class QToolBar;
class OtherWindow : public TopBarWindow
{
Q_OBJECT
public:
enum{
WIN_PROBLEM ,
WIN_SEARCH ,
WIN_COMPILE ,
WIN_BOOKMARK ,
WIN_MARK
};
OtherWindow(QWidget *parent = 0);
~OtherWindow();
private:
QPushButton *btnproblem ;
QPushButton *btnsearch ;
QPushButton *btncompiletext ;
QPushButton *btnbookmark ;
QPushButton *btnmark ;
QPushButton *btnruntimeproblem;
QLineEdit *lewords;
QStackedWidget *stackw ;
QListWidget *problemList ;
QListWidget *searchlist ;
QsciScintilla *compileedit ;
QListWidget *bookmarklist ;
QListWidget *marklist;
QListWidget *runtimeProblemList;
int ErrorCount(){ return errorcount ; }
void checkShow(QPushButton *btn,bool must = false) ;
public:
void feedDownBar(QToolBar *);
void setTextCount(int count);
void ClearSearch();
void AddSearchItem(const QString &label);
void SetProblemList(BkeMarkList *list, const QString &dir);
void SetCompileResult(const QString &label);
void RefreshBookMark(BkeMarkList *b);
void SetRuntimeProblemList(BkeMarkList *list, const QString &dir);
signals:
void Location(BkeMarkerBase *mark,const QString &prodir) ;
private slots:
void SearchDoubleClicked(QListWidgetItem * item);
void ProblemDoubleClicked(QListWidgetItem * item);
void BookMarkDoubleClicked(QListWidgetItem * item);
void MarkDoubleClicked(QListWidgetItem * item);
void RuntimeProblemDoubleClicked(QListWidgetItem * item);
public slots:
void switchToProblemWidget(bool force = false) ;
void switchToSearchWidget(bool force = false) ;
void switchToCompileWidget(bool force = false) ;
void switchToBookmarkWidget(bool force = false) ;
void switchToMarkWidget(bool force = false);
void switchToRuntimeProblemWidget(bool force = false);
void onSearchOne(const QString &file, const QString &fullfile, int line, int start, int end);
private:
QPushButton *lastbtn ;
int errorcount ;
int runtimeerrorcount;
QIcon *icoerror ;
QIcon *icowarning;
QIcon *iconlog;
QIcon *icobookmark ;
QColor bc1 ;
QColor bc2 ;
BkeMarkList membookmark ;
BkeMarkList memmark ;
BkeMarkList memproblem;
BkeMarkList memruntimeproblem;
BkeMarkList memsearch;
QString problemdir;
QString runtimeproblemdir;
QHash<QPushButton*,QWidget*> emap ;
void AddItem(BkeMarkerBase *marker, QIcon *ico, QListWidget* w);
};
#endif // OTHERWINDOW_H