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 toast widget. More...
#include <ttktoastlabel.h>
Public Slots | |
void | setText (const QString &text) |
Signals | |
void | finished () |
Public Member Functions | |
TTKToastLabel (QWidget *parent=nullptr) | |
TTKToastLabel (const QString &text, QWidget *parent=nullptr) | |
~TTKToastLabel () | |
void | setFontMargin (int height, int width) |
int | timerInterval () const |
void | setFontSize (int size) |
void | popup (QWidget *parent=nullptr) |
Private Slots | |
void | closeAnimation () |
Private Member Functions | |
virtual void | paintEvent (QPaintEvent *event) overridefinal |
Private Attributes | |
QFont | m_font |
QPoint | m_margin |
QTimer | m_timer |
The class of the toast widget.
Definition at line 29 of file ttktoastlabel.h.
|
explicit |
Object constructor.
Definition at line 7 of file ttktoastlabel.cpp.
References closeAnimation(), m_timer, setFontMargin(), setFontSize(), and TTK_DN_S2MS.
|
explicit |
Definition at line 23 of file ttktoastlabel.cpp.
References setText().
TTKToastLabel::~TTKToastLabel | ( | ) |
|
privateslot |
Close animation when tiem out.
Definition at line 73 of file ttktoastlabel.cpp.
References finished(), m_timer, and TTK_DN_S2MS.
Referenced by TTKToastLabel().
|
signal |
Animation close changed.
Referenced by closeAnimation().
|
finaloverrideprivatevirtual |
Override the widget event.
Definition at line 87 of file ttktoastlabel.cpp.
void TTKToastLabel::popup | ( | QWidget * | parent = nullptr | ) |
Popup the toast widget in parent widget.
Definition at line 51 of file ttktoastlabel.cpp.
References TTKDesktopWrapper::screenGeometry().
Referenced by MusicToastLabel::popup().
Set text margin in the body.
Definition at line 34 of file ttktoastlabel.cpp.
References m_margin.
Referenced by TTKToastLabel().
void TTKToastLabel::setFontSize | ( | int | size | ) |
Set context font size.
Definition at line 45 of file ttktoastlabel.cpp.
References m_font.
Referenced by TTKToastLabel().
|
slot |
Set context text.
Definition at line 66 of file ttktoastlabel.cpp.
References m_font, m_margin, and QtFontWidth.
Referenced by MusicToastLabel::popup(), MusicItemRenameEidt::textChanged(), and TTKToastLabel().
int TTKToastLabel::timerInterval | ( | ) | const |
|
private |
Definition at line 86 of file ttktoastlabel.h.
Referenced by setFontSize(), and setText().
|
private |
Definition at line 87 of file ttktoastlabel.h.
Referenced by setFontMargin(), and setText().
|
private |
Definition at line 88 of file ttktoastlabel.h.
Referenced by closeAnimation(), timerInterval(), TTKToastLabel(), and ~TTKToastLabel().