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
TTKCommon
TTKLibrary
ttkclickedgroup.cpp
Go to the documentation of this file.
1
#include "
ttkclickedgroup.h
"
2
3
TTKClickedGroup::TTKClickedGroup
(QObject *parent)
4
: QObject(parent)
5
{
6
7
}
8
9
void
TTKClickedGroup::mapped
(QWidget *widget)
10
{
11
m_container
<< widget;
12
connect(widget, SIGNAL(
clicked
()),
this
, SLOT(
update
()));
13
}
14
15
void
TTKClickedGroup::update
()
16
{
17
QWidget *widget =
TTKObjectCast
(QWidget*, sender());
18
if
(!widget)
19
{
20
return
;
21
}
22
23
int
index = -1;
24
for
(
int
i = 0; i <
m_container
.count(); ++i)
25
{
26
if
(
m_container
[i] == widget)
27
{
28
index = i;
29
break
;
30
}
31
}
32
33
if
(index == -1)
34
{
35
return
;
36
}
37
38
Q_EMIT
clicked
(index);
39
}
TTKClickedGroup::clicked
void clicked(int index)
TTKClickedGroup::mapped
void mapped(QWidget *widget)
Definition:
ttkclickedgroup.cpp:9
TTKClickedGroup::TTKClickedGroup
TTKClickedGroup(QObject *parent=nullptr)
Definition:
ttkclickedgroup.cpp:3
TTKClickedGroup::update
void update()
Definition:
ttkclickedgroup.cpp:15
TTKClickedGroup::m_container
QWidgetList m_container
Definition:
ttkclickedgroup.h:56
ttkclickedgroup.h
TTKObjectCast
#define TTKObjectCast(x, y)
Definition:
ttkqtglobal.h:76
Generated on Tue Jan 21 2025 21:07:12 for TTKMusicPlayer by
1.8.8