2011-05-02 22:21:42 +02:00
|
|
|
#ifndef GRAPHICSPAGE_H
|
|
|
|
#define GRAPHICSPAGE_H
|
2011-04-24 21:42:56 +02:00
|
|
|
|
2011-05-02 22:21:42 +02:00
|
|
|
#include <QWidget>
|
|
|
|
|
2013-10-30 14:04:33 +01:00
|
|
|
#include <components/ogreinit/ogreinit.hpp>
|
|
|
|
|
2013-03-05 02:17:28 +01:00
|
|
|
#include "ui_graphicspage.h"
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2015-01-23 16:05:36 +01:00
|
|
|
namespace Ogre { class Root; class RenderSystem; }
|
2013-01-27 16:39:51 +01:00
|
|
|
|
2012-01-21 01:14:35 +01:00
|
|
|
namespace Files { struct ConfigurationManager; }
|
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
namespace Launcher
|
2011-05-02 22:21:42 +02:00
|
|
|
{
|
2013-10-25 11:17:26 -05:00
|
|
|
class GraphicsSettings;
|
2011-05-02 22:21:42 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
class GraphicsPage : public QWidget, private Ui::GraphicsPage
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
public:
|
|
|
|
GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSettings, QWidget *parent = 0);
|
2013-06-23 03:49:30 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
void saveSettings();
|
|
|
|
bool loadSettings();
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
public slots:
|
|
|
|
void rendererChanged(const QString &renderer);
|
|
|
|
void screenChanged(int screen);
|
2013-03-05 02:17:28 +01:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
private slots:
|
|
|
|
void slotFullScreenChanged(int state);
|
|
|
|
void slotStandardToggled(bool checked);
|
2013-10-30 14:04:33 +01:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
private:
|
2013-11-06 10:21:25 +01:00
|
|
|
OgreInit::OgreInit mOgreInit;
|
2013-10-25 11:17:26 -05:00
|
|
|
Ogre::Root *mOgre;
|
|
|
|
Ogre::RenderSystem *mSelectedRenderSystem;
|
|
|
|
Ogre::RenderSystem *mOpenGLRenderSystem;
|
|
|
|
Ogre::RenderSystem *mDirect3DRenderSystem;
|
2013-10-30 14:04:33 +01:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
Files::ConfigurationManager &mCfgMgr;
|
|
|
|
GraphicsSettings &mGraphicsSettings;
|
2011-05-11 01:12:25 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
|
|
|
|
QStringList getAvailableResolutions(int screen);
|
|
|
|
QRect getMaximumResolution();
|
2011-05-02 22:21:42 +02:00
|
|
|
|
2013-10-25 11:17:26 -05:00
|
|
|
bool setupOgre();
|
|
|
|
bool setupSDL();
|
|
|
|
};
|
|
|
|
}
|
2011-05-02 22:21:42 +02:00
|
|
|
#endif
|