KFileCopyToMenu Class
This class adds "Copy To" and "Move To" submenus to a popupmenu. More...
- Header:
#include <KFileCopyToMenu> - CMake:
find_package(KF6 REQUIRED COMPONENTS KIO)
target_link_libraries(mytarget PRIVATE KF6::KIOFileWidgets) - Inherits: QObject
List of all members, including inherited members
Public Functions
- KFileCopyToMenu(QWidget *parentWidget)
- void addActionsTo(QMenu *menu) const
- void setAutoErrorHandlingEnabled(bool b)
- void setReadOnly(bool ro)
- void setUrls(const QList<QUrl> &urls)
Signals
Detailed Description
Member Function Documentation
[explicit] KFileCopyToMenu::KFileCopyToMenu(QWidget *parentWidget)
Creates a KFileCopyToMenu instance Note that this instance (and the widget) must stay alive for at least as long as the popupmenu; it has the slots for the actions created by addActionsTo.
parentWidget parent widget for the file dialog and message boxes. The parentWidget also serves as a parent for this object.
void KFileCopyToMenu::addActionsTo(QMenu *menu) const
Generate the actions and submenus, and adds them to the menu. All actions are created as children of the menu.
[signal] void KFileCopyToMenu::error(int errorCode, const QString &message)
Emitted when the copy or move job fails.
errorCode the KIO job error code
message the error message to show the user
void KFileCopyToMenu::setAutoErrorHandlingEnabled(bool b)
Enables or disables automatic error handling with message boxes. When called with true, a messagebox is shown in case of an error during a copy or move. When called with false, the application should connect to the error signal instead. Auto error handling is disabled by default.
void KFileCopyToMenu::setReadOnly(bool ro)
If setReadOnly(true) is called, the "Move To" submenu will not appear.
void KFileCopyToMenu::setUrls(const QList<QUrl> &urls)
Sets the URLs which the actions apply to.