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

The class of the lrc maker widget item. More...

#include <musiclrcmakerwidget.h>

+ Inheritance diagram for MusicLrcMakerWidgetItem:

Public Slots

void setText (const QString &string)
 

Public Member Functions

 MusicLrcMakerWidgetItem (QWidget *ui=nullptr, QObject *parent=nullptr)
 
bool biggerThan (int value) const
 
bool done () const
 
void reset ()
 
void moveUp ()
 
void moveDown ()
 
void moveLeft ()
 
void moveRight ()
 

Private Member Functions

virtual void paintEvent (QPaintEvent *event) overridefinal
 

Private Attributes

QObject * m_parent
 
bool m_leftDirection
 
bool m_painetLineDone
 
int m_intervalCount
 
int m_itemDelta
 
int m_currentIndex
 
int m_paintIndex
 

Detailed Description

The class of the lrc maker widget item.

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

Definition at line 33 of file musiclrcmakerwidget.h.

Constructor & Destructor Documentation

MusicLrcMakerWidgetItem::MusicLrcMakerWidgetItem ( QWidget *  ui = nullptr,
QObject *  parent = nullptr 
)
explicit

Object constructor.

Definition at line 18 of file musiclrcmakerwidget.cpp.

References TTK::UI::BackgroundStyle10, TTK::UI::BorderStyle02, reset(), and TTK_ITEM_SIZE_L.

Member Function Documentation

bool MusicLrcMakerWidgetItem::biggerThan ( int  value) const

Check the last index.

Definition at line 32 of file musiclrcmakerwidget.cpp.

References m_currentIndex.

Referenced by MusicLrcMakerWidget::createCurrentLine().

bool MusicLrcMakerWidgetItem::done ( ) const

Current text line make done.

Definition at line 37 of file musiclrcmakerwidget.cpp.

References m_painetLineDone.

Referenced by MusicLrcMakerWidget::createCurrentLine().

void MusicLrcMakerWidgetItem::moveDown ( )
void MusicLrcMakerWidgetItem::moveLeft ( )

Item move left.

Definition at line 82 of file musiclrcmakerwidget.cpp.

References m_itemDelta, m_leftDirection, m_painetLineDone, and m_paintIndex.

Referenced by MusicLrcMakerWidget::createCurrentLine().

void MusicLrcMakerWidgetItem::moveRight ( )
void MusicLrcMakerWidgetItem::moveUp ( )
void MusicLrcMakerWidgetItem::paintEvent ( QPaintEvent *  event)
finaloverrideprivatevirtual

Override the widget event.

Definition at line 117 of file musiclrcmakerwidget.cpp.

References TTK::Widget::fontTextWidth(), m_intervalCount, m_itemDelta, m_leftDirection, and m_paintIndex.

void MusicLrcMakerWidgetItem::reset ( )
void MusicLrcMakerWidgetItem::setText ( const QString &  string)
slot

Member Data Documentation

int MusicLrcMakerWidgetItem::m_currentIndex
private

Definition at line 87 of file musiclrcmakerwidget.h.

Referenced by biggerThan(), moveDown(), moveUp(), and reset().

int MusicLrcMakerWidgetItem::m_intervalCount
private

Definition at line 86 of file musiclrcmakerwidget.h.

Referenced by moveDown(), moveUp(), paintEvent(), and reset().

int MusicLrcMakerWidgetItem::m_itemDelta
private

Definition at line 86 of file musiclrcmakerwidget.h.

Referenced by moveLeft(), moveRight(), paintEvent(), reset(), and setText().

bool MusicLrcMakerWidgetItem::m_leftDirection
private

Definition at line 85 of file musiclrcmakerwidget.h.

Referenced by moveLeft(), moveRight(), paintEvent(), and reset().

bool MusicLrcMakerWidgetItem::m_painetLineDone
private

Definition at line 85 of file musiclrcmakerwidget.h.

Referenced by done(), moveDown(), moveLeft(), moveRight(), moveUp(), and reset().

int MusicLrcMakerWidgetItem::m_paintIndex
private

Definition at line 87 of file musiclrcmakerwidget.h.

Referenced by moveDown(), moveLeft(), moveRight(), moveUp(), paintEvent(), and reset().

QObject* MusicLrcMakerWidgetItem::m_parent
private

Definition at line 84 of file musiclrcmakerwidget.h.

Referenced by moveRight().


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