KIO
#include <copyjob.h>
Public Types | |
enum | CopyMode { Copy, Move, Link } |
Public Types inherited from KCompositeJob | |
enum | Capability |
enum | KillVerbosity |
enum | Unit |
Signals | |
void | aboutToCreate (KIO::Job *job, const QList< KIO::CopyInfo > &files) |
void | copying (KIO::Job *job, const KUrl &src, const KUrl &dest) |
void | copyingDone (KIO::Job *job, const KUrl &from, const KUrl &to, time_t mtime, bool directory, bool renamed) |
void | copyingLinkDone (KIO::Job *job, const KUrl &from, const QString &target, const KUrl &to) |
void | creatingDir (KIO::Job *job, const KUrl &dir) |
void | linking (KIO::Job *job, const QString &target, const KUrl &to) |
void | moving (KIO::Job *job, const KUrl &from, const KUrl &to) |
void | processedDirs (KIO::Job *job, unsigned long dirs) |
void | processedFiles (KIO::Job *job, unsigned long files) |
void | renamed (KIO::Job *job, const KUrl &from, const KUrl &to) |
void | totalDirs (KJob *job, unsigned long dirs) |
void | totalFiles (KJob *job, unsigned long files) |
Signals inherited from KIO::Job | |
void | canceled (KJob *job) |
void | connected (KIO::Job *job) |
Signals inherited from KCompositeJob | |
void | description (KJob *job, const QString &title, const QPair< QString, QString > &field1=qMakePair(QString(), QString()), const QPair< QString, QString > &field2=qMakePair(QString(), QString())) |
void | finished (KJob *job) |
void | infoMessage (KJob *job, const QString &plain, const QString &rich=QString()) |
void | percent (KJob *job, unsigned long percent) |
void | processedAmount (KJob *job, KJob::Unit unit, qulonglong amount) |
void | processedSize (KJob *job, qulonglong size) |
void | result (KJob *job) |
void | resumed (KJob *job) |
void | speed (KJob *job, unsigned long speed) |
void | suspended (KJob *job) |
void | totalAmount (KJob *job, KJob::Unit unit, qulonglong amount) |
void | totalSize (KJob *job, qulonglong size) |
void | warning (KJob *job, const QString &plain, const QString &rich=QString()) |
Public Member Functions | |
virtual | ~CopyJob () |
KUrl | destUrl () const |
virtual bool | doSuspend () |
CopyMode | operationMode () const |
void | setAutoRename (bool autoRename) |
void | setAutoSkip (bool autoSkip) |
void | setDefaultPermissions (bool b) |
void | setWriteIntoExistingDirectories (bool overwriteAllDirs) |
KUrl::List | srcUrls () const |
Public Member Functions inherited from KIO::Job | |
virtual | ~Job () |
void | addMetaData (const QString &key, const QString &value) |
void | addMetaData (const QMap< QString, QString > &values) |
QStringList | detailedErrorStrings (const KUrl *reqUrl=0L, int method=-1) const |
QString | errorString () const |
bool | isInteractive () const |
void | mergeMetaData (const QMap< QString, QString > &values) |
MetaData | metaData () const |
MetaData | outgoingMetaData () const |
Job * | parentJob () const |
QString | queryMetaData (const QString &key) |
void | setMetaData (const KIO::MetaData &metaData) |
void | setParentJob (Job *parentJob) |
void | showErrorDialog (QWidget *parent=0) |
void | start () |
JobUiDelegate * | ui () const |
Public Member Functions inherited from KCompositeJob | |
KCompositeJob (QObject *parent=0) | |
virtual | ~KCompositeJob () |
virtual | ~KJob () |
Capabilities | capabilities () const |
int | error () const |
QString | errorText () const |
bool | exec () |
bool | isAutoDelete () const |
bool | isSuspended () const |
KJob (QObject *parent=0) | |
unsigned long | percent () const |
qulonglong | processedAmount (Unit unit) const |
void | setAutoDelete (bool autodelete) |
void | setUiDelegate (KJobUiDelegate *delegate) |
qulonglong | totalAmount (Unit unit) const |
KJobUiDelegate * | uiDelegate () 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 |
Protected Slots | |
virtual void | slotResult (KJob *job) |
Protected Slots inherited from KCompositeJob | |
virtual void | slotInfoMessage (KJob *job, const QString &plain, const QString &rich) |
virtual void | slotResult (KJob *job) |
Protected Member Functions | |
CopyJob (CopyJobPrivate &dd) | |
void | emitResult () |
Protected Member Functions inherited from KIO::Job | |
Job () | |
Job (JobPrivate &dd) | |
virtual bool | addSubjob (KJob *job) |
virtual bool | doKill () |
virtual bool | doResume () |
virtual bool | removeSubjob (KJob *job) |
Protected Member Functions inherited from KCompositeJob | |
KCompositeJob (KCompositeJobPrivate &dd, QObject *parent) | |
void | clearSubjobs () |
void | emitPercent (qulonglong processedAmount, qulonglong totalAmount) |
void | emitResult () |
void | emitSpeed (unsigned long speed) |
bool | hasSubjobs () |
KJob (KJobPrivate &dd, QObject *parent) | |
void | setCapabilities (Capabilities capabilities) |
void | setError (int errorCode) |
void | setErrorText (const QString &errorText) |
void | setPercent (unsigned long percentage) |
void | setProcessedAmount (Unit unit, qulonglong amount) |
void | setTotalAmount (Unit unit, qulonglong amount) |
const QList< KJob * > & | subjobs () const |
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 | |
Public Slots inherited from KCompositeJob | |
bool | kill (KillVerbosity verbosity=Quietly) |
bool | resume () |
bool | suspend () |
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) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Protected Attributes inherited from KCompositeJob | |
KJobPrivate *const | d_ptr |
Properties inherited from QObject | |
objectName | |
Detailed Description
CopyJob is used to move, copy or symlink files and directories.
Don't create the job directly, but use KIO::copy(), KIO::move(), KIO::link() and friends.
Member Enumeration Documentation
Constructor & Destructor Documentation
|
virtual |
Definition at line 263 of file copyjob.cpp.
|
protected |
Definition at line 255 of file copyjob.cpp.
Member Function Documentation
|
signal |
Emitted when it is known which files / directories are going to be created.
Note that this may still change e.g. when existing files with the same name are discovered.
- Parameters
-
job the job that emitted this signal files a list of items that are about to be created.
The job is copying a file or directory.
Note: This signal is used for progress dialogs, it's not emitted for every file or directory (this would be too slow), but every 200ms.
- Parameters
-
job the job that emitted this signal src the URL of the file or directory that is currently being copied dest the destination of the current operation
|
signal |
The job emits this signal when copying or moving a file or directory successfully finished.
This signal is mainly for the Undo feature. If you simply want to know when a copy job is done, use result().
- Parameters
-
job the job that emitted this signal from the source URL to the destination URL mtime the modification time of the source file, hopefully set on the destination file too (when the kioslave supports it). directory indicates whether a file or directory was successfully copied/moved. true for a directory, false for file renamed indicates that the destination URL was created using a rename operation (i.e. fast directory moving). true if is has been renamed
|
signal |
The job is copying or moving a symbolic link, that points to target.
The new link is created in to
. The existing one is/was in from
. This signal is mainly for the Undo feature.
- Parameters
-
job the job that emitted this signal from the source URL target the target to the destination URL
The job is creating the directory dir
.
This signal is emitted for every directory being created.
- Parameters
-
job the job that emitted this signal dir the directory that is currently being created
KUrl CopyJob::destUrl | ( | ) | const |
|
virtual |
Reimplemented for internal reasons.
Reimplemented from KIO::Job.
Definition at line 486 of file copyjob.cpp.
|
protected |
Definition at line 1747 of file copyjob.cpp.
The job is creating a symbolic link.
Note: This signal is used for progress dialogs, it's not emitted for every file or directory (this would be too slow), but every 200ms.
- Parameters
-
job the job that emitted this signal target the URL of the file or directory that is currently being linked to the destination of the current operation
The job is moving a file or directory.
Note: This signal is used for progress dialogs, it's not emitted for every file or directory (this would be too slow), but every 200ms.
- Parameters
-
job the job that emitted this signal from the URL of the file or directory that is currently being moved to the destination of the current operation
KIO::CopyJob::CopyMode KIO::CopyJob::operationMode | ( | ) | const |
Returns the mode of the operation (copy, move, or link), depending on whether KIO::copy(), KIO::move() or KIO::link() was called.
Definition at line 2142 of file copyjob.cpp.
|
signal |
Sends the number of processed directories.
- Parameters
-
job the job that emitted this signal dirs the number of processed dirs
|
signal |
Sends the number of processed files.
- Parameters
-
job the job that emitted this signal files the number of processed files
The user chose to rename from
to to
.
- Parameters
-
job the job that emitted this signal from the original name to the new name
void KIO::CopyJob::setAutoRename | ( | bool | autoRename | ) |
Rename files automatically when the destination already exists, instead of the default behavior (interactive mode: showing a dialog to the user, non-interactive mode: aborting with an error).
Initially added for a unit test.
- Since
- 4.7
Definition at line 2153 of file copyjob.cpp.
void KIO::CopyJob::setAutoSkip | ( | bool | autoSkip | ) |
Skip copying or moving any file when the destination already exists, instead of the default behavior (interactive mode: showing a dialog to the user, non-interactive mode: aborting with an error).
Initially added for a unit test.
- Since
- 4.2
Definition at line 2147 of file copyjob.cpp.
void KIO::CopyJob::setDefaultPermissions | ( | bool | b | ) |
By default the permissions of the copied files will be those of the source files.
But when copying "template" files to "new" files, people prefer the umask to apply, rather than the template's permissions. For that case, call setDefaultPermissions(true)
Definition at line 2137 of file copyjob.cpp.
void KIO::CopyJob::setWriteIntoExistingDirectories | ( | bool | overwriteAllDirs | ) |
Reuse any directory that already exists, instead of the default behavior (interactive mode: showing a dialog to the user, non-interactive mode: aborting with an error).
- Since
- 4.2
Definition at line 2159 of file copyjob.cpp.
|
protectedvirtualslot |
Definition at line 2082 of file copyjob.cpp.
KUrl::List CopyJob::srcUrls | ( | ) | const |
Returns the list of source URLs.
- Returns
- the list of source URLs.
Definition at line 267 of file copyjob.cpp.
|
signal |
Emitted when the toal number of direcotries is known.
- Parameters
-
job the job that emitted this signal dirs the total number of directories
|
signal |
Emitted when the total number of files is known.
- Parameters
-
job the job that emitted this signal files the total number of files
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:24:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.