diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-08-13 21:07:26 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-08-13 21:07:26 +0000 |
| commit | ef4bb82a192bc61d3045e4ca1ebda51df2145717 (patch) | |
| tree | 820e5bdd3e72b323ae8952324ca89bce0a49690f /src/plugins/General/notifier | |
| parent | 3df7f3562b23ce9ea28ce9fd94799f9a237c58ab (diff) | |
| download | qmmp-ef4bb82a192bc61d3045e4ca1ebda51df2145717.tar.gz qmmp-ef4bb82a192bc61d3045e4ca1ebda51df2145717.tar.bz2 qmmp-ef4bb82a192bc61d3045e4ca1ebda51df2145717.zip | |
notifier plugin: added cover support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1139 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/notifier')
| -rw-r--r-- | src/plugins/General/notifier/popupwidget.cpp | 13 | ||||
| -rw-r--r-- | src/plugins/General/notifier/popupwidget.h | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp index b3653b95d..0d3c8f13e 100644 --- a/src/plugins/General/notifier/popupwidget.cpp +++ b/src/plugins/General/notifier/popupwidget.cpp @@ -28,6 +28,7 @@ #include <QDir> #include <QApplication> #include <qmmp/soundcore.h> +#include <qmmp/decoder.h> #include "popupwidget.h" @@ -39,10 +40,10 @@ PopupWidget::PopupWidget(QWidget *parent) setFrameStyle(QFrame::Box | QFrame::Plain); QHBoxLayout *hlayout = new QHBoxLayout(this); - QLabel *pixlabel = new QLabel(this); - pixlabel->setPixmap(QPixmap(":/notifier_icon.png")); - pixlabel->setFixedSize(32,32); - hlayout->addWidget(pixlabel); + m_pixlabel = new QLabel(this); + m_pixlabel->setPixmap(QPixmap(":/notifier_icon.png")); + m_pixlabel->setFixedSize(32,32); + hlayout->addWidget(m_pixlabel); //layout QVBoxLayout *vlayout = new QVBoxLayout(); hlayout->addLayout (vlayout); @@ -100,6 +101,10 @@ void PopupWidget::showMetaData() } else m_label2->hide(); + + QPixmap pix = Decoder::findCover(core->metaData(Qmmp::URL)); + if(!pix.isNull()) + m_pixlabel->setPixmap(pix.scaled(32,32)); qApp->processEvents(); resize(sizeHint()); qApp->processEvents(); diff --git a/src/plugins/General/notifier/popupwidget.h b/src/plugins/General/notifier/popupwidget.h index 989b37bd7..d059c4661 100644 --- a/src/plugins/General/notifier/popupwidget.h +++ b/src/plugins/General/notifier/popupwidget.h @@ -61,6 +61,7 @@ private: QTimer *m_timer; QLabel *m_label1; QLabel *m_label2; + QLabel *m_pixlabel; uint m_pos; }; |
