Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/kabstractfileitemactionplugin.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
43 | * However, complex scenarios such as showing submenus with a variable number of | 43 | * However, complex scenarios such as showing submenus with a variable number of | ||
44 | * actions or only showing an item if exactly two files are selected need to be | 44 | * actions or only showing an item if exactly two files are selected need to be | ||
45 | * implemented as a KFileItemAction plugin. | 45 | * implemented as a KFileItemAction plugin. | ||
46 | * | 46 | * | ||
47 | * To create such a plugin, subclass KAbstractFileItemActionPlugin and implement | 47 | * To create such a plugin, subclass KAbstractFileItemActionPlugin and implement | ||
48 | * actions() to return the actions to want to add to the context menu. Then | 48 | * actions() to return the actions to want to add to the context menu. Then | ||
49 | * create a plugin in the usual KPluginFactory based way: | 49 | * create a plugin in the usual KPluginFactory based way: | ||
50 | * \code | 50 | * \code | ||
51 | * K_PLUGIN_CLASS_WITH_JSON(MyActionPlugin, myactionplugin.json) | 51 | * K_PLUGIN_CLASS_WITH_JSON(MyActionPlugin, "myactionplugin.json") | ||
52 | * #include <thisfile.moc> | 52 | * #include <thisfile.moc> | ||
53 | * \endcode | 53 | * \endcode | ||
54 | * | 54 | * | ||
55 | * A desktop file is necessary to register the plugin with the KDE plugin system: | 55 | * A desktop file is necessary to register the plugin with the KDE plugin system: | ||
56 | * | 56 | * | ||
57 | * \code | 57 | * \code | ||
58 | * [Desktop Entry] | 58 | * [Desktop Entry] | ||
59 | * Type=Service | 59 | * Type=Service | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |