Bug 465932

Summary: NOR and NAND operators to filter item
Product: [Applications] digikam Reporter: Paul Christophe <paul.christophe>
Component: Albums-FiltersAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: caulier.gilles, frederic.chaume, metzpinguin
Priority: NOR    
Version First Reported In: 7.10.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Paul Christophe 2023-02-17 14:46:50 UTC
SUMMARY
In the "Filters" tab of the right-hand bar, the button to the right of the heading "Unlabeled images" allows you to choose the logical operation "OR" and "AND" to apply to the selected keywords.
I would suggest adding the "NOR" and "NAND" operators.
It would be nice if the active operator remained visible or was highlighted.
These functions would allow selections of all the photos defined by the left panel 
-> with "OR": having ONE OF the keywords checked in the right panel (e.g.: the father or the mother)
-> with "AND" : having ALL the keywords checked in the right panel (Ex.: the father and the mother)
-> with "NOR", EXCEPT those having ONE OF the keywords checked in the right panel (Ex.: except the father or the mother)
-> with "NAND", EXCEPT those having all the keywords checked in the right panel (Ex: except, TOGETHER, the father and the mother.)
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.



STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2023-02-17 16:18:57 UTC
NAND or NOR options can already be created with the option "- this tag must not be included" in the right mouse button menu. We already have bug reports that we should better graphically mark the "not included checkbox" in the tree view.

Maik
Comment 2 Maik Qualmann 2023-07-14 08:32:06 UTC
*** Bug 472243 has been marked as a duplicate of this bug. ***
Comment 3 fch22 2023-07-14 10:10:35 UTC
just discover the option "- this tag must not be included"  
but effectively, not easy to find it.
Would be more efficient to add it to the existing criteria AND, OR
Comment 4 Paul Christophe 2023-07-14 16:06:34 UTC
Allow me to insist once again.
Rather than a well-hidden "This tag must not be included" option, it would be more effective to add the "NOR" and "NAND" operators to the "OR" and "AND" filter operators. it would be nice if the active operator remained visible or was highlighted.

https://bugs.kde.org/show_bug.cgi?id=465932 

Sincerely

Paul Christophe
----------------------------------------------------------------------------------------------------------------------------------------------------
-----Message d'origine-----
De : Maik Qualmann [mailto:bugzilla_noreply@kde.org] 
Envoyé : vendredi 14 juillet 2023 10:32
À : paul.christophe@skynet.be
Objet : [digikam] [Bug 465932] NOR and NAND operators to filter item

https://bugs.kde.org/show_bug.cgi?id=465932 

Maik Qualmann <metzpinguin@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |frederic.chaume@gmail.com

--- Comment #2 from Maik Qualmann <metzpinguin@gmail.com> ---
*** Bug 472243 has been marked as a duplicate of this bug. ***
Comment 5 fch22 2023-07-21 09:04:42 UTC
(In reply to fch22 from comment #3)
> just discover the option "- this tag must not be included"  
> but effectively, not easy to find it.
> Would be more efficient to add it to the existing criteria AND, OR

(In reply to Paul Christophe from comment #4)
> Allow me to insist once again.
> Rather than a well-hidden "This tag must not be included" option, it would
> be more effective to add the "NOR" and "NAND" operators to the "OR" and
> "AND" filter operators. it would be nice if the active operator remained
> visible or was highlighted.
> 


I started to play with it and this was exactly what I was looking for. with such option we can make a filter with a tag and not another tag. Effectively the access to this option should be improved , but we need to ensure the same behavior remains available.
In particular just adding a "NAND" to the existing list (OR, AND) will help to exclude all the selected tags , but will not allow to filter out pictures with a tag and not another one. so what we would need is a NOT attached to the tag. 
May be we could use the radio button attached to the tag as follow:
v => means tag should be found
x => means tag shouldn't be found

I don't know if this is possible, but it would be very powerful.
Comment 6 Paul Christophe 2023-07-21 15:22:01 UTC
If one or more tags are selected in the left "tags" panel and if one or more tags are selected in the right "filter" panel, the additional application of a NAND/NOR operator would eliminate from the left selection the images that do not respond to the application of the NAND/NOR operator; that is to say, they would be eliminated if any of the tagged ones are present (NOR), or they would be eliminated if all the tagged ones are present together (NAND). 
In electronics, logic knows how to do everything with NOR or NAND circuits and can be satisfied with that ;-)

Paul Christophe


-----Message d'origine-----
De : fch22 [mailto:bugzilla_noreply@kde.org] 
Envoyé : vendredi 21 juillet 2023 11:05
À : paul.christophe@skynet.be
Objet : [digikam] [Bug 465932] NOR and NAND operators to filter item

https://bugs.kde.org/show_bug.cgi?id=465932

--- Comment #5 from fch22 <frederic.chaume@gmail.com> ---
(In reply to fch22 from comment #3)
> just discover the option "- this tag must not be included"  
> but effectively, not easy to find it.
> Would be more efficient to add it to the existing criteria AND, OR

(In reply to Paul Christophe from comment #4)
> Allow me to insist once again.
> Rather than a well-hidden "This tag must not be included" option, it would
> be more effective to add the "NOR" and "NAND" operators to the "OR" and
> "AND" filter operators. it would be nice if the active operator remained
> visible or was highlighted.
> 


I started to play with it and this was exactly what I was looking for. with
such option we can make a filter with a tag and not another tag. Effectively
the access to this option should be improved , but we need to ensure the same
behavior remains available.
In particular just adding a "NAND" to the existing list (OR, AND) will help to
exclude all the selected tags , but will not allow to filter out pictures with
a tag and not another one. so what we would need is a NOT attached to the tag. 
May be we could use the radio button attached to the tag as follow:
v => means tag should be found
x => means tag shouldn't be found

I don't know if this is possible, but it would be very powerful.