MusicSongsListPlayWidget::MusicSongsListPlayWidget(int index, QWidget *parent)
    : MusicSongsEnterPlayWidget(index, parent), m_renameLine(nullptr)
{
    m_totalTime = "/00:00";

    m_artPictureLabel = new QLabel(this);
    m_artPictureLabel->setFixedSize(60, 60);
    m_artPictureLabel->setAttribute(Qt::WA_TranslucentBackground);
    m_artPictureLabel->setGeometry(0, 0, 60, 60);

    m_songNameLabel = new QLabel(this);
    m_songNameLabel->setFixedSize(202, 25);
    m_songNameLabel->setAttribute(Qt::WA_TranslucentBackground);
    m_songNameLabel->setStyleSheet(MusicUIObject::MCustomStyle11);
    m_songNameLabel->setGeometry(65, 5, 182, 25);

    m_timeLabel = new QLabel(this);
    m_timeLabel->setFixedSize(100, 20);
    m_timeLabel->setAttribute(Qt::WA_TranslucentBackground);
    m_timeLabel->setStyleSheet(MusicUIObject::MCustomStyle11);
    m_timeLabel->setGeometry(65, 37, 100, 20);

    m_columnOne = new MusicSongsEnterPlayWidget(index, this);
    m_columnThree = new MusicSongsEnterPlayWidget(index, this);

    m_loveButton = new QPushButton(this);
    m_loveButton->setGeometry(214, 35, 23, 23);
    m_loveButton->setStyleSheet( MusicUIObject::MPushButtonStyle13 );
    m_loveButton->setCursor(QCursor(Qt::PointingHandCursor));
    m_loveButton->setToolTip(tr("bestlove"));
    currentLoveStateClicked();

    m_deleteButton = new QPushButton(this);
    m_deleteButton->setGeometry(235, 35, 23, 23);
    m_deleteButton->setStyleSheet( MusicUIObject::MPushButtonStyle13 );
    m_deleteButton->setIcon(QIcon(":/image/musicdelete"));
    m_deleteButton->setCursor(QCursor(Qt::PointingHandCursor));
    m_deleteButton->setToolTip(tr("deleteMusic"));

    m_downloadButton = new QPushButton(this);
    m_downloadButton->setGeometry(170, 35, 23, 23);
    m_downloadButton->setStyleSheet( MusicUIObject::MPushButtonStyle13 );
    m_downloadButton->setIconSize(QSize(23, 23));
    m_downloadButton->setCursor(QCursor(Qt::PointingHandCursor));
    m_downloadButton->setToolTip(tr("songDownload"));
    currentDownloadStateClicked();

    m_showMVButton = new QPushButton(m_columnThree);
    m_showMVButton->setGeometry(0, 35, 23, 23);
    m_showMVButton->setStyleSheet( MusicUIObject::MPushButtonStyle13 );
    m_showMVButton->setIcon(QIcon(":/share/showMV2"));
    m_showMVButton->setCursor(QCursor(Qt::PointingHandCursor));
    m_showMVButton->setToolTip(tr("showMV"));

    m_songShareButton = new QPushButton(m_columnThree);
    m_songShareButton->setGeometry(0, 7, 23, 23);
    m_songShareButton->setStyleSheet( MusicUIObject::MPushButtonStyle13 );
    m_songShareButton->setIcon(QIcon(":/image/songShare"));
    m_songShareButton->setCursor(QCursor(Qt::PointingHandCursor));
    m_songShareButton->setToolTip(tr("songShare"));

    connect(m_loveButton, SIGNAL(clicked()), SIGNAL(currentLoveStateChanged()));
    connect(m_downloadButton, SIGNAL(clicked()), SIGNAL(currentDownloadStateChanged()));
    connect(m_deleteButton, SIGNAL(clicked()), parent, SLOT(setDeleteItemAt()));
    connect(this, SIGNAL(renameFinished(QString)), parent, SLOT(setItemRenameFinished(QString)));
    connect(this, SIGNAL(enterChanged(int,int)), parent, SLOT(listCellEntered(int,int)));
    connect(m_columnOne, SIGNAL(enterChanged(int,int)), parent, SLOT(listCellEntered(int,int)));
    connect(m_columnThree, SIGNAL(enterChanged(int,int)), parent, SLOT(listCellEntered(int,int)));
    connect(m_showMVButton, SIGNAL(clicked()), SLOT(showMVButtonClicked()));
    connect(m_songShareButton, SIGNAL(clicked()), SLOT(sharingButtonClicked()));

    M_CONNECTION->setValue("MusicSongsListPlayWidget", this);
    M_CONNECTION->poolConnect("MusicSongsListPlayWidget", "MusicRightAreaWidget");
    M_CONNECTION->poolConnect("MusicSongsListPlayWidget", "MusicApplication");
    M_CONNECTION->poolConnect("MusicLeftAreaWidget", "MusicSongsListPlayWidget");
}
void MusicLeftAreaWidget::musictLoveStateClicked(bool state)
{
    m_ui->musicBestLove->setStyleSheet(state ? MusicUIObject::MKGBtnLove : MusicUIObject::MKGBtnUnLove);
    emit currentLoveStateChanged();
}