Added PlayStatus widget.

This commit is contained in:
Tobias Rundstrom 2006-02-20 16:21:35 -03:00
parent a50e7afd4a
commit 46a0fd1b29
8 changed files with 86 additions and 6 deletions

35
PlayStatus.cpp Normal file
View file

@ -0,0 +1,35 @@
#include "PlayStatus.h"
PlayStatus::PlayStatus (QWidget *parent) : PixWidget (parent)
{
setMinimumSize(11, 9);
setMaximumSize(11, 9);
m_status = XMMS_PLAYBACK_STATUS_STOP;
}
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 (int status)
{
if (status == XMMS_PLAYBACK_STATUS_STOP) {
m_pixmap = m_pixmap_stop;
} else if (status == XMMS_PLAYBACK_STATUS_PLAY) {
m_pixmap = m_pixmap_play;
} else if (status == XMMS_PLAYBACK_STATUS_PAUSE) {
m_pixmap = m_pixmap_pause;
}
update ();
}