blob: 005e0e5f3c2fc7ad4df26e65f92b6891f5bd51cc (
plain)
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
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#define COMMAND "command:"
#define COMMAND_WITH_CONFIRMATION "commandwithconfirmation:"
#define ENVIRONMENT "OGLOGFILE,boot"
//#define ENVIRONMENT "OGIP,OGSERVER,OGLOG"
#include <QWidget>
#include <QProcess>
#include <QMap>
#include <QMainWindow>
class QWebView;
class QTextEdit;
class QVBoxLayout;
class QProcess;
class QStringList;
class QString;
class QUrl;
class QFile;
class QTextStream;
class QTermWidget;
class QProgressBar;
class QLineEdit;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
// Funcion que maneja los links
void slotLinkHandle(const QUrl& url);
void slotWebLoadStarted();
void slotWebLoadFinished(bool ok);
void slotWebLoadProgress(int progress);
// Funciones que manejan cada vez que el proceso hace algo
void slotProcessStarted();
void slotProcessFinished(int code,QProcess::ExitStatus status);
void slotProcessError(QProcess::ProcessError error);
void slotProcessOutput();
void slotProcessErrorOutput();
// Funcion para crear terminales
void slotCreateTerminal();
void slotDeleteTerminal();
// Funcion para el webar
void slotWebBarReturnPressed();
void slotUrlChanged(const QUrl &url);
//Functions
protected:
int readEnvironmentValues();
void print(QString s);
void captureOutputForStatusBar(QString output);
void startProgressBar();
void finishProgressBar();
void executeCommand(QString &string);
protected:
QWebView *m_web;
QTextEdit *m_output;
QProgressBar *m_progressBar;
QTabWidget *m_tabs;
QLineEdit *m_webBar;
QProcess *m_process;
QMap<QString,QString> m_env;
QFile *m_logfile;
QTextStream *m_logstream;
int m_numberTerminal;
};
#endif // MAINWINDOW_H
|