1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 12:20:41 +00:00
OpenMW/apps/launcher/maindialog.hpp

68 lines
1.4 KiB
C++
Raw Normal View History

2011-04-07 22:04:09 +00:00
#ifndef MAINDIALOG_H
#define MAINDIALOG_H
#include <QMainWindow>
2011-04-07 22:04:09 +00:00
#include <components/files/configurationmanager.hpp>
2011-09-27 07:45:28 +00:00
#include "settings/gamesettings.hpp"
#include "settings/graphicssettings.hpp"
#include "settings/launchersettings.hpp"
#include "ui_mainwindow.h"
2011-04-07 22:04:09 +00:00
class QListWidget;
class QListWidgetItem;
class QStackedWidget;
class QStringList;
2011-04-07 22:04:09 +00:00
class QStringListModel;
class QString;
2011-04-07 22:04:09 +00:00
class PlayPage;
class GraphicsPage;
2011-04-07 22:04:09 +00:00
class DataFilesPage;
class MainDialog : public QMainWindow, private Ui::MainWindow
2011-04-07 22:04:09 +00:00
{
Q_OBJECT
public:
MainDialog();
bool setup();
bool showFirstRunDialog();
2011-04-07 22:04:09 +00:00
public slots:
void changePage(QListWidgetItem *current, QListWidgetItem *previous);
void play();
2011-04-07 22:04:09 +00:00
private:
void createIcons();
void createPages();
bool setupLauncherSettings();
bool setupGameSettings();
bool setupGraphicsSettings();
void loadSettings();
void saveSettings();
bool writeSettings();
inline bool startProgram(const QString &name, bool detached = false) { return startProgram(name, QStringList(), detached); }
bool startProgram(const QString &name, const QStringList &arguments, bool detached = false);
void closeEvent(QCloseEvent *event);
2011-04-07 22:04:09 +00:00
PlayPage *mPlayPage;
GraphicsPage *mGraphicsPage;
2011-04-07 22:04:09 +00:00
DataFilesPage *mDataFilesPage;
Files::ConfigurationManager mCfgMgr;
GameSettings mGameSettings;
GraphicsSettings mGraphicsSettings;
LauncherSettings mLauncherSettings;
2011-04-07 22:04:09 +00:00
};
#endif