• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KIO

Signals | Public Member Functions
KDeviceListModel Class Reference

#include <kdevicelistmodel.h>

Inheritance diagram for KDeviceListModel:
QAbstractItemModel

List of all members.

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.

Author:
Michaƫl Larouche micha.nosp@m.el.l.nosp@m.arouc.nosp@m.he@k.nosp@m.demai.nosp@m.l.ne.nosp@m.t

Definition at line 39 of file kdevicelistmodel.h.


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 65 of file kdevicelistmodel.cpp.

KDeviceListModel::KDeviceListModel ( const Solid::Predicate &  predicate,
QObject *  parent = 0 
)
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:
indexThe QModelIndex which contains the row, column to fetch the data.
roleThe 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:
sectionSection of Header to get the data of.
orientationOrientation of the header.
roleThe 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.

void KDeviceListModel::modelInitialized ( )
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:
  • kdevicelistmodel.h
  • kdevicelistmodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 11:47:59 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal