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

libkonq

KonqOperations Class Reference

Implements file operations (move,del,trash,paste,copy,move,link. More...

#include <konq_operations.h>

Inheritance diagram for KonqOperations:

Inheritance graph
[legend]

List of all members.


Public Types

enum  ConfirmationType { DEFAULT_CONFIRMATION, SKIP_CONFIRMATION, FORCE_CONFIRMATION }
enum  Operation {
  TRASH, DEL, COPY, MOVE,
  LINK, EMPTYTRASH, STAT, MKDIR,
  RESTORE, UNKNOWN
}

Signals

void aboutToCreate (const QPoint &pos, const QList< KIO::CopyInfo > &files)
void statFinished (const KFileItem &item)

Static Public Member Functions

static bool askDeleteConfirmation (const KUrl::List &selectedUrls, int method, ConfirmationType confirmation, QWidget *widget)
static void copy (QWidget *parent, Operation method, const KUrl::List &selectedUrls, const KUrl &destUrl)
static void del (QWidget *parent, Operation method, const KUrl::List &selectedUrls)
static void doDrop (const KFileItem &destItem, const KUrl &destUrl, QDropEvent *ev, QWidget *parent)
static void doPaste (QWidget *parent, const KUrl &destUrl, const QPoint &pos=QPoint())
static void editMimeType (const QString &mimeType, QWidget *parent)
static void emptyTrash (QWidget *parent)
static KIO::SimpleJob * mkdir (QWidget *parent, const KUrl &url)
static KIO::SimpleJob * newDir (QWidget *parent, const KUrl &baseUrl)
static void rename (QWidget *parent, const KUrl &oldurl, const KUrl &newurl)
static void rename (QWidget *parent, const KUrl &oldurl, const QString &name)
static void restoreTrashedItems (const KUrl::List &urls, QWidget *parent)
static void statUrl (const KUrl &url, const QObject *receiver, const char *member, QWidget *parent)

Protected Slots

void asyncDrop (const KFileItem &item)
void doDropFileCopy ()
void slotAboutToCreate (KIO::Job *job, const QList< KIO::CopyInfo > &files)
void slotResult (KJob *job)
void slotStatResult (KJob *job)

Protected Member Functions

 KonqOperations (QWidget *parent)
virtual ~KonqOperations ()

Detailed Description

Implements file operations (move,del,trash,paste,copy,move,link.

..) for konqueror and kdesktop whatever the view mode is (icon, tree, ...)

Definition at line 40 of file konq_operations.h.


Member Enumeration Documentation

enum KonqOperations::ConfirmationType

Enumerator:
DEFAULT_CONFIRMATION 
SKIP_CONFIRMATION 
FORCE_CONFIRMATION 

Definition at line 141 of file konq_operations.h.

enum KonqOperations::Operation

Enumerator:
TRASH 
DEL 
COPY 
MOVE 
LINK 
EMPTYTRASH 
STAT 
MKDIR 
RESTORE 
UNKNOWN 

Definition at line 54 of file konq_operations.h.


Constructor & Destructor Documentation

KonqOperations::KonqOperations ( QWidget *  parent  )  [protected]

Definition at line 70 of file konq_operations.cpp.

KonqOperations::~KonqOperations (  )  [protected, virtual]

Definition at line 77 of file konq_operations.cpp.


Member Function Documentation

void KonqOperations::aboutToCreate ( const QPoint &  pos,
const QList< KIO::CopyInfo > &  files 
) [signal]

bool KonqOperations::askDeleteConfirmation ( const KUrl::List &  selectedUrls,
int  method,
ConfirmationType  confirmation,
QWidget *  widget 
) [static]

Ask for confirmation before deleting/trashing selectedUrls.

Parameters:
selectedUrls the urls about to be deleted
method the type of deletion (DEL for real deletion, anything else for trash)
confirmation default (based on config file), skip (no confirmation) or force (always confirm)
widget parent widget for message boxes
Returns:
true if confirmed

Definition at line 238 of file konq_operations.cpp.

void KonqOperations::asyncDrop ( const KFileItem &  item  )  [protected, slot]

Definition at line 318 of file konq_operations.cpp.

void KonqOperations::copy ( QWidget *  parent,
Operation  method,
const KUrl::List &  selectedUrls,
const KUrl &  destUrl 
) [static]

Copy the selectedUrls to the destination destUrl.

Parameters:
parent parent widget (for error dialog box if any)
method should be COPY, MOVE or LINK
selectedUrls the URLs to copy
destUrl destination of the copy
Todo:
document restrictions on the kind of destination

Definition at line 150 of file konq_operations.cpp.

void KonqOperations::del ( QWidget *  parent,
Operation  method,
const KUrl::List &  selectedUrls 
) [static]

Delete the selectedUrls if possible.

Parameters:
parent parent widget (for error dialog box if any)
method should be TRASH or DEL
selectedUrls the URLs to be deleted

Definition at line 92 of file konq_operations.cpp.

void KonqOperations::doDrop ( const KFileItem &  destItem,
const KUrl &  destUrl,
QDropEvent *  ev,
QWidget *  parent 
) [static]

Drop.

Parameters:
destItem destination KFileItem for the drop (background or item)
destUrl destination URL for the drop.
ev the drop event
parent parent widget (for error dialog box if any)
If destItem is 0L, doDrop will stat the URL to determine it.

Definition at line 247 of file konq_operations.cpp.

void KonqOperations::doDropFileCopy (  )  [protected, slot]

Definition at line 401 of file konq_operations.cpp.

void KonqOperations::doPaste ( QWidget *  parent,
const KUrl &  destUrl,
const QPoint &  pos = QPoint() 
) [static]

Paste the clipboard contents.

Definition at line 127 of file konq_operations.cpp.

void KonqOperations::editMimeType ( const QString &  mimeType,
QWidget *  parent 
) [static]

Pop up properties dialog for mimetype mimeType.

Parameters:
parent parent widget (for dialogs)

Definition at line 83 of file konq_operations.cpp.

void KonqOperations::emptyTrash ( QWidget *  parent  )  [static]

Empty the trash.

Definition at line 106 of file konq_operations.cpp.

KIO::SimpleJob * KonqOperations::mkdir ( QWidget *  parent,
const KUrl &  url 
) [static]

Create a directory.

Same as KIO::mkdir but records job into KonqFileUndoManager for undo/redo purposes.

Definition at line 118 of file konq_operations.cpp.

KIO::SimpleJob * KonqOperations::newDir ( QWidget *  parent,
const KUrl &  baseUrl 
) [static]

Ask for the name of a new directory and create it.

Calls KonqOperations::mkdir.

Parameters:
parent the parent widget
baseUrl the directory to create the new directory in
Returns:
the job used to create the directory or 0 if the creation was cancelled by the user

Definition at line 697 of file konq_operations.cpp.

void KonqOperations::rename ( QWidget *  parent,
const KUrl &  oldurl,
const KUrl &  newurl 
) [static]

Do a renaming.

Parameters:
parent the parent widget, passed to KonqOperations ctor
oldurl the current url of the file to be renamed
newurl the new url for the file Use this version if the other one wouldn't work :) (e.g. because name could be a relative path, including a '/').

Definition at line 588 of file konq_operations.cpp.

void KonqOperations::rename ( QWidget *  parent,
const KUrl &  oldurl,
const QString &  name 
) [static]

Do a renaming.

Parameters:
parent the parent widget, passed to KonqOperations ctor
oldurl the current url of the file to be renamed
name the new name for the file. Shouldn't include '/'.

Definition at line 689 of file konq_operations.cpp.

void KonqOperations::restoreTrashedItems ( const KUrl::List &  urls,
QWidget *  parent 
) [static]

Restore trashed items.

Definition at line 112 of file konq_operations.cpp.

void KonqOperations::slotAboutToCreate ( KIO::Job *  job,
const QList< KIO::CopyInfo > &  files 
) [protected, slot]

Definition at line 638 of file konq_operations.cpp.

void KonqOperations::slotResult ( KJob *  job  )  [protected, slot]

Definition at line 676 of file konq_operations.cpp.

void KonqOperations::slotStatResult ( KJob *  job  )  [protected, slot]

Definition at line 659 of file konq_operations.cpp.

void KonqOperations::statFinished ( const KFileItem &  item  )  [signal]

void KonqOperations::statUrl ( const KUrl &  url,
const QObject *  receiver,
const char *  member,
QWidget *  parent 
) [static]

Get info about a given URL, and when that's done (it's asynchronous!), call a given slot with the KFileItem& as argument.

The KFileItem will be deleted by statUrl after calling the slot. Make a copy if you need one !

Definition at line 643 of file konq_operations.cpp.


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

libkonq

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

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.7
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