OpenMW
apps/launcher/graphicspage.hpp
Go to the documentation of this file.
00001 #ifndef GRAPHICSPAGE_H
00002 #define GRAPHICSPAGE_H
00003 
00004 #include <QWidget>
00005 
00006 #include <OgreRoot.h>
00007 #include <OgreRenderSystem.h>
00008 
00009 #include <components/ogreinit/ogreinit.hpp>
00010 
00011 
00012 #include "ui_graphicspage.h"
00013 
00014 
00015 namespace Files { struct ConfigurationManager; }
00016 
00017 namespace Launcher
00018 {
00019     class GraphicsSettings;
00020 
00021     class GraphicsPage : public QWidget, private Ui::GraphicsPage
00022     {
00023         Q_OBJECT
00024 
00025     public:
00026         GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSettings, QWidget *parent = 0);
00027 
00028         void saveSettings();
00029         bool loadSettings();
00030 
00031     public slots:
00032         void rendererChanged(const QString &renderer);
00033         void screenChanged(int screen);
00034 
00035     private slots:
00036         void slotFullScreenChanged(int state);
00037         void slotStandardToggled(bool checked);
00038 
00039     private:
00040         OgreInit::OgreInit mOgreInit;
00041         Ogre::Root *mOgre;
00042         Ogre::RenderSystem *mSelectedRenderSystem;
00043         Ogre::RenderSystem *mOpenGLRenderSystem;
00044         Ogre::RenderSystem *mDirect3DRenderSystem;
00045 
00046         Files::ConfigurationManager &mCfgMgr;
00047         GraphicsSettings &mGraphicsSettings;
00048 
00049         QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
00050         QStringList getAvailableResolutions(int screen);
00051         QRect getMaximumResolution();
00052 
00053         bool setupOgre();
00054         bool setupSDL();
00055     };
00056 }
00057 #endif