pqProxyGroupMenuManager is a menu-populator that fills up a menu with proxies defined in an XML configuration file.
More...
#include <pqProxyGroupMenuManager.h>
Inherits QObject.
pqProxyGroupMenuManager is a menu-populator that fills up a menu with proxies defined in an XML configuration file.
This is use to automatically build the sources and filters menu in ParaView.
Definition at line 46 of file pqProxyGroupMenuManager.h.
◆ pqProxyGroupMenuManager()
pqProxyGroupMenuManager::pqProxyGroupMenuManager |
( |
QMenu * |
menu, |
|
|
const QString & |
resourceTagName, |
|
|
bool |
supportsQuickLaunch = true |
|
) |
| |
Constructor.
menu
is the Menu to be populated. resourceTagName
is the tag name eg. "ParaViewSources" in the client configuration files which contains lists the items shown by this menu. supportsQuickLaunch
, set to false if quick-launch is not to be supported for this menu.
◆ ~pqProxyGroupMenuManager()
pqProxyGroupMenuManager::~pqProxyGroupMenuManager |
( |
| ) |
|
|
override |
◆ menu()
QMenu* pqProxyGroupMenuManager::menu |
( |
| ) |
const |
|
inline |
◆ setRecentlyUsedMenuSize()
void pqProxyGroupMenuManager::setRecentlyUsedMenuSize |
( |
unsigned int |
val | ) |
|
|
inline |
When size>0 a recently used category will be added to the menu.
One must call update() or initialize() after changing this value.
Definition at line 73 of file pqProxyGroupMenuManager.h.
◆ recentlyUsedMenuSize()
unsigned int pqProxyGroupMenuManager::recentlyUsedMenuSize |
( |
| ) |
const |
|
inline |
◆ widgetActionsHolder()
QWidget* pqProxyGroupMenuManager::widgetActionsHolder |
( |
| ) |
const |
returns the widget that hold actions created by this menu manager.
◆ actions() [1/2]
QList<QAction*> pqProxyGroupMenuManager::actions |
( |
| ) |
const |
returns the actions holds by the widgetActionsHolder
◆ getPrototype()
vtkSMProxy* pqProxyGroupMenuManager::getPrototype |
( |
QAction * |
action | ) |
const |
Returns the prototype proxy for the action.
◆ addProxy()
void pqProxyGroupMenuManager::addProxy |
( |
const QString & |
xmlgroup, |
|
|
const QString & |
xmlname |
|
) |
| |
Provides mechanism to explicitly add a proxy to the menu.
◆ removeProxy()
void pqProxyGroupMenuManager::removeProxy |
( |
const QString & |
xmlgroup, |
|
|
const QString & |
xmlname |
|
) |
| |
Provides mechanism to explicitly remove a proxy to the menu.
◆ getToolbarCategories()
QStringList pqProxyGroupMenuManager::getToolbarCategories |
( |
| ) |
const |
Returns a list of categories that have the "show_in_toolbar" attribute set to 1.
◆ actions() [2/2]
QList<QAction*> pqProxyGroupMenuManager::actions |
( |
const QString & |
category | ) |
|
Returns the list of actions in a category.
◆ actionsInToolbars()
QList<QAction*> pqProxyGroupMenuManager::actionsInToolbars |
( |
| ) |
|
Returns this list of actions that appear in toolbars.
◆ hideForTests()
bool pqProxyGroupMenuManager::hideForTests |
( |
const QString & |
category | ) |
const |
Returns whether or not the category's toolbar should be hidden initially.
◆ addProxyDefinitionUpdateListener()
void pqProxyGroupMenuManager::addProxyDefinitionUpdateListener |
( |
const QString & |
proxyGroupName | ) |
|
Attach an observer to proxy manager to monitor any proxy definition update The detected proxy have to own a hint:
<ShowInMenu category="" icon=""/>
where all the attribute are fully optional.
◆ removeProxyDefinitionUpdateListener()
void pqProxyGroupMenuManager::removeProxyDefinitionUpdateListener |
( |
const QString & |
proxyGroupName | ) |
|
◆ supportsQuickLaunch()
bool pqProxyGroupMenuManager::supportsQuickLaunch |
( |
| ) |
const |
|
inline |
◆ setEnableFavorites()
void pqProxyGroupMenuManager::setEnableFavorites |
( |
bool |
enable | ) |
|
|
inline |
◆ getFavoritesMenu()
QMenu* pqProxyGroupMenuManager::getFavoritesMenu |
( |
| ) |
|
◆ categoryLabel()
QString pqProxyGroupMenuManager::categoryLabel |
( |
const QString & |
category | ) |
|
Given a category name, return the category label.
◆ loadConfiguration
Load a configuration XML.
It will find the elements with resourceTagName in the XML and populate the menu accordingly. Applications do not need to call this method directly, it's by default connected to pqApplicationCore::loadXML()
◆ lookForNewDefinitions
void pqProxyGroupMenuManager::lookForNewDefinitions |
( |
| ) |
|
|
slot |
Look for new proxy definition to add inside the menu.
◆ removeProxyDefinitionUpdateObservers
void pqProxyGroupMenuManager::removeProxyDefinitionUpdateObservers |
( |
| ) |
|
|
slot |
Remove all ProxyDefinitionUpdate observers to active server.
◆ addProxyDefinitionUpdateObservers
void pqProxyGroupMenuManager::addProxyDefinitionUpdateObservers |
( |
| ) |
|
|
slot |
Update the list of ProxyDefinitionUpdate observers to server.
◆ setEnabled
void pqProxyGroupMenuManager::setEnabled |
( |
bool |
enable | ) |
|
|
slot |
Enable/disable the menu and the actions.
◆ populateMenu
void pqProxyGroupMenuManager::populateMenu |
( |
| ) |
|
|
slot |
Forces a re-population of the menu.
Any need to call this only after addProxy() has been used to explicitly add entries.
◆ triggered [1/2]
void pqProxyGroupMenuManager::triggered |
( |
const QString & |
group, |
|
|
const QString & |
name |
|
) |
| |
|
signal |
◆ menuPopulated
void pqProxyGroupMenuManager::menuPopulated |
( |
| ) |
|
|
signal |
fired when the menu gets repopulated,typically means that the actions have been updated.
◆ triggered [2/2]
void pqProxyGroupMenuManager::triggered |
( |
| ) |
|
|
protectedslot |
◆ quickLaunch
void pqProxyGroupMenuManager::quickLaunch |
( |
| ) |
|
|
protectedslot |
◆ switchActiveServer
void pqProxyGroupMenuManager::switchActiveServer |
( |
| ) |
|
|
protectedslot |
◆ updateMenuStyle
void pqProxyGroupMenuManager::updateMenuStyle |
( |
| ) |
|
|
protectedslot |
◆ populateRecentlyUsedMenu
void pqProxyGroupMenuManager::populateRecentlyUsedMenu |
( |
| ) |
|
|
protectedslot |
called when "recent" menu is being shown.
updates the menu with actions for the filters in the recent list.
◆ populateFavoritesMenu
void pqProxyGroupMenuManager::populateFavoritesMenu |
( |
| ) |
|
|
protectedslot |
called when "favorites" menu is being shown.
create the menu (and submenu) with actions for the filters in the favorites list.
◆ loadRecentlyUsedItems()
void pqProxyGroupMenuManager::loadRecentlyUsedItems |
( |
| ) |
|
|
protected |
◆ saveRecentlyUsedItems()
void pqProxyGroupMenuManager::saveRecentlyUsedItems |
( |
| ) |
|
|
protected |
◆ loadFavoritesItems()
void pqProxyGroupMenuManager::loadFavoritesItems |
( |
| ) |
|
|
protected |
Load the favorites from settings.
◆ getAction()
QAction* pqProxyGroupMenuManager::getAction |
( |
const QString & |
pgroup, |
|
|
const QString & |
proxyname |
|
) |
| |
|
protected |
Returns the action for a given proxy.
◆ getAddToCategoryAction()
QAction* pqProxyGroupMenuManager::getAddToCategoryAction |
( |
const QString & |
path | ) |
|
|
protected |
◆ ResourceTagName
QString pqProxyGroupMenuManager::ResourceTagName |
|
protected |
◆ MenuRoot
◆ RecentlyUsedMenuSize
int pqProxyGroupMenuManager::RecentlyUsedMenuSize |
|
protected |
◆ Enabled
bool pqProxyGroupMenuManager::Enabled |
|
protected |
◆ EnableFavorites
bool pqProxyGroupMenuManager::EnableFavorites |
|
protected |
The documentation for this class was generated from the following file: