SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MainWindow.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #ifndef MAINWINDOW_H
9 #define MAINWINDOW_H
10 
11 #include <QtWidgets/QMainWindow>
12 
13 #include <QComboBox>
14 #include <QProcess>
15 #include <QSettings>
16 
17 namespace Ui {
18 class MainWindow;
19 }
20 
21 class MainWindow : public QMainWindow
22 {
23  Q_OBJECT
24 
25 public:
26  explicit MainWindow(QWidget *parent = 0);
27  ~MainWindow();
28 
29  void selectionsFromCfg(QString sel);
30 
31 protected:
32  void changeEvent(QEvent *e);
33  void updateState();
34 
35  bool selectAddressOrReportFailure(QComboBox *cmb, QString v, bool failedPreviously);
36 private slots:
37  void on_loadConfigFile_clicked();
38 
39  void on_saveConfigFile_clicked();
40 
41  void on_startServerBtn_clicked();
42 
43  void on_stopServerBtn_clicked();
44 
45  void onServerDone(int retcode);
46  void onServerStarted();
47  void on_selectServerExePath_clicked();
48 
49  void onServerError(QProcess::ProcessError);
50  void readyReadStandardOutput();
51  void readyReadStandardError();
52 private:
53  Ui::MainWindow *ui;
54  QProcess *m_server_process;
55  QString m_selected_config_file;
56  QSettings *m_loaded_server_settings;
57  QString m_last_config_path;
58  QString m_server_executable;
59 };
60 
61 #endif // MAINWINDOW_H
~MainWindow()
Definition: MainWindow.cpp:81
void selectionsFromCfg(QString sel)
Definition: MainWindow.cpp:129
void changeEvent(QEvent *e)
Definition: MainWindow.cpp:87
bool selectAddressOrReportFailure(QComboBox *cmb, QString v, bool failedPreviously)
Definition: MainWindow.cpp:115
MainWindow(QWidget *parent=0)
Definition: MainWindow.cpp:23
void updateState()
Definition: MainWindow.cpp:99
Definition: MainWindow.h:21