TTKMusicPlayer  4.1.3.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 changeDesktopLrcWidget ()
 
void changeInteriorLrcWidget ()
 
void changeDownloadWidget ()
 
- 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 blockOption (bool block)
 

Private Slots

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 rippleSpectrumTransChanged (int value)
 
void rippleSpectrumEnableClicked (bool state)
 
void rippleLowPowerEnableBoxClicked (bool state)
 
void otherPluginManagerChanged ()
 
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 ()
 
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 426 of file musicsettingwidget.cpp.

References selectFunctionTableIndex(), and setScrollWidgetPageIndex().

void MusicSettingWidget::changeDownloadWidget ( )
slot

Change to download widget.

Definition at line 438 of file musicsettingwidget.cpp.

References selectFunctionTableIndex(), and setScrollWidgetPageIndex().

Referenced by MusicRightAreaWidget::changeDownloadCustumWidget().

void MusicSettingWidget::changeInteriorLrcWidget ( )
slot

Change to interior lrc widget.

Definition at line 432 of file musicsettingwidget.cpp.

References selectFunctionTableIndex(), and setScrollWidgetPageIndex().

void MusicSettingWidget::checkNetworkConnection ( )
privateslot

Check current network connection available.

Definition at line 555 of file musicsettingwidget.cpp.

References TTKGenerateSingleWidget.

Referenced by initNetworkWidget().

void MusicSettingWidget::clearFunctionTableSelection ( )
privateslot

Clear all function tables selection.

Definition at line 318 of file musicsettingwidget.cpp.

References m_ui.

Referenced by MusicSettingWidget(), and selectFunctionTableIndex().

void MusicSettingWidget::close ( )
slot

Override close function.

Definition at line 313 of file musicsettingwidget.cpp.

Referenced by MusicSettingWidget(), and saveParameterSettings().

void MusicSettingWidget::defaultDesktopLrcColorChanged ( int  value)
privateslot

Default desktop lrc color change by index.

Definition at line 496 of file musicsettingwidget.cpp.

References Desktop, and lrcColorByDefault().

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::defaultLrcColorChanged ( int  value)
privateslot

Default lrc color change by index.

Definition at line 454 of file musicsettingwidget.cpp.

References Interior, and lrcColorByDefault().

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::desktopBackgroundChanged ( )
privateslot

Desktop lrc background change.

Definition at line 491 of file musicsettingwidget.cpp.

References Desktop, lcrColorValue(), and m_ui.

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::desktopFrontgroundChanged ( )
privateslot

Desktop lrc foreground change.

Definition at line 486 of file musicsettingwidget.cpp.

References Desktop, lcrColorValue(), and m_ui.

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::desktopLrcTransChanged ( int  value)
privateslot

Desktop lrc transparent changed by value.

Definition at line 501 of file musicsettingwidget.cpp.

References Desktop, lrcTransparentValue(), and m_ui.

Referenced by initDesktopLrcWidget().

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

Set select download dir or lrc dir.

Definition at line 381 of file musicsettingwidget.cpp.

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

Referenced by initDownloadWidget().

void MusicSettingWidget::downloadFileNameRuleChanged ( QAction *  action)
privateslot

Set download file name rules.

Definition at line 361 of file musicsettingwidget.cpp.

References m_ui, and MusicRulesAnalysis::rule().

Referenced by initDownloadWidget().

void MusicSettingWidget::downloadGroupCached ( int  index)
privateslot

Set enable or disable download cache.

Definition at line 370 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initDownloadWidget().

void MusicSettingWidget::downloadGroupSpeedLimit ( int  index)
privateslot

Set enable or disable download speed limit.

Definition at line 375 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initDownloadWidget().

void MusicSettingWidget::fadeInAndOutClicked ( bool  state)
privateslot

Music fade in and out changed.

Definition at line 566 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initSoundEffectWidget().

void MusicSettingWidget::fileAssociationChanged ( )
privateslot

File association changed.

Definition at line 325 of file musicsettingwidget.cpp.

References MusicAbstractMoveDialog::exec().

Referenced by initNormalSettingWidget().

void MusicSettingWidget::globalHotkeyBoxChanged ( bool  state)
privateslot

Set global hotkey box changed.

Definition at line 330 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::OtherLogTrackEnable, 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, rippleSpectrumEnableClicked(), MusicSettingManager::RippleSpectrumTransparent, 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 918 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 ( )
privateslot

Interior lrc background change.

Definition at line 449 of file musicsettingwidget.cpp.

References Interior, lcrColorValue(), and m_ui.

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::interiorLrcFrontgroundChanged ( )
privateslot

Interior lrc foreground change.

Definition at line 444 of file musicsettingwidget.cpp.

References Interior, lcrColorValue(), and m_ui.

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::interiorLrcTransChanged ( int  value)
privateslot

Interior lrc transparent changed by value.

Definition at line 459 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 1175 of file musicsettingwidget.cpp.

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

Referenced by desktopLrcTransChanged(), and interiorLrcTransChanged().

void MusicSettingWidget::otherPluginManagerChanged ( )
privateslot

Plugin manager changed.

Definition at line 421 of file musicsettingwidget.cpp.

References MusicAbstractMoveDialog::exec().

Referenced by initOtherSettingWidget().

void MusicSettingWidget::parameterSettingChanged ( )
signal

Parameters setting changed.

Referenced by saveParameterSettings().

void MusicSettingWidget::resetDesktopParameter ( )
privateslot

Reset desktop parameter.

Definition at line 519 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initDesktopLrcWidget().

void MusicSettingWidget::resetInteriorParameter ( )
privateslot

Reset interior parameter.

Definition at line 477 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initInteriorLrcWidget().

void MusicSettingWidget::rippleLowPowerEnableBoxClicked ( bool  state)
privateslot

Ripple low power mode enable changed.

Definition at line 415 of file musicsettingwidget.cpp.

References m_ui, and rippleSpectrumEnableClicked().

Referenced by initialize(), and initSpectrumSettingWidget().

void MusicSettingWidget::rippleSpectrumColorChanged ( )
privateslot

Ripple spectrum color changed.

Definition at line 395 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initSpectrumSettingWidget().

void MusicSettingWidget::rippleSpectrumEnableClicked ( bool  state)
privateslot

Ripple spectrum enable changed.

Definition at line 409 of file musicsettingwidget.cpp.

References m_ui.

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

void MusicSettingWidget::rippleSpectrumTransChanged ( int  value)
privateslot

Ripple spectrum transparent changed by value.

Definition at line 404 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initSpectrumSettingWidget().

void MusicSettingWidget::rippleVersionUpdateChanged ( )
privateslot

Version update check changed.

Definition at line 390 of file musicsettingwidget.cpp.

References MusicSourceUpdateWidget::exec().

Referenced by initSpectrumSettingWidget().

void MusicSettingWidget::saveParameterSettings ( )
privateslot

Save the parameter setting results.

Definition at line 572 of file musicsettingwidget.cpp.

References 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::OtherLogTrackEnable, 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, MusicSettingManager::RippleSpectrumTransparent, QmmpSettings::setAudioSettings(), QmmpSettings::setBufferSize(), setNetworkProxyByType(), QmmpSettings::setReplayGainSettings(), MusicMessageBox::setText(), QmmpSettings::setVolumeStep(), MusicSettingManager::ShowDesktopLrc, MusicSettingManager::StartUpMode, MusicSettingManager::StartUpPlayMode, TTK_SPLITER, TTKStaticCast, MusicSettingManager::WindowQuitMode, and TTK::writeColorConfig().

Referenced by MusicSettingWidget().

void MusicSettingWidget::scrollWidgetValueChanged ( int  value)
privateslot

Scroll widget index changed.

Definition at line 705 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)
privateslot

Set network proxy control enabled or not.

Definition at line 528 of file musicsettingwidget.cpp.

References m_ui.

Referenced by initNetworkWidget().

void MusicSettingWidget::setScrollWidgetPageIndex ( int  index)
privateslot

Set scroll widget page index.

Definition at line 700 of file musicsettingwidget.cpp.

References m_ui, and SCROLL_ITEM_HEIGHT.

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

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

Test current network connection available.

Definition at line 548 of file musicsettingwidget.cpp.

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

Referenced by initNetworkWidget().

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

Test current network connection available changed.

Definition at line 560 of file musicsettingwidget.cpp.

References m_ui.

Referenced by testNetworkConnection().

void MusicSettingWidget::testNetworkProxy ( )
privateslot

Test current proxy available.

Definition at line 538 of file musicsettingwidget.cpp.

References setNetworkProxyByType(), and Test.

Referenced by initNetworkWidget().

void MusicSettingWidget::testProxyStateChanged ( bool  state)
privateslot

Test current proxy available changed.

Definition at line 543 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: