Complete GUI overhaul (from Qt Widgets to Qt Quick Controls 2)
Added chaperone profiles Added separate supersampling sliders for applications/compositor Added asynchronous reprojection on/off switch Merged in Microphone Control Overlay Added Push-to-Talk profiles Updated to OpenVR 1.0.3 Requires at least SteamVR beta 1477423729.
This commit is contained in:
@@ -3,32 +3,67 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
// openvr's github repo hasn't been updated yet to reflect changes in beta 1477423729.
|
||||
static const char* vrsettings_steamvr_allowAsyncReprojection = "allowAsyncReprojection";
|
||||
static const char* vrsettings_steamvr_allowInterleavedReprojection = "allowInterleavedReprojection";
|
||||
static const char* vrsettings_compositor_category = "compositor";
|
||||
|
||||
|
||||
class QQuickWindow;
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
|
||||
// forward declaration
|
||||
class OverlayWidget;
|
||||
class OverlayController;
|
||||
|
||||
|
||||
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 allowInterleavedReprojection READ allowInterleavedReprojection WRITE setAllowInterleavedReprojection NOTIFY allowInterleavedReprojectionChanged)
|
||||
Q_PROPERTY(bool allowAsyncReprojection READ allowAsyncReprojection WRITE setAllowAsyncReprojection NOTIFY allowAsyncReprojectionChanged)
|
||||
Q_PROPERTY(bool forceReprojection READ forceReprojection WRITE setForceReprojection NOTIFY forceReprojectionChanged)
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
OverlayWidget* widget;
|
||||
QQuickWindow* widget;
|
||||
|
||||
float m_superSampling = 1.0;
|
||||
float m_compositorSuperSampling = 1.0;
|
||||
bool m_allowInterleavedReprojection = true;
|
||||
bool m_allowAsyncReprojection = true;
|
||||
bool m_forceReprojection = false;
|
||||
|
||||
unsigned settingsUpdateCounter = 0;
|
||||
|
||||
public:
|
||||
void init(OverlayController* parent, OverlayWidget* widget);
|
||||
void initStage1();
|
||||
void initStage2(OverlayController* parent, QQuickWindow* widget);
|
||||
|
||||
void eventLoopTick();
|
||||
|
||||
float superSampling() const;
|
||||
float compositorSuperSampling() const;
|
||||
bool allowInterleavedReprojection() const;
|
||||
bool allowAsyncReprojection() const;
|
||||
bool forceReprojection() const;
|
||||
|
||||
public slots:
|
||||
void UpdateTab();
|
||||
void setSuperSampling(float value, bool notify = true);
|
||||
void setCompositorSuperSampling(float value, bool notify = true);
|
||||
void setAllowInterleavedReprojection(bool value, bool notify = true);
|
||||
void setAllowAsyncReprojection(bool value, bool notify = true);
|
||||
void setForceReprojection(bool value, bool notify = true);
|
||||
|
||||
void SupersamplingChanged(int value);
|
||||
void ReprojectionToggled(bool value);
|
||||
void ForceReprojectionToggled(bool value);
|
||||
void ResetClicked();
|
||||
void RestartClicked();
|
||||
void restartSteamVR();
|
||||
|
||||
signals:
|
||||
void superSamplingChanged(float value);
|
||||
void compositorSuperSamplingChanged(float value);
|
||||
void allowInterleavedReprojectionChanged(bool value);
|
||||
void allowAsyncReprojectionChanged(bool value);
|
||||
void forceReprojectionChanged(bool value);
|
||||
};
|
||||
|
||||
} // namespace advsettings
|
||||
|
||||
Reference in New Issue
Block a user