forked from alesapin/LSPL-IDE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
centralwidget.h
72 lines (67 loc) · 1.88 KB
/
centralwidget.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
#ifndef CENTRALWIDGET_H
#define CENTRALWIDGET_H
#include "Text/textbasicwidget.h"
#include "Patterns/patternsbasicwidget.h"
#include "Engine/patterncompiler.h"
#include "Matches/matchesbasicwidget.h"
#include <QMainWindow>
#include <QGridLayout>
#include <Interface/topmenu.h>
#include <QString>
#include <QFile>
#include <QMessageBox>
#include <QApplication>
#include <QCursor>
#include <QTextStream>
#include <QVector>
#include <QPushButton>
#include <QString>
#include <QSplitter>
#include <QTime>
#include <QtConcurrent/QtConcurrent>
#include <QFuture>
#include <QFutureWatcher>
#include "Interface/bottombar.h"
#include "Utils/xmlprocessor.h"
class TextBasicWidget;
class CentralWidget : public QWidget
{
Q_OBJECT
public:
static const QString CRASH_PATTERNS;
static const QString CRASH_TEXT;
explicit CentralWidget(QWidget *parent = 0);
~CentralWidget();
TextBasicWidget *getTextWidget();
PatternsBasicWidget *getPatternWidget();
MatchesBasicWidget *getMatchesWidget();
PatternCompiler *getPatternCompiler();
utility::XmlProcessor xml;
QStringList getChoosenPatterns();
void loadAfterCrash(const QString& textFileName, const QString& patternFileName);
void createBackup() const;
private:
PatternCompiler* compiler;
TextBasicWidget* txt;
PatternsBasicWidget* pattern;
MatchesBasicWidget* matches;
QFutureWatcher<QSharedPointer<PatternViewMap>>* watcher;
QTimer *timeoutTimer;
int timeOut;
static const int DEFAULT_TIMEOUT;
signals:
void statusReady();
void statusEngine();
void statusHighlighting();
void statusCompiling();
void statusCanceled();
public slots:
void slotAnalyze();
void slotDisplay();
void slotEdit();
void slotTimeout();
void slotProgress(int val);
void slotSaveLspl(const QString& filename);
void slotLoadLspl(const QString& filename);
};
#endif // CENTRALWIDGET_H