|
ParaView
|
pqProxyGroupMenuManager is a menu-populator that fills up a menu with proxies defined in an XML configuration file. More...
#include <pqProxyGroupMenuManager.h>

Public Slots | |
| void | loadConfiguration (vtkPVXMLElement *) |
| Load a configuration XML. | |
| void | lookForNewDefinitions () |
| Look for new proxy definition to add inside the menu. | |
| void | removeProxyDefinitionUpdateObservers () |
| Remove all ProxyDefinitionUpdate observers to active server. | |
| void | addProxyDefinitionUpdateObservers () |
| Update the list of ProxyDefinitionUpdate observers to server. | |
| void | setEnabled (bool enable) |
| Enable/disable the menu and the actions. | |
| void | populateMenu () |
| Forces a re-population of the menu. | |
Signals | |
| void | triggered (const QString &group, const QString &name) |
| void | menuPopulated () |
| fired when the menu gets repopulated,typically means that the actions have been updated. | |
Public Member Functions | |
| pqProxyGroupMenuManager (QMenu *menu, const QString &resourceTagName) | |
| Constructor. | |
| ~pqProxyGroupMenuManager () | |
| QMenu * | menu () const |
| Access the menu. | |
| void | setRecentlyUsedMenuSize (unsigned int val) |
| When size>0 a recently used category will be added to the menu. | |
| unsigned int | recentlyUsedMenuSize () const |
| QWidget * | widgetActionsHolder () const |
| returns the widget that hold actions created by this menu manager. | |
| QList< QAction * > | actions () const |
| returns the actions holds by the widgetActionsHolder | |
| vtkSMProxy * | getPrototype (QAction *action) const |
| Returns the prototype proxy for the action. | |
| void | addProxy (const QString &xmlgroup, const QString &xmlname) |
| Provides mechanism to explicitly add a proxy to the menu. | |
| void | removeProxy (const QString &xmlgroup, const QString &xmlname) |
| Provides mechanism to explicitly remove a proxy to the menu. | |
| QStringList | getToolbarCategories () const |
| Returns a list of categories that have the "show_in_toolbar" attribute set to 1. | |
| QList< QAction * > | actions (const QString &category) |
| Returns the list of actions in a category. | |
| void | 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=""> where those attribute are fully optional. | |
| void | removeProxyDefinitionUpdateListener (const QString &proxyGroupName) |
Protected Slots | |
| void | triggered () |
| void | quickLaunch () |
| void | switchActiveServer () |
Protected Member Functions | |
| void | loadRecentlyUsedItems () |
| void | saveRecentlyUsedItems () |
| void | populateRecentlyUsedMenu (QMenu *) |
| QAction * | getAction (const QString &pgroup, const QString &proxyname) |
| Returns the action for a given proxy. | |
Protected Attributes | |
| QString | ResourceTagName |
| vtkPVXMLElement * | MenuRoot |
| int | RecentlyUsedMenuSize |
| bool | Enabled |
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 44 of file pqProxyGroupMenuManager.h.
| pqProxyGroupMenuManager::pqProxyGroupMenuManager | ( | QMenu * | menu, |
| const QString & | resourceTagName | ||
| ) |
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.
| pqProxyGroupMenuManager::~pqProxyGroupMenuManager | ( | ) |
| QMenu* pqProxyGroupMenuManager::menu | ( | ) | const [inline] |
Access the menu.
Definition at line 57 of file pqProxyGroupMenuManager.h.
| 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 62 of file pqProxyGroupMenuManager.h.
| unsigned int pqProxyGroupMenuManager::recentlyUsedMenuSize | ( | ) | const [inline] |
Definition at line 65 of file pqProxyGroupMenuManager.h.
| QWidget* pqProxyGroupMenuManager::widgetActionsHolder | ( | ) | const |
returns the widget that hold actions created by this menu manager.
| QList<QAction*> pqProxyGroupMenuManager::actions | ( | ) | const |
returns the actions holds by the widgetActionsHolder
| vtkSMProxy* pqProxyGroupMenuManager::getPrototype | ( | QAction * | action | ) | const |
Returns the prototype proxy for the action.
| void pqProxyGroupMenuManager::addProxy | ( | const QString & | xmlgroup, |
| const QString & | xmlname | ||
| ) |
Provides mechanism to explicitly add a proxy to the menu.
| void pqProxyGroupMenuManager::removeProxy | ( | const QString & | xmlgroup, |
| const QString & | xmlname | ||
| ) |
Provides mechanism to explicitly remove a proxy to the menu.
| QStringList pqProxyGroupMenuManager::getToolbarCategories | ( | ) | const |
Returns a list of categories that have the "show_in_toolbar" attribute set to 1.
| QList<QAction*> pqProxyGroupMenuManager::actions | ( | const QString & | category | ) |
Returns the list of actions in a category.
| 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=""> where those attribute are fully optional.
| void pqProxyGroupMenuManager::removeProxyDefinitionUpdateListener | ( | const QString & | proxyGroupName | ) |
| void pqProxyGroupMenuManager::loadConfiguration | ( | vtkPVXMLElement * | ) | [slot] |
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()
| void pqProxyGroupMenuManager::lookForNewDefinitions | ( | ) | [slot] |
Look for new proxy definition to add inside the menu.
| void pqProxyGroupMenuManager::removeProxyDefinitionUpdateObservers | ( | ) | [slot] |
Remove all ProxyDefinitionUpdate observers to active server.
| void pqProxyGroupMenuManager::addProxyDefinitionUpdateObservers | ( | ) | [slot] |
Update the list of ProxyDefinitionUpdate observers to server.
| void pqProxyGroupMenuManager::setEnabled | ( | bool | enable | ) | [slot] |
Enable/disable the menu and the actions.
| 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.
| void pqProxyGroupMenuManager::triggered | ( | const QString & | group, |
| const QString & | name | ||
| ) | [signal] |
| void pqProxyGroupMenuManager::menuPopulated | ( | ) | [signal] |
fired when the menu gets repopulated,typically means that the actions have been updated.
| void pqProxyGroupMenuManager::triggered | ( | ) | [protected, slot] |
| void pqProxyGroupMenuManager::quickLaunch | ( | ) | [protected, slot] |
| void pqProxyGroupMenuManager::switchActiveServer | ( | ) | [protected, slot] |
| void pqProxyGroupMenuManager::loadRecentlyUsedItems | ( | ) | [protected] |
| void pqProxyGroupMenuManager::saveRecentlyUsedItems | ( | ) | [protected] |
| void pqProxyGroupMenuManager::populateRecentlyUsedMenu | ( | QMenu * | ) | [protected] |
| QAction* pqProxyGroupMenuManager::getAction | ( | const QString & | pgroup, |
| const QString & | proxyname | ||
| ) | [protected] |
Returns the action for a given proxy.
QString pqProxyGroupMenuManager::ResourceTagName [protected] |
Definition at line 133 of file pqProxyGroupMenuManager.h.
vtkPVXMLElement* pqProxyGroupMenuManager::MenuRoot [protected] |
Definition at line 134 of file pqProxyGroupMenuManager.h.
int pqProxyGroupMenuManager::RecentlyUsedMenuSize [protected] |
Definition at line 135 of file pqProxyGroupMenuManager.h.
bool pqProxyGroupMenuManager::Enabled [protected] |
Definition at line 136 of file pqProxyGroupMenuManager.h.
1.7.5.1