SVN commit 629088 by cgilles:
digiKam from trunk : add connection to progress bar from status bar when pictures are drag & dropped from Icon view to Tags Filter View. Marcel : TODO : MetadataHub call at this place. CCMAIL: [hidden email], [hidden email] M +6 -0 digikamview.cpp M +12 -1 tagfilterview.cpp M +5 -0 tagfilterview.h --- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #629087:629088 @@ -279,6 +279,12 @@ connect(d->rightSideBar, SIGNAL(signalProgressValue(int)), d->parent, SLOT(slotProgressValue(int))); + connect(d->tagFilterView, SIGNAL(signalProgressBarMode(int, const QString&)), + d->parent, SLOT(slotProgressBarMode(int, const QString&))); + + connect(d->tagFilterView, SIGNAL(signalProgressValue(int)), + d->parent, SLOT(slotProgressValue(int))); + // -- Preview image widget Connections ------------------------ connect(d->albumWidgetStack->imagePreviewWidget(), SIGNAL(signalNextItem()), --- trunk/extragear/graphics/digikam/digikam/tagfilterview.cpp #629087:629088 @@ -53,6 +53,7 @@ #include "folderitem.h" #include "imageattributeswatch.h" #include "tagcreatedlg.h" +#include "statusprogressbar.h" #include "tagfilterview.h" #include "tagfilterview.moc" @@ -518,17 +519,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 MetadataHub: add 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); } else if(id == 11) { --- trunk/extragear/graphics/digikam/digikam/tagfilterview.h #629087:629088 @@ -55,6 +55,11 @@ void stateChanged(TagFilterViewItem*); +signals: + + void signalProgressBarMode(int, const QString&); + void signalProgressValue(int); + protected: QDragObject* dragObject(); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |