TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the app object module. More...
#include <musicapplicationmodule.h>
Public Slots | |
void | quit () |
void | windowCloseAnimationFinished () |
void | showAboutWidget () |
void | showBugReportView () |
void | showVersionWidget () |
void | showTimerWidget () |
void | showSpectrumWidget () |
void | setWindowToTop () |
void | resetWindowGeometry () |
void | runTimerAutoModule () |
void | deviceNameChanged (const QString &name) |
void | deviceChanged (bool state) |
void | showEqualizerWidget () |
void | showSoundEffectWidget () |
void | soundEffectChanged () |
Signals | |
void | enhancedSongChanged (int type) |
Public Member Functions | |
MusicApplicationModule (QObject *parent=nullptr) | |
~MusicApplicationModule () | |
bool | windowToTop () const |
void | cleanup () |
bool | isLastedVersion () const |
void | loadNetWorkSetting () |
void | windowCloseAnimation () |
void | soureUpdateCheck () |
void | sideAnimationByOn () |
void | sideAnimationByOff () |
void | applyParameter () |
Static Public Member Functions | |
static MusicApplicationModule * | instance () |
Private Member Functions | |
bool | closeCurrentEqualizer () |
Private Attributes | |
bool | m_setWindowToTop |
TTK::Direction | m_direction |
QPropertyAnimation * | m_quitAnimation |
QPropertyAnimation * | m_sideAnimation |
MusicBackupModule * | m_backupModule |
MusicTimerAutoModule * | m_timerAutoModule |
MusicMobileDevicesWidget * | m_mobileDeviceWidget |
QDeviceWatcher * | m_deviceWatcher |
QWidget * | m_quitContainer |
MusicResourceRequest * | m_resourceRequest |
MusicPVCounterRequest * | m_counterRequest |
MusicSourceUpdateRequest * | m_sourceUpdateRequest |
MusicScreenSaverBackgroundWidget * | m_screenSaverWidget |
Static Private Attributes | |
static MusicApplicationModule * | m_instance = nullptr |
The class of the app object module.
Definition at line 42 of file musicapplicationmodule.h.
|
explicit |
Object constructor.
Definition at line 39 of file musicapplicationmodule.cpp.
References QDeviceWatcher::appendEventReceiver(), deviceChanged(), deviceNameChanged(), m_backupModule, m_counterRequest, m_deviceWatcher, m_instance, m_quitAnimation, m_resourceRequest, m_sideAnimation, m_sourceUpdateRequest, m_timerAutoModule, resetWindowGeometry(), runTimerAutoModule(), QDeviceWatcher::start(), and TTK_DN_S2MS.
MusicApplicationModule::~MusicApplicationModule | ( | ) |
Object destructor.
Definition at line 72 of file musicapplicationmodule.cpp.
References m_backupModule, m_counterRequest, m_deviceWatcher, m_mobileDeviceWidget, m_quitAnimation, m_quitContainer, m_resourceRequest, m_screenSaverWidget, m_sideAnimation, m_sourceUpdateRequest, and m_timerAutoModule.
void MusicApplicationModule::applyParameter | ( | ) |
Apply settings parameters.
Definition at line 268 of file musicapplicationmodule.cpp.
References TTK::applicationPath(), MusicSettingManager::FileAssociationMode, G_SETTING_PTR, TTK::installLogHandler(), m_backupModule, m_screenSaverWidget, MusicSettingManager::OtherHighDpiScalingEnable, MusicSettingManager::OtherLogTrackEnable, TTK::removeLogHandler(), MusicBackupModule::run(), MusicScreenSaverBackgroundWidget::run(), MusicSettingManager::StartUpMode, TTK::supportAssociations(), TTK_QT_CONFIG, TTKConcurrent, and TTK::unsupportAssociations().
Referenced by MusicApplication::applyParameter(), MusicScreenSaverWidget::currentItemClicked(), MusicScreenSaverWidget::inputDataChanged(), and MusicScreenSaverWidget::switchButtonState().
void MusicApplicationModule::cleanup | ( | ) |
Clean up the system parameter.
Definition at line 93 of file musicapplicationmodule.cpp.
References G_SETTING_PTR, MusicApplication::instance(), m_direction, TTK::No, MusicSettingManager::OtherSideByMode, and TTKDesktopWrapper::screenGeometry().
Referenced by MusicApplication::quitWindow().
|
private |
Close current equalizer.
Definition at line 472 of file musicapplicationmodule.cpp.
References MusicSettingManager::EnhancedMusicIndex, enhancedSongChanged(), MusicAbstractMoveDialog::exec(), G_SETTING_PTR, and MusicMessageBox::setText().
Referenced by showEqualizerWidget(), and showSoundEffectWidget().
|
slot |
Detect mobile devices changed.
Definition at line 423 of file musicapplicationmodule.cpp.
References MusicSettingManager::ExtraDevicePath, G_SETTING_PTR, and m_mobileDeviceWidget.
Referenced by MusicApplicationModule().
|
slot |
Detect mobile devices name changed.
Definition at line 418 of file musicapplicationmodule.cpp.
References MusicSettingManager::ExtraDevicePath, and G_SETTING_PTR.
Referenced by MusicApplicationModule().
|
signal |
Set enhanced song config changed.
Referenced by closeCurrentEqualizer().
|
static |
Get class object instance.
Definition at line 88 of file musicapplicationmodule.cpp.
References m_instance.
Referenced by MusicScreenSaverWidget::currentItemClicked(), MusicSettingWidget::initSoundEffectWidget(), MusicScreenSaverWidget::inputDataChanged(), MusicBackgroundSkinDialog::MusicBackgroundSkinDialog(), MusicEnhancedPopWidget::MusicEnhancedPopWidget(), MusicTimerWidget::saveParameterSettings(), and MusicScreenSaverWidget::switchButtonState().
bool MusicApplicationModule::isLastedVersion | ( | ) | const |
Is lasted version.
Definition at line 104 of file musicapplicationmodule.cpp.
References MusicSourceUpdateRequest::isLastedVersion(), and m_sourceUpdateRequest.
Referenced by MusicApplication::createRightMenu().
void MusicApplicationModule::loadNetWorkSetting | ( | ) |
load network settings parameters.
Definition at line 109 of file musicapplicationmodule.cpp.
References QSyncConfig::HOST, m_counterRequest, m_resourceRequest, m_sourceUpdateRequest, TTK::Algorithm::mdII(), MusicPVCounterRequest::startToRequest(), MusicResourceRequest::startToRequest(), MusicSourceUpdateRequest::startToRequest(), SYNC_HOST_URL, and TTK_INFO_STREAM.
Referenced by MusicApplication::readSystemConfigFromFile().
|
slot |
Application quit.
Definition at line 327 of file musicapplicationmodule.cpp.
Referenced by windowCloseAnimation().
|
slot |
Reset current window geometry.
Definition at line 397 of file musicapplicationmodule.cpp.
References G_SETTING_PTR, MusicApplication::instance(), m_direction, TTK::No, TTKDesktopWrapper::screenGeometry(), MusicSettingManager::ScreenSize, MusicSettingManager::WidgetSize, WINDOW_HEIGHT_MIN, and WINDOW_WIDTH_MIN.
Referenced by MusicApplicationModule().
|
slot |
Run timer auto module.
Definition at line 413 of file musicapplicationmodule.cpp.
References m_timerAutoModule, and MusicTimerAutoModule::run().
Referenced by MusicApplicationModule(), and MusicTimerWidget::saveParameterSettings().
|
slot |
Set current window to top.
Definition at line 389 of file musicapplicationmodule.cpp.
References MusicApplication::instance(), and m_setWindowToTop.
|
slot |
Show about widget.
Definition at line 359 of file musicapplicationmodule.cpp.
References MusicAbstractMoveDialog::exec().
|
slot |
Show bug report view.
Definition at line 364 of file musicapplicationmodule.cpp.
References TTK::Algorithm::mdII(), TTK::Url::openUrl(), and REPORT_BUG_URL.
|
slot |
Show set equalizer widget.
Definition at line 439 of file musicapplicationmodule.cpp.
References closeCurrentEqualizer(), and MusicAbstractMoveDialog::exec().
|
slot |
Show set sound effect widget.
Definition at line 450 of file musicapplicationmodule.cpp.
References closeCurrentEqualizer(), MusicAbstractMoveDialog::exec(), and MusicSoundEffectsWidget::setInputModule().
|
slot |
Show spectrum widget.
Definition at line 384 of file musicapplicationmodule.cpp.
References TTKGenerateSingleWidget.
|
slot |
Show timer widget.
Definition at line 374 of file musicapplicationmodule.cpp.
References MusicApplication::currentPlaylist(), MusicAbstractMoveDialog::exec(), MusicApplication::instance(), and MusicTimerWidget::setSongStringList().
|
slot |
Show version update widget.
Definition at line 369 of file musicapplicationmodule.cpp.
References MusicSourceUpdateWidget::exec(), and MusicApplication::instance().
void MusicApplicationModule::sideAnimationByOff | ( | ) |
Side animation by off.
Definition at line 226 of file musicapplicationmodule.cpp.
References TTK::Bottom, G_SETTING_PTR, MusicApplication::instance(), TTK::Left, TTK::LeftBottom, TTK::LeftTop, m_direction, m_sideAnimation, TTK::No, MusicSettingManager::OtherSideByInMode, MusicSettingManager::OtherSideByMode, TTK::Right, TTK::RightBottom, TTK::RightTop, TTKDesktopWrapper::screenGeometry(), and TTK::Top.
Referenced by MusicApplication::enterEvent(), and windowCloseAnimation().
void MusicApplicationModule::sideAnimationByOn | ( | ) |
Side animation by on.
Definition at line 163 of file musicapplicationmodule.cpp.
References TTK::Bottom, G_SETTING_PTR, MusicApplication::instance(), TTK::Left, TTKPlatformSystem::LinuxUbuntu, TTKDesktopWrapper::TaskbarInfo::m_direction, m_direction, m_sideAnimation, MARGIN_SIDE, MusicSettingManager::OtherSideByInMode, MusicSettingManager::OtherSideByMode, TTK::Right, TTKDesktopWrapper::screenGeometry(), TTKDesktopWrapper::screenTaskbar(), TTKPlatformSystem::systemName(), and TTK::Top.
Referenced by MusicApplication::leaveEvent(), and MusicApplication::mouseReleaseEvent().
|
slot |
Sound effect changed.
Definition at line 462 of file musicapplicationmodule.cpp.
References TTK::TTKQmmp::enabledEffectPlugin(), MusicSettingManager::EnhancedEffectValue, G_SETTING_PTR, qAsConst, and QtSkipEmptyParts.
Referenced by MusicApplication::readSystemConfigFromFile().
void MusicApplicationModule::soureUpdateCheck | ( | ) |
Soure update check.
Definition at line 157 of file musicapplicationmodule.cpp.
References MusicAbstractMoveWidget::show().
Referenced by MusicApplication::readSystemConfigFromFile().
void MusicApplicationModule::windowCloseAnimation | ( | ) |
Window close animation.
remove fixed size
Definition at line 123 of file musicapplicationmodule.cpp.
References MusicSettingManager::BackgroundTransparent, G_SETTING_PTR, MusicTopAreaWidget::instance(), MusicApplication::instance(), m_quitAnimation, quit(), MusicTopAreaWidget::setBackgroundAnimation(), sideAnimationByOff(), TTK_DN_S2MS, TTK_RN_MAX, TTK_SIGNLE_SHOT, TTK_SLOT, windowCloseAnimationFinished(), and MusicSettingManager::WindowQuitMode.
Referenced by MusicApplication::quitWindow().
|
slot |
Window close animation finished.
Definition at line 332 of file musicapplicationmodule.cpp.
References MusicGifLabelWidget::CloseWhite, MusicApplication::instance(), m_quitContainer, MusicGifLabelWidget::setInfinited(), MusicGifLabelWidget::setInterval(), MusicGifLabelWidget::setType(), MusicGifLabelWidget::start(), and TTK_DN_MS.
Referenced by windowCloseAnimation().
|
inline |
Get current window is to top.
Definition at line 64 of file musicapplicationmodule.h.
Referenced by MusicApplication::createRightMenu().
|
private |
Definition at line 178 of file musicapplicationmodule.h.
Referenced by applyParameter(), MusicApplicationModule(), and ~MusicApplicationModule().
|
private |
Definition at line 185 of file musicapplicationmodule.h.
Referenced by loadNetWorkSetting(), MusicApplicationModule(), and ~MusicApplicationModule().
|
private |
Definition at line 181 of file musicapplicationmodule.h.
Referenced by MusicApplicationModule(), and ~MusicApplicationModule().
|
private |
Definition at line 176 of file musicapplicationmodule.h.
Referenced by cleanup(), resetWindowGeometry(), sideAnimationByOff(), and sideAnimationByOn().
|
staticprivate |
Definition at line 189 of file musicapplicationmodule.h.
Referenced by instance(), and MusicApplicationModule().
|
private |
Definition at line 180 of file musicapplicationmodule.h.
Referenced by deviceChanged(), and ~MusicApplicationModule().
|
private |
Definition at line 177 of file musicapplicationmodule.h.
Referenced by MusicApplicationModule(), windowCloseAnimation(), and ~MusicApplicationModule().
|
private |
Definition at line 182 of file musicapplicationmodule.h.
Referenced by windowCloseAnimationFinished(), and ~MusicApplicationModule().
|
private |
Definition at line 184 of file musicapplicationmodule.h.
Referenced by loadNetWorkSetting(), MusicApplicationModule(), and ~MusicApplicationModule().
|
private |
Definition at line 187 of file musicapplicationmodule.h.
Referenced by applyParameter(), and ~MusicApplicationModule().
|
private |
Definition at line 175 of file musicapplicationmodule.h.
Referenced by setWindowToTop().
|
private |
Definition at line 177 of file musicapplicationmodule.h.
Referenced by MusicApplicationModule(), sideAnimationByOff(), sideAnimationByOn(), and ~MusicApplicationModule().
|
private |
Definition at line 186 of file musicapplicationmodule.h.
Referenced by isLastedVersion(), loadNetWorkSetting(), MusicApplicationModule(), and ~MusicApplicationModule().
|
private |
Definition at line 179 of file musicapplicationmodule.h.
Referenced by MusicApplicationModule(), runTimerAutoModule(), and ~MusicApplicationModule().