openmw-tes3coop/apps/browser/MainWindow.hpp

46 lines
1.1 KiB
C++
Raw Normal View History

2017-01-11 14:04:53 +00:00
//
// Created by koncord on 06.01.17.
//
#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:
2017-01-12 02:46:48 +00:00
explicit MainWindow(QWidget *parent = 0);
virtual ~MainWindow();
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(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 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