• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

KDeviceListModel Class Reference

#include <kdevicelistmodel.h>

Inheritance diagram for KDeviceListModel:

Inheritance graph
[legend]

List of all members.


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.

Author:
Michaƫl Larouche <michael.larouche@kdemail.net>

Definition at line 39 of file kdevicelistmodel.h.


Signals

void modelInitialized ()

Public Member Functions

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
 KDeviceListModel (const Solid::Predicate &predicate, QObject *parent=0)
 KDeviceListModel (const QString &predicate, QObject *parent=0)
 KDeviceListModel (QObject *parent=0)
QModelIndex parent (const QModelIndex &child) const
QModelIndex rootIndex () const
int rowCount (const QModelIndex &parent=QModelIndex()) const
 ~KDeviceListModel ()

Constructor & Destructor Documentation

KDeviceListModel::KDeviceListModel ( QObject *  parent = 0  )  [explicit]

Definition at line 58 of file kdevicelistmodel.cpp.

KDeviceListModel::KDeviceListModel ( const QString &  predicate,
QObject *  parent = 0 
) [explicit]

Definition at line 64 of file kdevicelistmodel.cpp.

KDeviceListModel::KDeviceListModel ( const Solid::Predicate &  predicate,
QObject *  parent = 0 
) [explicit]

Definition at line 70 of file kdevicelistmodel.cpp.

KDeviceListModel::~KDeviceListModel (  ) 

Definition at line 76 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 168 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 89 of file kdevicelistmodel.cpp.

Solid::Device KDeviceListModel::deviceForIndex ( const QModelIndex &  index  )  const

Definition at line 175 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 109 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 121 of file kdevicelistmodel.cpp.

void KDeviceListModel::modelInitialized (  )  [signal]

QModelIndex KDeviceListModel::parent ( const QModelIndex &  child  )  const

Get the parent QModelIndex for the given model child.

Definition at line 144 of file kdevicelistmodel.cpp.

QModelIndex KDeviceListModel::rootIndex (  )  const

Definition at line 139 of file kdevicelistmodel.cpp.

int KDeviceListModel::rowCount ( const QModelIndex &  parent = QModelIndex()  )  const

Get the number of rows for a model index.

Definition at line 158 of file kdevicelistmodel.cpp.


The documentation for this class was generated from the following files:
  • kdevicelistmodel.h
  • kdevicelistmodel.cpp

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal