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>
|
|
|
|
#include <OgreConfigFile.h>
|
|
|
|
#include <OgreConfigDialog.h>
|
2011-08-19 19:06:09 +00:00
|
|
|
#include <components/cfg/configurationmanager.hpp>
|
2011-05-10 23:12:25 +00:00
|
|
|
|
|
|
|
class QComboBox;
|
|
|
|
class QCheckBox;
|
|
|
|
class QStackedWidget;
|
|
|
|
class QSettings;
|
|
|
|
|
2011-05-02 20:21:42 +00:00
|
|
|
class GraphicsPage : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
GraphicsPage(QWidget *parent = 0);
|
|
|
|
|
2011-05-10 23:12:25 +00:00
|
|
|
QSettings *mOgreConfig;
|
|
|
|
|
|
|
|
void writeConfig();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void rendererChanged(const QString &renderer);
|
|
|
|
|
|
|
|
private:
|
2011-08-19 19:06:09 +00:00
|
|
|
Cfg::ConfigurationManager mCfg;
|
2011-05-10 23:12:25 +00:00
|
|
|
Ogre::Root *mOgre;
|
|
|
|
Ogre::RenderSystem *mSelectedRenderSystem;
|
|
|
|
Ogre::RenderSystem *mOpenGLRenderSystem;
|
|
|
|
Ogre::RenderSystem *mDirect3DRenderSystem;
|
|
|
|
|
|
|
|
QComboBox *mRendererComboBox;
|
|
|
|
|
|
|
|
QStackedWidget *mRendererStackedWidget;
|
|
|
|
QStackedWidget *mDisplayStackedWidget;
|
|
|
|
|
|
|
|
// OpenGL
|
|
|
|
QComboBox *mOGLRTTComboBox;
|
|
|
|
QComboBox *mOGLAntiAliasingComboBox;
|
|
|
|
QComboBox *mOGLResolutionComboBox;
|
|
|
|
QComboBox *mOGLFrequencyComboBox;
|
|
|
|
|
|
|
|
QCheckBox *mOGLVSyncCheckBox;
|
|
|
|
QCheckBox *mOGLFullScreenCheckBox;
|
|
|
|
|
|
|
|
// Direct3D
|
|
|
|
QComboBox *mD3DRenderDeviceComboBox;
|
|
|
|
QComboBox *mD3DAntiAliasingComboBox;
|
|
|
|
QComboBox *mD3DFloatingPointComboBox;
|
|
|
|
QComboBox *mD3DResolutionComboBox;
|
|
|
|
|
|
|
|
QCheckBox *mD3DNvPerfCheckBox;
|
|
|
|
QCheckBox *mD3DVSyncCheckBox;
|
|
|
|
QCheckBox *mD3DFullScreenCheckBox;
|
|
|
|
|
|
|
|
QString getConfigValue(const QString &key, Ogre::RenderSystem *renderer);
|
|
|
|
QStringList getAvailableOptions(const QString &key, Ogre::RenderSystem *renderer);
|
|
|
|
|
|
|
|
void createPages();
|
|
|
|
void setupConfig();
|
|
|
|
void setupOgre();
|
|
|
|
void readConfig();
|
2011-05-02 20:21:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|