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

KDirSelectDialog Class Reference

from PyKDE4.kio import *

Inherits: KDialog → QDialog → QWidget → QObject

Detailed Description

A pretty dialog for a KDirSelect control for selecting directories.

Author:
Michael Jarrett <michaelj@corel.com>
See also:
KFileDialog


Methods

 __init__ (self, KUrl startDir=KUrl(), bool localOnly=0, QWidget parent=0)
 accept (self)
 hideEvent (self, QHideEvent event)
bool localOnly (self)
 setCurrentUrl (self, KUrl url)
KUrl startDir (self)
KUrl url (self)
QAbstractItemView view (self)

Static Methods

KUrl selectDirectory (KUrl startDir=KUrl(), bool localOnly=0, QWidget parent=0, QString caption=QString())

Method Documentation

__init__ (  self,
KUrl  startDir=KUrl(),
bool  localOnly=0,
QWidget  parent=0
)

Creates a new directory selection dialog.

Internal:
use the static selectDirectory function

Parameters:
startDir  the directory, initially shown
localOnly  unused. You can only select paths below the startDir
parent  the parent for the dialog, usually 0

accept (   self )
hideEvent (  self,
QHideEvent  event
)

Reimplemented for saving the dialog geometry.

bool localOnly (   self )

Returns whether only local directories can be selected.

KUrl selectDirectory ( KUrl  startDir=KUrl(),
bool  localOnly=0,
QWidget  parent=0,
QString  caption=QString()
)

Creates a KDirSelectDialog, and returns the result.

Parameters:
startDir  the directory, initially shown The tree will display this directory and subdirectories of it.
localOnly  unused. You can only select paths below the startDir
parent  the parent widget to use for the dialog, or NULL to create a parent-less dialog
caption  the caption to use for the dialog, or QString() for the default caption

Returns:
The URL selected, or an empty URL if the user canceled or no URL was selected.

NOTE: if you use this method and nothing else from libkfile, then you can use KFileDialog.getExistingDirectory (if localOnly was true) or KFileDialog.getExistingDirectoryUrl (if localOnly was false), and then you can link to libkio only instead of libkfile.

setCurrentUrl (  self,
KUrl  url
)

Sets the current url in the dialog.

KUrl startDir (   self )

Returns:
The path for the root node

KUrl url (   self )

Returns:
The currently selected URL, or an empty one if no item is selected.

QAbstractItemView view (   self )

Returns a pointer to the view which is used for displaying the directories.

  • 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