SVN commit 629083 by cgilles:
digiKam from trunk : add connection to progress bar from status bar when pictures are drag & dropped from Icon view to Tags tree view of Comments & Tags. Marcel : TODO : MetadataHub call at this place. CCMAIL: [hidden email], [hidden email] M +6 -0 imagedescedittab.cpp M +12 -1 talbumlistview.cpp M +2 -0 talbumlistview.h --- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #629082:629083 @@ -223,6 +223,12 @@ // -------------------------------------------------- + connect(d->tagsView, SIGNAL(signalProgressBarMode(int, const QString&)), + this, SIGNAL(signalProgressBarMode(int, const QString&))); + + connect(d->tagsView, SIGNAL(signalProgressValue(int)), + this, SIGNAL(signalProgressValue(int))); + connect(popupMenu, SIGNAL(activated(int)), this, SLOT(slotRecentTagsMenuActivated(int))); --- trunk/extragear/graphics/digikam/libs/imageproperties/talbumlistview.cpp #629082:629083 @@ -48,6 +48,7 @@ #include "dragobjects.h" #include "imageattributeswatch.h" #include "albumthumbnailloader.h" +#include "statusprogressbar.h" #include "talbumlistview.h" #include "talbumlistview.moc" @@ -414,17 +415,27 @@ if (id == 10) { + emit signalProgressBarMode(StatusProgressBar::ProgressBarMode, + i18n("Assign tag to pictures. Please wait...")); + AlbumDB* db = AlbumManager::instance()->albumDB(); - + int i=0; db->beginTransaction(); for (QValueList<int>::const_iterator it = imageIDs.begin(); it != imageIDs.end(); ++it) { db->addItemTag(*it, destAlbum->id()); + + // TODO: add MetadataHub call here. + + emit signalProgressValue((int)((i++/(float)imageIDs.count())*100.0)); + kapp->processEvents(); } db->commitTransaction(); ImageAttributesWatch::instance()->imagesChanged(destAlbum->id()); + + emit signalProgressBarMode(StatusProgressBar::TextMode, QString::null); } } } --- trunk/extragear/graphics/digikam/libs/imageproperties/talbumlistview.h #629082:629083 @@ -71,6 +71,8 @@ signals: + void signalProgressBarMode(int, const QString&); + void signalProgressValue(int); void signalItemStateChanged(TAlbumCheckListItem *item); protected: _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |