libkonq
KonqMenuActions Class Reference
#include <konq_menuactions.h>
Detailed Description
This class handles the user-defined actions for a url in a popupmenu.User-defined actions include:
- builtin services like mount/unmount for old-style device desktop files
- user-defined actions for a .desktop file, defined in the file itself (see the desktop entry standard)
- servicemenus actions, defined in .desktop files and selected based on the mimetype of the url
In addition it can also add "open with" actions.
Definition at line 39 of file konq_menuactions.h.
Public Member Functions | |
int | addActionsTo (QMenu *menu) |
void | addOpenWithActionsTo (QMenu *menu, const QString &traderConstraint) |
KonqMenuActions () | |
void | setPopupMenuInfo (const KonqPopupMenuInformation &info) |
~KonqMenuActions () |
Constructor & Destructor Documentation
KonqMenuActions::KonqMenuActions | ( | ) |
Creates a KonqMenuActions instance.
Note that this instance must stay alive for at least as long as the popupmenu; it has the slots for the actions created by addActionsTo.
Definition at line 167 of file konq_menuactions.cpp.
KonqMenuActions::~KonqMenuActions | ( | ) |
Member Function Documentation
int KonqMenuActions::addActionsTo | ( | QMenu * | menu | ) |
Generate the user-defined actions and submenus, and adds them to the menu
.
User-defined actions include:
- builtin services like mount/unmount for old-style device desktop files
- user-defined actions for a .desktop file, defined in the file itself (see the desktop entry standard)
- servicemenus actions, defined in .desktop files and selected based on the mimetype of the url
When KonqPopupMenuInformation::readOnly() is true, actions that modify the files are not shown. This is controlled by Require=Write in the servicemenu desktop files.
All actions are created as children of the menu.
- Returns:
- the number of actions added
Definition at line 183 of file konq_menuactions.cpp.
Generate the "Open With <Application>" actions, and adds them to the menu
.
All actions are created as children of the menu.
- Parameters:
-
menu the QMenu where to add actions traderConstraint this constraint allows to exclude the current application from the "open with" list. Example: "DesktopEntryName != 'kfmclient'".
Definition at line 395 of file konq_menuactions.cpp.
void KonqMenuActions::setPopupMenuInfo | ( | const KonqPopupMenuInformation & | info | ) |
Sets all the data for the next instance of the popupmenu.
- See also:
- KonqPopupMenuInformation
Definition at line 178 of file konq_menuactions.cpp.
The documentation for this class was generated from the following files: