MusicBackgroundRemoteWidget::MusicBackgroundRemoteWidget(QWidget *parent)
    : QWidget(parent), m_downloadQueue(nullptr)
{
    m_currentIndex = -1;
    m_group = new QButtonGroup(this);

    initWidget();
    createUrls();

    m_downloadQueue = new MusicDownloadQueueCache(QStringList(), QStringList(),
                            MusicDownLoadThreadAbstract::Download_BigBG, this);
    connect(m_downloadQueue, SIGNAL(musicDownLoadFinished(QString)), m_listWidget,
                             SLOT(recreateItem(QString)));
}
void QgsLayoutItemUndoCommand::restoreState( QDomDocument &stateDoc )
{
  // find item by uuid...
  QgsLayoutItem *item = mLayout->itemByUuid( mItemUuid );
  if ( !item )
  {
    // uh oh - it's been deleted! we need to create a new instance
    item = recreateItem( mItemType, mLayout );
  }

  item->readXml( stateDoc.documentElement().firstChild().toElement(), stateDoc, QgsReadWriteContext() );
  item->finalizeRestoreFromXml();
  mLayout->project()->setDirty( true );
  mLayout->undoStack()->notifyUndoRedoOccurred( item );
}