1 | #ifndef MAINWINDOW_H |
---|
2 | #define MAINWINDOW_H |
---|
3 | |
---|
4 | #define PROTOCOL "command:" |
---|
5 | #define ENVIRONMENT "OGLOGFILE,boot" |
---|
6 | //#define ENVIRONMENT "OGIP,OGSERVER,OGLOG" |
---|
7 | |
---|
8 | #include <QWidget> |
---|
9 | #include <QProcess> |
---|
10 | #include <QMap> |
---|
11 | #include <QMainWindow> |
---|
12 | |
---|
13 | class QWebView; |
---|
14 | class QTextEdit; |
---|
15 | class QVBoxLayout; |
---|
16 | class QProcess; |
---|
17 | class QStringList; |
---|
18 | class QString; |
---|
19 | class QUrl; |
---|
20 | class QFile; |
---|
21 | class QTextStream; |
---|
22 | class QTermWidget; |
---|
23 | class QProgressBar; |
---|
24 | class QLineEdit; |
---|
25 | |
---|
26 | class MainWindow : public QMainWindow |
---|
27 | { |
---|
28 | Q_OBJECT |
---|
29 | |
---|
30 | public: |
---|
31 | MainWindow(QWidget *parent = 0); |
---|
32 | ~MainWindow(); |
---|
33 | |
---|
34 | public slots: |
---|
35 | // Funcion que maneja los links |
---|
36 | void slotLinkHandle(const QUrl& url); |
---|
37 | void slotWebLoadStarted(); |
---|
38 | void slotWebLoadFinished(bool ok); |
---|
39 | void slotWebLoadProgress(int progress); |
---|
40 | |
---|
41 | // Funciones que manejan cada vez que el proceso hace algo |
---|
42 | void slotProcessStarted(); |
---|
43 | void slotProcessFinished(int code,QProcess::ExitStatus status); |
---|
44 | void slotProcessError(QProcess::ProcessError error); |
---|
45 | void slotProcessOutput(); |
---|
46 | void slotProcessErrorOutput(); |
---|
47 | |
---|
48 | // Funcion para crear terminales |
---|
49 | void slotCreateTerminal(); |
---|
50 | void slotDeleteTerminal(); |
---|
51 | |
---|
52 | // Funcion para el webar |
---|
53 | void slotWebBarReturnPressed(); |
---|
54 | void slotUrlChanged(const QUrl &url); |
---|
55 | |
---|
56 | //Functions |
---|
57 | protected: |
---|
58 | int readEnvironmentValues(); |
---|
59 | void print(QString s); |
---|
60 | void captureOutputForStatusBar(QString output); |
---|
61 | void startProgressBar(); |
---|
62 | void finishProgressBar(); |
---|
63 | |
---|
64 | |
---|
65 | protected: |
---|
66 | QWebView *m_web; |
---|
67 | QTextEdit *m_output; |
---|
68 | QProgressBar *m_progressBar; |
---|
69 | QTabWidget *m_tabs; |
---|
70 | QLineEdit *m_webBar; |
---|
71 | |
---|
72 | QProcess *m_process; |
---|
73 | |
---|
74 | QMap<QString,QString> m_env; |
---|
75 | QFile *m_logfile; |
---|
76 | QTextStream *m_logstream; |
---|
77 | |
---|
78 | int m_numberTerminal; |
---|
79 | }; |
---|
80 | |
---|
81 | #endif // MAINWINDOW_H |
---|