1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 19:19:55 +00:00
openmw-tes3mp/apps/browser/MainWindow.hpp

43 lines
1.1 KiB
C++
Raw Normal View History

2017-01-11 14:04:53 +00:00
#ifndef NEWLAUNCHER_MAIN_HPP
#define NEWLAUNCHER_MAIN_HPP
#include "ui_Main.h"
#include "ServerModel.hpp"
2017-01-29 23:17:21 +00:00
#include "MySortFilterProxyModel.hpp"
2017-01-11 14:04:53 +00:00
#include <components/process/processinvoker.hpp>
class QueryHelper;
2017-01-12 02:46:48 +00:00
class MainWindow : public QMainWindow, private Ui::MainWindow
2017-01-11 14:04:53 +00:00
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow() override;
2017-01-11 14:04:53 +00:00
protected:
2017-01-22 07:09:17 +00:00
void closeEvent(QCloseEvent * event) Q_DECL_OVERRIDE;
void addServerAndUpdate(const QString &addr);
2017-01-11 14:04:53 +00:00
protected slots:
void tabSwitched(int index);
void addServer();
void addServerByIP();
void deleteServer();
void play();
void serverSelected();
void notFullSwitch(bool state);
2017-01-29 23:17:21 +00:00
void havePlayersSwitch(bool state);
void noPasswordSwitch(bool state);
2017-01-29 23:17:21 +00:00
void maxLatencyChanged(int index);
void gamemodeChanged(const QString &text);
2017-01-11 14:04:53 +00:00
private:
QueryHelper *queryHelper;
2017-01-11 14:04:53 +00:00
Process::ProcessInvoker *mGameInvoker;
ServerModel *browser, *favorites;
2017-01-29 23:17:21 +00:00
MySortFilterProxyModel *proxyModel;
2017-01-22 07:59:00 +00:00
void loadFavorites();
2017-01-11 14:04:53 +00:00
};
#endif //NEWLAUNCHER_MAIN_HPP