TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicmobiledeviceswidget.cpp
Go to the documentation of this file.
3 #include "musicsettingmanager.h"
4 #include "musicapplication.h"
5 
6 #include <QTimer>
7 
9  : TTKClickedLabel(parent)
10 {
11  setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Tool);
12  setAttribute(Qt::WA_TranslucentBackground);
13 
14  const QSize &size = G_SETTING_PTR->value(MusicSettingManager::ScreenSize).toSize();
15  setGeometry(size.width() - 266 - 15, size.height() - 85 - 55, 266, 85);
16  setPixmap(QPixmap(":/toolSets/lb_mobile_devices"));
17 
18  m_closeButton = new QToolButton(this);
19  m_closeButton->setIcon(QIcon(":/functions/btn_close_hover"));
21  m_closeButton->setCursor(QCursor(Qt::PointingHandCursor));
22  m_closeButton->setToolTip(tr("Close"));
23  m_closeButton->setGeometry(235, 2, 28, 22);
24 
25  connect(m_closeButton, SIGNAL(clicked()), SLOT(hide()));
26  connect(this, SIGNAL(clicked()), SLOT(showMobileManager()));
27 
28  QTimer::singleShot(10 * TTK_DN_S2MS, this, SLOT(hide()));
29 }
30 
32 {
33  delete m_closeButton;
34 }
35 
37 {
38  hide();
39  //
42 }
MusicMobileDevicesWidget(QWidget *parent=nullptr)
voidpf void uLong size
Definition: ioapi.h:136
The class of the label widget that can click.
#define TTK_GENERATE_SINGLE_WIDGET(...)
#define TTK_DN_S2MS
Definition: ttkglobal.h:355
static const QString ToolButtonStyle04
The class of the mobile songs manager widget.
#define G_SETTING_PTR