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 Member Functions | Private Member Functions | Private Attributes | List of all members
MusicPreviewLabel Class Reference

The class of the lrc setting preview label. More...

#include <musicpreviewlabel.h>

+ Inheritance diagram for MusicPreviewLabel:

Public Member Functions

 MusicPreviewLabel (QWidget *parent=nullptr)
 
void setLinearGradient (const MusicPreviewLabelItem &item)
 
void setLinearGradient (const QList< QColor > &front, const QList< QColor > &back)
 
void setTransparent (int trans)
 

Private Member Functions

virtual void paintEvent (QPaintEvent *event) overridefinal
 

Private Attributes

QFont m_font
 
QLinearGradient m_linearGradient
 
QLinearGradient m_maskLinearGradient
 
int m_transparent
 

Detailed Description

The class of the lrc setting preview label.

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

Definition at line 76 of file musicpreviewlabel.h.

Constructor & Destructor Documentation

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

Object constructor.

Definition at line 56 of file musicpreviewlabel.cpp.

References m_linearGradient, and m_maskLinearGradient.

Member Function Documentation

void MusicPreviewLabel::paintEvent ( QPaintEvent *  event)
finaloverrideprivatevirtual

Override the widget event.

Definition at line 95 of file musicpreviewlabel.cpp.

References TTK::Widget::fontTextHeight(), m_font, m_linearGradient, and m_maskLinearGradient.

void MusicPreviewLabel::setLinearGradient ( const MusicPreviewLabelItem item)
void MusicPreviewLabel::setLinearGradient ( const QList< QColor > &  front,
const QList< QColor > &  back 
)

Set linear gradient and front and back.

Definition at line 74 of file musicpreviewlabel.cpp.

References m_linearGradient, m_maskLinearGradient, and m_transparent.

void MusicPreviewLabel::setTransparent ( int  trans)
inline

Set current transparent.

Definition at line 97 of file musicpreviewlabel.h.

Referenced by MusicSettingWidget::lrcTransparentValue().

Member Data Documentation

QFont MusicPreviewLabel::m_font
private

Definition at line 105 of file musicpreviewlabel.h.

Referenced by paintEvent(), and setLinearGradient().

QLinearGradient MusicPreviewLabel::m_linearGradient
private

Definition at line 106 of file musicpreviewlabel.h.

Referenced by MusicPreviewLabel(), paintEvent(), and setLinearGradient().

QLinearGradient MusicPreviewLabel::m_maskLinearGradient
private

Definition at line 107 of file musicpreviewlabel.h.

Referenced by MusicPreviewLabel(), paintEvent(), and setLinearGradient().

int MusicPreviewLabel::m_transparent
private

Definition at line 108 of file musicpreviewlabel.h.

Referenced by setLinearGradient().


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