TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
TTKThirdParty
TTKqmmp
qmmp
qmmpevents_p.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright (C) 2011-2024 by Ilya Kotov *
3
* forkotov02@ya.ru *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
20
21
#ifndef QMMPEVENTS_P_H
22
#define QMMPEVENTS_P_H
23
24
#include <QMap>
25
#include <QHash>
26
#include <QEvent>
27
#include "
trackinfo.h
"
28
29
#define EVENT_STATE_CHANGED (QEvent::Type(QEvent::User))
30
#define EVENT_NEXT_TRACK_REQUEST (QEvent::Type(QEvent::User + 1))
31
#define EVENT_FINISHED (QEvent::Type(QEvent::User + 2))
32
#define EVENT_TRACK_INFO_CHANGED (QEvent::Type(QEvent::User + 3))
33
#define EVENT_STREAM_INFO_CHANGED (QEvent::Type(QEvent::User + 4))
38
class QMMP_EXPORT StateChangedEvent : public QEvent
39
{
40
public
:
41
StateChangedEvent
(
Qmmp::State
currentState,
Qmmp::State
previousState);
42
virtual
~
StateChangedEvent
() =
default
;
43
44
Qmmp::State
currentState()
const
;
45
Qmmp::State
previousState()
const
;
46
47
private
:
48
Qmmp::State
m_state
;
49
Qmmp::State
m_prevState
;
50
51
};
52
56
class
QMMP_EXPORT
StreamInfoChangedEvent
:
public
QEvent
57
{
58
public
:
59
explicit
StreamInfoChangedEvent
(
const
QHash<QString, QString> &info);
60
virtual
~
StreamInfoChangedEvent
() =
default
;
61
65
QHash<QString, QString> streamInfo()
const
;
66
67
private
:
68
QHash<QString, QString>
m_streamInfo
;
69
70
};
71
75
class
QMMP_EXPORT
TrackInfoEvent
:
public
QEvent
76
{
77
public
:
78
explicit
TrackInfoEvent
(
const
TrackInfo
&info);
79
virtual
~
TrackInfoEvent
() =
default
;
80
81
const
TrackInfo
&trackInfo()
const
;
82
83
private
:
84
TrackInfo
m_info
;
85
86
};
87
88
#endif
StreamInfoChangedEvent
Definition:
qmmpevents_p.h:56
trackinfo.h
TrackInfo
The TrackInfo class stores metadata and other information about track.
Definition:
trackinfo.h:32
StreamInfoChangedEvent::m_streamInfo
QHash< QString, QString > m_streamInfo
Definition:
qmmpevents_p.h:68
Qmmp::State
State
Definition:
qmmp.h:82
StateChangedEvent::m_prevState
Qmmp::State m_prevState
Definition:
qmmpevents_p.h:49
QMMP_EXPORT
#define QMMP_EXPORT
Definition:
qmmp_export.h:29
TrackInfoEvent
Definition:
qmmpevents_p.h:75
StateChangedEvent::m_state
Qmmp::State m_state
Definition:
qmmpevents_p.h:48
StateChangedEvent
Definition:
qmmpevents_p.h:38
TrackInfoEvent::m_info
TrackInfo m_info
Definition:
qmmpevents_p.h:84
Generated on Tue Jan 21 2025 21:07:15 for TTKMusicPlayer by
1.8.8