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 Types | Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
MusicSettingWidget Class Reference

The class of the setting parameters widget. More...

#include <musicsettingwidget.h>

+ Inheritance diagram for MusicSettingWidget:

Public Types

enum  Lrc { Lrc::Interior, Lrc::Desktop }
 
enum  Proxy { Proxy::Test, Proxy::Apply }
 
enum  SettingType {
  Normal, Hotkey, Download, Spectrum,
  Other, DesktopLrc, InteriorLrc, SoundEffect,
  Audio, Network
}
 

Public Slots

void close ()
 
void clearFunctionTableSelection ()
 
void fileAssociationChanged ()
 
void globalHotkeyBoxChanged (bool state)
 
void downloadCacheClean ()
 
void downloadFileNameRuleChanged (QAction *action)
 
void downloadGroupCached (int index)
 
void downloadGroupSpeedLimit (int index)
 
void downloadDirChanged (int index)
 
void rippleVersionUpdateChanged ()
 
void rippleSpectrumColorChanged ()
 
void rippleSpectrumOpacityEnableClicked (bool state)
 
void rippleLowPowerEnableBoxClicked (bool state)
 
void otherPluginManagerChanged ()
 
void changeDesktopLrcWidget ()
 
void changeInteriorLrcWidget ()
 
void changeDownloadWidget ()
 
void interiorLrcFrontgroundChanged ()
 
void interiorLrcBackgroundChanged ()
 
void defaultLrcColorChanged (int value)
 
void interiorLrcTransChanged (int value)
 
void showInteriorLrcDemo ()
 
void resetInteriorParameter ()
 
void desktopFrontgroundChanged ()
 
void desktopBackgroundChanged ()
 
void defaultDesktopLrcColorChanged (int value)
 
void desktopLrcTransChanged (int value)
 
void showDesktopLrcDemo ()
 
void resetDesktopParameter ()
 
void setNetworkProxyControl (int enable)
 
void testNetworkProxy ()
 
void testProxyStateChanged (bool state)
 
void testNetworkConnection ()
 
void checkNetworkConnection ()
 
void testNetworkConnectionStateChanged (const QString &name)
 
void fadeInAndOutClicked (bool state)
 
void saveParameterSettings ()
 
- Public Slots inherited from MusicAbstractMoveDialog
void backgroundChanged ()
 
virtual int exec ()
 
void show ()
 

Signals

void parameterSettingChanged ()
 

Public Member Functions

 MusicSettingWidget (QWidget *parent=nullptr)
 
 ~MusicSettingWidget ()
 
void initialize ()
 
- Public Member Functions inherited from MusicAbstractMoveDialog
 MusicAbstractMoveDialog (QWidget *parent=nullptr)
 
 MusicAbstractMoveDialog (bool transparent, QWidget *parent=nullptr)
 
 ~MusicAbstractMoveDialog ()
 
- Public Member Functions inherited from TTKAbstractMoveDialog
 TTKAbstractMoveDialog (QWidget *parent=nullptr)
 
 TTKAbstractMoveDialog (bool transparent, QWidget *parent=nullptr)
 
void drawWindowShadow (bool show)
 
void blockMoveOption (bool block)
 

Private Slots

void setScrollWidgetPageIndex (int index)
 
void scrollWidgetValueChanged (int value)
 

Private Member Functions

void initScrollWidgetPage ()
 
void initNormalSettingWidget ()
 
void initDownloadWidget ()
 
void initSpectrumSettingWidget ()
 
void initOtherSettingWidget ()
 
void initDesktopLrcWidget ()
 
void initInteriorLrcWidget ()
 
void initSoundEffectWidget ()
 
void initAudioSettingWidget ()
 
void initNetworkWidget ()
 
void selectFunctionTableIndex (int row, int column)
 
void lcrColorValue (Lrc key, const QString &type, QLabel *obj)
 
void lrcColorByDefault (Lrc key, int index)
 
void lrcTransparentValue (Lrc key, int value) const
 
bool setNetworkProxyByType (Proxy type)
 

Private Attributes

Ui::MusicSettingWidget * m_ui
 

Additional Inherited Members

- Protected Member Functions inherited from MusicWidgetRenderer
void setBackgroundPixmap (const QSize &size)
 
 MusicWidgetRenderer ()
 
void setBackgroundLabel (QLabel *label)
 

Detailed Description

The class of the setting parameters widget.

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

Definition at line 88 of file musicsettingwidget.h.

Member Enumeration Documentation

Enumerator
Interior 

lrc interior type

Desktop 

lrc desktop type

Definition at line 93 of file musicsettingwidget.h.

Enumerator
Test 

proxy test type

Apply 

proxy apply type

Definition at line 99 of file musicsettingwidget.h.

Enumerator
Normal 

Normal Setting Type

Hotkey 

Hotkey Setting Type

Download 

Download Setting Type

Spectrum 

Spectrum Setting Type

Other 

Other Setting Type

DesktopLrc 

DesktopLrc Setting Type

InteriorLrc 

InteriorLrc Setting Type

SoundEffect 

SoundEffect Setting Type

Audio 

Audio Setting Type

Network 

Network Setting Type

Definition at line 105 of file musicsettingwidget.h.

Constructor & Destructor Documentation

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

Object destructor.

Definition at line 133 of file musicsettingwidget.cpp.

References m_ui.

Member Function Documentation

void MusicSettingWidget::changeDesktopLrcWidget ( )
slot

Change to desktop lrc widget.

Definition at line 414 of file musicsettingwidget.cpp.

References selectFunctionTableIndex(), and setScrollWidgetPageIndex().

void MusicSettingWidget::changeDownloadWidget ( )
slot

Change to download widget.

Definition at line 426 of file musicsettingwidget.cpp.

References selectFunctionTableIndex(), and setScrollWidgetPageIndex().

Referenced by MusicRightAreaWidget::changeDownloadCustumWidget().

void MusicSettingWidget::changeInteriorLrcWidget ( )
slot

Change to interior lrc widget.

Definition at line 420 of file musicsettingwidget.cpp.

References selectFunctionTableIndex(), and setScrollWidgetPageIndex().

void MusicSettingWidget::checkNetworkConnection ( )
slot

Check current network connection available.

Definition at line 543 of file musicsettingwidget.cpp.

References TTKGenerateSingleWidget.

Referenced by initNetworkWidget().

void MusicSettingWidget::clearFunctionTableSelection ( )
slot

Clear all function tables selection.

Definition at line 312 of file musicsettingwidget.cpp.

References m_ui.

Referenced by MusicSettingWidget(), and selectFunctionTableIndex().

void MusicSettingWidget::close ( )
slot

Override close function.

Definition at line 307 of file musicsettingwidget.cpp.

Referenced by MusicSettingWidget(), and saveParameterSettings().

void MusicSettingWidget::defaultDesktopLrcColorChanged ( int  value)
slot

Default desktop lrc color change by index.

Definition at line 484 of file musicsettingwidget.cpp.

References Desktop, and lrcColorByDefault().

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::defaultLrcColorChanged ( int  value)
slot

Default lrc color change by index.

Definition at line 442 of file musicsettingwidget.cpp.

References Interior, and lrcColorByDefault().

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::desktopBackgroundChanged ( )
slot

Desktop lrc background change.

Definition at line 479 of file musicsettingwidget.cpp.

References Desktop, lcrColorValue(), and m_ui.

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::desktopFrontgroundChanged ( )
slot

Desktop lrc foreground change.

Definition at line 474 of file musicsettingwidget.cpp.

References Desktop, lcrColorValue(), and m_ui.

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::desktopLrcTransChanged ( int  value)
slot

Desktop lrc transparent changed by index.

Definition at line 489 of file musicsettingwidget.cpp.

References Desktop, lrcTransparentValue(), and m_ui.

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::downloadCacheClean ( )
slot
void MusicSettingWidget::downloadDirChanged ( int  index)
slot

Set select download dir or lrc dir.

Definition at line 375 of file musicsettingwidget.cpp.

References TTK::File::getExistingDirectory(), and m_ui.

Referenced by initDownloadWidget().

void MusicSettingWidget::downloadFileNameRuleChanged ( QAction *  action)
slot

Set download file name rules.

Definition at line 355 of file musicsettingwidget.cpp.

References m_ui, and MusicRulesAnalysis::rule().

Referenced by initDownloadWidget().

void MusicSettingWidget::downloadGroupCached ( int  index)
slot

Set enable or disable download cache.

Definition at line 364 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initDownloadWidget().

void MusicSettingWidget::downloadGroupSpeedLimit ( int  index)
slot

Set enable or disable download speed limit.

Definition at line 369 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initDownloadWidget().

void MusicSettingWidget::fadeInAndOutClicked ( bool  state)
slot

Music fade in and out changed.

Definition at line 554 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initSoundEffectWidget().

void MusicSettingWidget::fileAssociationChanged ( )
slot

File association changed.

Definition at line 319 of file musicsettingwidget.cpp.

References MusicAbstractMoveDialog::exec().

Referenced by initNormalSettingWidget().

void MusicSettingWidget::globalHotkeyBoxChanged ( bool  state)
slot

Set global hotkey box changed.

Definition at line 324 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initialize(), and initNormalSettingWidget().

void MusicSettingWidget::initAudioSettingWidget ( )
private
void MusicSettingWidget::initDesktopLrcWidget ( )
private
void MusicSettingWidget::initDownloadWidget ( )
private
void MusicSettingWidget::initialize ( )

Init controller parameter to widget.

Definition at line 138 of file musicsettingwidget.cpp.

References QmmpSettings::bufferSize(), MusicSettingManager::CloseEventMode, MusicSettingManager::CloseNetWorkMode, MusicSettingManager::DLrcBackgroundColor, MusicSettingManager::DLrcColor, MusicSettingManager::DLrcColorTransparent, MusicSettingManager::DLrcFamily, MusicSettingManager::DLrcFrontgroundColor, MusicSettingManager::DLrcSingleLineMode, MusicSettingManager::DLrcSize, MusicSettingManager::DLrcType, MusicSettingManager::DownloadCacheEnable, MusicSettingManager::DownloadCacheSize, MusicSettingManager::DownloadDownloadLimitSize, MusicSettingManager::DownloadFileNameRule, MusicSettingManager::DownloadLimitEnable, MusicSettingManager::DownloadLrcDirPath, MusicSettingManager::DownloadMusicDirPath, MusicSettingManager::DownloadServerIndex, MusicSettingManager::DownloadUploadLimitSize, MusicSettingManager::EnhancedFadeEnable, MusicSettingManager::EnhancedFadeInValue, MusicSettingManager::EnhancedFadeOutValue, MusicSettingManager::FileAssociationMode, G_HOTKEY_PTR, G_SETTING_PTR, globalHotkeyBoxChanged(), MusicSettingManager::HotkeyEnable, MusicSettingManager::HotkeyValue, QmmpSettings::instance(), MusicSettingManager::LanguageIndex, MusicSettingManager::LastPlayIndex, LRC_COLOR_OFFSET, MusicSettingManager::LrcBackgroundColor, MusicSettingManager::LrcColor, MusicSettingManager::LrcColorTransparent, MusicSettingManager::LrcFamily, MusicSettingManager::LrcFrontgroundColor, MusicSettingManager::LrcSize, MusicSettingManager::LrcType, m_ui, MusicSettingManager::OtherCheckUpdateEnable, MusicSettingManager::OtherHighDpiScalingEnable, MusicSettingManager::OtherLrcKTVMode, MusicSettingManager::OtherPlaylistAutoSaveEnable, MusicSettingManager::OtherRandomShuffleMode, MusicSettingManager::OtherReadAlbumCover, MusicSettingManager::OtherReadFileInfo, MusicSettingManager::OtherScreenSaverEnable, MusicSettingManager::OtherSideByMode, MusicSettingManager::OtherWriteAlbumCover, MusicSettingManager::OtherWriteFileInfo, QmmpSettings::outputFormat(), TTK::readColorConfig(), QmmpSettings::replayGainDefaultGain(), QmmpSettings::replayGainMode(), QmmpSettings::replayGainPreamp(), QmmpSettings::replayGainPreventClipping(), rippleLowPowerEnableBoxClicked(), MusicSettingManager::RippleLowPowerMode, MusicSettingManager::RippleSpectrumColor, MusicSettingManager::RippleSpectrumEnable, rippleSpectrumOpacityEnableClicked(), TTK::Widget::setComboBoxText(), TTK::Algorithm::sha1(), MusicSettingManager::ShowDesktopLrc, showDesktopLrcDemo(), showInteriorLrcDemo(), MusicSettingManager::StartUpMode, MusicSettingManager::StartUpPlayMode, TTK_NORMAL_LEVEL, TTK_SPLITER, TTK_VERSION_STR, TTK_VERSION_TIME_STR, TTKStaticCast, QmmpSettings::useDithering(), QmmpSettings::useSoftVolume(), QmmpSettings::volumeStep(), and MusicSettingManager::WindowQuitMode.

Referenced by MusicRightAreaWidget::showSettingWidget().

void MusicSettingWidget::initInteriorLrcWidget ( )
private
void MusicSettingWidget::initNetworkWidget ( )
private
void MusicSettingWidget::initNormalSettingWidget ( )
private
void MusicSettingWidget::initOtherSettingWidget ( )
private

Init other setting stack widget.

Definition at line 911 of file musicsettingwidget.cpp.

References TTK::UI::CheckBoxStyle01, m_ui, otherPluginManagerChanged(), and TTK::UI::PushButtonStyle04.

Referenced by initScrollWidgetPage().

void MusicSettingWidget::initScrollWidgetPage ( )
private
void MusicSettingWidget::initSoundEffectWidget ( )
private
void MusicSettingWidget::initSpectrumSettingWidget ( )
private
void MusicSettingWidget::interiorLrcBackgroundChanged ( )
slot

Interior lrc background change.

Definition at line 437 of file musicsettingwidget.cpp.

References Interior, lcrColorValue(), and m_ui.

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::interiorLrcFrontgroundChanged ( )
slot

Interior lrc foreground change.

Definition at line 432 of file musicsettingwidget.cpp.

References Interior, lcrColorValue(), and m_ui.

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::interiorLrcTransChanged ( int  value)
slot

Interior lrc transparent changed by index.

Definition at line 447 of file musicsettingwidget.cpp.

References Interior, lrcTransparentValue(), and m_ui.

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::lcrColorValue ( Lrc  key,
const QString &  type,
QLabel *  obj 
)
private
void MusicSettingWidget::lrcColorByDefault ( Lrc  key,
int  index 
)
private
void MusicSettingWidget::lrcTransparentValue ( Lrc  key,
int  value 
) const
private

Set lrc transparent by type and value.

Definition at line 1166 of file musicsettingwidget.cpp.

References Interior, m_ui, MusicPreviewLabel::setLinearGradient(), and MusicPreviewLabel::setTransparent().

Referenced by desktopLrcTransChanged(), and interiorLrcTransChanged().

void MusicSettingWidget::otherPluginManagerChanged ( )
slot

Plugin manager changed.

Definition at line 409 of file musicsettingwidget.cpp.

References MusicAbstractMoveDialog::exec().

Referenced by initOtherSettingWidget().

void MusicSettingWidget::parameterSettingChanged ( )
signal

Parameters setting changed.

Referenced by saveParameterSettings().

void MusicSettingWidget::resetDesktopParameter ( )
slot

Reset desktop parameter.

Definition at line 507 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::resetInteriorParameter ( )
slot

Reset interior parameter.

Definition at line 465 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::rippleLowPowerEnableBoxClicked ( bool  state)
slot

Ripple low power mode enable changed.

Definition at line 403 of file musicsettingwidget.cpp.

References m_ui, and rippleSpectrumOpacityEnableClicked().

Referenced by initialize(), and initSpectrumSettingWidget().

void MusicSettingWidget::rippleSpectrumColorChanged ( )
slot

Ripple spectrum color changed.

Definition at line 389 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initSpectrumSettingWidget().

void MusicSettingWidget::rippleSpectrumOpacityEnableClicked ( bool  state)
slot

Ripple spectrum opacity enable changed.

Definition at line 398 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initialize(), initSpectrumSettingWidget(), and rippleLowPowerEnableBoxClicked().

void MusicSettingWidget::rippleVersionUpdateChanged ( )
slot

Version update check changed.

Definition at line 384 of file musicsettingwidget.cpp.

References MusicSourceUpdateWidget::exec().

Referenced by initSpectrumSettingWidget().

void MusicSettingWidget::saveParameterSettings ( )
slot

Save the parameter setting results.

Definition at line 560 of file musicsettingwidget.cpp.

References TTK::applicationPath(), Apply, close(), MusicSettingManager::CloseEventMode, MusicSettingManager::DLrcBackgroundColor, MusicSettingManager::DLrcColor, MusicSettingManager::DLrcColorTransparent, MusicSettingManager::DLrcFamily, MusicSettingManager::DLrcFrontgroundColor, MusicSettingManager::DLrcSingleLineMode, MusicSettingManager::DLrcSize, MusicSettingManager::DLrcType, MusicSettingManager::DownloadCacheEnable, MusicSettingManager::DownloadCacheSize, MusicSettingManager::DownloadDownloadLimitSize, MusicSettingManager::DownloadFileNameRule, MusicSettingManager::DownloadLimitEnable, MusicSettingManager::DownloadLrcDirPath, MusicSettingManager::DownloadMusicDirPath, MusicSettingManager::DownloadServerIndex, MusicSettingManager::DownloadUploadLimitSize, MusicSettingManager::EnhancedFadeEnable, MusicSettingManager::EnhancedFadeInValue, MusicSettingManager::EnhancedFadeOutValue, MusicAbstractMoveDialog::exec(), MusicSettingManager::FileAssociationMode, G_HOTKEY_PTR, G_NETWORK_PTR, G_SETTING_PTR, MusicSettingManager::HotkeyEnable, MusicSettingManager::HotkeyValue, QmmpSettings::instance(), MusicSettingManager::LanguageIndex, MusicSettingManager::LastPlayIndex, LRC_COLOR_OFFSET, MusicSettingManager::LrcBackgroundColor, MusicSettingManager::LrcColor, MusicSettingManager::LrcColorTransparent, MusicSettingManager::LrcFamily, MusicSettingManager::LrcFrontgroundColor, MusicSettingManager::LrcSize, MusicSettingManager::LrcType, m_ui, MusicSettingManager::OtherCheckUpdateEnable, MusicSettingManager::OtherHighDpiScalingEnable, MusicSettingManager::OtherLrcKTVMode, MusicSettingManager::OtherPlaylistAutoSaveEnable, MusicSettingManager::OtherRandomShuffleMode, MusicSettingManager::OtherReadAlbumCover, MusicSettingManager::OtherReadFileInfo, MusicSettingManager::OtherScreenSaverEnable, MusicSettingManager::OtherSideByMode, MusicSettingManager::OtherWriteAlbumCover, MusicSettingManager::OtherWriteFileInfo, parameterSettingChanged(), MusicSettingManager::RippleLowPowerMode, MusicSettingManager::RippleSpectrumColor, MusicSettingManager::RippleSpectrumEnable, QmmpSettings::setAudioSettings(), QmmpSettings::setBufferSize(), setNetworkProxyByType(), QmmpSettings::setReplayGainSettings(), MusicMessageBox::setText(), QmmpSettings::setVolumeStep(), MusicSettingManager::ShowDesktopLrc, MusicSettingManager::StartUpMode, MusicSettingManager::StartUpPlayMode, TTK_QT_CONFIG, TTK_SPLITER, TTKStaticCast, MusicSettingManager::WindowQuitMode, and TTK::writeColorConfig().

Referenced by MusicSettingWidget().

void MusicSettingWidget::scrollWidgetValueChanged ( int  value)
privateslot

Scroll widget index changed.

Definition at line 702 of file musicsettingwidget.cpp.

References SCROLL_ITEM_HEIGHT, and selectFunctionTableIndex().

Referenced by initScrollWidgetPage().

void MusicSettingWidget::selectFunctionTableIndex ( int  row,
int  column 
)
private
bool MusicSettingWidget::setNetworkProxyByType ( Proxy  type)
private
void MusicSettingWidget::setNetworkProxyControl ( int  enable)
slot

Set network proxy control enabled or not.

Definition at line 516 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initNetworkWidget().

void MusicSettingWidget::setScrollWidgetPageIndex ( int  index)
privateslot

Set scroll widget page index.

Definition at line 697 of file musicsettingwidget.cpp.

References m_ui, and SCROLL_ITEM_HEIGHT.

Referenced by changeDesktopLrcWidget(), changeDownloadWidget(), changeInteriorLrcWidget(), and MusicSettingWidget().

void MusicSettingWidget::showDesktopLrcDemo ( )
slot
void MusicSettingWidget::showInteriorLrcDemo ( )
slot
void MusicSettingWidget::testNetworkConnection ( )
slot

Test current network connection available.

Definition at line 536 of file musicsettingwidget.cpp.

References MusicNetworkOperator::startToRequest(), and testNetworkConnectionStateChanged().

Referenced by initNetworkWidget().

void MusicSettingWidget::testNetworkConnectionStateChanged ( const QString &  name)
slot

Test current network connection available changed.

Definition at line 548 of file musicsettingwidget.cpp.

References m_ui.

Referenced by testNetworkConnection().

void MusicSettingWidget::testNetworkProxy ( )
slot

Test current proxy available.

Definition at line 526 of file musicsettingwidget.cpp.

References setNetworkProxyByType(), and Test.

Referenced by initNetworkWidget().

void MusicSettingWidget::testProxyStateChanged ( bool  state)
slot

Test current proxy available changed.

Definition at line 531 of file musicsettingwidget.cpp.

References MusicToastLabel::popup().

Referenced by setNetworkProxyByType().

Member Data Documentation

Ui::MusicSettingWidget* MusicSettingWidget::m_ui
private

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