Meta data structure for the User Interface, describing an item of a pqProxyCategory. More...
#include <pqProxyInfo.h>
Inherits QObject.
Public Types | |
| enum | ItemType { ItemType::Proxy, ItemType::Script, ItemType::Separator } |
| Type of item. More... | |
Public Member Functions | |
| pqProxyInfo (pqProxyCategory *parent, const QString &name, const QString &group, const QString &label, const QString &icon="", const QStringList &omitFromToolbar=QStringList(), bool hideFromMenu=false) | |
| pqProxyInfo (pqProxyCategory *parent, pqProxyInfo *other) | |
| create a pqProxyInfo with same attributes as other. More... | |
| pqProxyInfo (pqProxyCategory *parent, vtkPVXMLElement *xmlElement) | |
| pqProxyInfo ()=default | |
| void | setLabel (const QString &label) |
| Set label. More... | |
| void | setName (const QString &name) |
| Set the name. More... | |
| void | setHideFromMenu (bool hidden) |
| Set HideFromMenu. More... | |
| void | setIcon (const QString &iconPath) |
| Set Icon path. More... | |
| void | setOmitFromToolbar (const QString &categoryName, bool omit) |
| Set whether the item is omitted from the toolbar of the given category. More... | |
| void | merge (pqProxyInfo *other) |
| Merge pqProxyInfo meta data into self. More... | |
| void | convertToXML (vtkPVXMLElement *root) |
| Create the xml element and add it under given root. More... | |
| bool | isValid () const |
| Returns true if the item has the required information, which depends on its type: a name and group for proxies, a name and either code or a file name for scripts. More... | |
| bool | hasSameCustomizableAttributes (pqProxyInfo *other) |
| Returns true if the attributes that can be customized by users, i.e. More... | |
| QString | name () |
| Return member. More... | |
| QString | group () |
| Return member. More... | |
| QString | label () |
| return the translated label, or create one from name if empty. More... | |
| QString | icon () |
| Return member. More... | |
| QStringList | omitFromToolbar () |
| Return member. More... | |
| bool | hideFromMenu () |
| Return member. More... | |
| ItemType | type () const |
| Return member. More... | |
| bool | isProxy () const |
| Return member. More... | |
| bool | isScript () const |
| Return member. More... | |
| bool | isSeparator () const |
| Return member. More... | |
| QString | script () const |
| for scripts: the Python code, if provided inline. More... | |
| QString | fileName () const |
| for scripts: the file containing the Python code, if provided. More... | |
| QString | toolTip () const |
| for scripts: the tooltip. More... | |
Static Public Member Functions | |
| static QMap< QString, QPointer< pqProxyInfo > > | mergeProxies (const QMap< QString, QPointer< pqProxyInfo >> &proxies, const QMap< QString, QPointer< pqProxyInfo >> &otherProxies) |
| Merge otherProxies into proxies and return a new map. More... | |
Meta data structure for the User Interface, describing an item of a pqProxyCategory.
Items are mostly proxies i.e. sources or filters, but can also be Python scripts and separators. In XML, they are respectively described using the Proxy, Script and Separator elements:
A Script can also provide its code using a filename attribute instead.
Definition at line 33 of file pqProxyInfo.h.
|
strong |
| pqProxyInfo::pqProxyInfo | ( | pqProxyCategory * | parent, |
| const QString & | name, | ||
| const QString & | group, | ||
| const QString & | label, | ||
| const QString & | icon = "", |
||
| const QStringList & | omitFromToolbar = QStringList(), |
||
| bool | hideFromMenu = false |
||
| ) |
| pqProxyInfo::pqProxyInfo | ( | pqProxyCategory * | parent, |
| pqProxyInfo * | other | ||
| ) |
create a pqProxyInfo with same attributes as other.
| pqProxyInfo::pqProxyInfo | ( | pqProxyCategory * | parent, |
| vtkPVXMLElement * | xmlElement | ||
| ) |
|
default |
| void pqProxyInfo::setLabel | ( | const QString & | label | ) |
Set label.
|
inline |
Set the name.
Must be done before adding it to a category.
Definition at line 68 of file pqProxyInfo.h.
| void pqProxyInfo::setHideFromMenu | ( | bool | hidden | ) |
Set HideFromMenu.
| void pqProxyInfo::setIcon | ( | const QString & | iconPath | ) |
Set Icon path.
| void pqProxyInfo::setOmitFromToolbar | ( | const QString & | categoryName, |
| bool | omit | ||
| ) |
Set whether the item is omitted from the toolbar of the given category.
| void pqProxyInfo::merge | ( | pqProxyInfo * | other | ) |
Merge pqProxyInfo meta data into self.
Append OmitFromToolbar values. For other properties, keep those from self if non empty, else copy other.
|
static |
Merge otherProxies into proxies and return a new map.
| void pqProxyInfo::convertToXML | ( | vtkPVXMLElement * | root | ) |
Create the xml element and add it under given root.
|
inline |
Return member.
Definition at line 108 of file pqProxyInfo.h.
|
inline |
Return member.
Definition at line 109 of file pqProxyInfo.h.
| QString pqProxyInfo::label | ( | ) |
return the translated label, or create one from name if empty.
|
inline |
Return member.
Definition at line 112 of file pqProxyInfo.h.
|
inline |
Return member.
Definition at line 113 of file pqProxyInfo.h.
| bool pqProxyInfo::hideFromMenu | ( | ) |
Return member.
|
inline |
Return member.
Definition at line 115 of file pqProxyInfo.h.
|
inline |
Return member.
Definition at line 116 of file pqProxyInfo.h.
|
inline |
Return member.
Definition at line 117 of file pqProxyInfo.h.
|
inline |
Return member.
Definition at line 118 of file pqProxyInfo.h.
|
inline |
for scripts: the Python code, if provided inline.
Definition at line 120 of file pqProxyInfo.h.
|
inline |
for scripts: the file containing the Python code, if provided.
Definition at line 122 of file pqProxyInfo.h.
|
inline |
for scripts: the tooltip.
Definition at line 124 of file pqProxyInfo.h.
| bool pqProxyInfo::isValid | ( | ) | const |
Returns true if the item has the required information, which depends on its type: a name and group for proxies, a name and either code or a file name for scripts.
| bool pqProxyInfo::hasSameCustomizableAttributes | ( | pqProxyInfo * | other | ) |
Returns true if the attributes that can be customized by users, i.e.
icon and visibility in menus and toolbars, are the same for both items. For the toolbar visibility, only the parent categories are considered.
1.8.13 on Sat Dec 5 2026