Baloo::Query
Baloo::Query Class Reference
#include <Baloo/Query>
Public Types | |
enum | SortingOption { SortNone , SortAuto } |
Public Member Functions | |
Query (const Query &rhs) | |
void | addType (const QString &type) |
void | addTypes (const QStringList &typeList) |
int | dayFilter () const |
ResultIterator | exec () |
QString | includeFolder () const |
uint | limit () const |
int | monthFilter () const |
uint | offset () const |
bool | operator!= (const Query &rhs) const |
Query & | operator= (const Query &rhs) |
bool | operator== (const Query &rhs) const |
QString | searchString () const |
void | setDateFilter (int year, int month=0, int day=0) |
void | setIncludeFolder (const QString &folder) |
void | setLimit (uint limit) |
void | setOffset (uint offset) |
void | setSearchString (const QString &str) |
void | setSortingOption (SortingOption option) |
void | setType (const QString &type) |
void | setTypes (const QStringList &types) |
SortingOption | sortingOption () const |
QByteArray | toJSON () |
QUrl | toSearchUrl (const QString &title=QString()) |
QStringList | types () const |
int | yearFilter () const |
Static Public Member Functions | |
static Query | fromJSON (const QByteArray &arr) |
static Query | fromSearchUrl (const QUrl &url) |
static QString | titleFromQueryUrl (const QUrl &url) |
Detailed Description
The Query class is the central class to query to search for files from the Index.
This class has an inbuilt parser which recognizes words along with AND / OR and parenthesis and specific properties. This can be used with the setSearchString method
Member Enumeration Documentation
◆ SortingOption
Constructor & Destructor Documentation
◆ Query() [1/2]
◆ Query() [2/2]
Member Function Documentation
◆ addType()
Add a type to the results of the query.
Every file has a higher level type such as "Audio", "Video", "Image", "Document", etc.
Please note that the types are ANDed together. So searching for "Image" and "Video" will probably never return any results. Have a look at KFileMetaData::TypeInfo for a list of type names.
◆ addTypes()
void Query::addTypes | ( | const QStringList & | typeList | ) |
◆ dayFilter()
◆ exec()
◆ fromJSON()
|
static |
◆ fromSearchUrl()
◆ includeFolder()
◆ limit()
◆ monthFilter()
◆ offset()
◆ operator!=()
◆ operator=()
◆ operator==()
◆ searchString()
◆ setDateFilter()
void Query::setDateFilter | ( | int | year, |
int | month = 0, | ||
int | day = 0 ) |
◆ setIncludeFolder()
◆ setLimit()
void Query::setLimit | ( | uint | limit | ) |
◆ setOffset()
◆ setSearchString()
◆ setSortingOption()
void Query::setSortingOption | ( | Query::SortingOption | option | ) |
◆ setType()
◆ setTypes()
void Query::setTypes | ( | const QStringList & | types | ) |
◆ sortingOption()
Query::SortingOption Query::sortingOption | ( | ) | const |
◆ titleFromQueryUrl()
◆ toJSON()
QByteArray Query::toJSON | ( | ) |
◆ toSearchUrl()
◆ types()
QStringList Query::types | ( | ) | const |
◆ yearFilter()
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.