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
MusicSystemTrayMenu Class Reference

The class of the system tray menu widget. More...

#include <musicsystemtraymenu.h>

+ Inheritance diagram for MusicSystemTrayMenu:

Public Slots

void showDesktopLrc ()
 
void lockDesktopLrc (bool lock)
 
void setWindowLockedChanged ()
 

Public Member Functions

 MusicSystemTrayMenu (QWidget *parent=nullptr)
 
 ~MusicSystemTrayMenu ()
 
void setLabelText (const QString &text) const
 
void showDesktopLrc (bool show) const
 
void setCurrentPlayState (bool state) const
 
void setVolumeValue (int value) const
 

Private Member Functions

void createPlayWidgetActions ()
 
void createVolumeWidgetActions ()
 

Private Attributes

QLabel * m_showText
 
QToolButton * m_playButton
 
QToolButton * m_volumeButton
 
TTKClickedSliderm_volumeSlider
 
QAction * m_showLrcAction
 
QAction * m_lockLrcAction
 

Detailed Description

The class of the system tray menu widget.

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

Definition at line 30 of file musicsystemtraymenu.h.

Constructor & Destructor Documentation

MusicSystemTrayMenu::MusicSystemTrayMenu ( QWidget *  parent = nullptr)
explicit
MusicSystemTrayMenu::~MusicSystemTrayMenu ( )

Object destructor.

Definition at line 36 of file musicsystemtraymenu.cpp.

References m_lockLrcAction, m_playButton, m_showLrcAction, m_showText, m_volumeButton, and m_volumeSlider.

Member Function Documentation

void MusicSystemTrayMenu::createPlayWidgetActions ( )
private
void MusicSystemTrayMenu::createVolumeWidgetActions ( )
private

Create volume widget actions.

Definition at line 171 of file musicsystemtraymenu.cpp.

References m_volumeButton, m_volumeSlider, and TTK::UI::SliderStyle08.

Referenced by MusicSystemTrayMenu().

void MusicSystemTrayMenu::lockDesktopLrc ( bool  lock)
slot

Lock current desktop lrc or not.

Definition at line 64 of file musicsystemtraymenu.cpp.

References m_lockLrcAction.

Referenced by MusicBottomAreaWidget::lockDesktopLrc().

void MusicSystemTrayMenu::setCurrentPlayState ( bool  state) const

Set current play state.

Definition at line 74 of file musicsystemtraymenu.cpp.

References TTK::UI::ContextPause, TTK::UI::ContextPlay, and m_playButton.

Referenced by MusicBottomAreaWidget::setCurrentPlayState().

void MusicSystemTrayMenu::setLabelText ( const QString &  text) const

Set tray menu song text.

Definition at line 48 of file musicsystemtraymenu.cpp.

References TTK::Widget::elidedText(), and m_showText.

Referenced by MusicBottomAreaWidget::setLabelText().

void MusicSystemTrayMenu::setVolumeValue ( int  value) const

Set current play volume.

Definition at line 83 of file musicsystemtraymenu.cpp.

References m_volumeButton, m_volumeSlider, and TTK::UI::TinyBtnSound.

Referenced by MusicBottomAreaWidget::setVolumeValue().

void MusicSystemTrayMenu::setWindowLockedChanged ( )
slot

Lock current desktop lrc state changed.

Definition at line 69 of file musicsystemtraymenu.cpp.

References MusicRightAreaWidget::instance(), and MusicRightAreaWidget::setWindowLockedChanged().

Referenced by MusicSystemTrayMenu().

void MusicSystemTrayMenu::showDesktopLrc ( bool  show) const

Set show or not desktop lrc.

Definition at line 58 of file musicsystemtraymenu.cpp.

References m_lockLrcAction, and m_showLrcAction.

Referenced by MusicBottomAreaWidget::desktopLrcClosed(), and MusicBottomAreaWidget::setDestopLrcVisible().

void MusicSystemTrayMenu::showDesktopLrc ( )
slot

Member Data Documentation

QAction * MusicSystemTrayMenu::m_lockLrcAction
private
QToolButton* MusicSystemTrayMenu::m_playButton
private
QAction* MusicSystemTrayMenu::m_showLrcAction
private

Definition at line 88 of file musicsystemtraymenu.h.

Referenced by MusicSystemTrayMenu(), showDesktopLrc(), and ~MusicSystemTrayMenu().

QLabel* MusicSystemTrayMenu::m_showText
private
QToolButton * MusicSystemTrayMenu::m_volumeButton
private
TTKClickedSlider* MusicSystemTrayMenu::m_volumeSlider
private

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