From b06d352d14d9d917ff23288dd6a9433e4e75f7df Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 20 May 2020 01:19:55 +0900 Subject: KMix: 1) added direct DCOP access to the user selected mixer/device channel used as master. 2) fixed bug with volume update 3) unlinked global keyboard shortcuts for volume control to avoid clashing with kmilo. A user can still link them manually if needed. Signed-off-by: Michele Calgaro --- kmix/kmix.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'kmix/kmix.h') diff --git a/kmix/kmix.h b/kmix/kmix.h index e04aee43..e24c457a 100644 --- a/kmix/kmix.h +++ b/kmix/kmix.h @@ -49,18 +49,38 @@ class Mixer; #include "mixer.h" #include "mixdevicewidget.h" +#include "kmixIface.h" class -KMixWindow : public TDEMainWindow +KMixWindow : public TDEMainWindow, virtual public KMixIface { Q_OBJECT - public: KMixWindow(); ~KMixWindow(); + // Additional functions for DCOP interface + void setVolume(int percentage); + void increaseVolume(int percentage); + void decreaseVolume(int percentage); + int volume(); + + void setAbsoluteVolume(long absoluteVolume); + long absoluteVolume(); + long absoluteVolumeMin(); + long absoluteVolumeMax(); + + void setMute(bool on); + void toggleMute(); + bool mute(); + + TQString mixerName(); + int deviceIndex(); + + void setBalance(int balance); + protected slots: void saveSettings(); @@ -130,9 +150,9 @@ KMixWindow : public TDEMainWindow void slotHWInfo(); void showSelectedMixer( int mixer ); void configureGlobalShortcuts(); - void toggleMuted(); - void increaseVolume(); - void decreaseVolume(); + void slotToggleMuted() { toggleMute(); } + void slotIncreaseVolume() { increaseVolume(5); } + void slotDecreaseVolume() { decreaseVolume(5); } }; #endif // KMIX_H -- cgit v1.2.3