void UploadDialog::createIpodAlbum() { QString helper; #if KIPI_PLUGIN ImageCollection album = iface()->currentAlbum(); if( album.isValid() ) helper = album.name(); #endif bool ok = false; QString newAlbum = KInputDialog::getText( i18n("New iPod Photo Album"), i18n("Create a new album:"), helper, &ok, this ); if( ok ) { kDebug() << "creating album " << newAlbum ; Itdb_PhotoAlbum* photoAlbum = itdb_photodb_photoalbum_create( m_itdb, QFile::encodeName( newAlbum ), -1/*end*/ ); // add the new album to the list view new IpodAlbumItem( m_ipodAlbumList, photoAlbum ); m_ipodAlbumList->clearSelection(); // commit the changes to the iPod GError* err = 0; itdb_photodb_write( m_itdb, &err ); } }
void UploadDialog::loadImagesFromCurrentSelection() { #if KIPI_PLUGIN /// add selected items to the ImageList ImageCollection images = iface()->currentSelection(); if( images.isValid() ) { KUrl::List selected = images.images(); for( KUrl::List::Iterator it = selected.begin(); it != selected.end(); ++it ) { addUrlToList( (*it).path() ); } } #endif }