void MusicSongsSummarizied::addNetMusicSongToList(const QString &name, const QString &time,
                                                  const QString &format)
{
    const QString path = QString("%1%2.%3").arg(MUSIC_DOWNLOAD_AL).arg(name).arg(format);
    m_musicFileNames[2] << MusicSong(path, 0, time, name);
    m_mainSongLists[2]->updateSongsFileName(m_musicFileNames[2]);
    if(m_currentIndexs == 2)
    {
        emit updatePlayLists(path);
    }
}
void MusicSongsSummarizied::addMusicSongToLovestListAt(int row)
{
    MusicSong song = m_musicFileNames[currentIndex()][row];
    m_musicFileNames[1] << song;
    m_mainSongLists[1]->updateSongsFileName(m_musicFileNames[1]);
    if(m_currentIndexs == 1)
    {
        emit updatePlayLists(song.getMusicPath());
    }
    MusicMessageBox message;
    message.setText(tr("add music to lovest list done!"));
    message.exec();
}
Example #3
0
void PlayListHeaderModel::insert(int index, const QString &name, const QString &pattern)
{
    if(index < 0 || index > m_columns.size())
    {
        qWarning("ColumnManager: index is out of range");
        return;
    }

    ColumnHeader col;
    col.name = name;
    col.pattern = pattern;
    m_columns.insert(index, col);
    emit columnAdded(index);
    emit headerChanged();
    updatePlayLists();
}
Example #4
0
void PlayListHeaderModel::remove(int index)
{
    if(index < 0 || index >= m_columns.size())
    {
        qWarning("ColumnManager: index is out of range");
        return;
    }

    if(m_columns.count() == 1)
        return;

    m_columns.takeAt(index);
    emit columnRemoved(index);
    emit headerChanged();
    updatePlayLists();
}
Example #5
0
void PlayListHeaderModel::move(int from, int to)
{
    if(from < 0 || from >= m_columns.size())
    {
        qWarning("ColumnManager: index is out of range");
        return;
    }

    if(to < 0 || to >= m_columns.size())
    {
        qWarning("ColumnManager: index is out of range");
        return;
    }

    m_columns.move(from, to);
    emit columnMoved(from, to);
    emit headerChanged();
    updatePlayLists();
}
Example #6
0
void PlayListHeaderModel::execEdit(int index, QWidget *parent)
{
    if(index < 0 || index >= m_columns.size())
    {
        qWarning("ColumnManager: index is out of range");
        return;
    }

    if(!parent)
        parent = qApp->activeWindow();

    ColumnEditor editor(m_columns[index].name, m_columns[index].pattern, parent);
    if(editor.exec() == QDialog::Accepted)
    {
        m_columns[index].name = editor.name();
        m_columns[index].pattern = editor.pattern();
        emit columnChanged(index);
        emit headerChanged();
        updatePlayLists();
    }
}