Nepomuk
#include <Nepomuk/Utils/ProxyFacet>
Public Slots | |
void | clearSelection () |
bool | selectFromTerm (const Nepomuk::Query::Term &queryTerm) |
void | setFacetCondition (const Nepomuk::Query::Term &queryTerm) |
void | setSelected (int index, bool selected=true) |
Public Slots inherited from Nepomuk::Utils::Facet | |
virtual void | clearSelection ()=0 |
virtual bool | selectFromTerm (const Nepomuk::Query::Term &queryTerm)=0 |
void | setClientQuery (const Nepomuk::Query::Query &query) |
virtual void | setSelected (int index, bool selected=true)=0 |
Public Member Functions | |
ProxyFacet (QObject *parent=0) | |
virtual | ~ProxyFacet () |
int | count () const |
Nepomuk::Query::Term | facetCondition () const |
KGuiItem | guiItem (int index) const |
bool | isSelected (int index) const |
virtual Nepomuk::Query::Term | queryTerm () const |
SelectionMode | selectionMode () const |
void | setSourceFacet (Facet *source) |
Facet * | sourceFacet () const |
Public Member Functions inherited from Nepomuk::Utils::Facet | |
Facet (QObject *parent=0) | |
virtual | ~Facet () |
Query::Query | clientQuery () const |
virtual QString | text (int index) const |
Protected Member Functions | |
virtual bool | facetConditionMet () const |
void | handleClientQueryChange () |
Additional Inherited Members | |
Public Types inherited from Nepomuk::Utils::Facet | |
enum | SelectionMode { MatchAll, MatchAny, MatchOne } |
Signals inherited from Nepomuk::Utils::Facet | |
void | layoutChanged (Nepomuk::Utils::Facet *facet) |
void | queryTermChanged (Nepomuk::Utils::Facet *facet, const Nepomuk::Query::Term &queryTerm) |
void | selectionChanged (Nepomuk::Utils::Facet *facet) |
Static Public Member Functions inherited from Nepomuk::Utils::Facet | |
static Facet * | createDateFacet (QObject *parent=0) |
static Facet * | createFileTypeFacet (QObject *parent=0) |
static Facet * | createPriorityFacet (QObject *parent=0) |
static Facet * | createRatingFacet (QObject *parent=0) |
static Facet * | createTagFacet (QObject *parent=0) |
static Facet * | createTypeFacet (QObject *parent=0) |
Protected Slots inherited from Nepomuk::Utils::Facet | |
void | setLayoutChanged () |
void | setQueryTermChanged () |
void | setSelectionChanged () |
Detailed Description
A facet forwarding the filtered choices from another facet.
The ProxyFacet allows to perform filter operations on another facet. Most noticable one can set a general condition which needs to be fulfilled in the client query in order for the facet to show any choices.
- See also
- Facet Examples
- Since
- 4.6
Definition at line 47 of file proxyfacet.h.
Constructor & Destructor Documentation
Nepomuk::Utils::ProxyFacet::ProxyFacet | ( | QObject * | parent = 0 | ) |
Create a new proxy facet without a source.
|
virtual |
Destructor.
Member Function Documentation
|
slot |
Clear the selection.
If selectionMode() is MatchOne the first choice should be selected.
|
virtual |
- Returns
- The number of terms forwarded from the sourceFacet().
Implements Nepomuk::Utils::Facet.
Nepomuk::Query::Term Nepomuk::Utils::ProxyFacet::facetCondition | ( | ) | const |
The facet condition set via setFacetCondition()
|
protectedvirtual |
Used internally to determine if the facet condition is met.
Can be reimplemented for customized filtering.
- Returns
true
if the facet condition is met and all choices from the source facet should be forwarded.
|
virtual |
The gui item forwarded from the sourceFacet().
Reimplemented from Nepomuk::Utils::Facet.
|
protectedvirtual |
This method is called from setClientQuery() and can be reimplemented by subclasses.
The default implementation does nothing.
Reimplemented from Nepomuk::Utils::Facet.
|
virtual |
- Returns
true
if the term atindex
has been selected via setSelected().
Implements Nepomuk::Utils::Facet.
|
virtual |
The query term forwarded and optionally filtered from the sourceModel().
Implements Nepomuk::Utils::Facet.
|
slot |
The term
is analyzed depending on the selectionMode().
- See also
- Facet::selectFromTerm()
|
virtual |
The selection mode forwarded from the sourceFacet().
Implements Nepomuk::Utils::Facet.
|
slot |
Allows to set a condition for the entire facet.
Unless it is not met in the client query set via setClientQuery() the facet does not provide any choices.
- Parameters
-
term The condition term. If valid this facet will only show any choices if the client query contains term
in a non-optional way.
A typical example is a facet which filters images by size. In that case the condition would be
since filtering by image size does only make sense if only images are selected.
|
slot |
Selects or deselects the term at index
.
Depending on the selectionMode() this will also affect the selection of other terms.
void Nepomuk::Utils::ProxyFacet::setSourceFacet | ( | Facet * | source | ) |
Set the source facet.
The proxy will forward all calls to source
.
Facet* Nepomuk::Utils::ProxyFacet::sourceFacet | ( | ) | const |
The source facet which this proxy facet is forwarding.
- See also
- setSourceFacet()
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.