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 |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Protected Member Functions | |
virtual bool | facetConditionMet () const |
void | handleClientQueryChange () |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
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) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Slots inherited from Nepomuk::Utils::Facet | |
void | setLayoutChanged () |
void | setQueryTermChanged () |
void | setSelectionChanged () |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.