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

The class of the tab button module. More...

#include <ttktabbutton.h>

+ Inheritance diagram for TTKTabButton:

Signals

void clicked (int index)
 

Public Member Functions

 TTKTabButton (QWidget *parent=nullptr)
 
 ~TTKTabButton ()
 
void addButtons (const QStringList &titles)
 
void setButtonEnabled (bool enabled)
 
int currentIndex () const
 
int count () const
 

Private Slots

void buttonClicked (int index)
 

Private Attributes

int m_currentIndex
 
QButtonGroup * m_buttonGroup
 

Detailed Description

The class of the tab button module.

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

Definition at line 29 of file ttktabbutton.h.

Constructor & Destructor Documentation

TTKTabButton::TTKTabButton ( QWidget *  parent = nullptr)
explicit

Object constructor.

Definition at line 8 of file ttktabbutton.cpp.

References buttonClicked(), m_buttonGroup, QtButtonGroupConnect, and TTK_SLOT.

TTKTabButton::~TTKTabButton ( )

Object destructor.

Definition at line 21 of file ttktabbutton.cpp.

References m_buttonGroup.

Member Function Documentation

void TTKTabButton::addButtons ( const QStringList &  titles)
void TTKTabButton::buttonClicked ( int  index)
privateslot

Set diff button clicked by index.

Definition at line 60 of file ttktabbutton.cpp.

References clicked(), count(), m_buttonGroup, m_currentIndex, TAB_BUTTON_OFF, and TAB_BUTTON_ON.

Referenced by addButtons(), and TTKTabButton().

void TTKTabButton::clicked ( int  index)
signal

Index button click.

Referenced by buttonClicked().

int TTKTabButton::count ( ) const
inline

Get tab buttons count.

Definition at line 59 of file ttktabbutton.h.

Referenced by addButtons(), and buttonClicked().

int TTKTabButton::currentIndex ( ) const
inline
void TTKTabButton::setButtonEnabled ( bool  enabled)

Set button enable or disable.

Definition at line 52 of file ttktabbutton.cpp.

References m_buttonGroup.

Member Data Documentation

QButtonGroup* TTKTabButton::m_buttonGroup
private
int TTKTabButton::m_currentIndex
private

Definition at line 74 of file ttktabbutton.h.

Referenced by buttonClicked().


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