示例#1
0
void AlbumChooserWidget::slotNewAlbumRequest()
{
    QPointer<VkontakteAlbumDialog> dlg = new VkontakteAlbumDialog(this);

    if (dlg->exec() == QDialog::Accepted)
    {
        updateBusyStatus(true);
        startAlbumCreation(dlg->album());
    }

    delete dlg;
}
void AlbumChooserWidget::slotEditAlbumRequest()
{
    VkontakteAlbumDialog::AlbumInfo album;
    int aid = 0;
    if (!getCurrentAlbumInfo(album) || !getCurrentAlbumId(aid))
    {
        return;
    }

    QPointer<VkontakteAlbumDialog> dlg = new VkontakteAlbumDialog(this, album);

    if (dlg->exec() == QDialog::Accepted)
    {
        updateBusyStatus(true);
        startAlbumEditing(aid, dlg->album());
    }

    delete dlg;
}