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)
 
void setActiveSource (pqPipelineSource *source)
 
void setActivePort (pqOutputPort *port)
 
void setActiveServer (pqServer *)
 
void onActiveServerChanged ()
 
void setSelection (const pqProxySelection &selection, pqServerManagerModelItem *current)
 Sets the selected set of proxies. More...
 

Signals

void serverChanged (pqServer *)
 These signals are fired when any of the corresponding active items change. More...
 
void viewChanged (pqView *view)
 
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...
 

Public Member Functions

pqViewactiveView () const
 Returns the active view. More...
 
pqPipelineSourceactiveSource () const
 Returns the active source. 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...
 

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 61 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 75 of file pqActiveObjects.h.

◆ activeSource()

pqPipelineSource* pqActiveObjects::activeSource ( ) const
inline

Returns the active source.

Definition at line 80 of file pqActiveObjects.h.

◆ activePort()

pqOutputPort* pqActiveObjects::activePort ( ) const
inline

Returns the active port.

Definition at line 85 of file pqActiveObjects.h.

◆ activeServer()

pqServer* pqActiveObjects::activeServer ( ) const
inline

Returns the active server.

Definition at line 90 of file pqActiveObjects.h.

◆ activeRepresentation()

pqDataRepresentation* pqActiveObjects::activeRepresentation ( ) const
inline

Returns the active representation.

Definition at line 95 of file pqActiveObjects.h.

◆ activeSourcesSelectionModel()

vtkSMProxySelectionModel* pqActiveObjects::activeSourcesSelectionModel ( ) const
inline

Definition at line 97 of file pqActiveObjects.h.

◆ selection()

const pqProxySelection& pqActiveObjects::selection ( ) const
inline

Returns the current source selection.

Definition at line 105 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

◆ setActiveSource

void pqActiveObjects::setActiveSource ( pqPipelineSource source)
slot

◆ setActivePort

void pqActiveObjects::setActivePort ( pqOutputPort port)
slot

◆ setActiveServer

void pqActiveObjects::setActiveServer ( pqServer )
slot

◆ onActiveServerChanged

void pqActiveObjects::onActiveServerChanged ( )
slot

◆ 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

◆ 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.

◆ 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: