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

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kfile
kdevicelistmodel.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright (C) 2006 Michael Larouche <michael.larouche@kdemail.net>
3  2007 Kevin Ottens <ervin@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 
19 */
20 #ifndef KDEVICELISTMODEL_H
21 #define KDEVICELISTMODEL_H
22 
23 #include <kio/kio_export.h>
24 
25 #include <QtCore/QAbstractItemModel>
26 
27 #include <solid/device.h>
28 #include <solid/predicate.h>
29 
39 class KIO_EXPORT KDeviceListModel : public QAbstractItemModel
40 {
41  Q_OBJECT
42 public:
43  explicit KDeviceListModel(QObject *parent=0);
44  explicit KDeviceListModel(const QString &predicate, QObject *parent=0);
45  explicit KDeviceListModel(const Solid::Predicate &predicate,
46  QObject *parent=0);
47  ~KDeviceListModel();
48 
58  QVariant data(const QModelIndex &index, int role) const;
59 
71  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
72 
76  QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
77 
78  QModelIndex rootIndex() const;
79 
83  QModelIndex parent(const QModelIndex &child) const;
84 
88  int rowCount(const QModelIndex &parent = QModelIndex()) const;
89 
93  int columnCount(const QModelIndex &parent = QModelIndex()) const;
94 
95  Solid::Device deviceForIndex( const QModelIndex& index ) const;
96 
97 
98 Q_SIGNALS:
99  void modelInitialized();
100 
101 private:
102  Q_PRIVATE_SLOT(d, void _k_initDeviceList())
103  Q_PRIVATE_SLOT(d, void _k_deviceAdded(const QString &))
104  Q_PRIVATE_SLOT(d, void _k_deviceRemoved(const QString &))
105 
106  class Private;
107  Private * const d;
108 };
109 
110 #endif
QVariant
kio_export.h
QString
QObject
QAbstractItemModel
KDeviceListModel
Device list model in Qt's Interview framework.
Definition: kdevicelistmodel.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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