Nepomuk
simpleresourcemodel.h
Go to the documentation of this file.
Base class for all models providing a plain list of resources.
Definition: resourcemodel.h:58
A simple ResourceModel that handles a list of Resource instances which can be managed via the setReso...
Definition: simpleresourcemodel.h:48
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
Removes those resources from the model.
void clear()
Clear the model by removing all resources added via setResources() and friends.
SimpleResourceModel(QObject *parent=0)
Creates an empty resource model.
void addResources(const QList< Nepomuk::Resource > &resources)
Add resources to the list of resources being provided by the model.
QModelIndex indexForResource(const Resource &res) const
Get the Resource which corresponds to index.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Creates an index for the cell at row and column.
void setResources(const QList< Nepomuk::Resource > &resources)
Set the resources to be provided by the model to resources.
Resource resourceForIndex(const QModelIndex &index) const
Get the index for a resource.
int rowCount(const QModelIndex &parent=QModelIndex()) const
void addResults(const QList< Nepomuk::Query::Result > &results)
This method is similar to addResources().
void addResource(const Nepomuk::Resource &resource)
Add resource to the list of resources being provided by the model.
void setResults(const QList< Nepomuk::Query::Result > &results)
This method is similar to setResources().
void addResult(const Nepomuk::Query::Result result)
This method is similar to addResource().
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.