KIO Namespace
The KIO namespace includes the following elements from module KIOWidgets. The full namespace is documented in module KIOCore here.
Namespaces
namespace | SslUi |
Classes
(since 5.100) class | DeleteOrTrashJob |
(since 5.6) class | DropJob |
class | FileUndoManager |
class | JobUiDelegate |
(since 5.16) class | KUriFilterSearchProviderActions |
(since 5.4) class | PasteJob |
class | RenameDialog |
(since 5.67) class | RenameFileDialog |
(since 5.78) class | WidgetsAskUserActionHandler |
Types
(since 5.67) enum | DropJobFlag { DropJobDefaultFlags, ShowMenuManually } |
Functions
(since 5.0 (was called canPasteMimeSource before)) bool | canPasteMimeData(const QMimeData *data) |
(since 5.4) KIO::DropJob * | drop(const QDropEvent *dropEvent, const QUrl &destUrl, KIO::JobFlags flags = DefaultFlags) |
(since 5.67) KIO::DropJob * | drop(const QDropEvent *dropEvent, const QUrl &destUrl, KIO::DropJobFlags dropjobFlags, KIO::JobFlags flags = DefaultFlags) |
(since 5.2) bool | isClipboardDataCut(const QMimeData *mimeData) |
(since 5.4) KIO::PasteJob * | paste(const QMimeData *mimeData, const QUrl &destDir, KIO::JobFlags flags = DefaultFlags) |
(since 5.4) QString | pasteActionText(const QMimeData *mimeData, bool *enable, const KFileItem &destItem) |
(since 5.2) void | setClipboardDataCut(QMimeData *mimeData, bool cut) |
Namespaces
namespace KIO::SslUi
UI methods for handling SSL errors.
Classes
class DeleteOrTrashJob
This job asks the user for confirmation to delete or move to Trash a list of URLs; or if the job is constructed with AskUserActionInterface::EmptyTrash, to empty the Trash. More...
class DropJob
A KIO job that handles dropping into a file-manager-like view. More...
class FileUndoManager
Makes it possible to undo KIO jobs. More...
class JobUiDelegate
class KUriFilterSearchProviderActions
This class is a manager for web shortcuts. More...
class PasteJob
A KIO job that handles pasting the clipboard contents. More...
class RenameDialog
class RenameFileDialog
Dialog for renaming a variable number of files. More...
class WidgetsAskUserActionHandler
Type Documentation
[since 5.67]
enum KIO::DropJobFlag
flags KIO::DropJobFlags
Special flag of DropJob in addition to KIO::JobFlag
Constant | Value | Description |
---|---|---|
KIO::DropJobDefaultFlags | 0 | |
KIO::ShowMenuManually | 1 | Show the menu manually with DropJob::showMenu |
This enum was introduced in 5.67.
The DropJobFlags type is a typedef for QFlags<DropJobFlag>. It stores an OR combination of DropJobFlag values.
Function Documentation
[since 5.0 (was called canPasteMimeSource before)]
bool KIO::canPasteMimeData(const QMimeData *data)
Returns true if pasteMimeData will find any interesting format in data. You can use this method to enable/disable the paste action appropriately.
This function was introduced in 5.0 (was called canPasteMimeSource before).
[since 5.4]
KIO::DropJob *drop(const QDropEvent *dropEvent, const QUrl &destUrl, KIO::JobFlags flags = DefaultFlags)
Drops the clipboard contents.
If the mime data contains URLs, a popup appears to choose between Move, Copy, Link and Cancel which is then implemented by the job, using KIO::move, KIO::copy or KIO::link Additional actions provided by the application or by plugins can be shown in the popup.
If the mime data contains data other than URLs, it is saved into a file after asking the user to choose a filename and the preferred data format.
This job takes care of recording the subjob in the FileUndoManager, and emits itemCreated for every file or directory being created, so that the view can select these items.
dropEvent the drop event, from which the job will extract mimeData, dropAction, etc. The application should take care of calling dropEvent->acceptProposedAction().
destUrl The URL of the target file or directory
flags passed to the sub job
Returns A pointer to the job handling the operation.
Warning: Don't forget to call KJobWidgets::setWindow() on this job, otherwise the popup menu won't be properly positioned with Wayland compositors.
This function was introduced in 5.4.
[since 5.67]
KIO::DropJob *drop(const QDropEvent *dropEvent, const QUrl &destUrl, KIO::DropJobFlags dropjobFlags, KIO::JobFlags flags = DefaultFlags)
Similar to KIO::drop
dropEvent the drop event, from which the job will extract mimeData, dropAction, etc. The application should take care of calling dropEvent->acceptProposedAction().
destUrl The URL of the target file or directory
dropjobFlags Show the menu immediately or manually.
flags passed to the sub job
Returns A pointer to the job handling the operation.
Warning: Don't forget to call DropJob::showMenu on this job, otherwise the popup will never be shown
This function was introduced in 5.67.
[since 5.2]
bool KIO::isClipboardDataCut(const QMimeData *mimeData)
Returns true if the URLs in mimeData were cut by the user. This should be called when pasting, to choose between moving and copying.
This function was introduced in 5.2.
[since 5.4]
KIO::PasteJob *paste(const QMimeData *mimeData, const QUrl &destDir, KIO::JobFlags flags = DefaultFlags)
Pastes the clipboard contents.
If the clipboard contains URLs, they are copied (or moved) to the destination URL, using a KIO::CopyJob subjob. Otherwise, the data from the clipboard is saved into a file using KIO::storedPut, after asking the user to choose a filename and the preferred data format.
This takes care of recording the subjob in the FileUndoManager, and emits itemCreated for every file or directory being created, so that the view can select these items.
mimeData the MIME data to paste, usually QApplication::clipboard()->mimeData()
destDir The URL of the target directory
flags passed to the sub job
Returns a pointer to the job handling the operation.
This function was introduced in 5.4.
[since 5.4]
QString KIO::pasteActionText(const QMimeData *mimeData, bool *enable, const KFileItem &destItem)
Returns the text to use for the Paste action, when the application supports pasting files, urls, and clipboard data, using pasteClipboard().
mimeData the mime data, usually QApplication::clipboard()->mimeData().
enable output parameter, to be passed to QAction::setEnabled. The pointer must be non-null, and in return the function will always set its value.
destItem item representing the directory into which the clipboard data or items would be pasted. Used to find out about permissions in that directory.
Returns a string suitable for QAction::setText
This function was introduced in 5.4.
[since 5.2]
void KIO::setClipboardDataCut(QMimeData *mimeData, bool cut)
Add the information whether the files were cut, into the mimedata.
mimeData pointer to the mimeData object to be populated. Must not be null.
cut if true, the user selected "cut" (saved as application/x-kde-cutselection in the mimedata).
This function was introduced in 5.2.
See also isClipboardDataCut().