KIO
paste.cpp
Go to the documentation of this file.
62 static KIO::Job *pasteClipboardUrls(const QMimeData* mimeData, const KUrl& destDir, KIO::JobFlags flags = KIO::DefaultFlags)
78 static KUrl getNewFileName( const KUrl &u, const QString& text, const QString& suggestedFileName, QWidget *widget, bool delIfOverwrite )
119 // But 1) CopyJob doesn't support that (it wouldn't really apply to multiple files) [not true anymore]
149 static KIO::Job* putDataAsyncTo(const KUrl& url, const QByteArray& data, QWidget* widget, KIO::JobFlags flags)
177 //using QString() instead of QString::null didn't compile (with gcc 3.2.3), because the ctor was mistaken as a function declaration, Alex //krazy:exclude=nullstrassign
178 KIO::PasteDialog dlg( QString::null, dialogText, suggestedFileName, formatLabels, widget, clipboard ); //krazy:exclude=nullstrassign
235 const QString suggestedFilename = QString::fromUtf8(mimeData->data("application/x-kde-suggestedfilename"));
251 ba = chooseFormatAndUrl(destUrl, mimeData, formats, dialogText, suggestedFilename, widget, clipboard, &newUrl);
283 const QString suggestedFilename = QString::fromUtf8(mimeData->data("application/x-kde-suggestedfilename"));
295 ba = chooseFormatAndUrl(destUrl, mimeData, formats, dialogText, suggestedFilename, widget, clipboard, &newUrl);
352 KIO_EXPORT KIO::CopyJob* KIO::pasteDataAsync( const KUrl& u, const QByteArray& _data, QWidget *widget, const QString& text )
virtual void setWindow(QWidget *window)
Associate this job with a window given by window.
Definition: jobuidelegate.cpp:58
bool canPasteMimeSource(const QMimeData *data)
Returns true if pasteMimeSource finds any interesting format in data.
Definition: paste.cpp:273
QString i18n(const char *text)
When set, automatically overwrite the destination if it exists already.
Definition: jobclasses.h:67
bool flush()
QByteArray data(const QString &mimeType) const
const QMimeData * mimeData(Mode mode) const
char at(int i) const
Job * pasteClipboard(const KUrl &destURL, QWidget *widget, bool move=false)
Pastes the content of the clipboard to the given destination URL.
Definition: paste.cpp:315
QString i18np(const char *sing, const char *plur, const A1 &a1)
Definition: renamedialog.h:61
bool exec()
bool isEmpty() const
Job * pasteMimeData(const QMimeData *data, const KUrl &destUrl, const QString &dialogText, QWidget *widget)
Save the given mime data to the given destination URL after offering the user to choose a data format...
Definition: paste.cpp:383
static bool synchronousRun(Job *job, QWidget *window, QByteArray *data=0, KUrl *finalURL=0, QMap< QString, QString > *metaData=0)
This function executes a job in a synchronous way.
Definition: netaccess.cpp:276
int exec()
bool hasText() const
void pasteData(const KUrl &destURL, const QByteArray &data, QWidget *widget)
Pastes the given data to the given destination URL.
Definition: paste.cpp:341
static bool canDecode(const QMimeData *mimeData)
Definition: renamedialog.h:56
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static KIO::Job * pasteClipboardUrls(const QMimeData *mimeData, const KUrl &destDir, KIO::JobFlags flags=KIO::DefaultFlags)
Pastes URLs from the clipboard.
Definition: paste.cpp:62
bool isEmpty() const
static KIO::Job * putDataAsyncTo(const KUrl &url, const QByteArray &data, QWidget *widget, KIO::JobFlags flags)
Definition: paste.cpp:149
QString pasteActionText()
Returns the text to use for the Paste action, when the application supports pasting files...
Definition: paste.cpp:366
int size() const
Show the progress info GUI, no Resume and no Overwrite.
Definition: jobclasses.h:46
static KIO::CopyJob * pasteDataAsyncTo(const KUrl &newUrl, const QByteArray &_data)
Definition: paste.cpp:133
Definition: renamedialog.h:61
static bool decodeIsCutSelection(const QMimeData *mimeData)
Definition: paste.cpp:43
void addPath(const QString &txt)
int count(const T &value) const
void append(const T &value)
QString fromUtf8(const char *str, int size)
static bool exists(const KUrl &url, bool source, QWidget *window)
Tests whether a URL exists.
Definition: netaccess.cpp:207
QString text() const
QClipboard * clipboard()
static KUrl::List fromMimeData(const QMimeData *mimeData, KUrl::MetaDataMap *metaData=0)
static QByteArray chooseFormatAndUrl(const KUrl &u, const QMimeData *mimeData, const QStringList &formats, const QString &text, const QString &suggestedFileName, QWidget *widget, bool clipboard, KUrl *newUrl)
Definition: paste.cpp:156
void setAutoRemove(bool b)
bool isEmpty() const
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
bool isEmpty() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QString pathOrUrl() const
static KUrl getNewFileName(const KUrl &u, const QString &text, const QString &suggestedFileName, QWidget *widget, bool delIfOverwrite)
Definition: paste.cpp:78
T & first()
RenameDialog_Mode
M_OVERWRITE: We have an existing dest, show details about it and offer to overwrite it...
Definition: renamedialog.h:56
QString getText(const QString &caption, const QString &label, const QString &value=QString(), bool *ok=0, QWidget *parent=0, QValidator *validator=0, const QString &mask=QString(), const QString &whatsThis=QString(), const QStringList &completionList=QStringList())
CopyJob * move(const KUrl &src, const KUrl &dest, JobFlags flags=DefaultFlags)
Moves a file or directory src to the given destination dest.
Definition: copyjob.cpp:2186
CopyJob * pasteMimeSource(const QMimeData *data, const KUrl &destURL, const QString &dialogText, QWidget *widget, bool clipboard=false)
Definition: paste.cpp:230
QByteArray toLocal8Bit() const
CopyJob * pasteDataAsync(const KUrl &destURL, const QByteArray &data, QWidget *widget, const QString &dialogText=QString())
Pastes the given data to the given destination URL.
Definition: paste.cpp:352
bool contains(QChar ch, Qt::CaseSensitivity cs) const
Definition: renamedialog.h:61
KIO::Job * pasteMimeDataImpl(const QMimeData *mimeData, const KUrl &destUrl, const QString &dialogText, QWidget *widget, bool clipboard)
Definition: paste.cpp:278
KGuiItem ok()
QString fileName() const
StoredTransferJob * storedPut(const QByteArray &arr, const KUrl &url, int permissions, JobFlags flags=DefaultFlags)
Put (a.k.a.
Definition: job.cpp:1776
DeleteJob * del(const KUrl &src, JobFlags flags=DefaultFlags)
Delete a file or directory.
Definition: deletejob.cpp:492
bool isValid() const
Definition: pastedialog.h:34
Definition: renamedialog.h:56
Definition: netaccess.h:74
CopyJob * copy(const KUrl &src, const KUrl &dest, JobFlags flags=DefaultFlags)
Copy a file or directory src into the destination dest, which can be a file (including the final file...
Definition: copyjob.cpp:2164
char * data()
qint64 write(const char *data, qint64 maxSize)
virtual QStringList formats() const
The dialog shown when a CopyJob realizes that a destination file already exists, and wants to offer t...
Definition: renamedialog.h:70
int size() const
bool open()
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
static void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
CopyJob is used to move, copy or symlink files and directories.
Definition: copyjob.h:65
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.