diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/audioplayer/LPAudioPlayer.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/audioplayer/LPAudioPlayer.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/audioplayer/LPAudioPlayer.cpp b/src-qt5/core/lumina-desktop/panel-plugins/audioplayer/LPAudioPlayer.cpp new file mode 100644 index 00000000..5669aaf5 --- /dev/null +++ b/src-qt5/core/lumina-desktop/panel-plugins/audioplayer/LPAudioPlayer.cpp @@ -0,0 +1,30 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2014, Susanne Jaeckel +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "LPAudioPlayer.h" +#include "LSession.h" + +LPAudioPlayer::LPAudioPlayer(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ + //Setup the button + button = new QToolButton(this); + button->setAutoRaise(true); + button->setToolButtonStyle(Qt::ToolButtonIconOnly); + button->setPopupMode(QToolButton::InstantPopup); //make sure it runs the update routine first + //connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); + this->layout()->setContentsMargins(0,0,0,0); + this->layout()->addWidget(button); + wact = new QWidgetAction(this); + aplayer = new PPlayerWidget(this); + button ->setMenu(new QMenu(this) ); + wact->setDefaultWidget(aplayer); + button->menu()->addAction(wact); + //Now start up the widgets + button->setIcon( LXDG::findIcon("audio-volume-high","") ); + QTimer::singleShot(0,this,SLOT(OrientationChange()) ); //update the sizing/icon +} + +LPAudioPlayer::~LPAudioPlayer(){ +} |