-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmainwindow.h
44 lines (39 loc) · 1018 Bytes
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonValue>
#include <QSettings>
#include <QProcess>
#include <QDir>
#include <QTimer>
#include <swiftbot.h>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
void setModules( const QJsonArray& modules );
bool isModuleRunning( const QString& module ) {
QString lockname( QDir::temp().absoluteFilePath( QString("swift-"+module+".lock") ));
return QFile::exists( lockname );
}
public slots:
void updateModulesStatus();
private slots:
void on_pushButton_clicked();
protected:
void closeEvent(QCloseEvent *event);
private:
QProcess * process;
Ui::MainWindow *ui;
QMap<quint32, QSharedPointer<QSettings>> _settings_files;
Wamp::Session * session;
};
#endif // MAINWINDOW_H