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 25 of file pqProxyGroupMenuManager.h.
◆ pqProxyGroupMenuManager()
| pqProxyGroupMenuManager::pqProxyGroupMenuManager |
( |
QMenu * |
menu, |
|
|
const QString & |
resourceTagName, |
|
|
bool |
supportsQuickLaunch = true, |
|
|
bool |
enableFavorites = false |
|
) |
| |
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 |
◆ widgetActionsHolder()
| QWidget* pqProxyGroupMenuManager::widgetActionsHolder |
( |
| ) |
const |
returns the widget that hold actions created by this menu manager.
◆ getFavoritesMenu()
| QMenu* pqProxyGroupMenuManager::getFavoritesMenu |
( |
| ) |
|
◆ 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 58 of file pqProxyGroupMenuManager.h.
◆ recentlyUsedMenuSize()
| unsigned int pqProxyGroupMenuManager::recentlyUsedMenuSize |
( |
| ) |
const |
|
inline |
◆ supportsQuickLaunch()
| bool pqProxyGroupMenuManager::supportsQuickLaunch |
( |
| ) |
const |
|
inline |
◆ setEnableFavorites()
| void pqProxyGroupMenuManager::setEnableFavorites |
( |
bool |
enable | ) |
|
|
inline |
◆ 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 |
Categories information.
Returns a list of categories that have the "show_in_toolbar" attribute set to 1.
◆ getToolbarName()
| QString pqProxyGroupMenuManager::getToolbarName |
( |
pqProxyCategory * |
category | ) |
|
Return a name for the toolbar.
This is based on category name and proxy group.
◆ categoryLabel()
| QString pqProxyGroupMenuManager::categoryLabel |
( |
const QString & |
category | ) |
|
Given a category name, return the category label.
◆ actions()
| QList<QAction*> pqProxyGroupMenuManager::actions |
( |
| ) |
const |
List actions.
returns the actions holds by the widgetActionsHolder
◆ categoryActions() [1/2]
| QList<QAction*> pqProxyGroupMenuManager::categoryActions |
( |
const QString & |
category | ) |
|
Returns actions from given category.
Create actions as needed. Looks for category in the default categories list.
◆ categoryActions() [2/2]
| QList<QAction*> pqProxyGroupMenuManager::categoryActions |
( |
pqProxyCategory * |
category | ) |
|
Returns actions from given category.
Create actions as needed.
◆ actionsInToolbars()
| QList<QAction*> pqProxyGroupMenuManager::actionsInToolbars |
( |
| ) |
|
Returns this list of actions that appear in toolbars.
◆ getAction() [1/2]
| QAction* pqProxyGroupMenuManager::getAction |
( |
pqProxyInfo * |
proxy | ) |
|
Return the action for a given proxy.
◆ updateActionIcon()
| void pqProxyGroupMenuManager::updateActionIcon |
( |
pqProxyInfo * |
proxy | ) |
|
Update action icon from proxy info.
◆ 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 | ) |
|
◆ getApplicationCategory()
Specific-meaning categories.
Returns the invisible root category containing all categories to display, as defined by the application.
◆ getMenuCategory()
Returns the invisible root category containing all categories to display.
Use settings if existing.
◆ getFavoritesCategory()
Returns the Favorites category.
◆ isFavorites()
Returns true if the given category is a favorites.
Based on name.
◆ loadConfiguration
Update from servermanager.
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 Iter over known proxy definitions to parse Hints tag.
◆ 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.
◆ populateMenu
| virtual void pqProxyGroupMenuManager::populateMenu |
( |
| ) |
|
|
virtualslot |
Forces a re-population of the menu.
Create the main submenu entries. Actions are mostly created on "aboutToShow" signal, as menu should present the currently available proxies. See also populateRecentlyUsedMenu, populateAlphabeticalMenu, populateMiscMenu, populateCategoriesMenus, clearMenu
◆ writeCategoryToSettings
| void pqProxyGroupMenuManager::writeCategoryToSettings |
( |
| ) |
|
|
slot |
Write categories to settings.
◆ 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.
◆ categoriesUpdated
| void pqProxyGroupMenuManager::categoriesUpdated |
( |
| ) |
|
|
signal |
Fired when categories were updated.
◆ triggered [2/2]
| void pqProxyGroupMenuManager::triggered |
( |
| ) |
|
|
protectedslot |
◆ quickLaunch
| void pqProxyGroupMenuManager::quickLaunch |
( |
| ) |
|
|
protectedslot |
◆ switchActiveServer
| void pqProxyGroupMenuManager::switchActiveServer |
( |
| ) |
|
|
protectedslot |
◆ updateMenuStyle
| void pqProxyGroupMenuManager::updateMenuStyle |
( |
| ) |
|
|
protectedslot |
◆ updateActionsStyle
| void pqProxyGroupMenuManager::updateActionsStyle |
( |
| ) |
|
|
protectedslot |
◆ populateRecentlyUsedMenu
| void pqProxyGroupMenuManager::populateRecentlyUsedMenu |
( |
| ) |
|
|
protectedslot |
Fill recently used submenu.
◆ loadRecentlyUsedItems()
| void pqProxyGroupMenuManager::loadRecentlyUsedItems |
( |
| ) |
|
|
protected |
◆ saveRecentlyUsedItems()
| void pqProxyGroupMenuManager::saveRecentlyUsedItems |
( |
| ) |
|
|
protected |
◆ getAction() [2/2]
| QAction* pqProxyGroupMenuManager::getAction |
( |
const QString & |
pgroup, |
|
|
const QString & |
proxyname |
|
) |
| |
|
protected |
Return the action for a given proxy.
◆ ResourceTagName
| QString pqProxyGroupMenuManager::ResourceTagName |
|
protected |
◆ MenuRoot
◆ RecentlyUsedMenuSize
| int pqProxyGroupMenuManager::RecentlyUsedMenuSize = 0 |
|
protected |
◆ EnableFavorites
| bool pqProxyGroupMenuManager::EnableFavorites = false |
|
protected |
The documentation for this class was generated from the following file: