OTHER: make balance slider work
Implemented balance handling and moved volume slider handling to lib/xplayback.cpp
This commit is contained in:
parent
096ac37121
commit
eb96c8b75b
6 changed files with 184 additions and 102 deletions
|
@ -22,6 +22,7 @@ class XClient;
|
|||
#include <xmmsclient/xmmsclient++.h>
|
||||
#include <QObject>
|
||||
|
||||
static const int MAX_BALANCE = 20;
|
||||
|
||||
/**
|
||||
* @class XPlayback
|
||||
|
@ -34,6 +35,9 @@ class XPlayback : public QObject {
|
|||
public:
|
||||
XPlayback (XClient *);
|
||||
|
||||
int getVolume () {return m_volume;}
|
||||
int getBalance () {return m_balance;}
|
||||
|
||||
public slots:
|
||||
void play ();
|
||||
void pause ();
|
||||
|
@ -46,16 +50,29 @@ class XPlayback : public QObject {
|
|||
void seekMs (uint milliseconds);
|
||||
void seekMsRel (int milliseconds);
|
||||
|
||||
void setVolume (int new_volume);
|
||||
void setBalance (int new_balance);
|
||||
|
||||
// callbacks for clientlib
|
||||
bool playback_status (const Xmms::Playback::Status &status);
|
||||
bool volume_changed (const Xmms::Dict &volDict);
|
||||
|
||||
void on_connect (XClient *);
|
||||
|
||||
signals:
|
||||
void playbackStatusChanged (Xmms::Playback::Status status);
|
||||
void volumeChanged (int volume);
|
||||
void balanceChanged (int balance);
|
||||
|
||||
private:
|
||||
XClient *m_client;
|
||||
Xmms::Playback::Status m_status;
|
||||
|
||||
void newVolume (int new_volume);
|
||||
void newBalance (int new_balance);
|
||||
int m_volume;
|
||||
int m_balance;
|
||||
bool m_onechannel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue