KonqOperations Class Reference
#include <konq_operations.h>
Detailed Description
Implements file operations (move,del,trash,shred,paste,copy,move,link...) for konqueror and kdesktop whatever the view mode is (icon, tree, ...)
Definition at line 37 of file konq_operations.h.
Public Types | |
enum | { TRASH, DEL, SHRED, COPY, MOVE, LINK, EMPTYTRASH, STAT, MKDIR, RESTORE, UNKNOWN } |
Signals | |
void | statFinished (const KFileItem *item) |
void | aboutToCreate (const QPoint &pos, const QValueList< KIO::CopyInfo > &files) |
Static Public Member Functions | |
static void | editMimeType (const QString &mimeType) |
static void | del (QWidget *parent, int method, const KURL::List &selectedURLs) |
static void | copy (QWidget *parent, int method, const KURL::List &selectedURLs, const KURL &destURL) |
static void | doDrop (const KFileItem *destItem, const KURL &destURL, QDropEvent *ev, QWidget *parent) |
static void | doPaste (QWidget *parent, const KURL &destURL, const QPoint &pos) |
static void | doPaste (QWidget *parent, const KURL &destURL) |
static void | emptyTrash () |
static void | restoreTrashedItems (const KURL::List &urls) |
static void | mkdir (QWidget *parent, const KURL &url) |
static void | statURL (const KURL &url, const QObject *receiver, const char *member) |
static void | rename (QWidget *parent, const KURL &oldurl, const QString &name) |
static void | rename (QWidget *parent, const KURL &oldurl, const KURL &newurl) |
static void | newDir (QWidget *parent, const KURL &baseURL) |
Protected Types | |
enum | { DEFAULT_CONFIRMATION, SKIP_CONFIRMATION, FORCE_CONFIRMATION } |
Protected Slots | |
void | slotAboutToCreate (KIO::Job *job, const QValueList< KIO::CopyInfo > &files) |
void | slotResult (KIO::Job *job) |
void | slotStatResult (KIO::Job *job) |
void | asyncDrop (const KFileItem *item) |
void | doFileCopy () |
Protected Member Functions | |
KonqOperations (QWidget *parent) | |
virtual | ~KonqOperations () |
bool | askDeleteConfirmation (const KURL::List &selectedURLs, int confirmation) |
void | _del (int method, const KURL::List &selectedURLs, int confirmation) |
void | _restoreTrashedItems (const KURL::List &urls) |
void | _statURL (const KURL &url, const QObject *receiver, const char *member) |
void | setOperation (KIO::Job *job, int method, const KURL::List &src, const KURL &dest) |
void | setDropInfo (DropInfo *info) |
void | setPasteInfo (KIOPasteInfo *info) |
Classes | |
struct | DropInfo |
struct | KIOPasteInfo |
Member Function Documentation
void KonqOperations::editMimeType | ( | const QString & | mimeType | ) | [static] |
void KonqOperations::del | ( | QWidget * | parent, | |
int | 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, DEL or SHRED selectedURLs the URLs to be deleted
Definition at line 84 of file konq_operations.cc.
void KonqOperations::copy | ( | QWidget * | parent, | |
int | 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 146 of file konq_operations.cc.
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)
Definition at line 311 of file konq_operations.cc.
void KonqOperations::doPaste | ( | QWidget * | parent, | |
const KURL & | destURL, | |||
const QPoint & | pos | |||
) | [static] |
void KonqOperations::mkdir | ( | QWidget * | parent, | |
const KURL & | url | |||
) | [static] |
void KonqOperations::statURL | ( | const KURL & | url, | |
const QObject * | receiver, | |||
const char * | member | |||
) | [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 672 of file konq_operations.cc.
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 715 of file konq_operations.cc.
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 620 of file konq_operations.cc.
void KonqOperations::newDir | ( | QWidget * | parent, | |
const KURL & | baseURL | |||
) | [static] |
Ask for the name of a new directory and create it.
- Parameters:
-
parent the parent widget baseURL the directory to create the new directory in
Definition at line 723 of file konq_operations.cc.
The documentation for this class was generated from the following files: