libkonq
#include <konq_operations.h>
Public Types | |
enum | ConfirmationType { DEFAULT_CONFIRMATION, SKIP_CONFIRMATION, FORCE_CONFIRMATION } |
enum | NewDirFlag { ViewShowsHiddenFile = 1 } |
enum | Operation { TRASH, DEL, COPY, MOVE, LINK, EMPTYTRASH, STAT, MKDIR, RESTORE, UNKNOWN, PUT, RENAME } |
Signals | |
void | aboutToCreate (const QPoint &pos, const QList< KIO::CopyInfo > &files) |
void | aboutToCreate (const KUrl::List &urls) |
void | renamingFailed (const KUrl &oldUrl, const KUrl &newUrl) |
void | statFinished (const KFileItem &item) |
Public Member Functions | |
KUrl::List | droppedUrls () const |
QPoint | dropPosition () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
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 KonqOperations * | doDrop (const KFileItem &destItem, const KUrl &destUrl, QDropEvent *ev, QWidget *parent, const QList< QAction * > &userActions) |
static void | doPaste (QWidget *parent, const KUrl &destUrl, const QPoint &pos=QPoint()) |
static KonqOperations * | doPasteV2 (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 KIO::SimpleJob * | newDir (QWidget *parent, const KUrl &baseUrl, NewDirFlags flags) |
static QPair< bool, QString > | pasteInfo (const KUrl &targetUrl) |
static void | rename (QWidget *parent, const KUrl &oldurl, const QString &name) |
static void | rename (QWidget *parent, const KUrl &oldurl, const KUrl &newurl) |
static KonqOperations * | renameV2 (QWidget *parent, const KUrl &oldurl, const QString &name) |
static KonqOperations * | renameV2 (QWidget *parent, const KUrl &oldurl, const KUrl &newurl) |
static void | restoreTrashedItems (const KUrl::List &urls, QWidget *parent) |
static void | statUrl (const KUrl &url, const QObject *receiver, const char *member, QWidget *parent) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Slots | |
void | asyncDrop (const KFileItem &item) |
void | doDropFileCopy () |
void | slotAboutToCreate (KIO::Job *job, const QList< KIO::CopyInfo > &files) |
void | slotCopyingDone (KIO::Job *job, const KUrl &from, const KUrl &to) |
void | slotCopyingLinkDone (KIO::Job *job, const KUrl &from, const QString &target, const KUrl &to) |
void | slotResult (KJob *job) |
void | slotStatResult (KJob *job) |
Protected Member Functions | |
KonqOperations (QWidget *parent) | |
virtual | ~KonqOperations () |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
Implements file operations (move,del,trash,paste,copy,move,link...) for file managers.
Definition at line 42 of file konq_operations.h.
Member Enumeration Documentation
Enumerator | |
---|---|
DEFAULT_CONFIRMATION | |
SKIP_CONFIRMATION | |
FORCE_CONFIRMATION |
Definition at line 229 of file konq_operations.h.
Enumerator | |
---|---|
ViewShowsHiddenFile |
Definition at line 162 of file konq_operations.h.
Enumerator | |
---|---|
TRASH | |
DEL | |
COPY | |
MOVE | |
LINK | |
EMPTYTRASH | |
STAT | |
MKDIR | |
RESTORE | |
UNKNOWN | |
PUT | |
RENAME |
Definition at line 56 of file konq_operations.h.
Constructor & Destructor Documentation
|
protected |
Definition at line 79 of file konq_operations.cpp.
|
protectedvirtual |
Definition at line 86 of file konq_operations.cpp.
Member Function Documentation
|
signal |
|
signal |
|
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 264 of file konq_operations.cpp.
|
protectedslot |
Definition at line 368 of file konq_operations.cpp.
|
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 171 of file konq_operations.cpp.
|
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 101 of file konq_operations.cpp.
|
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 285 of file konq_operations.cpp.
|
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) userActions additional actions to include in the drop menu
This is an overloaded member function that lets you add your own actions to the drop menu shown by KonqOperations.
The drop menu will be shown when the application re-enters the event loop.
If destItem is 0L, doDrop will stat the URL to determine it.
Note that the returned KonqOperations object will be deleted automatically when the drop is completed.
It is still valid when a slot connected to a triggered() signal in one of the user actions is invoked, but should not be assumed to be valid after the slot returns.
- Returns
- The KonqOperations object
- Since
- 4.3
Definition at line 290 of file konq_operations.cpp.
|
protectedslot |
Definition at line 461 of file konq_operations.cpp.
|
static |
Paste the clipboard contents.
Definition at line 136 of file konq_operations.cpp.
|
static |
Paste the clipboard contents.
- Returns
- The KonqOperations object
- Since
- 4.10
- Todo:
- TODO KDE 5,0 - Merge doPaste and doPasteV2
Definition at line 141 of file konq_operations.cpp.
KUrl::List KonqOperations::droppedUrls | ( | ) | const |
Returns the list of dropped URL's.
You can call this method on the object returned by KonqOperations::doDrop(), to obtain the list of URL's this object handles.
- Since
- 4.3
Definition at line 451 of file konq_operations.cpp.
QPoint KonqOperations::dropPosition | ( | ) | const |
Returns the position where the drop occurred.
- Since
- 4.3
Definition at line 456 of file konq_operations.cpp.
Pop up properties dialog for mimetype mimeType
.
- Parameters
-
parent parent widget (for dialogs)
Definition at line 92 of file konq_operations.cpp.
|
static |
Empty the trash.
Definition at line 115 of file konq_operations.cpp.
|
static |
Create a directory.
Same as KIO::mkdir but records job into KonqFileUndoManager for undo/redo purposes.
Definition at line 127 of file konq_operations.cpp.
|
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 932 of file konq_operations.cpp.
|
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 flags see NewDirFlags
- Returns
- the job used to create the directory or 0 if the creation was cancelled by the user
Definition at line 937 of file konq_operations.cpp.
Returns the state of the paste action: first is whether the action should be enabled second is the text for the action.
- Since
- 4.3
Definition at line 1038 of file konq_operations.cpp.
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 903 of file konq_operations.cpp.
|
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 764 of file konq_operations.cpp.
|
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 '/'.
- Returns
- The KonqOperations object
- Since
- 4.11
- Todo:
- TODO KDE 5.0 - Merge rename and renameV2
Definition at line 908 of file konq_operations.cpp.
|
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 '/').
- Returns
- The KonqOperations object
- Since
- 4.11
- Todo:
- TODO KDE 5.0 - Merge rename and renameV2
Definition at line 769 of file konq_operations.cpp.
|
signal |
|
static |
Restore trashed items.
Definition at line 121 of file konq_operations.cpp.
|
protectedslot |
Definition at line 822 of file konq_operations.cpp.
|
protectedslot |
Definition at line 694 of file konq_operations.cpp.
|
protectedslot |
Definition at line 699 of file konq_operations.cpp.
|
protectedslot |
Definition at line 860 of file konq_operations.cpp.
|
protectedslot |
Definition at line 843 of file konq_operations.cpp.
|
signal |
|
static |
Get info about a given URL, and when that's done (it's asynchronous!), call a given slot with a const KFileItem& as argument.
The KFileItem will be deleted by statUrl after calling the slot. Make a copy if you need one !
Definition at line 827 of file konq_operations.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:07:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.