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();
    ////////////////////////////////////////////////
}