TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Classes | Signals | Public Member Functions | Private Slots | Private Attributes | List of all members
TTKClickedGroup Class Reference

The class of the label widget click group mapper. More...

#include <ttkclickedgroup.h>

+ Inheritance diagram for TTKClickedGroup:

Classes

struct  Data
 

Signals

void clicked (int index)
 

Public Member Functions

 TTKClickedGroup (QObject *parent=nullptr)
 
void addWidget (QWidget *widget, int id=-1)
 
void removeWidget (QWidget *widget)
 
QList< QWidget * > items () const
 
QWidget * widget (int id) const
 
void setId (QWidget *widget, int id)
 
int id (QWidget *widget) const
 

Private Slots

void update ()
 

Private Attributes

QList< Datam_container
 

Detailed Description

The class of the label widget click group mapper.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 28 of file ttkclickedgroup.h.

Constructor & Destructor Documentation

TTKClickedGroup::TTKClickedGroup ( QObject *  parent = nullptr)
explicit

Object constructor.

Definition at line 3 of file ttkclickedgroup.cpp.

Member Function Documentation

void TTKClickedGroup::addWidget ( QWidget *  widget,
int  id = -1 
)
void TTKClickedGroup::clicked ( int  index)
signal

Index widget click.

Referenced by addWidget(), and update().

int TTKClickedGroup::id ( QWidget *  widget) const

Get widget item id.

Definition at line 54 of file ttkclickedgroup.cpp.

References m_container, and qAsConst.

Referenced by addWidget(), and setId().

QList< QWidget * > TTKClickedGroup::items ( ) const

Get all container items.

Definition at line 20 of file ttkclickedgroup.cpp.

References m_container, and qAsConst.

void TTKClickedGroup::removeWidget ( QWidget *  widget)

Remove the clicked widget.

Definition at line 15 of file ttkclickedgroup.cpp.

References m_container.

void TTKClickedGroup::setId ( QWidget *  widget,
int  id 
)

Set widget item id.

Definition at line 42 of file ttkclickedgroup.cpp.

References id(), and m_container.

void TTKClickedGroup::update ( )
privateslot

Update the current clicked state.

Definition at line 66 of file ttkclickedgroup.cpp.

References clicked(), m_container, TTKClickedGroup::Data::m_id, TTKClickedGroup::Data::m_widget, TTKObjectCast, and widget().

Referenced by addWidget().

QWidget * TTKClickedGroup::widget ( int  id) const

Get item widget by id.

Definition at line 30 of file ttkclickedgroup.cpp.

References m_container, and qAsConst.

Referenced by update().

Member Data Documentation

QList<Data> TTKClickedGroup::m_container
private

Definition at line 88 of file ttkclickedgroup.h.

Referenced by addWidget(), id(), items(), removeWidget(), setId(), update(), and widget().


The documentation for this class was generated from the following files: