| Summary: | digikam usability: tags filter misses 'deselect all Tags' in context menu | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Achim Bohnet <ach> |
| Component: | Usability-Menus | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | 0.8.0 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 0.9.0 | |
| Sentry Crash Report: | |||
typo in summary "delect" should be "deselect" (trying to correct it if my permissions allow) Achim, Given a complex subtag selection menu is a non-sence for me : the tag list are already in the sidebar view. No need to duplicate tags in a sub-menu. But, i'm agree with you, global selection/unseletion options are mandadory. This is my proposal of options set : - Unselect all - Select All - Invert Selection Gilles SVN commit 580439 by cgilles:
digikam from trunk : Tags Filter View : new options to
- "Select All" tags
- "Deselect" all tags
- "Invert Selection" of tags
BUG: 115154
CCBUGS: 115157
M +58 -7 tagfilterview.cpp
--- trunk/extragear/graphics/digikam/digikam/tagfilterview.cpp #580438:580439
@@ -143,6 +143,8 @@
QTimer *timer;
};
+// ---------------------------------------------------------------------
+
TagFilterView::TagFilterView(QWidget* parent)
: FolderView(parent)
{
@@ -330,8 +332,7 @@
}
else
{
- TagFilterViewItem* parent =
- (TagFilterViewItem*)(tag->parent()->extraData(this));
+ TagFilterViewItem* parent = (TagFilterViewItem*)(tag->parent()->extraData(this));
if (!parent)
{
kdWarning() << k_funcinfo << " Failed to find parent for Tag "
@@ -354,8 +355,7 @@
if (!tag)
return;
- TagFilterViewItem* item =
- (TagFilterViewItem*)(tag->extraData(this));
+ TagFilterViewItem* item = (TagFilterViewItem*)(tag->extraData(this));
if (item)
{
item->setText(0, tag->title());
@@ -507,10 +507,15 @@
if (item)
{
- popmenu.insertItem(SmallIcon("pencil"), i18n("Edit Tag Properties..."), 11);
- popmenu.insertItem(SmallIcon("reload_page"), i18n("Reset Tag Icon"), 13);
- popmenu.insertItem(SmallIcon("edittrash"), i18n("Delete Tag"), 12);
+ popmenu.insertItem(SmallIcon("pencil"), i18n("Edit Tag Properties..."), 11);
+ popmenu.insertItem(SmallIcon("reload_page"), i18n("Reset Tag Icon"), 13);
+ 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);
int choice = popmenu.exec((QCursor::pos()));
switch( choice )
@@ -536,6 +541,52 @@
AlbumManager::instance()->updateTAlbumIcon(item->m_tag, QString("tag"), 0, errMsg);
break;
}
+ case 14:
+ {
+ QListViewItemIterator it(this, QListViewItemIterator::NotChecked);
+ while (it.current())
+ {
+ TagFilterViewItem* item = (TagFilterViewItem*)it.current();
+ item->setOn(true);
+ ++it;
+ }
+ triggerChange();
+ break;
+ }
+ case 15:
+ {
+ QListViewItemIterator it(this, QListViewItemIterator::Checked);
+ while (it.current())
+ {
+ TagFilterViewItem* item = (TagFilterViewItem*)it.current();
+ item->setOn(false);
+ ++it;
+ }
+ triggerChange();
+ break;
+ }
+ case 16:
+ {
+ QListViewItemIterator it(this);
+ while (it.current())
+ {
+ TagFilterViewItem* item = (TagFilterViewItem*)it.current();
+
+ // Toogle all root tags filter.
+ TAlbum *tag = item->m_tag;
+ if (tag)
+ if (tag->parent()->isRoot())
+ item->setOn(!item->isOn());
+
+ // Toogle "Not Tagged" item tag filter.
+ if (item->m_untagged)
+ item->setOn(!item->isOn());
+
+ ++it;
+ }
+ triggerChange();
+ break;
+ }
default:
break;
}
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();
}
|
Version: 0.8.0-beta2 (using KDE 3.4.3, Kubuntu Package 4:3.4.3-0ubuntu1 ) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.12-9-686 when one has selected several tags in 'tag filters' it's hard to delected them to start from scratch. A 'selected all tags' im 'Tags Filter' can fix it another possibllity more powerful in flat submenu RMB 'Deselect Tags -> all selected-tag1 ... selected-tagN Anyother solution that easily allows to see or find out that filter tags are selected is okay too ;) Achim