1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-03 17:37:18 +00:00
OpenMW/apps/launcher/graphicspage.hpp
Lukasz Gromanowski 7c24ae9ac7 Issue #168 - Configuration cleanup - WIP
This is "work in progress" commit, it shall not be merged alone,
without succeeding commits (it's not fully functional).

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
2012-01-21 01:31:20 +01:00

73 lines
1.7 KiB
C++

#ifndef GRAPHICSPAGE_H
#define GRAPHICSPAGE_H
#include <QWidget>
#include <OgreRoot.h>
#include <OgreRenderSystem.h>
#include <OgreConfigFile.h>
#include <OgreConfigDialog.h>
class QComboBox;
class QCheckBox;
class QStackedWidget;
class QSettings;
namespace Files { struct ConfigurationManager; }
class GraphicsPage : public QWidget
{
Q_OBJECT
public:
GraphicsPage(Files::ConfigurationManager& cfg, QWidget *parent = 0);
QSettings *mOgreConfig;
void writeConfig();
public slots:
void rendererChanged(const QString &renderer);
private:
Files::ConfigurationManager& mCfgMgr;
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();
};
#endif