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

KFile

KDirOperator Class Reference

#include <kdiroperator.h>

Inheritance diagram for KDirOperator:

Inheritance graph
[legend]

List of all members.


Detailed Description

This widget works as a network transparent filebrowser.

You specify a URL to display and this url will be loaded via KDirLister. The user can browse through directories, highlight and select files, delete or rename files.

It supports different views, e.g. a detailed view (see KFileDetailView), a simple icon view (see KFileIconView), a combination of two views, separating directories and files ( KCombiView).

Additionally, a preview view is available (see KFilePreview), which can show either a simple or detailed view and additionally a preview widget (see setPreviewWidget()). KImageFilePreview is one implementation of a preview widget, that displays previews for all supported filetypes utilizing KIO::PreviewJob.

Currently, those classes don't support Drag&Drop out of the box -- there you have to use your own view-classes. You can use some DnD-aware views from Bj�n Sahlstr� <bjorn@kbear.org> until they will be integrated into this library. See http://devel-home.kde.org/~pfeiffer/DnD-classes.tar.gz

This widget is the one used in the KFileDialog.

Basic usage is like this:

   KDirOperator *op = new KDirOperator( KUrl( "file:/home/gis" ), this );
   // some signals you might be interested in
   connect(op, SIGNAL(urlEntered(const KUrl&)),
           SLOT(urlEntered(const KUrl&)));
   connect(op, SIGNAL(fileHighlighted(const KFileItem &)),
           SLOT(fileHighlighted(const KFileItem &)));
   connect(op, SIGNAL(fileSelected(const KFileItem &)),
           SLOT(fileSelected(const KFileItem &)));
   connect(op, SIGNAL(finishedLoading()),
           SLOT(slotLoadingFinished()));

   KConfigGroup grp(KGlobal::config(),"Your KDiroperator ConfigGroup" );
   op->readConfig( &grp);
   op->setView(KFile::Default);

This will create a childwidget of 'this' showing the directory contents of /home/gis in the default-view. The view is determined by the readConfig() call, which will read the KDirOperator settings, the user left your program with (and which you saved with op->writeConfig()).

A widget for displaying files and browsing directories.

Author:
Stephan Kulow <coolo@kde.org>, Carsten Pfeiffer <pfeiffer@kde.org>

Definition at line 99 of file kdiroperator.h.


Public Types

enum  ActionType {
  SortActions = 1, ViewActions = 2, NavActions = 4, FileActions = 8,
  AllActions = 15
}

Public Slots

virtual void back ()
virtual void forward ()
virtual void home ()
virtual void cdUp ()
void updateDir ()
virtual void rereadDir ()
virtual void mkdir ()
virtual void deleteSelected ()
void updateSelectionDependentActions ()
QString makeCompletion (const QString &)
QString makeDirCompletion (const QString &)
virtual void trashSelected ()

Signals

void urlEntered (const KUrl &)
void updateInformation (int files, int dirs)
void completion (const QString &)
void finishedLoading ()
void viewChanged (QAbstractItemView *newView)
void fileHighlighted (const KFileItem &item)
void dirActivated (const KFileItem &item)
void fileSelected (const KFileItem &item)
void dropped (const KFileItem &item, QDropEvent *event, const KUrl::List &urls)

Public Member Functions

 KDirOperator (const KUrl &urlName=KUrl(), QWidget *parent=0)
virtual ~KDirOperator ()
virtual void setShowHiddenFiles (bool s)
bool showHiddenFiles () const
void close ()
void setNameFilter (const QString &filter)
QString nameFilter () const
void setMimeFilter (const QStringList &mimetypes)
QStringList mimeFilter () const
void clearFilter ()
KUrl url () const
virtual void setUrl (const KUrl &url, bool clearforward)
void setCurrentItem (const QString &filename)
void setCurrentItem (const KFileItem &item)
virtual void setView (QAbstractItemView *view)
QAbstractItemView * view () const
virtual void setView (KFile::FileView viewKind)
void setSorting (QDir::SortFlags)
QDir::SortFlags sorting () const
bool isRoot () const
KDirLister * dirLister () const
QProgressBar * progressBar () const
virtual void setMode (KFile::Modes m)
KFile::Modes mode () const
virtual void setPreviewWidget (KPreviewWidgetBase *w)
KFileItemList selectedItems () const
bool isSelected (const KFileItem &item) const
int numDirs () const
int numFiles () const
KCompletion * completionObject () const
KCompletion * dirCompletionObject () const
KActionCollection * actionCollection () const
virtual void setViewConfig (KConfigGroup &configGroup)
KConfigGroup * viewConfigGroup () const
virtual void readConfig (const KConfigGroup &configGroup)
virtual void writeConfig (KConfigGroup &configGroup)
void setOnlyDoubleClickSelectsFiles (bool enable)
bool onlyDoubleClickSelectsFiles () const
virtual bool mkdir (const QString &directory, bool enterDirectory=true)
virtual KIO::DeleteJob * del (const KFileItemList &items, QWidget *parent=0, bool ask=true, bool showProgress=true)
void clearHistory ()
virtual void setEnableDirHighlighting (bool enable)
bool dirHighlighting () const
bool dirOnlyMode () const
void setupMenu (int whichActions)
virtual void setAcceptDrops (bool b)
virtual void setDropOptions (int options)
virtual KIO::CopyJob * trash (const KFileItemList &items, QWidget *parent, bool ask=true, bool showProgress=true)

Static Public Member Functions

static bool dirOnlyMode (uint mode)

Protected Slots

void resetCursor ()
void pathChanged ()
virtual void selectDir (const KFileItem &item)
void selectFile (const KFileItem &item)
void highlightFile (const KFileItem &item)
void sortByName ()
void sortBySize ()
void sortByDate ()
void sortByType ()
void sortReversed ()
void toggleDirsFirst ()
void toggleIgnoreCase ()
void slotCompletionMatch (const QString &match)

Protected Member Functions

virtual QAbstractItemView * createView (QWidget *parent, KFile::FileView viewKind)
virtual void setDirLister (KDirLister *lister)
virtual void resizeEvent (QResizeEvent *event)
void setupActions ()
void updateSortActions ()
void updateViewActions ()
void setupMenu ()
void prepareCompletionObjects ()
bool checkPreviewSupport ()
virtual void activatedMenu (const KFileItem &item, const QPoint &pos)
virtual void changeEvent (QEvent *event)

Member Enumeration Documentation

enum KDirOperator::ActionType

The various action types.

These values can be or'd together

Enumerator:
SortActions 
ViewActions 
NavActions 
FileActions 
AllActions 

Definition at line 107 of file kdiroperator.h.


Constructor & Destructor Documentation

KDirOperator::KDirOperator ( const KUrl &  urlName = KUrl(),
QWidget *  parent = 0 
) [explicit]

Constructs the KDirOperator with no initial view.

As the views are configurable, call readConfig() to load the user's configuration and then setView to explicitly set a view.

This constructor doesn't start loading the url, setView will do it.

Definition at line 292 of file kdiroperator.cpp.

KDirOperator::~KDirOperator (  )  [virtual]

Destroys the KDirOperator.

Definition at line 349 of file kdiroperator.cpp.


Member Function Documentation

void KDirOperator::setShowHiddenFiles ( bool  s  )  [virtual]

Enables/disables showing hidden files.

Definition at line 2106 of file kdiroperator.cpp.

bool KDirOperator::showHiddenFiles (  )  const

Returns:
true when hidden files are shown or false otherwise.

Definition at line 2111 of file kdiroperator.cpp.

void KDirOperator::close (  ) 

Stops loading immediately.

You don't need to call this, usually.

Reimplemented from QWidget.

Definition at line 805 of file kdiroperator.cpp.

void KDirOperator::setNameFilter ( const QString &  filter  ) 

Sets a filter like "*.cpp *.h *.o".

Only files matching that filter will be shown.

See also:
KDirLister::setNameFilter

nameFilter

Definition at line 1079 of file kdiroperator.cpp.

QString KDirOperator::nameFilter (  )  const

Returns:
the current namefilter.

See also:
setNameFilter

Definition at line 1085 of file kdiroperator.cpp.

void KDirOperator::setMimeFilter ( const QStringList &  mimetypes  ) 

Sets a list of mimetypes as filter.

Only files of those mimetypes will be shown.

Example:

 QStringList filter;
 filter << "text/html" << "image/png" << "inode/directory";
 dirOperator->setMimefilter( filter );

Node: Without the mimetype inode/directory, only files would be shown. Call updateDir() to apply it.

See also:
KDirLister::setMimeFilter

mimeFilter

Definition at line 1090 of file kdiroperator.cpp.

QStringList KDirOperator::mimeFilter (  )  const

Returns:
the current mime filter.

Definition at line 1096 of file kdiroperator.cpp.

void KDirOperator::clearFilter (  ) 

Clears both the namefilter and mimetype filter, so that all files and directories will be shown.

Call updateDir() to apply it.

See also:
setMimeFilter

setNameFilter

Definition at line 1072 of file kdiroperator.cpp.

KUrl KDirOperator::url (  )  const

Returns:
the current url

Definition at line 1053 of file kdiroperator.cpp.

void KDirOperator::setUrl ( const KUrl &  url,
bool  clearforward 
) [virtual]

Sets a new url to list.

Parameters:
clearforward specifies whether the "forward" history should be cleared.
url the URL to set

Definition at line 868 of file kdiroperator.cpp.

void KDirOperator::setCurrentItem ( const QString &  filename  ) 

Clears the current selection and attempts to set filename the current file.

filename is just the name, no path or url.

Definition at line 1420 of file kdiroperator.cpp.

void KDirOperator::setCurrentItem ( const KFileItem &  item  ) 

Clears the current selection and attempts to set item as the the current item.

Definition at line 1429 of file kdiroperator.cpp.

void KDirOperator::setView ( QAbstractItemView *  view  )  [virtual]

Sets a new view to be used for showing and browsing files.

Note: this will read the current url() to fill the view.

See also:
KFileTreeView

view

Definition at line 1278 of file kdiroperator.cpp.

QAbstractItemView * KDirOperator::view (  )  const

Returns:
the currently used view.

See also:
setView

Definition at line 1255 of file kdiroperator.cpp.

void KDirOperator::setView ( KFile::FileView  viewKind  )  [virtual]

Sets one of the predefined fileviews.

See also:
KFile::FileView

Definition at line 1230 of file kdiroperator.cpp.

void KDirOperator::setSorting ( QDir::SortFlags  spec  ) 

Sets the way to sort files and directories.

Definition at line 356 of file kdiroperator.cpp.

QDir::SortFlags KDirOperator::sorting (  )  const

Returns:
the current way of sorting files and directories

Definition at line 363 of file kdiroperator.cpp.

bool KDirOperator::isRoot (  )  const

Returns:
true if we are displaying the root directory of the current url

Definition at line 368 of file kdiroperator.cpp.

KDirLister * KDirOperator::dirLister (  )  const

Returns:
the object listing the directory

Definition at line 373 of file kdiroperator.cpp.

QProgressBar * KDirOperator::progressBar (  )  const

Returns:
the progress widget, that is shown during directory listing.

You can for example reparent() it to put it into a statusbar.

Definition at line 1882 of file kdiroperator.cpp.

void KDirOperator::setMode ( KFile::Modes  m  )  [virtual]

Sets the listing/selection mode for the views, an OR'ed combination of.

  • File
  • Directory
  • Files
  • ExistingOnly
  • LocalOnly
You cannot mix File and Files of course, as the former means single-selection mode, the latter multi-selection.

Definition at line 1265 of file kdiroperator.cpp.

KFile::Modes KDirOperator::mode (  )  const

Returns:
the listing/selection mode.

Definition at line 1260 of file kdiroperator.cpp.

void KDirOperator::setPreviewWidget ( KPreviewWidgetBase *  w  )  [virtual]

Sets a preview-widget to be shown next to the file-view.

The ownership of w is transferred to KDirOperator, so don't delete it yourself!

Definition at line 434 of file kdiroperator.cpp.

KFileItemList KDirOperator::selectedItems (  )  const

Returns:
a list of all currently selected items.

If there is no view, or there are no selected items, an empty list is returned.

Definition at line 456 of file kdiroperator.cpp.

bool KDirOperator::isSelected ( const KFileItem &  item  )  const

Returns:
true if item is currently selected, or false otherwise.

Definition at line 476 of file kdiroperator.cpp.

int KDirOperator::numDirs (  )  const

Returns:
the number of directories in the currently listed url.

Returns 0 if there is no view.

Definition at line 487 of file kdiroperator.cpp.

int KDirOperator::numFiles (  )  const

Returns:
the number of files in the currently listed url.

Returns 0 if there is no view.

Definition at line 492 of file kdiroperator.cpp.

KCompletion * KDirOperator::completionObject (  )  const

Returns:
a KCompletion object, containing all filenames and directories of the current directory/URL.

You can use it to insert it into a KLineEdit or KComboBox Note: it will only contain files, after prepareCompletionObjects() has been called. It will be implicitly called from makeCompletion() or makeDirCompletion()

Definition at line 497 of file kdiroperator.cpp.

KCompletion * KDirOperator::dirCompletionObject (  )  const

Returns:
a KCompletion object, containing only all directories of the current directory/URL.

You can use it to insert it into a KLineEdit or KComboBox Note: it will only contain directories, after prepareCompletionObjects() has been called. It will be implicitly called from makeCompletion() or makeDirCompletion()

Definition at line 502 of file kdiroperator.cpp.

KActionCollection * KDirOperator::actionCollection (  )  const

an accessor to a collection of all available Actions.

The actions are static, they will be there all the time (no need to connect to the signals KActionCollection::inserted() or removed().

There are the following actions:

  • popupMenu : an ActionMenu presenting a popupmenu with all actions
  • up : changes to the parent directory
  • back : goes back to the previous directory
  • forward : goes forward in the history
  • home : changes to the user's home directory
  • reload : reloads the current directory
  • mkdir : opens a dialog box to create a directory
  • delete : deletes the selected files/directories
  • sorting menu : an ActionMenu containing all sort-options
  • by name : sorts by name
  • by size : sorts by size
  • by date : sorts by date
  • by type : sorts by type
  • descending : reverses the sort order
  • view menu : an ActionMenu containing all actions concerning the view
  • short view : shows a simple fileview
  • detailed view : shows a detailed fileview (dates, permissions ,...)
  • show hidden : shows hidden files
  • preview : shows a preview next to the fileview
  • properties : shows a KPropertiesDialog for the selected files
The short and detailed view are in an exclusive group. The sort-by actions are in an exclusive group as well. Also the "separate dirs", "preview" and "single" actions are in an exclusive group.

You can e.g. use

 actionCollection()->action( "up" )->plug( someToolBar );
to add a button into a toolbar, which makes the dirOperator change to its parent directory.

Returns:
all available Actions

Definition at line 507 of file kdiroperator.cpp.

void KDirOperator::setViewConfig ( KConfigGroup &  configGroup  )  [virtual]

Sets the config object and the to be used group in KDirOperator.

This will be used to store the view's configuration. If you don't set this, the views cannot save and restore their configuration.

Usually you call this right after KDirOperator creation so that the view instantiation can make use of it already.

Note that KDirOperator does NOT take ownership of that object (typically it's KGlobal::config() anyway.

You must not delete the KConfig or KConfigGroup object (and master config object) before either deleting the KDirOperator or calling setViewConfig(0); or something like that

See also:
viewConfig

viewConfigGroup

Definition at line 2095 of file kdiroperator.cpp.

KConfigGroup * KDirOperator::viewConfigGroup (  )  const

Definition at line 2101 of file kdiroperator.cpp.

void KDirOperator::readConfig ( const KConfigGroup &  configGroup  )  [virtual]

Reads the default settings for a view, i.e.

the default KFile::FileView. Also reads the sorting and whether hidden files should be shown. Note: the default view will not be set - you have to call

 setView( KFile::Default )
to apply it.

See also:
setView

setViewConfig

writeConfig

Definition at line 1693 of file kdiroperator.cpp.

void KDirOperator::writeConfig ( KConfigGroup &  configGroup  )  [virtual]

Saves the current settings like sorting, simple or detailed view.

See also:
readConfig

setViewConfig

Definition at line 1747 of file kdiroperator.cpp.

void KDirOperator::setOnlyDoubleClickSelectsFiles ( bool  enable  ) 

This is a KFileDialog specific hack: we want to select directories with single click, but not files.

But as a generic class, we have to be able to select files on single click as well.

This gives us the opportunity to do both.

The default is false, set it to true if you don't want files selected with single click.

Definition at line 1825 of file kdiroperator.cpp.

bool KDirOperator::onlyDoubleClickSelectsFiles (  )  const

Returns:
whether files (not directories) should only be select()ed by double-clicks.

See also:
setOnlyDoubleClickSelectsFiles

Definition at line 1834 of file kdiroperator.cpp.

bool KDirOperator::mkdir ( const QString &  directory,
bool  enterDirectory = true 
) [virtual]

Creates the given directory/url.

If it is a relative path, it will be completed with the current directory. If enterDirectory is true, the directory will be entered after a successful operation. If unsuccessful, a messagebox will be presented to the user.

Returns:
true if the directory could be created.

Definition at line 644 of file kdiroperator.cpp.

KIO::DeleteJob * KDirOperator::del ( const KFileItemList &  items,
QWidget *  parent = 0,
bool  ask = true,
bool  showProgress = true 
) [virtual]

Starts and returns a KIO::DeleteJob to delete the given items.

Parameters:
items the list of items to be deleted
parent the parent widget used for the confirmation dialog
ask specifies whether a confirmation dialog should be shown
showProgress passed to the DeleteJob to show a progress dialog

Definition at line 676 of file kdiroperator.cpp.

void KDirOperator::clearHistory (  ) 

Clears the forward and backward history.

Definition at line 1887 of file kdiroperator.cpp.

void KDirOperator::setEnableDirHighlighting ( bool  enable  )  [virtual]

When going up in the directory hierarchy, KDirOperator can highlight the directory that was just left.

I.e. when you go from /home/gis/src to /home/gis, the item "src" will be made the current item.

Default is off.

Definition at line 1898 of file kdiroperator.cpp.

bool KDirOperator::dirHighlighting (  )  const

Returns:
whether the last directory will be made the current item when going up in the directory hierarchy.

Default is false.

Definition at line 1903 of file kdiroperator.cpp.

bool KDirOperator::dirOnlyMode (  )  const

Returns:
true if we are in directory-only mode, that is, no files are shown.

Definition at line 1908 of file kdiroperator.cpp.

bool KDirOperator::dirOnlyMode ( uint  mode  )  [static]

Definition at line 1913 of file kdiroperator.cpp.

void KDirOperator::setupMenu ( int  whichActions  ) 

Sets up the action menu.

Parameters:
whichActions is an value of OR'd ActionTypes that controls which actions to show in the action menu

Definition at line 1613 of file kdiroperator.cpp.

void KDirOperator::setAcceptDrops ( bool  b  )  [virtual]

Reimplemented - allow dropping of files if b is true.

Parameters:
b true if the widget should allow dropping of files

Definition at line 1214 of file kdiroperator.cpp.

void KDirOperator::setDropOptions ( int  options  )  [virtual]

Sets the options for dropping files.

CURRENTLY NOT IMPLEMENTED

Definition at line 1222 of file kdiroperator.cpp.

KIO::CopyJob * KDirOperator::trash ( const KFileItemList &  items,
QWidget *  parent,
bool  ask = true,
bool  showProgress = true 
) [virtual]

Starts and returns a KIO::CopyJob to trash the given items.

Parameters:
items the list of items to be trashed
parent the parent widget used for the confirmation dialog
ask specifies whether a confirmation dialog should be shown
showProgress passed to the CopyJob to show a progress dialog

Definition at line 738 of file kdiroperator.cpp.

QAbstractItemView * KDirOperator::createView ( QWidget *  parent,
KFile::FileView  viewKind 
) [protected, virtual]

A view factory for creating predefined fileviews.

Called internally by setView, but you can also call it directly. Reimplement this if you depend on self defined fileviews.

Parameters:
parent is the QWidget to be set as parent
viewKind is the predefined view to be set, note: this can be several ones OR:ed together
Returns:
the created view
See also:
KFile::FileView

setView

Definition at line 1199 of file kdiroperator.cpp.

void KDirOperator::setDirLister ( KDirLister *  lister  )  [protected, virtual]

Sets a custom KDirLister to list directories.

The KDirOperator takes ownership of the given KDirLister.

Definition at line 1362 of file kdiroperator.cpp.

void KDirOperator::resizeEvent ( QResizeEvent *  event  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 1798 of file kdiroperator.cpp.

void KDirOperator::setupActions (  )  [protected]

Sets up all the actions.

Called from the constructor, you usually better not call this.

Definition at line 1494 of file kdiroperator.cpp.

void KDirOperator::updateSortActions (  )  [protected]

Updates the sorting-related actions to comply with the current sorting.

See also:
sorting

Definition at line 1667 of file kdiroperator.cpp.

void KDirOperator::updateViewActions (  )  [protected]

Updates the view-related actions to comply with the current KFile::FileView.

Definition at line 1681 of file kdiroperator.cpp.

void KDirOperator::setupMenu (  )  [protected]

Sets up the context-menu with all the necessary actions.

Called from the constructor, you usually don't need to call this.

Definition at line 1608 of file kdiroperator.cpp.

void KDirOperator::prepareCompletionObjects (  )  [protected]

Synchronizes the completion objects with the entries of the currently listed url.

Automatically called from makeCompletion() and makeDirCompletion()

Definition at line 1470 of file kdiroperator.cpp.

bool KDirOperator::checkPreviewSupport (  )  [protected]

Checks if there support from KIO::PreviewJob for the currently shown files, taking mimeFilter() and nameFilter() into account Enables/disables the preview-action accordingly.

Definition at line 1101 of file kdiroperator.cpp.

void KDirOperator::activatedMenu ( const KFileItem &  item,
const QPoint &  pos 
) [protected, virtual]

Called upon right-click to activate the popupmenu.

Definition at line 1114 of file kdiroperator.cpp.

void KDirOperator::changeEvent ( QEvent *  event  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 1123 of file kdiroperator.cpp.

void KDirOperator::back (  )  [virtual, slot]

Goes one step back in the history and opens that url.

Definition at line 1027 of file kdiroperator.cpp.

void KDirOperator::forward (  )  [virtual, slot]

Goes one step forward in the history and opens that url.

Definition at line 1041 of file kdiroperator.cpp.

void KDirOperator::home (  )  [virtual, slot]

Enters the home directory.

Definition at line 1065 of file kdiroperator.cpp.

void KDirOperator::cdUp (  )  [virtual, slot]

Goes one directory up from the current url.

Definition at line 1058 of file kdiroperator.cpp.

void KDirOperator::updateDir (  )  [slot]

to update the view after changing the settings

Definition at line 926 of file kdiroperator.cpp.

void KDirOperator::rereadDir (  )  [virtual, slot]

Re-reads the current url.

Definition at line 931 of file kdiroperator.cpp.

void KDirOperator::mkdir (  )  [virtual, slot]

Opens a dialog to create a new directory.

Definition at line 625 of file kdiroperator.cpp.

void KDirOperator::deleteSelected (  )  [virtual, slot]

Deletes the currently selected files/directories.

Definition at line 730 of file kdiroperator.cpp.

void KDirOperator::updateSelectionDependentActions (  )  [slot]

Enables/disables actions that are selection dependent.

Call this e.g. when you are about to show a popup menu using some of KDirOperators actions.

Definition at line 425 of file kdiroperator.cpp.

QString KDirOperator::makeCompletion ( const QString &  string  )  [slot]

Tries to complete the given string (only completes files).

Definition at line 1448 of file kdiroperator.cpp.

QString KDirOperator::makeDirCompletion ( const QString &  string  )  [slot]

Tries to complete the given string (only completes directores).

Definition at line 1459 of file kdiroperator.cpp.

void KDirOperator::trashSelected (  )  [virtual, slot]

Trashes the currently selected files/directories.

This function used to take activation reason and keyboard modifiers, in order to call deleteSelected() if the user wanted to delete. Instead, call deleteSelected().

FIXME KAction Port: link deleteSelected() up correctly

Definition at line 788 of file kdiroperator.cpp.

void KDirOperator::resetCursor (  )  [protected, slot]

Restores the normal cursor after showing the busy-cursor.

Also hides the progressbar.

Definition at line 378 of file kdiroperator.cpp.

void KDirOperator::pathChanged (  )  [protected, slot]

Called after setUrl() to load the directory, update the history, etc.

Definition at line 989 of file kdiroperator.cpp.

void KDirOperator::selectDir ( const KFileItem &  item  )  [protected, virtual, slot]

Enters the directory specified by the given item.

Definition at line 1399 of file kdiroperator.cpp.

void KDirOperator::selectFile ( const KFileItem &  item  )  [protected, slot]

Emits fileSelected( item ).

Definition at line 1404 of file kdiroperator.cpp.

void KDirOperator::highlightFile ( const KFileItem &  item  )  [protected, slot]

Emits fileHighlighted(item).

Definition at line 1411 of file kdiroperator.cpp.

void KDirOperator::sortByName (  )  [protected, slot]

Changes sorting to sort by name.

Definition at line 385 of file kdiroperator.cpp.

void KDirOperator::sortBySize (  )  [protected, slot]

Changes sorting to sort by size.

Definition at line 390 of file kdiroperator.cpp.

void KDirOperator::sortByDate (  )  [protected, slot]

Changes sorting to sort by date.

Definition at line 395 of file kdiroperator.cpp.

void KDirOperator::sortByType (  )  [protected, slot]

Changes sorting to sort by date.

Definition at line 400 of file kdiroperator.cpp.

void KDirOperator::sortReversed (  )  [protected, slot]

Changes sorting to reverse sorting.

Definition at line 405 of file kdiroperator.cpp.

void KDirOperator::toggleDirsFirst (  )  [protected, slot]

Toggles showing directories first / having them sorted like files.

Definition at line 411 of file kdiroperator.cpp.

void KDirOperator::toggleIgnoreCase (  )  [protected, slot]

Toggles case sensitive / case insensitive sorting.

Definition at line 416 of file kdiroperator.cpp.

void KDirOperator::slotCompletionMatch ( const QString &  match  )  [protected, slot]

Tries to make the given match as current item in the view and emits completion( match ).

Definition at line 1488 of file kdiroperator.cpp.

void KDirOperator::urlEntered ( const KUrl &   )  [signal]

void KDirOperator::updateInformation ( int  files,
int  dirs 
) [signal]

void KDirOperator::completion ( const QString &   )  [signal]

void KDirOperator::finishedLoading (  )  [signal]

void KDirOperator::viewChanged ( QAbstractItemView *  newView  )  [signal]

Emitted whenever the current fileview is changed, either by an explicit call to setView() or by the user selecting a different view thru the GUI.

void KDirOperator::fileHighlighted ( const KFileItem &  item  )  [signal]

Emitted when a file is highlighted or generally the selection changes in multiselection mode.

In the latter case, item is 0L. You can access the selected items with selectedItems().

void KDirOperator::dirActivated ( const KFileItem &  item  )  [signal]

void KDirOperator::fileSelected ( const KFileItem &  item  )  [signal]

void KDirOperator::dropped ( const KFileItem &  item,
QDropEvent *  event,
const KUrl::List &  urls 
) [signal]

Emitted when files are dropped.

Dropping files is disabled by default. You need to enable it with setAcceptDrops()

Parameters:
item the item on which the drop occurred or 0.
event the drop event itself.
urls the urls that where dropped.


The documentation for this class was generated from the following files:
  • kdiroperator.h
  • kdiroperator.cpp

KFile

Skip menu "KFile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   WTF
  • KJSEmbed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  •   core
  • Phonon
  •   Backend
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal