MusicTimerWidget::MusicTimerWidget(QWidget *parent)
    : MusicAbstractMoveDialog(parent),
      ui(new Ui::MusicTimerWidget)
{
    ui->setupUi(this);

    ui->topTitleCloseButton->setIcon(QIcon(":/share/searchclosed"));
    ui->topTitleCloseButton->setStyleSheet(MusicUIObject::MToolButtonStyle03);
    ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->topTitleCloseButton->setToolTip(tr("Close"));
    connect(ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));

    connect(ui->timerToPlay, SIGNAL(clicked()), SLOT(changeFirstWidget()));
    connect(ui->timerToStop, SIGNAL(clicked()), SLOT(changeSecondWidget()));
    connect(ui->timerToShutdown, SIGNAL(clicked()), SLOT(changeThreeWidget()));

    ui->timerToPlay->setIcon(QIcon(":/control/timerPlay"));
    ui->timerToStop->setIcon(QIcon(":/control/timerStop"));
    ui->timerToShutdown->setIcon(QIcon(":/control/timerDown"));
    ui->timerToPlay->setStyleSheet(MusicUIObject::MPushButtonStyle08);
    ui->timerToStop->setStyleSheet(MusicUIObject::MPushButtonStyle08);
    ui->timerToShutdown->setStyleSheet(MusicUIObject::MPushButtonStyle08);
    ui->confirm->setStyleSheet(MusicUIObject::MPushButtonStyle08);
    ui->cancel->setStyleSheet(MusicUIObject::MPushButtonStyle08);
    ui->timerToPlay->setCursor(QCursor(Qt::PointingHandCursor));
    ui->timerToStop->setCursor(QCursor(Qt::PointingHandCursor));
    ui->timerToShutdown->setCursor(QCursor(Qt::PointingHandCursor));
    ui->confirm->setCursor(QCursor(Qt::PointingHandCursor));
    ui->cancel->setCursor(QCursor(Qt::PointingHandCursor));
    connect(ui->timerToPlay, SIGNAL(clicked()), SLOT(changeFirstWidget()));
    connect(ui->timerToStop, SIGNAL(clicked()), SLOT(changeSecondWidget()));
    connect(ui->timerToShutdown, SIGNAL(clicked()), SLOT(changeThreeWidget()));
    connect(ui->confirm, SIGNAL(clicked()), SLOT(commitTheResults()));
    connect(ui->cancel, SIGNAL(clicked()), SLOT(close()));

    initComboParameter();
    initFirstWidget();
    initSecondWidget();
    initThreeWidget();
    initParemeter();

    QButtonGroup *group1 = new QButtonGroup(this);
    group1->addButton(ui->noSetRadioButton1, 0);
    group1->addButton(ui->setRadioButton1, 1);
    connect(group1, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int)));

    QButtonGroup *group2 = new QButtonGroup(this);
    group2->addButton(ui->noSetRadioButton2, 2);
    group2->addButton(ui->setRadioButton2, 3);
    connect(group2, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int)));

    QButtonGroup *group3 = new QButtonGroup(this);
    group3->addButton(ui->noSetRadioButton3, 4);
    group3->addButton(ui->setRadioButton3, 5);
    connect(group3, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int)));

    M_CONNECTION_PTR->setValue(getClassName(), this);
    M_CONNECTION_PTR->poolConnect(getClassName(), MusicApplicationObject::getClassName());
}
MusicSettingWidget::MusicSettingWidget(QWidget *parent)
    : MusicAbstractMoveDialog(parent),
      ui(new Ui::MusicSettingWidget)
{
    ui->setupUi(this);

    ////////////////////////////////////////////////
    ui->topTitleCloseButton->setIcon(QIcon(":/share/searchclosed"));
    ui->topTitleCloseButton->setStyleSheet(MusicUIObject::MToolButtonStyle03);
    ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->topTitleCloseButton->setToolTip(tr("Close"));
    connect(ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));

    ////////////////////////////////////////////////
    ui->normalFunTableWidget->setRowCount(3);
    ui->normalFunTableWidget->addFunctionItems(0,
            QStringList() << ":/contextMenu/setting" << ":/contextMenu/funckeyboard" << ":/contextMenu/funcdownload",
            QStringList() << tr("Normal") << tr("Hotkey") << tr("Dwonload"));
    ui->lrcFunTableWidget->setRowCount(2);
    ui->lrcFunTableWidget->addFunctionItems(ui->normalFunTableWidget->rowCount(),
                                            QStringList() << ":/contextMenu/lrc" << ":/contextMenu/funcdesktopLrc",
                                            QStringList() << tr("Desktop") << tr("Inline"));
    ui->confirmButton->setStyleSheet(MusicUIObject::MPushButtonStyle06);
    ui->cancelButton->setStyleSheet(MusicUIObject::MPushButtonStyle06);
    ui->confirmButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->cancelButton->setCursor(QCursor(Qt::PointingHandCursor));

    connect(ui->normalFunTableWidget, SIGNAL(currentIndexChanged(int)), ui->stackedWidget, SLOT(setCurrentIndex(int)));
    connect(ui->normalFunTableWidget, SIGNAL(currentIndexChanged(int)), ui->lrcFunTableWidget, SLOT(clearSelection()));
    connect(ui->lrcFunTableWidget, SIGNAL(currentIndexChanged(int)), ui->stackedWidget, SLOT(setCurrentIndex(int)));
    connect(ui->lrcFunTableWidget, SIGNAL(currentIndexChanged(int)), ui->normalFunTableWidget, SLOT(clearSelection()));
    connect(ui->confirmButton, SIGNAL(clicked()), SLOT(commitTheResults()));
    connect(ui->cancelButton, SIGNAL(clicked()), SLOT(close()));

    ////////////////////////////////////////////////
    ui->autoPlayCheckBox->setStyleSheet(MusicUIObject::MCheckBoxStyle01);
    ui->backPlayCheckBox->setStyleSheet(MusicUIObject::MCheckBoxStyle01);
    ui->minimumRadioBox->setStyleSheet(MusicUIObject::MRadioButtonStyle01);
    ui->quitRadioBox->setStyleSheet(MusicUIObject::MRadioButtonStyle01);
    ui->setDefaultPlayerCheckBox->setStyleSheet(MusicUIObject::MCheckBoxStyle01);
    ui->closeNetWorkCheckBox->setStyleSheet(MusicUIObject::MCheckBoxStyle01);

    ui->languageComboBox->setItemDelegate(new QStyledItemDelegate(ui->languageComboBox));
    ui->languageComboBox->setStyleSheet(MusicUIObject::MComboBoxStyle01 + MusicUIObject::MItemView01);
    ui->languageComboBox->view()->setStyleSheet(MusicUIObject::MScrollBarStyle01);
    ui->languageComboBox->addItems(QStringList() << tr("0") << tr("1") << tr("2"));
    ////////////////////////////////////////////////
    ui->showInlineCheckBox->setStyleSheet(MusicUIObject::MCheckBoxStyle01);
    ui->showDesktopCheckBox->setStyleSheet(MusicUIObject::MCheckBoxStyle01);

    ////////////////////////////////////////////////
    initInlineLrcWidget();
    initDesktopLrcWidget();
    initDownloadWidget();
    ////////////////////////////////////////////////
}
MusicSettingWidget::MusicSettingWidget(QWidget *parent)
    : MusicAbstractMoveDialog(parent),
      ui(new Ui::MusicSettingWidget)
{
    ui->setupUi(this);

    ////////////////////////////////////////////////
    ui->topTitleCloseButton->setIcon(QIcon(":/share/searchclosed"));
    ui->topTitleCloseButton->setStyleSheet(MusicUIObject::MToolButtonStyle03);
    ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->topTitleCloseButton->setToolTip(tr("Close"));
    connect(ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));

    ////////////////////////////////////////////////
    ui->normalFunTableWidget->setRowCount(3);
    ui->normalFunTableWidget->addFunctionItems(0,
        QStringList() << ":/contextMenu/setting" << ":/contextMenu/funckeyboard" << ":/contextMenu/funcdownload",
        QStringList() << tr("Normal") << tr("Hotkey") << tr("Dwonload"));
    ui->lrcFunTableWidget->setRowCount(2);
    ui->lrcFunTableWidget->addFunctionItems(ui->normalFunTableWidget->rowCount(),
        QStringList() << ":/contextMenu/lrc" << ":/contextMenu/funcdesktopLrc",
        QStringList() << tr("Desktop") << tr("Inline"));
    ui->supperFunTableWidget->setRowCount(2);
    ui->supperFunTableWidget->addFunctionItems(ui->normalFunTableWidget->rowCount() + ui->lrcFunTableWidget->rowCount(),
        QStringList() << ":/contextMenu/equalizer" << ":/contextMenu/network",
        QStringList() << tr("Equalizer") << tr("NetWork"));
    ui->confirmButton->setStyleSheet(MusicUIObject::MPushButtonStyle08);
    ui->cancelButton->setStyleSheet(MusicUIObject::MPushButtonStyle08);
    ui->confirmButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->cancelButton->setCursor(QCursor(Qt::PointingHandCursor));

    connect(ui->normalFunTableWidget, SIGNAL(currentIndexChanged(int)), ui->stackedWidget, SLOT(setCurrentIndex(int)));
    connect(ui->normalFunTableWidget, SIGNAL(currentIndexChanged(int)), SLOT(clearFunctionTableSelection()));
    connect(ui->lrcFunTableWidget, SIGNAL(currentIndexChanged(int)), ui->stackedWidget, SLOT(setCurrentIndex(int)));
    connect(ui->lrcFunTableWidget, SIGNAL(currentIndexChanged(int)), SLOT(clearFunctionTableSelection()));
    connect(ui->supperFunTableWidget, SIGNAL(currentIndexChanged(int)), ui->stackedWidget, SLOT(setCurrentIndex(int)));
    connect(ui->supperFunTableWidget, SIGNAL(currentIndexChanged(int)), SLOT(clearFunctionTableSelection()));
    connect(ui->confirmButton, SIGNAL(clicked()), SLOT(commitTheResults()));
    connect(ui->cancelButton, SIGNAL(clicked()), SLOT(close()));

    ////////////////////////////////////////////////
    initNormalSettingWidget();
    initInlineLrcWidget();
    initDesktopLrcWidget();
    initDownloadWidget();
    initSoundEffectWidget();
    initNetworkWidget();
    ////////////////////////////////////////////////
}