TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the tab button module. More...
#include <ttktabbutton.h>
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 |
The class of the tab button module.
Definition at line 29 of file ttktabbutton.h.
|
explicit |
Object constructor.
Definition at line 8 of file ttktabbutton.cpp.
References buttonClicked(), m_buttonGroup, QtButtonGroupConnect, and TTK_SLOT.
TTKTabButton::~TTKTabButton | ( | ) |
void TTKTabButton::addButtons | ( | const QStringList & | titles | ) |
Add button by input titles.
Definition at line 26 of file ttktabbutton.cpp.
References buttonClicked(), count(), m_buttonGroup, qAsConst, TAB_BUTTON_OFF, and TTKObjectCast.
Referenced by MusicAdvancedSearchedWidget::MusicAdvancedSearchedWidget(), and MusicLocalManagerWidget::MusicLocalManagerWidget().
|
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().
|
signal |
Index button click.
Referenced by buttonClicked().
|
inline |
Get tab buttons count.
Definition at line 59 of file ttktabbutton.h.
Referenced by addButtons(), and buttonClicked().
|
inline |
Get button current index.
Definition at line 55 of file ttktabbutton.h.
Referenced by MusicLocalManagerWidget::refreshItems(), MusicAdvancedSearchedWidget::searchButtonClicked(), and MusicLocalManagerWidget::searchResultChanged().
void TTKTabButton::setButtonEnabled | ( | bool | enabled | ) |
Set button enable or disable.
Definition at line 52 of file ttktabbutton.cpp.
References m_buttonGroup.
|
private |
Definition at line 75 of file ttktabbutton.h.
Referenced by addButtons(), buttonClicked(), setButtonEnabled(), TTKTabButton(), and ~TTKTabButton().
|
private |
Definition at line 74 of file ttktabbutton.h.
Referenced by buttonClicked().