Singletonify XMMSHandler and kick out everything not XMMSisch from the class.
A class that needs to talk to xmms2 now calls XMMSHandler::getInstance() and all communication is handled by signals'n'slots.
This commit is contained in:
parent
56dd4cf3ee
commit
787a5c7b5b
10 changed files with 150 additions and 85 deletions
|
@ -2,10 +2,15 @@
|
|||
|
||||
PlayStatus::PlayStatus (QWidget *parent) : PixWidget (parent)
|
||||
{
|
||||
setMinimumSize(11, 9);
|
||||
setMaximumSize(11, 9);
|
||||
XMMSHandler *xmmsh = XMMSHandler::getInstance();
|
||||
|
||||
m_status = XMMS_PLAYBACK_STATUS_STOP;
|
||||
setMinimumSize(11, 9);
|
||||
setMaximumSize(11, 9);
|
||||
|
||||
m_status = XMMS_PLAYBACK_STATUS_STOP;
|
||||
|
||||
connect (xmmsh, SIGNAL(playbackStatusChanged(uint)),
|
||||
this, SLOT(setStatus(uint)));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -19,9 +24,9 @@ PlayStatus::setPixmaps (Skin *skin)
|
|||
}
|
||||
|
||||
void
|
||||
PlayStatus::setStatus (int status)
|
||||
PlayStatus::setStatus (uint status)
|
||||
{
|
||||
|
||||
qDebug("funkar");
|
||||
if (status == XMMS_PLAYBACK_STATUS_STOP) {
|
||||
m_pixmap = m_pixmap_stop;
|
||||
} else if (status == XMMS_PLAYBACK_STATUS_PLAY) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue