KIO
#include <kdevicelistmodel.h>

Signals | |
| void | modelInitialized () |
Public Member Functions | |
| KDeviceListModel (QObject *parent=0) | |
| KDeviceListModel (const QString &predicate, QObject *parent=0) | |
| KDeviceListModel (const Solid::Predicate &predicate, QObject *parent=0) | |
| ~KDeviceListModel () | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| QVariant | data (const QModelIndex &index, int role) const |
| Solid::Device | deviceForIndex (const QModelIndex &index) const |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| QModelIndex | parent (const QModelIndex &child) const |
| QModelIndex | rootIndex () const |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Detailed Description
Device list model in Qt's Interview framework.
This class is a tree view model. Each device has a parent excluding the main device(the computer). Only revelant when used with QTreeView.
Definition at line 39 of file kdevicelistmodel.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 58 of file kdevicelistmodel.cpp.
Definition at line 65 of file kdevicelistmodel.cpp.
|
explicit |
Definition at line 71 of file kdevicelistmodel.cpp.
| KDeviceListModel::~KDeviceListModel | ( | ) |
Definition at line 77 of file kdevicelistmodel.cpp.
Member Function Documentation
| int KDeviceListModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Get the number of columns for a model index.
Definition at line 172 of file kdevicelistmodel.cpp.
| QVariant KDeviceListModel::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const |
Get a visible data based on Qt role for the given index.
Return the device information for the give index.
- Parameters
-
index The QModelIndex which contains the row, column to fetch the data. role The Interview data role(ex: Qt::DisplayRole).
- Returns
- the data for the given index and role.
Definition at line 90 of file kdevicelistmodel.cpp.
| Solid::Device KDeviceListModel::deviceForIndex | ( | const QModelIndex & | index | ) | const |
Definition at line 179 of file kdevicelistmodel.cpp.
| QVariant KDeviceListModel::headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role = Qt::DisplayRole |
||
| ) | const |
Get the header data for a given section, orientation and role.
This method return a value to display in header in a view. Only support Qt::Horizontal direction and Qt::DisplayRole role.
- Parameters
-
section Section of Header to get the data of. orientation Orientation of the header. role The Interview data role(ex: Qt::DisplayRole).
- Returns
- the header data for the given section.
Definition at line 110 of file kdevicelistmodel.cpp.
| QModelIndex KDeviceListModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const |
Get the children model index for the given row and column.
Definition at line 122 of file kdevicelistmodel.cpp.
|
signal |
| QModelIndex KDeviceListModel::parent | ( | const QModelIndex & | child | ) | const |
Get the parent QModelIndex for the given model child.
Definition at line 148 of file kdevicelistmodel.cpp.
| QModelIndex KDeviceListModel::rootIndex | ( | ) | const |
Definition at line 143 of file kdevicelistmodel.cpp.
| int KDeviceListModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Get the number of rows for a model index.
Definition at line 162 of file kdevicelistmodel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference