Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
pqActiveObjects Class Reference

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

pqViewactiveView () const
 Returns the active view. More...
 
pqOutputPortactivePort () const
 Returns the active port. More...
 
pqServeractiveServer () const
 Returns the active server. More...
 
pqDataRepresentationactiveRepresentation () const
 Returns the active representation. More...
 
vtkSMProxySelectionModelactiveSourcesSelectionModel () const
 
const pqProxySelectionselection () const
 Returns the current source selection. More...
 
vtkSMSessionProxyManagerproxyManager () const
 Returns the proxyManager() from the active server, if any. More...
 
vtkSMViewLayoutProxyactiveLayout () 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...
 
pqProxyactivePipelineProxy () const
 Returns the active pipeline proxy e.g. More...
 
pqPipelineSourceactiveSource () const
 Returns the active pipeline proxy e.g. More...
 

Static Public Member Functions

static pqActiveObjectsinstance ()
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ pqActiveObjects()

pqActiveObjects::pqActiveObjects ( )
protected

◆ ~pqActiveObjects()

pqActiveObjects::~pqActiveObjects ( )
overrideprotected

Member Function Documentation

◆ instance()

static pqActiveObjects& pqActiveObjects::instance ( )
static

Provides access to the singleton.

◆ activeView()

pqView* pqActiveObjects::activeView ( ) const
inline

Returns the active view.

Definition at line 48 of file pqActiveObjects.h.

◆ activePipelineProxy()

pqProxy* pqActiveObjects::activePipelineProxy ( ) const
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.

◆ activeSource()

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.

◆ activePort()

pqOutputPort* pqActiveObjects::activePort ( ) const

Returns the active port.

◆ activeServer()

pqServer* pqActiveObjects::activeServer ( ) const
inline

Returns the active server.

Definition at line 76 of file pqActiveObjects.h.

◆ activeRepresentation()

pqDataRepresentation* pqActiveObjects::activeRepresentation ( ) const
inline

Returns the active representation.

Definition at line 81 of file pqActiveObjects.h.

◆ activeSourcesSelectionModel()

vtkSMProxySelectionModel* pqActiveObjects::activeSourcesSelectionModel ( ) const
inline

Definition at line 83 of file pqActiveObjects.h.

◆ selection()

const pqProxySelection& pqActiveObjects::selection ( ) const
inline

Returns the current source selection.

Definition at line 91 of file pqActiveObjects.h.

◆ proxyManager()

vtkSMSessionProxyManager* pqActiveObjects::proxyManager ( ) const

Returns the proxyManager() from the active server, if any.

Equivalent to calling this->activeServer()->proxyManager();

◆ activeLayout()

vtkSMViewLayoutProxy* pqActiveObjects::activeLayout ( ) const

Convenience method to get the layout for the active view.

◆ activeLayoutLocation()

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.

◆ setActiveView

void pqActiveObjects::setActiveView ( pqView view)
slot

Set the active view.

Changing the active view may lead to change in active representation as well.

◆ setActivePipelineProxy

void pqActiveObjects::setActivePipelineProxy ( pqProxy proxy)
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.

◆ setActiveSource

void pqActiveObjects::setActiveSource ( pqPipelineSource source)
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.

◆ setActivePort

void pqActiveObjects::setActivePort ( pqOutputPort port)
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.

◆ setActiveServer

void pqActiveObjects::setActiveServer ( pqServer )
slot

Set the active server.

Changing the server typically leads to changes all other active items.

◆ setSelection

void pqActiveObjects::setSelection ( const pqProxySelection selection,
pqServerManagerModelItem current 
)
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.

◆ serverChanged

void pqActiveObjects::serverChanged ( pqServer )
signal

These signals are fired when any of the corresponding active items change.

◆ viewChanged

void pqActiveObjects::viewChanged ( pqView view)
signal

◆ pipelineProxyChanged

void pqActiveObjects::pipelineProxyChanged ( pqProxy )
signal

◆ sourceChanged

void pqActiveObjects::sourceChanged ( pqPipelineSource )
signal

◆ portChanged

void pqActiveObjects::portChanged ( pqOutputPort )
signal

◆ representationChanged [1/2]

void pqActiveObjects::representationChanged ( pqDataRepresentation )
signal

◆ representationChanged [2/2]

void pqActiveObjects::representationChanged ( pqRepresentation )
signal

◆ selectionChanged

void pqActiveObjects::selectionChanged ( const pqProxySelection )
signal

◆ dataUpdated

void pqActiveObjects::dataUpdated ( )
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.

◆ representationUpdated

void pqActiveObjects::representationUpdated ( )
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.

◆ viewUpdated

void pqActiveObjects::viewUpdated ( )
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.

◆ triggerSignals()

void pqActiveObjects::triggerSignals ( )
protected

single method that fires appropriate signals based on state changes.

This also ensures that the Cached* variables are updated correctly.


The documentation for this class was generated from the following file: