KActivities::Stats::ResultSet

Search for usage in LXR

KActivities::Stats::ResultSet Class Reference

#include <KActivities/Stats/ResultSet>

Classes

class  Result
 

Public Types

typedef Result value_type
 

Public Member Functions

 ResultSet (const ResultSet &source)=delete
 
 ResultSet (Query query)
 
 ResultSet (ResultSet &&source)
 
Result at (int index) const
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator constBegin () const
 
const_iterator constEnd () const
 
const_iterator end () const
 
ResultSetoperator= (ResultSet source)=delete
 

Detailed Description

Class that can query the KActivities usage tracking mechanism for resources.

Note: It is important to note that you should not create long-living instances of ResultSet. It might lock the database and break proper updating mechanisms. If you want a list of results that automatically get updated, use ResultModel.

ResultSet is meant to be used when you just need to fetch a few results like this:

auto results = ResultSet(AllResources | Agent("org.kde.kate"));
for (const auto &result: results) {
// ...
}
ResultSet(Query query)
Creates the ResultSet from the specified query.

Definition at line 43 of file resultset.h.

Member Typedef Documentation

◆ value_type

ResultSet is a container.

This notifies the generic algorithms from STL and others of the contained type.

Definition at line 95 of file resultset.h.

Constructor & Destructor Documentation

◆ ResultSet() [1/2]

KActivities::Stats::ResultSet::ResultSet ( Query query)

Creates the ResultSet from the specified query.

Definition at line 531 of file resultset.cpp.

◆ ResultSet() [2/2]

KActivities::Stats::ResultSet::ResultSet ( ResultSet && source)

Definition at line 550 of file resultset.cpp.

◆ ~ResultSet()

KActivities::Stats::ResultSet::~ResultSet ( )

Definition at line 556 of file resultset.cpp.

Member Function Documentation

◆ at()

ResultSet::Result KActivities::Stats::ResultSet::at ( int index) const
Returns
a result at the specified index
Parameters
indexof the result
Note
You should use iterators instead

Definition at line 561 of file resultset.cpp.

◆ begin()

iterator KActivities::Stats::ResultSet::begin ( ) const
Returns
a constant iterator pointing to the start of the collection (to the first item)
Note
as usual in C++, the range of the collection is [begin, end)

Definition at line 165 of file resultset_iterator.cpp.

◆ cbegin()

const_iterator KActivities::Stats::ResultSet::cbegin ( ) const
inline

Alias for begin.

Definition at line 195 of file resultset.h.

◆ cend()

const_iterator KActivities::Stats::ResultSet::cend ( ) const
inline

Alias for end.

Definition at line 202 of file resultset.h.

◆ constBegin()

const_iterator KActivities::Stats::ResultSet::constBegin ( ) const
inline

Alias for begin.

Definition at line 210 of file resultset.h.

◆ constEnd()

const_iterator KActivities::Stats::ResultSet::constEnd ( ) const
inline

Alias for end.

Definition at line 217 of file resultset.h.

◆ end()

iterator KActivities::Stats::ResultSet::end ( ) const
Returns
a constant iterator pointing to the end of the collection (after the last item)
Note
as usual in C++, the range of the collection is [begin, end)

Definition at line 170 of file resultset_iterator.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 12:01:02 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.