Change playlist to use Esperanza's playlistmodel
This commit is contained in:
parent
85cf6a8d1c
commit
503385309b
96 changed files with 2010 additions and 412 deletions
41
src/PlayStatus.cpp
Normal file
41
src/PlayStatus.cpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include <xmmsclient/xmmsclient++.h>
|
||||
#include "PlayStatus.h"
|
||||
#include "Skin.h"
|
||||
|
||||
PlayStatus::PlayStatus (QWidget *parent) : PixWidget (parent)
|
||||
{
|
||||
setMinimumSize(11, 9);
|
||||
setMaximumSize(11, 9);
|
||||
|
||||
m_status = Xmms::Playback::STOPPED;
|
||||
|
||||
connect (&XMMSHandler::getInstance (),
|
||||
SIGNAL(playbackStatusChanged(Xmms::Playback::Status)),
|
||||
this, SLOT(setStatus(Xmms::Playback::Status)));
|
||||
}
|
||||
|
||||
void
|
||||
PlayStatus::setPixmaps (Skin *skin)
|
||||
{
|
||||
m_pixmap_play = skin->getItem (Skin::PIC_PLAY);
|
||||
m_pixmap_pause = skin->getItem (Skin::PIC_PAUSE);
|
||||
m_pixmap_stop = skin->getItem (Skin::PIC_STOP);
|
||||
|
||||
setStatus (m_status);
|
||||
}
|
||||
|
||||
void
|
||||
PlayStatus::setStatus (Xmms::Playback::Status status)
|
||||
{
|
||||
using Xmms::Playback;
|
||||
if (status == Playback::STOPPED) {
|
||||
m_pixmap = m_pixmap_stop;
|
||||
} else if (status == Playback::PLAYING) {
|
||||
m_pixmap = m_pixmap_play;
|
||||
} else if (status == Playback::PAUSED) {
|
||||
m_pixmap = m_pixmap_pause;
|
||||
}
|
||||
|
||||
update ();
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue