README.md 1.28 KB
Newer Older
Ivan Čukić's avatar
Ivan Čukić committed
1
2
3
4
5
6
7
# KActivitiesStats

Library to access the usage statistics data collected by the KDE activity manager.

## Introduction

The KActivitiesStats library provides a querying mechanism for the data
8
that the activity manager collects - which documents hae been opened by
Ivan Čukić's avatar
Ivan Čukić committed
9
10
11
12
13
14
15
16
17
18
which applications, and what documents have been linked to which activity.
The activity manager also keeps the score for each document which gets
higher when a particular document has been often accessed or kept open
for longer periods of time. This score is also available through the
querying mechanism.

## Usage

The library provides the following important classes:

19
- `KActivities::Stats::ResultSet` is a low level class that provides a forward iterator to the
Ivan Čukić's avatar
Ivan Čukić committed
20
  list of results that match the specified query
21
- `KActivities::Stats::ResultWatcher` provides signals when a new resource that matches a query
Ivan Čukić's avatar
Ivan Čukić committed
22
23
  arrives, or when an existing one is gone (usage statistics cleared or some
  for other reason)
24
- `KActivities::Stats::ResultModel` provides a Qt data model that shows the resources that
Ivan Čukić's avatar
Ivan Čukić committed
25
26
27
  match the specified query. This model should be subclassed to teach it
  to handle the different resource types that you want to show as the results.

28
Queries are defined by the `KActivities::Stats::Query` class using a simple range-like syntax.
Ivan Čukić's avatar
Ivan Čukić committed
29