KDE 4.2 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KFilePlacesModel Class Reference

from PyKDE4.kio import *

Inherits: QAbstractItemModel → QObject

Detailed Description

This class is a list view model. Each entry represents a "place" where user can access files. Only revelant when used with QListView or QTableView.


Enumerations

AdditionalRoles { UrlRole, HiddenRole, SetupNeededRole }

Signals

 errorMessage (QString message)
 setupDone (QModelIndex index, bool success)

Methods

 __init__ (self, QObject parent=0)
 addPlace (self, QString text, KUrl url, QString iconName=QString(), QString appName=QString())
KBookmark bookmarkForIndex (self, QModelIndex index)
QModelIndex closestItem (self, KUrl url)
int columnCount (self, QModelIndex parent=QModelIndex())
QVariant data (self, QModelIndex index, int role)
Solid.Device deviceForIndex (self, QModelIndex index)
bool dropMimeData (self, QMimeData data, Qt.DropAction action, int row, int column, QModelIndex parent)
 editPlace (self, QModelIndex index, QString text, KUrl url, QString iconName=QString(), QString appName=QString())
QAction ejectActionForIndex (self, QModelIndex index)
 errorMessage (self, QString message)
Qt.ItemFlags flags (self, QModelIndex index)
int hiddenCount (self)
KIcon icon (self, QModelIndex index)
QModelIndex index (self, int row, int column, QModelIndex parent=QModelIndex())
bool isDevice (self, QModelIndex index)
bool isHidden (self, QModelIndex index)
QMimeData mimeData (self, QModelIndexList indexes)
QStringList mimeTypes (self)
QModelIndex parent (self, QModelIndex child)
 removePlace (self, QModelIndex index)
 requestEject (self, QModelIndex index)
 requestSetup (self, QModelIndex index)
 requestTeardown (self, QModelIndex index)
int rowCount (self, QModelIndex parent=QModelIndex())
 setPlaceHidden (self, QModelIndex index, bool hidden)
 setupDone (self, QModelIndex index, bool success)
bool setupNeeded (self, QModelIndex index)
Qt.DropActions supportedDropActions (self)
QAction teardownActionForIndex (self, QModelIndex index)
QString text (self, QModelIndex index)
KUrl url (self, QModelIndex index)

Method Documentation

__init__ (  self,
QObject  parent=0
)
addPlace (  self,
QString  text,
KUrl  url,
QString  iconName=QString(),
QString  appName=QString()
)
KBookmark bookmarkForIndex (  self,
QModelIndex  index
)
QModelIndex closestItem (  self,
KUrl  url
)

Returns the closest item for the URL url. The closest item is defined as item which is equal to the URL or at least is a parent URL. If there are more than one possible parent URL candidates, the item which covers the bigger range of the URL is returned.

Example: the url is '/home/peter/Documents/Music'. Available items are: - /home/peter - /home/peter/Documents

The returned item will the one for '/home/peter/Documents'.

int columnCount (  self,
QModelIndex  parent=QModelIndex()
)

Get the number of columns for a model index.

QVariant data (  self,
QModelIndex  index,
int  role
)

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.

Solid.Device deviceForIndex (  self,
QModelIndex  index
)
bool dropMimeData (  self,
QMimeData  data,
Qt.DropAction  action,
int  row,
int  column,
QModelIndex  parent
)
editPlace (  self,
QModelIndex  index,
QString  text,
KUrl  url,
QString  iconName=QString(),
QString  appName=QString()
)
QAction ejectActionForIndex (  self,
QModelIndex  index
)
errorMessage (  self,
QString  message
)
Signal syntax:
QObject.connect(source, SIGNAL("errorMessage(const QString&)"), target_slot)
Qt.ItemFlags flags (  self,
QModelIndex  index
)
int hiddenCount (   self )
KIcon icon (  self,
QModelIndex  index
)
QModelIndex index (  self,
int  row,
int  column,
QModelIndex  parent=QModelIndex()
)

Get the children model index for the given row and column.

bool isDevice (  self,
QModelIndex  index
)
bool isHidden (  self,
QModelIndex  index
)
QMimeData mimeData (  self,
QModelIndexList  indexes
)
QStringList mimeTypes (   self )
QModelIndex parent (  self,
QModelIndex  child
)

Get the parent QModelIndex for the given model child.

removePlace (  self,
QModelIndex  index
)
requestEject (  self,
QModelIndex  index
)
requestSetup (  self,
QModelIndex  index
)
requestTeardown (  self,
QModelIndex  index
)
int rowCount (  self,
QModelIndex  parent=QModelIndex()
)

Get the number of rows for a model index.

setPlaceHidden (  self,
QModelIndex  index,
bool  hidden
)
setupDone (  self,
QModelIndex  index,
bool  success
)
Signal syntax:
QObject.connect(source, SIGNAL("setupDone(const QModelIndex&, bool)"), target_slot)
bool setupNeeded (  self,
QModelIndex  index
)
Qt.DropActions supportedDropActions (   self )
QAction teardownActionForIndex (  self,
QModelIndex  index
)
QString text (  self,
QModelIndex  index
)
KUrl url (  self,
QModelIndex  index
)

Enumeration Documentation

AdditionalRoles
Enumerator:
UrlRole = 0x069CD12B
HiddenRole = 0x0741CAAC
SetupNeededRole = 0x059A935D

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal