diff options
author | Michele Calgaro <[email protected]> | 2020-05-21 23:15:24 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-05-25 13:28:20 +0900 |
commit | c20f6cb658e757b8174be8fb537036bfc3c7c7a8 (patch) | |
tree | 4adf532de83136359d859202b0be0d22836dab76 /kmilo/generic/generic_monitor.h | |
parent | 9fdd3356a8135aae08cb2f329af053056c3d1bb8 (diff) | |
download | tdeutils-c20f6cb658e757b8174be8fb537036bfc3c7c7a8.tar.gz tdeutils-c20f6cb658e757b8174be8fb537036bfc3c7c7a8.zip |
KMilo: added support for PulseAudio volume control.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kmilo/generic/generic_monitor.h')
-rw-r--r-- | kmilo/generic/generic_monitor.h | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/kmilo/generic/generic_monitor.h b/kmilo/generic/generic_monitor.h index 9305ac3..ea75593 100644 --- a/kmilo/generic/generic_monitor.h +++ b/kmilo/generic/generic_monitor.h @@ -36,15 +36,6 @@ namespace KMilo { -// now the key data (from kkeyserver_x11.h and $TQTDIR/include/tqnamespace.h) -struct ShortcutInfo -{ - const char* name; - uint symbol; - const char *slot; -}; - - class GenericMonitor : public Monitor { Q_OBJECT @@ -64,7 +55,7 @@ public slots: void slowVolumeDown(); void fastVolumeUp(); void fastVolumeDown(); - void mute(); + void toggleMute(); void brightnessUp(); void brightnessDown(); void launchMail(); @@ -80,11 +71,9 @@ public slots: void pmBattery(); private: - bool retrieveKmixDevices(); - void volumeChange(int direction, int step); - bool retrieveMute(); - bool retrieveVolume(); - void displayVolume(); + void volumeChange(int direction, int percentage); + bool retrieveMute(bool &muted); + bool retrieveVolume(int &volume); void brightnessChange(int direction, int step); void launch(TQString configKey, TQString defaultApplication); @@ -94,14 +83,9 @@ private: DCOPRef *kmixClient, *kmixWindow, *tdepowersave; int m_progress; - long m_volume; - bool m_mute; - - long m_maxVolume, m_minVolume; // following properties are read from config file: int m_volumeStepFast, m_volumeStepSlow; - int m_volumeDeviceIdx, m_muteDeviceIdx, m_extraDeviceIdx; bool m_enabled; Monitor::DisplayType m_displayType; |