Search for usage in LXR

KActivities::Stats::Query Class Reference

#include <KActivities/Stats/Query>

Public Member Functions

 Query (Terms::Select selection=Terms::AllResources)
 Query (Query &&source)
 Query (const Query &source)
QStringList activities () const
void addActivities (const QStringList &activities)
void addAgents (const QStringList &agents)
void addTypes (const QStringList &types)
void addUrlFilters (const QStringList &urlFilters)
QStringList agents () const
void clearActivities ()
void clearAgents ()
void clearTypes ()
void clearUrlFilters ()
QDate dateEnd () const
QDate dateStart () const
int limit () const
int offset () const
bool operator!= (const Query &right) const
Queryoperator= (Query source)
bool operator== (const Query &right) const
Terms::Order ordering () const
void removeActivities (const QStringList &activities)
void removeAgents (const QStringList &agents)
void removeTypes (const QStringList &types)
void removeUrlFilters (const QStringList &urlFilters)
Terms::Select selection () const
void setActivities (const Terms::Activity &activities)
void setAgents (const Terms::Agent &agents)
void setDate (const Terms::Date &date)
void setDateEnd (QDate date)
void setDateStart (QDate date)
void setLimit (int limit)
void setOffset (int offset)
void setOrdering (Terms::Order ordering)
void setSelection (Terms::Select selection)
void setTypes (const Terms::Type &types)
void setUrlFilters (const Terms::Url &urlFilters)
QStringList types () const
QStringList urlFilters () const


template<typename Term >
Query operator| (const Query &query, Term &&term)
template<typename Term >
Query operator| (Query &&query, Term &&term)

Detailed Description

The activities system tracks resources (documents, contacts, etc.) that the user has used.

It also allows linking resources to specific activities (like bookmarks, favorites, etc.).

The Query class specifies which resources to return - the previously used ones, the linked ones, or to combine these two.

It allows filtering the results depending on the resource type, the agent (application that reported the usage event, see KActivities::ResourceInstance) and the activity the resource has been used in, or linked to. It also allows filtering on the URL of the resource.

While it can be explicitly instantiated, a preferred approach is to use the pipe syntax like this:

auto query = UsedResources
| RecentlyUsedFirst

Definition at line 57 of file query.h.

Member Function Documentation

void KActivities::Stats::Query::setActivities ( const Terms::Activity activities)
void KActivities::Stats::Query::setAgents ( const Terms::Agent agents)
void KActivities::Stats::Query::setDate ( const Terms::Date date)

Definition at line 166 of file query.cpp.

void KActivities::Stats::Query::setTypes ( const Terms::Type types)
void KActivities::Stats::Query::setUrlFilters ( const Terms::Url urlFilters)

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Apr 20 2021 22:46:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.