• 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
kdevicelistitem_p.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 KDEVICELISTITEM_P_H
21 #define KDEVICELISTITEM_P_H
22 
23 #include <QVariant>
24 #include <QList>
25 
26 namespace Solid
27 {
28  class Device;
29 }
30 
40 class KDeviceListItem
41 {
42 public:
46  KDeviceListItem();
47 
51  ~KDeviceListItem();
52 
58  KDeviceListItem *child(int row);
59 
64  QList<KDeviceListItem*> children();
65 
71  int indexOf(KDeviceListItem *child) const;
72 
77  int childCount() const;
78 
83  int row() const;
84 
89  void setParent(KDeviceListItem *parent);
90 
95  KDeviceListItem *parent();
96 
101  void setDevice(const Solid::Device &device);
102 
107  Solid::Device &device();
108 
109 private:
114  void appendChild(KDeviceListItem *child);
115 
120  void removeChild(KDeviceListItem *child);
121 
122  class Private;
123  Private * const d;
124 };
125 
126 #endif
KDeviceListItem::childCount
int childCount() const
Helper method to get the numbers of childrens of this item.
Definition: kdevicelistitem.cpp:65
KDeviceListItem::setDevice
void setDevice(const Solid::Device &device)
Get the Solid::Device reference for this item.
Definition: kdevicelistitem.cpp:97
KDeviceListItem::child
KDeviceListItem * child(int row)
Return a child of this item according to the given row.
Definition: kdevicelistitem.cpp:50
KDeviceListItem::parent
KDeviceListItem * parent()
Get the parent of this item.
Definition: kdevicelistitem.cpp:92
KDeviceListItem::device
Solid::Device & device()
Get the Solid::Device reference for this item.
Definition: kdevicelistitem.cpp:102
KDeviceListItem::setParent
void setParent(KDeviceListItem *parent)
Set the parent of this item.
Definition: kdevicelistitem.cpp:79
KDeviceListItem::children
QList< KDeviceListItem * > children()
Get all the children of this item.
Definition: kdevicelistitem.cpp:55
KDeviceListItem::~KDeviceListItem
~KDeviceListItem()
The d-tor duh.
Definition: kdevicelistitem.cpp:45
KDeviceListItem::row
int row() const
Get the relative(to parent) row position of this item in the tree.
Definition: kdevicelistitem.cpp:70
KDeviceListItem::KDeviceListItem
KDeviceListItem()
Create a new DeviceListItem.
Definition: kdevicelistitem.cpp:40
KDeviceListItem
Item for the Device List model Represent a Solid::Device in the tree device list model.
Definition: kdevicelistitem_p.h:40
KDeviceListItem::indexOf
int indexOf(KDeviceListItem *child) const
Returns the index position of a child in the list.
Definition: kdevicelistitem.cpp:60
QList< KDeviceListItem * >
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