DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dmpriscontrol_p.h
1// SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DMPRISCONTROL_P_H
6#define DMPRISCONTROL_P_H
7
8#include <DObjectPrivate>
9#include <DFloatingButton>
10
11#include <DImageButton>
12#include <dmpriscontrol.h>
13#include <dtickeffect.h>
14#include "mpris/dbusmpris.h"
15#include "mpris/dmprismonitor.h"
16
17#include <QScrollArea>
18
19DWIDGET_BEGIN_NAMESPACE
20
21class DMPRISControlPrivate : public DTK_CORE_NAMESPACE::DObjectPrivate {
22 D_DECLARE_PUBLIC(DMPRISControl)
23
24public:
26
27 void init();
28
29public Q_SLOTS:
30 void _q_onPrevClicked();
31 void _q_onPlayClicked();
32 void _q_onPauseClicked();
33 void _q_onNextClicked();
34
35 void _q_onMetaDataChanged();
36 void _q_onPlaybackStatusChanged();
37
38 void _q_loadMPRISPath(const QString &path);
39 void _q_removeMPRISPath(const QString &path);
40
41 void _q_onCanControlChanged(bool canControl);
42
43public:
44 DMPRISMonitor *m_mprisMonitor;
45 DBusMPRIS * m_mprisInter;
46
47 QScrollArea *m_titleScrollArea;
48 QLabel * m_title;
49 QLabel * m_picture;
50 DTickEffect *m_tickEffect;
51
52 QWidget * m_controlWidget;
53 DFloatingButton *m_prevBtn;
54 DFloatingButton *m_playBtn;
55 DFloatingButton *m_nextBtn;
56
57 bool m_playStatus = false;
58 bool m_clickedStatus = false;
59 bool m_pictureVisible;
60
61 QString m_lastPath;
62 QStringList m_mprisPaths;
63};
64
65DWIDGET_END_NAMESPACE
66
67#endif // DMPRISCONTROL_P_H
Definition dbusmpris.h:21
Definition dmprismonitor.h:13
Definition dfloatingbutton.h:13
Definition dmpriscontrol_p.h:21
DMPRISControl 封装了MPRIS协议,提供了上一曲、下一曲、暂停播放、恢复播放和显示歌曲名和封面的功能.
Definition dmpriscontrol.h:17
这个类提供了跑马灯效果,可以让控件的内容滚动起来.
Definition dtickeffect.h:17