SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
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 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md 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
Definition: DataPathsDialog.h:13
Definition: MainWindow.h:21