Nepomuk
#include <typefacet.h>

Public Slots | |
void | clearSelection () |
bool | selectFromTerm (const Nepomuk::Query::Term &queryTerm) |
void | setSelected (int index, bool selected=true) |
![]() | |
void | setClientQuery (const Nepomuk::Query::Query &query) |
Public Member Functions | |
TypeFacet (QObject *parent=0) | |
~TypeFacet () | |
int | count () const |
KGuiItem | guiItem (int index) const |
bool | isSelected (int index) const |
Query::Term | queryTerm () const |
SelectionMode | selectionMode () const |
![]() | |
Facet (QObject *parent=0) | |
virtual | ~Facet () |
Query::Query | clientQuery () const |
virtual QString | text (int index) const |
Additional Inherited Members | |
![]() | |
enum | SelectionMode { MatchAll, MatchAny, MatchOne } |
![]() | |
void | layoutChanged (Nepomuk::Utils::Facet *facet) |
void | queryTermChanged (Nepomuk::Utils::Facet *facet, const Nepomuk::Query::Term &queryTerm) |
void | selectionChanged (Nepomuk::Utils::Facet *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) |
![]() | |
void | setLayoutChanged () |
void | setQueryTermChanged () |
void | setSelectionChanged () |
![]() | |
virtual void | handleClientQueryChange () |
Detailed Description
Definition at line 30 of file typefacet.h.
Constructor & Destructor Documentation
Nepomuk::Utils::TypeFacet::TypeFacet | ( | QObject * | parent = 0 | ) |
Nepomuk::Utils::TypeFacet::~TypeFacet | ( | ) |
Member Function Documentation
|
virtualslot |
Clear the selection.
If selectionMode() is MatchOne the first choice should be selected.
Implements Nepomuk::Utils::Facet.
|
virtual |
The number of choices this facet provides.
Implements Nepomuk::Utils::Facet.
|
virtual |
The parameters used to render the choice at index
.
Reimplemented from Nepomuk::Utils::Facet.
|
virtual |
- Returns:
true
if the choice atindex
is selected,false
otherwise.
Implements Nepomuk::Utils::Facet.
|
virtual |
The term currently produced by this facet.
This is dependant on the subclass implementation and the selectionMode(). The SimpleFacet for example uses an AndTerm or an OrTerm to combine all its terms in MatchAll or MatchAny mode while it returns the one selected term in MatchOne mode.
Implements Nepomuk::Utils::Facet.
|
virtualslot |
If a client application provides several ways to construct a query (one could think of a query editor which allows to insert certain constraints or simply another application providing a base query) the user expects to be able to modify that query using the available facets.
Thus, a Facet should be able to extract parts from a query.
Implement this method to create a selection based on the contents of \p term. The selection of the facet must only change if all of \p term can be used. This means that if \p term is for example an OrTerm and the Facet can only handle one of the sub terms it needs to ignore the whole term. FacetModel::setQuery() internally calls selectFromTerm() on all its facets. A simple example is SimpleFacet which compares all its terms which have been added via SimpleFacet::addTerm() to \p term. Depending on the selectionMode() it also checks for AndTerm or OrTerm. \warning Implementations of this method should \em never reset the selection before handling \p term. Instead the method should work similar to setSelected(), ie. in MatchAll or MatchAny facets calling it multiple times should select multiple choices. \return \p true if all of \p term could be used to select choices in this term, \p false otherwise.
Implements Nepomuk::Utils::Facet.
|
virtual |
The selection mode used by this facet.
The GUI client can make use of this value to adjust the GUI accordingly. A typical example would be using radio buttons for MatchOne facets.
Implements Nepomuk::Utils::Facet.
|
virtualslot |
Called by client code to change the selection.
- Parameters:
-
index The index of the choice for which the selection should be changed. selected If true
the item should be selected, otherwise it should be deselected.
Implements Nepomuk::Utils::Facet.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sun Apr 28 2013 14:24:54 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.