mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-22 23:26:15 +00:00
We can now set whether to use OpenGL in WE in the WE settings page. For whatever reason VMware despises the OpenGL viewport so it's a good idea to turn it off inside VMware.
--HG-- branch : hotfix
This commit is contained in:
parent
b530d99bf1
commit
44c6f93b26
4 changed files with 77 additions and 10 deletions
|
@ -17,9 +17,11 @@
|
|||
// Project includes
|
||||
#include "world_editor_settings_page.h"
|
||||
#include "world_editor_constants.h"
|
||||
#include "../core/icore.h"
|
||||
|
||||
// Qt includes
|
||||
#include <QtGui/QWidget>
|
||||
#include <QSettings>
|
||||
|
||||
// NeL includes
|
||||
|
||||
|
@ -61,11 +63,31 @@ QWidget *WorldEditorSettingsPage::createPage(QWidget *parent)
|
|||
{
|
||||
m_currentPage = new QWidget(parent);
|
||||
m_ui.setupUi(m_currentPage);
|
||||
readSettings();
|
||||
|
||||
return m_currentPage;
|
||||
}
|
||||
|
||||
void WorldEditorSettingsPage::readSettings()
|
||||
{
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
settings->beginGroup(Constants::WORLD_EDITOR_SECTION);
|
||||
bool b = false;
|
||||
|
||||
b = settings->value( Constants::WORLD_EDITOR_USE_OPENGL, true ).toBool();
|
||||
m_ui.glCB->setChecked( b );
|
||||
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
void WorldEditorSettingsPage::apply()
|
||||
{
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
settings->beginGroup(Constants::WORLD_EDITOR_SECTION);
|
||||
bool b = false;
|
||||
b = m_ui.glCB->isChecked();
|
||||
settings->setValue( Constants::WORLD_EDITOR_USE_OPENGL, b );
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
} /* namespace WorldEditor */
|
|
@ -46,6 +46,7 @@ public:
|
|||
QIcon categoryIcon() const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
|
||||
virtual void readSettings();
|
||||
virtual void apply();
|
||||
virtual void finish() {}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<class>WorldEditorSettingsPage</class>
|
||||
<widget class="QWidget" name="WorldEditorSettingsPage">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
@ -25,6 +25,9 @@
|
|||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Workspace</string>
|
||||
</property>
|
||||
|
@ -37,10 +40,18 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_3"/>
|
||||
<widget class="QSpinBox" name="spinBox_3">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="spinBox_4"/>
|
||||
<widget class="QSpinBox" name="spinBox_4">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
|
@ -50,15 +61,32 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_5"/>
|
||||
<widget class="QSpinBox" name="spinBox_5">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="spinBox_6"/>
|
||||
<widget class="QSpinBox" name="spinBox_6">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<widget class="QCheckBox" name="glCB">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use OpenGL</string>
|
||||
<string>Use OpenGL ( requires restart )</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -79,7 +107,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBox"/>
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
|
@ -89,7 +121,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_2"/>
|
||||
<widget class="QSpinBox" name="spinBox_2">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
|
@ -101,10 +137,17 @@
|
|||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
|
|
|
@ -436,6 +436,7 @@ void WorldEditorWindow::writeSettings()
|
|||
settings->beginGroup(Constants::WORLD_EDITOR_SECTION);
|
||||
settings->setValue(Constants::WORLD_WINDOW_STATE, saveState());
|
||||
settings->setValue(Constants::WORLD_WINDOW_GEOMETRY, saveGeometry());
|
||||
settings->setValue(Constants::WORLD_EDITOR_USE_OPENGL, settings->value(Constants::WORLD_EDITOR_USE_OPENGL));
|
||||
settings->endGroup();
|
||||
settings->sync();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue