KIO
kdevicelistmodel.cpp
Go to the documentation of this file.
231 if (!deviceItems.contains(device.parentUdi()) ) // The parent was not present, try to insert it in the model
Item for the Device List model Represent a Solid::Device in the tree device list model.
Definition: kdevicelistitem_p.h:41
Solid::Device & device()
Get the Solid::Device reference for this item.
Definition: kdevicelistitem.cpp:102
QList< KDeviceListItem * > children()
Get all the children of this item.
Definition: kdevicelistitem.cpp:55
KDeviceListItem * child(int row)
Return a child of this item according to the given row.
Definition: kdevicelistitem.cpp:50
void setDevice(const Solid::Device &device)
Get the Solid::Device reference for this item.
Definition: kdevicelistitem.cpp:97
int childCount() const
Helper method to get the numbers of childrens of this item.
Definition: kdevicelistitem.cpp:65
int row() const
Get the relative(to parent) row position of this item in the tree.
Definition: kdevicelistitem.cpp:70
void setParent(KDeviceListItem *parent)
Set the parent of this item.
Definition: kdevicelistitem.cpp:79
QModelIndex parent(const QModelIndex &child) const
Get the parent QModelIndex for the given model child.
Definition: kdevicelistmodel.cpp:148
int rowCount(const QModelIndex &parent=QModelIndex()) const
Get the number of rows for a model index.
Definition: kdevicelistmodel.cpp:162
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Get the header data for a given section, orientation and role.
Definition: kdevicelistmodel.cpp:110
KDeviceListModel(QObject *parent=0)
Definition: kdevicelistmodel.cpp:58
Solid::Device deviceForIndex(const QModelIndex &index) const
Definition: kdevicelistmodel.cpp:179
int columnCount(const QModelIndex &parent=QModelIndex()) const
Get the number of columns for a model index.
Definition: kdevicelistmodel.cpp:172
QVariant data(const QModelIndex &index, int role) const
Get a visible data based on Qt role for the given index.
Definition: kdevicelistmodel.cpp:90
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Get the children model index for the given row and column.
Definition: kdevicelistmodel.cpp:122
QString i18n(const char *text)
Definition: kdevicelistitem_p.h:27
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.