PlasmaCore
#include <datamodel.h>
|
int | countItems () const |
|
void | setItems (const QString &sourceName, const QVariantList &list) |
|
Definition at line 128 of file datamodel.h.
Plasma::DataModel::DataModel |
( |
QObject * |
parent = 0 | ) |
|
Plasma::DataModel::~DataModel |
( |
| ) |
|
int Plasma::DataModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
int Plasma::DataModel::count |
( |
| ) |
const |
|
inline |
void Plasma::DataModel::countChanged |
( |
| ) |
|
|
signal |
int Plasma::DataModel::countItems |
( |
| ) |
const |
|
inlineprotected |
QVariant Plasma::DataModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
QObject* Plasma::DataModel::dataSource |
( |
| ) |
const |
void Plasma::DataModel::filterRegExpChanged |
( |
const QString & |
| ) |
|
|
signal |
QVariantHash Plasma::DataModel::get |
( |
int |
i | ) |
const |
Returns the item at index in the list model.
This allows the item data to be accessed (but not modified) from JavaScript. It returns an Object with a property for each role.
Definition at line 498 of file datamodel.cpp.
QVariant Plasma::DataModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
QModelIndex Plasma::DataModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
QString Plasma::DataModel::keyRoleFilter |
( |
| ) |
const |
QModelIndex Plasma::DataModel::parent |
( |
const QModelIndex & |
child | ) |
const |
int Plasma::DataModel::roleNameToId |
( |
const QString & |
name | ) |
|
int Plasma::DataModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
void Plasma::DataModel::setDataSource |
( |
QObject * |
source | ) |
|
void Plasma::DataModel::setItems |
( |
const QString & |
sourceName, |
|
|
const QVariantList & |
list |
|
) |
| |
|
protected |
void Plasma::DataModel::setKeyRoleFilter |
( |
const QString & |
key | ) |
|
Include only items with a key that matches this regexp in the model.
Definition at line 277 of file datamodel.cpp.
void Plasma::DataModel::setSourceFilter |
( |
const QString & |
key | ) |
|
Include only sources that matches this regexp in the model.
Definition at line 299 of file datamodel.cpp.
QString Plasma::DataModel::sourceFilter |
( |
| ) |
const |
void Plasma::DataModel::sourceModelChanged |
( |
QObject * |
| ) |
|
|
signal |
int Plasma::DataModel::count |
|
read |
How many items are in this model.
Definition at line 151 of file datamodel.h.
QObject * Plasma::DataModel::dataSource |
|
readwrite |
QString Plasma::DataModel::keyRoleFilter |
|
readwrite |
It's a regular expression.
Only data with keys that match this filter expression will be inserted in the model
Definition at line 140 of file datamodel.h.
QString Plasma::DataModel::sourceFilter |
|
readwrite |
it's a regular expression.
If the DataSource is connected to more than one source, only inserts data from sources matching this filter expression in the model. If we want to have a source watch all sources beginning with say "name:", the required regexp would be sourceFilter: "name:.*"
Definition at line 146 of file datamodel.h.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:02:42 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.