Purpose::Menu Class
A menu showing different alternatives. More...
- Header:
#include <Purpose/Menu> - CMake:
find_package(KF6 REQUIRED COMPONENTS Purpose)
target_link_libraries(mytarget PRIVATE KF6::PurposeWidgets) - Inherits: QMenu
List of all members, including inherited members
Public Functions
Signals
- void aboutToShare() (since 6.2)
- void finished(const QJsonObject &output, int error, const QString &errorMessage)
Detailed Description
Member Function Documentation
[explicit] Menu::Menu(QWidget *parent = nullptr)
[signal, since 6.2] void Menu::aboutToShare()
Emitted just before triggered, just before starting the share operation.
Can be used to do adjustments to the configuration, such as setting a new Url.
This function was introduced in Qt 6.2.
[signal] void Menu::finished(const QJsonObject &output, int error, const QString &errorMessage)
Emitted when a triggered job finishes
output contains the information offered by the plugin. The information offered will depend on the plugin type.
error will be 0 if the execution was successful, KIO::ERR_USER_CANCELED if cancelled by the user, otherwise it will provide an error message
errorMessage the error message
See also Purpose::Job
Purpose::AlternativesModel *Menu::model() const
Exposes the used AlternativesModel so that it can be configured to suit the application needs
void Menu::reload()
Forces a reload of the menu in case something changed in the model