void MusicRightAreaWidget::setupUi(Ui::MusicApplication* ui)
{
    m_ui = ui;
    m_downloadStatusLabel->setMovieLabel(m_ui->showDownloadGif);

    ui->lrcDisplayAllButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->lrcDisplayAllButton->setIconSize(QSize(15, 56));
    connect(ui->lrcDisplayAllButton, SIGNAL(clicked()), SLOT(musicLrcDisplayAllButtonClicked()));

    ui->musicSearchBackButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->musicSearchBackButton->setStyleSheet(MusicUIObject::MPushButtonStyle07);
    ui->musicSearchBackButton->setIconSize(QSize(25, 25));
    ui->musicSearchBackButton->setIcon(QIcon(QString::fromUtf8(":/image/back")));
//    connect(ui->musicSearchBackButton, SIGNAL(clicked()), SLOT(musicSearchRefreshButtonRefreshed()));

    ui->musicSearchRefreshButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->musicSearchRefreshButton->setStyleSheet(MusicUIObject::MPushButtonStyle07);
    ui->musicSearchRefreshButton->setIconSize(QSize(25, 25));
    ui->musicSearchRefreshButton->setIcon(QIcon(QString::fromUtf8(":/image/flash")));
    connect(ui->musicSearchRefreshButton, SIGNAL(clicked()), SLOT(musicSearchRefreshButtonRefreshed()));

    ui->musicIndexWidgetButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->musicIndexWidgetButton->setStyleSheet(MusicUIObject::MPushButtonStyle16);
    connect(ui->musicIndexWidgetButton, SIGNAL(clicked()), SLOT(musicIndexWidgetButtonSearched()));

    ui->musicSearchWidgetButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->musicSearchWidgetButton->setStyleSheet(MusicUIObject::MPushButtonStyle07);
    connect(ui->musicSearchWidgetButton, SIGNAL(clicked()), SLOT(musicSearchWidgetButtonSearched()));

    ui->musicLrcWidgetButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->musicLrcWidgetButton->setStyleSheet(MusicUIObject::MPushButtonStyle07);
    connect(ui->musicLrcWidgetButton, SIGNAL(clicked()), SLOT(musicLrcWidgetButtonSearched()));

    ui->vedioWidgetButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->vedioWidgetButton->setStyleSheet(MusicUIObject::MPushButtonStyle07);
    connect(ui->vedioWidgetButton, SIGNAL(clicked()), SLOT(musicVideoWidgetButtonSearched()));
    ///////////////////////////////////////////////////////
    connect(m_musiclrcfordesktop, SIGNAL(theCurrentLrcUpdated()), m_supperClass,
                 SLOT(musicCurrentLrcUpdated()));
    connect(m_musiclrcfordesktop, SIGNAL(changeCurrentLrcColorSetting()), m_supperClass,
                 SLOT(musicSetting()));
    connect(m_musiclrcfordesktop, SIGNAL(changeCurrentLrcColorCustom()), m_setting,
                 SLOT(changeDesktopLrcWidget()));
    connect(m_musiclrcfordesktop, SIGNAL(desktopLrcClosed()), SIGNAL(desktopLrcClosed()));
    connect(m_musiclrcfordesktop, SIGNAL(setWindowLockedChanged(bool)), SIGNAL(lockDesktopLrc(bool)));
    ///////////////////////////////////////////////////////
    connect(ui->musiclrccontainerforinline, SIGNAL(changeCurrentLrcColorCustom()), m_setting,
                 SLOT(changeInlineLrcWidget()));
    connect(ui->musiclrccontainerforinline, SIGNAL(theCurrentLrcUpdated()), m_supperClass,
                 SLOT(musicCurrentLrcUpdated()));
    connect(ui->musiclrccontainerforinline, SIGNAL(theArtBgHasChanged()),
                 SIGNAL(updateBgThemeDownload()));
    connect(ui->musiclrccontainerforinline, SIGNAL(changeCurrentLrcColorSetting()), m_supperClass,
                 SLOT(musicSetting()));
    connect(ui->musiclrccontainerforinline, SIGNAL(updateCurrentTime(qint64)), m_supperClass,
                 SLOT(updateCurrentTime(qint64)));
    connect(ui->musicSongSearchLine, SIGNAL(enterFinished(QString)),
                 SLOT(musicResearchButtonSearched(QString)));
    ///////////////////////////////////////////////////////
}
void MusicLrcContainerForDesktop::creatToolBarWidget()
{
    m_toolBarWidget = new QWidget(this);
    m_toolBarWidget->setStyleSheet(MusicUIObject::MCustomStyle09);
    m_toolBarWidget->setGeometry((m_geometry.x() - TOOLBAR_WIDTH)/2, 0, TOOLBAR_WIDTH, TOOLBAR_HEIGHT);

    m_showMainWindow = new QPushButton(m_toolBarWidget);

    m_toolCloseButton = new QToolButton(m_toolBarWidget);
    m_toolCloseButton->setGeometry(290, 0, 30, TOOLBAR_HEIGHT);
    connect(m_toolCloseButton, SIGNAL(clicked()), SLOT(close()));

    m_toolWindowLockedButton = new QToolButton(m_toolBarWidget);
    m_toolWindowLockedButton->setGeometry(260, 0, 30, TOOLBAR_HEIGHT);
    connect(m_toolWindowLockedButton, SIGNAL(clicked()), SLOT(setWindowLockedChanged()));

    m_toolLrcBigerButton = new QToolButton(m_toolBarWidget);
    m_toolLrcBigerButton->setGeometry(200, 0, 30, TOOLBAR_HEIGHT);
    connect(m_toolLrcBigerButton, SIGNAL(clicked()), SLOT(setLrcBigerChanged()));

    m_toolLrcSmallerButton = new QToolButton(m_toolBarWidget);
    m_toolLrcSmallerButton->setGeometry(230, 0, 30, TOOLBAR_HEIGHT);
    connect(m_toolLrcSmallerButton, SIGNAL(clicked()), SLOT(setLrcSmallerChanged()));

    m_toolUpdateLrcButton = new QToolButton(m_toolBarWidget);
    m_toolUpdateLrcButton->setGeometry(170, 0, 30, TOOLBAR_HEIGHT);
    connect(m_toolUpdateLrcButton, SIGNAL(clicked()),  SIGNAL(theCurrentLrcUpdated()));

    m_toolSettingButton = new QToolButton(m_toolBarWidget);
    m_toolSettingButton->setGeometry(140, 0, 30, TOOLBAR_HEIGHT);
    connect(m_toolSettingButton, SIGNAL(clicked()), SLOT(currentLrcCustom()));

    m_toolPreSongButton = new QToolButton(m_toolBarWidget);
    m_toolPreSongButton->setGeometry(50, 0, 30, TOOLBAR_HEIGHT);
    m_toolNextSongButton = new QToolButton(m_toolBarWidget);
    m_toolNextSongButton->setGeometry(110, 0, 30, TOOLBAR_HEIGHT);
    m_toolPlayButton = new QToolButton(m_toolBarWidget);
    m_toolPlayButton->setGeometry(80, 0, 30, TOOLBAR_HEIGHT);
    connect(m_toolPreSongButton, SIGNAL(clicked()), m_supperClass, SLOT(musicPlayPrivious()));
    connect(m_toolNextSongButton, SIGNAL(clicked()), m_supperClass, SLOT(musicPlayNext()));
    connect(m_toolPlayButton, SIGNAL(clicked()), m_supperClass, SLOT(musicKey()));
    connect(m_showMainWindow, SIGNAL(clicked()), m_supperClass, SLOT(showNormal()));

    setButtonIcon();
    setButtonCursor();
    setButtonTips();
    m_toolBarWidget->hide();
}
MusicLrcFloatWidget::MusicLrcFloatWidget(QWidget *parent)
    : MusicLrcFloatAbstractWidget(parent)
{
    setStyleSheet(MusicUIObject::MCustomStyle03);

    m_floatPhotoWidget = new MusicLrcFloatPhotoWidget(parent);
    m_floatPhotoWidget->hide();
    m_floatSettingWidget = new MusicLrcFloatSettingWidget(parent);
    m_floatSettingWidget->hide();

    resizeWidth(0);
    m_update = new QPushButton(tr(" Update"), this);
    m_search = new QPushButton(tr(" Search"), this);
    m_more = new QPushButton(tr(" More"), this);
    m_wallp = new QPushButton(tr(" Wallp"), this);
    m_photo = new QPushButton(tr(" Photo"), this);

    m_update->setIcon(QIcon(":/lrc/update"));
    m_search->setIcon(QIcon(":/lrc/search"));
    m_more->setIcon(QIcon(":/lrc/more"));
    m_wallp->setIcon(QIcon(":/lrc/wallpaper"));
    m_photo->setIcon(QIcon(":/lrc/photo"));

    m_update->setStyleSheet( MusicUIObject::MPushButtonStyle15 );
    m_search->setStyleSheet( MusicUIObject::MPushButtonStyle15 );
    m_more->setStyleSheet( MusicUIObject::MPushButtonStyle15 );
    m_wallp->setStyleSheet( MusicUIObject::MPushButtonStyle15 );
    m_photo->setStyleSheet( MusicUIObject::MPushButtonStyle15 );

    m_update->setGeometry(15, 10, m_update->width(), m_update->height());
    m_search->setGeometry(15, 50, m_search->width(), m_search->height());
    m_more->setGeometry(15, 90, m_more->width(), m_more->height());
    m_wallp->setGeometry(15, 130, m_wallp->width(), m_wallp->height());
    m_photo->setGeometry(15, 170, m_photo->width(), m_photo->height());

    m_update->setCursor(QCursor(Qt::PointingHandCursor));
    m_search->setCursor(QCursor(Qt::PointingHandCursor));
    m_more->setCursor(QCursor(Qt::PointingHandCursor));
    m_wallp->setCursor(QCursor(Qt::PointingHandCursor));
    m_photo->setCursor(QCursor(Qt::PointingHandCursor));

    connect(m_update, SIGNAL(clicked()), parent, SIGNAL(theCurrentLrcUpdated()));
    connect(m_search, SIGNAL(clicked()), parent, SLOT(searchMusicLrcs()));
    connect(m_photo, SIGNAL(clicked()), m_floatPhotoWidget, SLOT(show()));
    connect(m_floatSettingWidget, SIGNAL(widgetClose()), SLOT(closeFloatSettingWidget()));
    connect(m_more, SIGNAL(clicked()), this, SLOT(showFloatSettingWidget()));
}
void MusicLrcContainerForDesktop::contextMenuEvent(QContextMenuEvent *event)
{
    QWidget::contextMenuEvent(event);
    QMenu menu(this);
    QMenu changColorMenu(tr("changColorMenu"), this);
    changColorMenu.setStyleSheet(MusicUIObject::MMenuStyle02);
    menu.setStyleSheet(MusicUIObject::MMenuStyle02);
    menu.addAction(tr("searchLrcs"), this, SLOT(searchMusicLrcs()));
    menu.addAction(tr("updateLrc"), this, SIGNAL(theCurrentLrcUpdated()));
    menu.addAction(tr("makeLrc"), this, SLOT(theCurrentLrcMaked()));
    menu.addSeparator();
    menu.addAction(tr("hide"), this, SLOT(close()));
    menu.addAction(QIcon(":/contextMenu/lock"), tr("lockLrc"), this, SLOT(setWindowLockedChanged()));
    menu.addMenu(&changColorMenu);
    menu.addSeparator();

    createColorMenu(changColorMenu);
    menu.addAction(tr("customSetting"), this, SLOT(currentLrcCustom()));

    menu.exec(QCursor::pos());
}