[Digikam-devel] extragear/graphics/digikam/digikam
Gilles Caulier
caulier.gilles at kdemail.net
Thu Feb 1 10:31:07 GMT 2007
SVN commit 629093 by cgilles:
digiKam from trunk : add connection to progress bar from status bar when pictures are drag & dropped from Icon view to Tags Folder View.
Marcel : TODO : MetadataHub call at this place.
CCMAIL: digikam-devel at kde.org, marcel.wiesweg at gmx.de
M +6 -0 digikamview.cpp
M +12 -1 tagfolderview.cpp
M +5 -0 tagfolderview.h
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #629092:629093
@@ -285,6 +285,12 @@
connect(d->tagFilterView, SIGNAL(signalProgressValue(int)),
d->parent, SLOT(slotProgressValue(int)));
+ connect(d->tagFolderView, SIGNAL(signalProgressBarMode(int, const QString&)),
+ d->parent, SLOT(slotProgressBarMode(int, const QString&)));
+
+ connect(d->tagFolderView, SIGNAL(signalProgressValue(int)),
+ d->parent, SLOT(slotProgressValue(int)));
+
// -- Preview image widget Connections ------------------------
connect(d->albumWidgetStack->imagePreviewWidget(), SIGNAL(signalNextItem()),
--- trunk/extragear/graphics/digikam/digikam/tagfolderview.cpp #629092:629093
@@ -46,6 +46,7 @@
#include "dio.h"
#include "imageattributeswatch.h"
#include "albumthumbnailloader.h"
+#include "statusprogressbar.h"
#include "tagfolderview.h"
#include "tagfolderview.moc"
@@ -802,17 +803,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);
}
}
}
--- trunk/extragear/graphics/digikam/digikam/tagfolderview.h #629092:629093
@@ -50,6 +50,11 @@
void tagEdit();
void tagDelete();
+signals:
+
+ void signalProgressBarMode(int, const QString&);
+ void signalProgressValue(int);
+
protected:
void contentsDropEvent(QDropEvent *e);
More information about the Digikam-devel
mailing list