Files
OpenVR-AdvancedSettings-frame/src/tabcontrollers/UtilitiesTabController.h
T
ykeara 4b0be27ff6 Video and Steam VR Tab Re-work + keyboard binds (#289)
* changed color overlay to use gain values instead of overlay

* moved SS/Motion smoothing, and filter to video tab

* began refactor of steamVR qml page

* added misc toggles to steamvr tab

* added imu fallback and DND, and some qml formatting

* added Camera Settings to SteamVR page

* changed formatting to minimize height

* added video profiles cleaned up steamvr controller

* delta comparison change

* added profiles for video

* fixed display bug in colorgroupbox and removed frivoulous saves

* removed commented code

* added custom keybind buttons
2019-09-01 02:35:00 -05:00

88 lines
2.6 KiB
C++

#pragma once
#include <QObject>
#include <QTime>
#include <openvr.h>
#include <memory>
#include "src/keyboard_input/keyboard_input.h"
#include "src/media_keys/media_keys.h"
class QQuickWindow;
// application namespace
namespace advsettings
{
// forward declaration
class OverlayController;
class UtilitiesTabController : public QObject
{
Q_OBJECT
Q_PROPERTY( bool alarmEnabled READ alarmEnabled WRITE setAlarmEnabled NOTIFY
alarmEnabledChanged )
Q_PROPERTY( bool alarmIsModal READ alarmIsModal WRITE setAlarmIsModal NOTIFY
alarmIsModalChanged )
Q_PROPERTY( int alarmTimeHour READ alarmTimeHour WRITE setAlarmTimeHour
NOTIFY alarmTimeHourChanged )
Q_PROPERTY( int alarmTimeMinute READ alarmTimeMinute WRITE
setAlarmTimeMinute NOTIFY alarmTimeMinuteChanged )
private:
OverlayController* m_parent;
unsigned settingsUpdateCounter = 0;
bool m_alarmEnabled = false;
bool m_alarmIsModal = true;
QTime m_alarmTime;
QTime m_alarmLastCheckTime;
vr::VROverlayHandle_t m_batteryOverlayHandles[vr::k_unMaxTrackedDeviceCount]
= { 0 };
int m_batteryState[vr::k_unMaxTrackedDeviceCount];
bool m_batteryVisible[vr::k_unMaxTrackedDeviceCount];
public:
void initStage1();
void initStage2( OverlayController* var_parent );
void eventLoopTick();
bool alarmEnabled() const;
bool alarmIsModal() const;
int alarmTimeHour() const;
int alarmTimeMinute() const;
public slots:
void sendKeyboardInput( QString input );
void sendKeyboardEnter();
void sendKeyboardAltTab();
void sendKeyboardAltEnter();
void sendKeyboardCtrlC();
void sendKeyboardCtrlV();
void sendKeyboardBackspace( const int count );
void sendMediaNextSong();
void sendMediaPreviousSong();
void sendMediaPausePlay();
void sendMediaStopSong();
Q_INVOKABLE void sendKeyboardOne();
Q_INVOKABLE void sendKeyboardTwo();
Q_INVOKABLE void sendKeyboardThree();
void setAlarmEnabled( bool enabled, bool notify = true );
void setAlarmIsModal( bool modal, bool notify = true );
void setAlarmTimeHour( int hour, bool notify = true );
void setAlarmTimeMinute( int min, bool notify = true );
void setAlarmTimeToCurrentTime();
void modAlarmTimeHour( int value, bool notify = true );
void modAlarmTimeMinute( int value, bool notify = true );
signals:
void alarmEnabledChanged( bool enabled );
void alarmIsModalChanged( bool modal );
void alarmTimeHourChanged( int hour );
void alarmTimeMinuteChanged( int min );
};
} // namespace advsettings