Nepomuk
datefacet.h
Go to the documentation of this file.
140 };
DateRangeCandidate
Using fixed QDate values would result in invalid queries as soon as an application runs over the span...
Definition: datefacet.h:103
@ LastMonth
a date range that includes all days from the last month, ie. that before the current one
Definition: datefacet.h:126
@ ThisYear
a date range that includes all days from the current year up to today
Definition: datefacet.h:129
@ CustomDateRange
a custom range - this will enable a special item that if selection will open a dialog allowing the us...
Definition: datefacet.h:136
@ ThisMonth
a date range that includes all days from the current month up to today
Definition: datefacet.h:123
@ LastWeek
a date range that includes all days from the last week, ie. that before the current one
Definition: datefacet.h:120
@ LastYear
a date range that includes all days from the last year, ie. that before the current one
Definition: datefacet.h:132
@ Yesterday
a date range which uses QDate::today().addDays(-1) for start and end
Definition: datefacet.h:114
@ ThisWeek
a date range that includes all days from the current week up to today
Definition: datefacet.h:117
bool selectFromTerm(const Nepomuk::Query::Term &queryTerm)
Select the current date range based on term.
Query::Term queryTerm() const
Creates a query term for the currently selected date range.
void clearSelection()
Resets the current range to the default value which is the first in the list of candidates.
virtual Query::Term createDateRangeTerm(const DateRange &range) const
Create the query Term that reflects the dates specified in range.
virtual DateRange extractDateRange(const Query::Term &queryTerm) const
This is the counterpart method to createDateRangeTerm().
SelectionMode selectionMode() const
The selection mode in the date facet is fixed to MatchOne, ie.
DateFacet(QObject *parent=0)
Creates a new date facet which contains the DefaultRanges date range candidates as choices.
virtual DateRange getCustomRange(bool *ok=0) const
Retrieve a custom date range typically from the user.
KGuiItem guiItem(int index) const
The parameters used to render the choice at index.
void setSelected(int index, bool selected=true)
Change the currently selected date range.
bool isSelected(int index) const
void setDateRangeCandidates(DateRangeCandidates ranges)
Set the date ranges this facet should provide.
DateRangeCandidates dateRangeCandidates() const
int count() const
The base class for all facets used to create query filters.
Definition: facet.h:75
SelectionMode
A Facet can have one of three selection modes which is provided by selectionMode().
Definition: facet.h:93
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.