-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsoledock.h
69 lines (56 loc) · 1.64 KB
/
consoledock.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
#ifndef CONSOLEDOCK_H
#define CONSOLEDOCK_H
#include <QDockWidget>
#include <QPlainTextEdit>
#include <QTabWidget>
#include <QProcess>
/**
* @brief The ConsoleDock class defines the dock that shows console output
*/
class ConsoleDock : public QDockWidget
{
Q_OBJECT
public:
const Qt::DockWidgetArea defaultArea = Qt::BottomDockWidgetArea;
enum ConsoleTab {Parsing, LTSCreation, Verification};
/**
* @brief ConsoleDock Constructor
* @param parent The parent of this widget
*/
explicit ConsoleDock(QWidget *parent);
/**
* @brief setConsoleTab Set which tab should be visible
* @param tab The tab to make visible
*/
void setConsoleTab(ConsoleTab tab);
/**
* @brief writeToConsole Write something to the console
* @param tab Which console tab to write to
* @param output What to write
*/
void writeToConsole(ConsoleTab tab, QString output);
public slots:
/**
* @brief logToConsole Write output in the parsing console
*/
void logToParsingConsole();
/**
* @brief logToConsole Write output in the LTS creation console
*/
void logToLTSCreationConsole();
/**
* @brief logToConsole Write output in the verification console
*/
void logToVerificationConsole();
private:
QTabWidget *consoleTabs;
QPlainTextEdit *parsingConsole;
QPlainTextEdit *LTSCreationConsole;
QPlainTextEdit *verificationConsole;
/**
* @brief logToConsole Write output in the console
* @param tab Which console tab to write to
*/
void logToConsole(QPlainTextEdit *console, QProcess *process);
};
#endif // CONSOLEDOCK_H