2011-05-02 20:21:42 +00:00
|
|
|
#ifndef GRAPHICSPAGE_H
|
|
|
|
#define GRAPHICSPAGE_H
|
2011-04-24 19:42:56 +00:00
|
|
|
|
2011-05-02 20:21:42 +00:00
|
|
|
#include <QWidget>
|
|
|
|
|
2011-05-10 23:12:25 +00:00
|
|
|
#include <OgreRoot.h>
|
|
|
|
#include <OgreRenderSystem.h>
|
2013-01-27 15:39:51 +00:00
|
|
|
//#include <OgreConfigFile.h>
|
|
|
|
//#include <OgreConfigDialog.h>
|
2011-05-10 23:12:25 +00:00
|
|
|
|
2012-03-15 14:51:39 +00:00
|
|
|
// Static plugin headers
|
|
|
|
#ifdef ENABLE_PLUGIN_GL
|
|
|
|
# include "OgreGLPlugin.h"
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_PLUGIN_Direct3D9
|
|
|
|
# include "OgreD3D9Plugin.h"
|
|
|
|
#endif
|
|
|
|
|
2013-03-05 01:17:28 +00:00
|
|
|
#include "ui_graphicspage.h"
|
2011-05-10 23:12:25 +00:00
|
|
|
|
2013-01-27 15:39:51 +00:00
|
|
|
class GraphicsSettings;
|
|
|
|
|
2012-01-21 00:14:35 +00:00
|
|
|
namespace Files { struct ConfigurationManager; }
|
|
|
|
|
2013-03-05 01:17:28 +00:00
|
|
|
class GraphicsPage : public QWidget, private Ui::GraphicsPage
|
2011-05-02 20:21:42 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-01-27 15:39:51 +00:00
|
|
|
GraphicsPage(Files::ConfigurationManager &cfg, GraphicsSettings &graphicsSettings, QWidget *parent = 0);
|
2011-05-10 23:12:25 +00:00
|
|
|
|
2013-01-27 15:39:51 +00:00
|
|
|
void saveSettings();
|
2012-06-20 18:43:51 +00:00
|
|
|
bool setupOgre();
|
2011-05-10 23:12:25 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void rendererChanged(const QString &renderer);
|
|
|
|
|
2013-03-05 01:17:28 +00:00
|
|
|
private slots:
|
|
|
|
void slotFullScreenChanged(int state);
|
|
|
|
void slotStandardToggled(bool checked);
|
|
|
|
|
2011-05-10 23:12:25 +00:00
|
|
|
private:
|
|
|
|
Ogre::Root *mOgre;
|
|
|
|
Ogre::RenderSystem *mSelectedRenderSystem;
|
|
|
|
Ogre::RenderSystem *mOpenGLRenderSystem;
|
|
|
|
Ogre::RenderSystem *mDirect3DRenderSystem;
|
2012-03-15 14:51:39 +00:00
|
|
|
#ifdef ENABLE_PLUGIN_GL
|
|
|
|
Ogre::GLPlugin* mGLPlugin;
|
|
|
|
#endif
|
|
|
|
#ifdef ENABLE_PLUGIN_Direct3D9
|
|
|
|
Ogre::D3D9Plugin* mD3D9Plugin;
|
|
|
|
#endif
|
2011-05-10 23:12:25 +00:00
|
|
|
|
2012-02-22 07:34:47 +00:00
|
|
|
Files::ConfigurationManager &mCfgMgr;
|
2013-01-27 15:39:51 +00:00
|
|
|
GraphicsSettings &mGraphicsSettings;
|
2012-02-22 07:34:47 +00:00
|
|
|
|
2011-05-10 23:12:25 +00:00
|
|
|
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
|
2012-06-19 13:57:58 +00:00
|
|
|
QStringList getAvailableResolutions(Ogre::RenderSystem *renderer);
|
2013-06-22 17:15:13 +00:00
|
|
|
QRect getMaximumResolution();
|
2011-05-10 23:12:25 +00:00
|
|
|
|
2013-01-27 15:39:51 +00:00
|
|
|
void loadSettings();
|
|
|
|
|
2011-05-02 20:21:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|