pqActiveObjects is a singleton that keeps track of "active objects" including active view, active source, active representation etc. More...
#include <pqActiveObjects.h>
Inherits QObject.
Public Slots | |
void | setActiveView (pqView *view) |
Set the active view. More... | |
void | setActiveServer (pqServer *) |
Set the active server. More... | |
void | setSelection (const pqProxySelection &selection, pqServerManagerModelItem *current) |
Sets the selected set of proxies. More... | |
void | setActivePipelineProxy (pqProxy *proxy) |
Set the active source. More... | |
void | setActiveSource (pqPipelineSource *source) |
Set the active source. More... | |
void | setActivePort (pqOutputPort *port) |
Set the active source. More... | |
Signals | |
void | serverChanged (pqServer *) |
These signals are fired when any of the corresponding active items change. More... | |
void | viewChanged (pqView *view) |
void | pipelineProxyChanged (pqProxy *) |
void | sourceChanged (pqPipelineSource *) |
void | portChanged (pqOutputPort *) |
void | representationChanged (pqDataRepresentation *) |
void | representationChanged (pqRepresentation *) |
void | selectionChanged (const pqProxySelection &) |
void | dataUpdated () |
this signal is fired when the active source fires the dataUpdated() signal. More... | |
void | representationUpdated () |
this signal is fired when the active representation fires the updated() signal. More... | |
void | viewUpdated () |
this signal is fired when the active view fires the dataUpdated() signal. More... | |
Public Member Functions | |
pqView * | activeView () const |
Returns the active view. More... | |
pqOutputPort * | activePort () const |
Returns the active port. More... | |
pqServer * | activeServer () const |
Returns the active server. More... | |
pqDataRepresentation * | activeRepresentation () const |
Returns the active representation. More... | |
vtkSMProxySelectionModel * | activeSourcesSelectionModel () const |
const pqProxySelection & | selection () const |
Returns the current source selection. More... | |
vtkSMSessionProxyManager * | proxyManager () const |
Returns the proxyManager() from the active server, if any. More... | |
vtkSMViewLayoutProxy * | activeLayout () const |
Convenience method to get the layout for the active view. More... | |
int | activeLayoutLocation () const |
Convenience method to locate the active vtkSMViewLayoutProxy and the active cell in it. More... | |
pqProxy * | activePipelineProxy () const |
Returns the active pipeline proxy e.g. More... | |
pqPipelineSource * | activeSource () const |
Returns the active pipeline proxy e.g. More... | |
Static Public Member Functions | |
static pqActiveObjects & | instance () |
Provides access to the singleton. More... | |
Protected Member Functions | |
pqActiveObjects () | |
~pqActiveObjects () override | |
void | triggerSignals () |
single method that fires appropriate signals based on state changes. More... | |
pqActiveObjects is a singleton that keeps track of "active objects" including active view, active source, active representation etc.
pqActiveObjects also keeps track of selected sources (known as 'selection'). setActiveSource/setActivePort will affect the selection but not vice-versa (unless dealing with multiple server sessions).
Definition at line 34 of file pqActiveObjects.h.
|
protected |
|
overrideprotected |
|
static |
Provides access to the singleton.
|
inline |
Returns the active view.
Definition at line 48 of file pqActiveObjects.h.
|
inline |
Returns the active pipeline proxy e.g.
a pqPipelineSource or pqExtractor.
Historical note: until ParaView 5.9, the only types of objects that could be part of the data-processing pipeline were pqPipelineSource (or subclass) instances i.e. they were all vtkAlgorithm-based. With 5.9, we introduced a concept of extractors (pqExtractor) which are not vtkAlgorithm-based and hence cannot be pqPipelineSource
. To avoid major disruption to API and applications, here was the chosen strategy: we let active-source be either a pqPipelineSource or pqExtractor. setActiveSource
/activeSource()
remains unchanged but will likely get deprecated in the future. setActivePipelineProxy
and activePipelineProxy()
is the now recommended API to get access to the active source and active extractor.
Definition at line 64 of file pqActiveObjects.h.
pqPipelineSource* pqActiveObjects::activeSource | ( | ) | const |
Returns the active pipeline proxy e.g.
a pqPipelineSource or pqExtractor.
Historical note: until ParaView 5.9, the only types of objects that could be part of the data-processing pipeline were pqPipelineSource (or subclass) instances i.e. they were all vtkAlgorithm-based. With 5.9, we introduced a concept of extractors (pqExtractor) which are not vtkAlgorithm-based and hence cannot be pqPipelineSource
. To avoid major disruption to API and applications, here was the chosen strategy: we let active-source be either a pqPipelineSource or pqExtractor. setActiveSource
/activeSource()
remains unchanged but will likely get deprecated in the future. setActivePipelineProxy
and activePipelineProxy()
is the now recommended API to get access to the active source and active extractor.
pqOutputPort* pqActiveObjects::activePort | ( | ) | const |
Returns the active port.
|
inline |
Returns the active server.
Definition at line 76 of file pqActiveObjects.h.
|
inline |
Returns the active representation.
Definition at line 81 of file pqActiveObjects.h.
|
inline |
Definition at line 83 of file pqActiveObjects.h.
|
inline |
Returns the current source selection.
Definition at line 91 of file pqActiveObjects.h.
vtkSMSessionProxyManager* pqActiveObjects::proxyManager | ( | ) | const |
Returns the proxyManager() from the active server, if any.
Equivalent to calling this->activeServer()->proxyManager();
vtkSMViewLayoutProxy* pqActiveObjects::activeLayout | ( | ) | const |
Convenience method to get the layout for the active view.
int pqActiveObjects::activeLayoutLocation | ( | ) | const |
Convenience method to locate the active vtkSMViewLayoutProxy and the active cell in it.
Since currently this information is not available at the server-manager level, especially if the active view is nullptr, we use pqMultiViewWidget and pqTabbedMultiViewWidget to find this.
Returns 0 if one could not determined.
|
slot |
Set the active view.
Changing the active view may lead to change in active representation as well.
|
slot |
Set the active source.
Changing the active source may lead to changes in active port, and active representation.
Using setActivePipelineProxy
is the recommended approach since ParaView 5.9 since it allows for supporting pqExtractor items.
|
inlineslot |
Set the active source.
Changing the active source may lead to changes in active port, and active representation.
Using setActivePipelineProxy
is the recommended approach since ParaView 5.9 since it allows for supporting pqExtractor items.
Definition at line 130 of file pqActiveObjects.h.
|
inlineslot |
Set the active source.
Changing the active source may lead to changes in active port, and active representation.
Using setActivePipelineProxy
is the recommended approach since ParaView 5.9 since it allows for supporting pqExtractor items.
Definition at line 131 of file pqActiveObjects.h.
|
slot |
Set the active server.
Changing the server typically leads to changes all other active items.
|
slot |
Sets the selected set of proxies.
All proxies in the selection must be on the same server/session. This generally doesn't affect the activeSource etc. unless the server is different from the active server. In which case, the active server is changed before the selection is updated.
|
signal |
These signals are fired when any of the corresponding active items change.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
this signal is fired when the active source fires the dataUpdated() signal.
This is used by components in the GUI that need to be updated when the active source's pipeline updates.
|
signal |
this signal is fired when the active representation fires the updated() signal.
This is used by components in the GUI that need to be updated when the active representation updates.
|
signal |
this signal is fired when the active view fires the dataUpdated() signal.
This is used by components in the GUI that need to be updated when the active view updates.
|
protected |
single method that fires appropriate signals based on state changes.
This also ensures that the Cached* variables are updated correctly.