get/set implemented
This commit is contained in:
@@ -85,4 +85,42 @@ namespace advsettings
|
||||
void VideoTabController::saveVideoConfig() {
|
||||
|
||||
}
|
||||
|
||||
float VideoTabController::brightnessValue() const
|
||||
{
|
||||
return m_brightnessValue;
|
||||
}
|
||||
|
||||
bool VideoTabController::brightnessEnabled() const
|
||||
{
|
||||
return m_brightnessEnabled;
|
||||
}
|
||||
|
||||
void VideoTabController::setBrightnessEnabled(bool value, bool notify)
|
||||
{
|
||||
//TODO mutex?
|
||||
//std::lock_guard<std::recursive_mutex> lock(eventLoopMutex);
|
||||
if (value != m_brightnessEnabled)
|
||||
{
|
||||
m_brightnessEnabled = value;
|
||||
if (notify)
|
||||
{
|
||||
emit brightnessEnabledChanged(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void VideoTabController::setBrightnessvalue(float value, bool notify)
|
||||
{
|
||||
//TODO mutex?
|
||||
//std::lock_guard<std::recursive_mutex> lock(eventLoopMutex);
|
||||
if (value != m_brightnessValue)
|
||||
{
|
||||
m_brightnessValue = value;
|
||||
if (notify)
|
||||
{
|
||||
emit brightnessValueChanged(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,40 +2,55 @@
|
||||
|
||||
namespace advsettings {
|
||||
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(int playbackDeviceIndex READ playbackDeviceIndex WRITE
|
||||
setPlaybackDeviceIndex NOTIFY playbackDeviceIndexChanged)
|
||||
Q_PROPERTY(int mirrorDeviceIndex READ mirrorDeviceIndex WRITE
|
||||
setMirrorDeviceIndex NOTIFY mirrorDeviceIndexChanged)
|
||||
|
||||
private:
|
||||
//TODO
|
||||
constexpr auto notificationBrightnessFilename
|
||||
= "todo";
|
||||
vr::VROverlayHandle_t m_brightnessNotificationOverlayHandle
|
||||
= vr::k_ulOverlayHandleInvalid;
|
||||
float m_brightnessValue = 1.0;
|
||||
bool m_brightnessEnabled = false;
|
||||
|
||||
void reloadVideoConfig();
|
||||
void saveVideoConfig();
|
||||
|
||||
|
||||
QString getSettingsName() override
|
||||
class ChaperoneTabController : public QObject
|
||||
{
|
||||
return "videoSettings";
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool brightnessEnabled READ brightnessEnabled WRITE
|
||||
setBrightnessEnabled NOTIFY brightnessEnabledChanged)
|
||||
Q_PROPERTY(float brightnessValue READ brightnessValue WRITE
|
||||
setBrightnessValue NOTIFY brightnessValueChanged)
|
||||
|
||||
private:
|
||||
//TODO
|
||||
constexpr auto notificationBrightnessFilename
|
||||
= "todo";
|
||||
vr::VROverlayHandle_t m_brightnessNotificationOverlayHandle
|
||||
= vr::k_ulOverlayHandleInvalid;
|
||||
float m_brightnessValue = 1.0;
|
||||
bool m_brightnessEnabled = false;
|
||||
|
||||
void reloadVideoConfig();
|
||||
void saveVideoConfig();
|
||||
|
||||
|
||||
QString getSettingsName() override
|
||||
{
|
||||
return "videoSettings";
|
||||
}
|
||||
|
||||
vr::VROverlayHandle_t getBrightnessOverlayHandle()
|
||||
{
|
||||
return m_brightnessNotificationOverlayHandle;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
float brightnessValue() const;
|
||||
bool brightnessEnabled() const;
|
||||
|
||||
void initStage1();
|
||||
//TODO ?? on args
|
||||
void initStage2(OverlayController* var_parent, QQuickWindow* var_widget);
|
||||
|
||||
|
||||
public slots:
|
||||
void setBrightnessEnabled(bool value, bool notify = true);
|
||||
void setBrightnessValue(float value, bool notify = true);
|
||||
|
||||
|
||||
signals:
|
||||
void brightnessEnabledChanged(bool value);
|
||||
void brightnessValueChanged(float value);
|
||||
}
|
||||
|
||||
vr::VROverlayHandle_t getBrightnessOverlayHandle()
|
||||
{
|
||||
return m_brightnessNotificationOverlayHandle;
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
|
||||
void initStage1();
|
||||
//TODO ?? on args
|
||||
void initStage2(OverlayController* var_parent, QQuickWindow* var_widget);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user