[Digikam-devel] [Bug 115154] digikam usability: tags filter misses 'deselect all Tags' in context menu
Gilles Caulier
caulier.gilles at free.fr
Sun Sep 3 16:47:11 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=115154
------- Additional Comments From caulier.gilles free fr 2006-09-03 17:47 -------
SVN commit 580457 by cgilles:
digikam from trunk : Tags view from Comments & Tags side bar tab : new options to:
- "Select All" tags
- "Deselect" all tags
- "Invert Selection" of tags
CCBUGS: 115154, 115157
M +52 -6 imagedescedittab.cpp
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagedescedittab.cpp #580456:580457
@ -508,8 +508,7 @
QListViewItemIterator it( d->tagsView);
while (it.current())
{
- TAlbumCheckListItem* tItem =
- dynamic_cast<TAlbumCheckListItem*>(it.current());
+ TAlbumCheckListItem* tItem = dynamic_cast<TAlbumCheckListItem*>(it.current());
if (tItem)
{
@ -569,6 +568,7 @
QPopupMenu popmenu(this);
popmenu.insertItem(SmallIcon("tag"), i18n("New Tag..."), 10);
+
if (!album->isRoot())
{
popmenu.insertItem(SmallIcon("pencil"), i18n("Edit Tag Properties..."), 11);
@ -576,6 +576,11 @
popmenu.insertItem(SmallIcon("edittrash"), i18n("Delete Tag"), 12);
}
+ popmenu.insertSeparator();
+ popmenu.insertItem(i18n("Select All"), 14);
+ popmenu.insertItem(i18n("Deselect"), 15);
+ popmenu.insertItem(i18n("Invert Selection"), 16);
+
switch (popmenu.exec(QCursor::pos()))
{
case 10:
@ -601,6 +606,43 @
AlbumManager::instance()->updateTAlbumIcon(album, QString("tag"), 0, errMsg);
break;
}
+ case 14:
+ {
+ QListViewItemIterator it(d->tagsView, QListViewItemIterator::NotChecked);
+ while (it.current())
+ {
+ TAlbumCheckListItem* item = dynamic_cast<TAlbumCheckListItem*>(it.current());
+ item->setOn(true);
+ ++it;
+ }
+ break;
+ }
+ case 15:
+ {
+ QListViewItemIterator it(d->tagsView, QListViewItemIterator::Checked);
+ while (it.current())
+ {
+ TAlbumCheckListItem* item = dynamic_cast<TAlbumCheckListItem*>(it.current());
+ item->setOn(false);
+ ++it;
+ }
+ break;
+ }
+ case 16:
+ {
+ QListViewItemIterator it(d->tagsView);
+ while (it.current())
+ {
+ TAlbumCheckListItem* item = dynamic_cast<TAlbumCheckListItem*>(it.current());
+ TAlbum *tag = item->m_album;
+ if (tag)
+ if (!tag->isRoot())
+ item->setOn(!item->isOn());
+
+ ++it;
+ }
+ break;
+ }
default:
break;
}
@ -823,7 +865,8 @
void ImageDescEditTab::slotImagesChanged(int albumId)
{
Album *a = AlbumManager::instance()->findAlbum(albumId);
- if (!d->ignoreImageAttributesWatch && !d->currInfo || !a || a->isRoot() || a->type() != Album::TAG)
+ if (!d->ignoreImageAttributesWatch &&
+ !d->currInfo || !a || a->isRoot() || a->type() != Album::TAG)
return;
updateTagsView();
@ -831,19 +874,22 @
void ImageDescEditTab::slotImageRatingChanged(Q_LLONG imageId)
{
- if (!d->ignoreImageAttributesWatch && d->currInfo && d->currInfo->id() == imageId)
+ if (!d->ignoreImageAttributesWatch &&
+ d->currInfo && d->currInfo->id() == imageId)
updateRating();
}
void ImageDescEditTab::slotImageCaptionChanged(Q_LLONG imageId)
{
- if (!d->ignoreImageAttributesWatch && d->currInfo && d->currInfo->id() == imageId)
+ if (!d->ignoreImageAttributesWatch &&
+ d->currInfo && d->currInfo->id() == imageId)
updateComments();
}
void ImageDescEditTab::slotImageDateChanged(Q_LLONG imageId)
{
- if (!d->ignoreImageAttributesWatch && d->currInfo && d->currInfo->id() == imageId)
+ if (!d->ignoreImageAttributesWatch &&
+ d->currInfo && d->currInfo->id() == imageId)
updateDate();
}
More information about the Digikam-devel
mailing list