SteamVRTab SSOverride update (#40)

* Added Manual Override Checkbox

* added profile logic/synch fixed bug with profile

* Added Function definitions + re-arranged code into more logical blocks

* formatting and fixed reset function in steamvrtabcontroler

* updated documentation

* removed some comments(for later standardization), params as const (where applicable), changed SS minimum value to .2 to match with steamVR minimum

* changed c style cast to c++

* re-applied formatting

* removed un-used lines in steamvrtabcontroller.h
This commit is contained in:
ykeara
2019-01-12 14:49:07 -06:00
committed by GitHub
parent fca227f9c7
commit 95b7eaa664
5 changed files with 344 additions and 215 deletions
+10 -9
View File
@@ -21,6 +21,7 @@ struct SteamVRProfile
bool supersampleFiltering = false;
bool motionSmooth = false;
bool includesMotionSmoothing = false;
bool supersampleOverride = false;
};
class SteamVRTabController : public QObject
@@ -28,27 +29,27 @@ class SteamVRTabController : public QObject
Q_OBJECT
Q_PROPERTY( float superSampling READ superSampling WRITE setSuperSampling
NOTIFY superSamplingChanged )
/*Q_PROPERTY(
float compositorSuperSampling READ compositorSuperSampling WRITE
setCompositorSuperSampling NOTIFY compositorSuperSamplingChanged )
*/
Q_PROPERTY( bool motionSmoothing READ motionSmoothing WRITE
setMotionSmoothing NOTIFY motionSmoothingChanged )
Q_PROPERTY( bool allowSupersampleFiltering READ allowSupersampleFiltering
WRITE setAllowSupersampleFiltering NOTIFY
allowSupersampleFilteringChanged )
Q_PROPERTY(
bool allowSupersampleOverride READ allowSupersampleOverride WRITE
setAllowSupersampleOverride NOTIFY allowSupersampleOverrideChanged )
private:
OverlayController* parent;
QQuickWindow* widget;
float m_superSampling = 1.0;
// float m_compositorSuperSampling = 1.0;
bool m_motionSmoothing = true;
bool m_allowSupersampleFiltering = true;
bool m_allowSupersampleOverride = false;
void initMotionSmoothing();
void initSupersampleOverride();
std::vector<SteamVRProfile> steamvrProfiles;
@@ -61,21 +62,21 @@ public:
void eventLoopTick();
float superSampling() const;
// float compositorSuperSampling() const;
bool motionSmoothing() const;
bool allowSupersampleFiltering() const;
bool allowSupersampleOverride() const;
void reloadSteamVRProfiles();
void saveSteamVRProfiles();
Q_INVOKABLE unsigned getSteamVRProfileCount();
Q_INVOKABLE int getSteamVRProfileCount();
Q_INVOKABLE QString getSteamVRProfileName( unsigned index );
public slots:
void setSuperSampling( float value, bool notify = true );
// void setCompositorSuperSampling( float value, bool notify = true );
void setMotionSmoothing( bool value, bool notify = true );
void setAllowSupersampleFiltering( bool value, bool notify = true );
void setAllowSupersampleOverride( bool value, bool notify = true );
void addSteamVRProfile( QString name,
bool includeSupersampling,
@@ -89,9 +90,9 @@ public slots:
signals:
void superSamplingChanged( float value );
// void compositorSuperSamplingChanged( float value );
void motionSmoothingChanged( bool value );
void allowSupersampleFilteringChanged( bool value );
void allowSupersampleOverrideChanged( bool value );
void steamVRProfilesUpdated();
void steamVRProfileAdded();