# class KDirSelectDialog

###

Module | kio
Namespace |
Class | KDirSelectDialog
Inherits | KDialog

A pretty dialog for a KDirSelect control for selecting directories. Author Michael Jarrett <michaelj@corel.com>

See also KFileDialog

### methods

- KDirSelectDialog (startDir, localOnly, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  startDir | KUrl | KUrl()
  localOnly | bool | 0
  parent | QWidget | 0

  Creates a new directory selection dialog. Internal use the static selectDirectory function

  startDir - the directory, initially shown

  localOnly - unused. You can only select paths below the startDir

  parent - the parent for the dialog, usually 0

- KDirSelectDialog (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KUrl | KUrl()
  a1 | bool | 0
  a2 | QWidget | 0

- accept ( )

  returns Nothing

- localOnly ( )

  returns bool

  Returns whether only local directories can be selected.

- selectDirectory (startDir, localOnly, parent, caption)

  returns KUrl
  static

  Argument | Type | Default
  --- | --- | ---
  startDir | KUrl | KUrl()
  localOnly | bool | 0
  parent | QWidget | 0
  caption | QString | QString()

  Creates a KDirSelectDialog, and returns the result.

  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 (url)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  url | KUrl |

  Sets the current url in the dialog.

- startDir ( )

  returns KUrl

  Returns The path for the root node

- url ( )

  returns KUrl

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

- view ( )

  returns QAbstractItemView

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