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

KFile

Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KDirSelectDialog Class Reference

#include <kdirselectdialog.h>

Inheritance diagram for KDirSelectDialog:
Inheritance graph
[legend]

Public Slots

void setCurrentUrl (const KUrl &url)
 

Public Member Functions

 KDirSelectDialog (const KUrl &startDir=KUrl(), bool localOnly=false, QWidget *parent=0L)
 
 ~KDirSelectDialog ()
 
bool localOnly () const
 
KUrl startDir () const
 
KUrl url () const
 
QAbstractItemView * view () const
 

Static Public Member Functions

static KUrl selectDirectory (const KUrl &startDir=KUrl(), bool localOnly=false, QWidget *parent=0L, const QString &caption=QString())
 

Protected Member Functions

virtual void accept ()
 
virtual void hideEvent (QHideEvent *event)
 

Detailed Description

A pretty dialog for a KDirSelect control for selecting directories.

Author
Michael Jarrett micha.nosp@m.elj@.nosp@m.corel.nosp@m..com
See also
KFileDialog

Definition at line 36 of file kdirselectdialog.h.

Constructor & Destructor Documentation

KDirSelectDialog::KDirSelectDialog ( const KUrl &  startDir = KUrl(),
bool  localOnly = false,
QWidget *  parent = 0L 
)
explicit

Creates a new directory selection dialog.

use the static selectDirectory function

Parameters
startDirthe directory, initially shown
localOnlyunused. You can only select paths below the startDir
parentthe parent for the dialog, usually 0L

Definition at line 272 of file kdirselectdialog.cpp.

KDirSelectDialog::~KDirSelectDialog ( )

Destroys the directory selection dialog.

Definition at line 400 of file kdirselectdialog.cpp.

Member Function Documentation

void KDirSelectDialog::accept ( )
protectedvirtual

Definition at line 462 of file kdirselectdialog.cpp.

void KDirSelectDialog::hideEvent ( QHideEvent *  event)
protectedvirtual

Reimplemented for saving the dialog geometry.

Definition at line 479 of file kdirselectdialog.cpp.

bool KDirSelectDialog::localOnly ( ) const

Returns whether only local directories can be selected.

Definition at line 426 of file kdirselectdialog.cpp.

KUrl KDirSelectDialog::selectDirectory ( const KUrl &  startDir = KUrl(),
bool  localOnly = false,
QWidget *  parent = 0L,
const QString &  caption = QString() 
)
static

Creates a KDirSelectDialog, and returns the result.

Parameters
startDirthe directory, initially shown The tree will display this directory and subdirectories of it.
localOnlyunused. You can only select paths below the startDir
parentthe parent widget to use for the dialog, or NULL to create a parent-less dialog
captionthe 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.

Definition at line 487 of file kdirselectdialog.cpp.

void KDirSelectDialog::setCurrentUrl ( const KUrl &  url)
slot

Sets the current url in the dialog.

Definition at line 436 of file kdirselectdialog.cpp.

KUrl KDirSelectDialog::startDir ( ) const
Returns
The path for the root node

Definition at line 431 of file kdirselectdialog.cpp.

KUrl KDirSelectDialog::url ( ) const

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

If the URL entered in the combobox is valid and exists, it is returned. Otherwise, the URL selected in the treeview is returned instead.

Definition at line 405 of file kdirselectdialog.cpp.

QAbstractItemView * KDirSelectDialog::view ( ) const

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

Definition at line 421 of file kdirselectdialog.cpp.


The documentation for this class was generated from the following files:
  • kdirselectdialog.h
  • kdirselectdialog.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KFile

Skip menu "KFile"
  • Main Page
  • 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