libkonq
KonqOperations Class Reference
#include <konq_operations.h>

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.
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 () |
Member Enumeration Documentation
Definition at line 141 of file konq_operations.h.
Definition at line 54 of file konq_operations.h.
Constructor & Destructor Documentation
KonqOperations::KonqOperations | ( | QWidget * | parent | ) | [protected] |
Definition at line 69 of file konq_operations.cpp.
KonqOperations::~KonqOperations | ( | ) | [protected, virtual] |
Definition at line 76 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 236 of file konq_operations.cpp.
void KonqOperations::asyncDrop | ( | const KFileItem & | item | ) | [protected, slot] |
Definition at line 316 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 149 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 91 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)
Definition at line 245 of file konq_operations.cpp.
void KonqOperations::doDropFileCopy | ( | ) | [protected, slot] |
Definition at line 398 of file konq_operations.cpp.
Pop up properties dialog for mimetype mimeType
.
- Parameters:
-
parent parent widget (for dialogs)
Definition at line 82 of file konq_operations.cpp.
void KonqOperations::emptyTrash | ( | QWidget * | parent | ) | [static] |
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 117 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 670 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 561 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 662 of file konq_operations.cpp.
void KonqOperations::restoreTrashedItems | ( | const KUrl::List & | urls, | |
QWidget * | parent | |||
) | [static] |
void KonqOperations::slotAboutToCreate | ( | KIO::Job * | job, | |
const QList< KIO::CopyInfo > & | files | |||
) | [protected, slot] |
Definition at line 611 of file konq_operations.cpp.
void KonqOperations::slotResult | ( | KJob * | job | ) | [protected, slot] |
Definition at line 649 of file konq_operations.cpp.
void KonqOperations::slotStatResult | ( | KJob * | job | ) | [protected, slot] |
Definition at line 632 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 616 of file konq_operations.cpp.
The documentation for this class was generated from the following files: