Change MoveCenterTabController::initStage1 from QSettings to new API
Only the existing changes were moved. The remaining were not initially added because they didn't show up in the .ini files I based my initial prototypes on.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include "../overlaycontroller.h"
|
#include "../overlaycontroller.h"
|
||||||
#include "../utils/Matrix.h"
|
#include "../utils/Matrix.h"
|
||||||
#include "../quaternion/quaternion.h"
|
#include "../quaternion/quaternion.h"
|
||||||
|
#include "../settings/settings.h"
|
||||||
|
|
||||||
void rotateCoordinates( double coordinates[3], double angle )
|
void rotateCoordinates( double coordinates[3], double angle )
|
||||||
{
|
{
|
||||||
@@ -40,43 +41,26 @@ void MoveCenterTabController::initStage1()
|
|||||||
{
|
{
|
||||||
auto settings = OverlayController::appSettings();
|
auto settings = OverlayController::appSettings();
|
||||||
settings->beginGroup( "playspaceSettings" );
|
settings->beginGroup( "playspaceSettings" );
|
||||||
|
|
||||||
auto value = settings->value( "adjustChaperone", m_adjustChaperone );
|
auto value = settings->value( "adjustChaperone", m_adjustChaperone );
|
||||||
if ( value.isValid() && !value.isNull() )
|
if ( value.isValid() && !value.isNull() )
|
||||||
{
|
{
|
||||||
m_adjustChaperone = value.toBool();
|
m_adjustChaperone = value.toBool();
|
||||||
}
|
}
|
||||||
value = settings->value( "moveShortcutRight",
|
|
||||||
m_settingsRightHandDragEnabled );
|
m_settingsRightHandDragEnabled = settings::getSetting(
|
||||||
if ( value.isValid() && !value.isNull() )
|
settings::BoolSetting::PLAYSPACE_moveShortcutRight );
|
||||||
{
|
m_settingsLeftHandDragEnabled = settings::getSetting(
|
||||||
m_settingsRightHandDragEnabled = value.toBool();
|
settings::BoolSetting::PLAYSPACE_moveShortcutLeft );
|
||||||
}
|
m_settingsLeftHandTurnEnabled
|
||||||
value
|
= settings::getSetting( settings::BoolSetting::PLAYSPACE_turnBindLeft );
|
||||||
= settings->value( "moveShortcutLeft", m_settingsLeftHandDragEnabled );
|
m_settingsRightHandTurnEnabled = settings::getSetting(
|
||||||
if ( value.isValid() && !value.isNull() )
|
settings::BoolSetting::PLAYSPACE_turnBindRight );
|
||||||
{
|
m_dragBounds
|
||||||
m_settingsLeftHandDragEnabled = value.toBool();
|
= settings::getSetting( settings::BoolSetting::PLAYSPACE_dragBounds );
|
||||||
}
|
m_turnBounds
|
||||||
value = settings->value( "turnBindLeft", m_settingsLeftHandTurnEnabled );
|
= settings::getSetting( settings::BoolSetting::PLAYSPACE_turnBounds );
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_settingsLeftHandTurnEnabled = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "turnBindRight", m_settingsRightHandTurnEnabled );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_settingsRightHandTurnEnabled = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "dragBounds", m_dragBounds );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_dragBounds = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "turnBounds", m_turnBounds );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_turnBounds = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "dragComfortFactor", m_dragComfortFactor );
|
value = settings->value( "dragComfortFactor", m_dragComfortFactor );
|
||||||
if ( value.isValid() && !value.isNull() )
|
if ( value.isValid() && !value.isNull() )
|
||||||
{
|
{
|
||||||
@@ -112,52 +96,31 @@ void MoveCenterTabController::initStage1()
|
|||||||
{
|
{
|
||||||
m_flingStrength = value.toFloat();
|
m_flingStrength = value.toFloat();
|
||||||
}
|
}
|
||||||
value = settings->value( "momentumSave", m_momentumSave );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
m_momentumSave
|
||||||
{
|
= settings::getSetting( settings::BoolSetting::PLAYSPACE_momentumSave );
|
||||||
m_momentumSave = value.toBool();
|
m_lockXToggle
|
||||||
}
|
= settings::getSetting( settings::BoolSetting::PLAYSPACE_lockXToggle );
|
||||||
value = settings->value( "lockXToggle", m_lockXToggle );
|
m_lockYToggle
|
||||||
if ( value.isValid() && !value.isNull() )
|
= settings::getSetting( settings::BoolSetting::PLAYSPACE_lockYToggle );
|
||||||
{
|
m_lockZToggle
|
||||||
m_lockXToggle = value.toBool();
|
= settings::getSetting( settings::BoolSetting::PLAYSPACE_lockZToggle );
|
||||||
}
|
|
||||||
value = settings->value( "lockYToggle", m_lockYToggle );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_lockYToggle = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "lockZToggle", m_lockZToggle );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_lockZToggle = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "showLogMatricesButton", m_showLogMatricesButton );
|
value = settings->value( "showLogMatricesButton", m_showLogMatricesButton );
|
||||||
if ( value.isValid() && !value.isNull() )
|
if ( value.isValid() && !value.isNull() )
|
||||||
{
|
{
|
||||||
m_showLogMatricesButton = value.toBool();
|
m_showLogMatricesButton = value.toBool();
|
||||||
}
|
}
|
||||||
value = settings->value( "allowExternalEdits", m_allowExternalEdits );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
m_allowExternalEdits = settings::getSetting(
|
||||||
{
|
settings::BoolSetting::PLAYSPACE_allowExternalEdits );
|
||||||
m_allowExternalEdits = value.toBool();
|
m_oldStyleMotion = settings::getSetting(
|
||||||
}
|
settings::BoolSetting::PLAYSPACE_oldStyleMotion );
|
||||||
value = settings->value( "oldStyleMotion", m_oldStyleMotion );
|
m_universeCenteredRotation = settings::getSetting(
|
||||||
if ( value.isValid() && !value.isNull() )
|
settings::BoolSetting::PLAYSPACE_universeCenteredRotation );
|
||||||
{
|
m_enableSeatedMotion = settings::getSetting(
|
||||||
m_oldStyleMotion = value.toBool();
|
settings::BoolSetting::PLAYSPACE_enableSeatedMotion );
|
||||||
}
|
|
||||||
value = settings->value( "universeCenteredRotation",
|
|
||||||
m_universeCenteredRotation );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_universeCenteredRotation = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "enableSeatedMotion", m_enableSeatedMotion );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_enableSeatedMotion = value.toBool();
|
|
||||||
}
|
|
||||||
value = settings->value( "simpleRecenter", m_simpleRecenter );
|
value = settings->value( "simpleRecenter", m_simpleRecenter );
|
||||||
if ( value.isValid() && !value.isNull() )
|
if ( value.isValid() && !value.isNull() )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user