ParaView
|
This is a PQ abstraction of a generic view module. More...
#include <pqView.h>
Public Types | |
enum | SelectionModifier { PV_SELECTION_DEFAULT = 0, PV_SELECTION_ADDITION, PV_SELECTION_SUBTRACTION, PV_SELECTION_TOGGLE } |
![]() | |
enum | ModifiedState { UNINITIALIZED, MODIFIED, UNMODIFIED } |
The modification state of this proxy. More... | |
Public Slots | |
virtual void | render () |
Request a StillRender on idle. More... | |
virtual void | forceRender () |
Forces an immediate render. More... | |
void | cancelPendingRenders () |
Cancels any pending renders. More... | |
virtual void | undo () |
Called to undo interaction. More... | |
virtual void | redo () |
Called to redo interaction. More... | |
virtual void | resetDisplay () |
Called to reset the view's display. More... | |
Signals | |
void | updateDataEvent () |
Fired when the vtkSMViewProxy fires the vtkCommand::UpdateDataEvent The view proxy fires this event at the end of vtkSMViewProxy::Update() when the update executes, not just when the method is called. More... | |
void | representationAdded (pqRepresentation *) |
Fired after a representation has been added to this view. More... | |
void | representationRemoved (pqRepresentation *) |
Fired after a representation has been removed from this view. More... | |
void | beginRender () |
Fired when the render module fires a vtkCommand::StartEvent signalling the beginning of rendering. More... | |
void | endRender () |
Fired when the render module fires a vtkCommand::EndEvent signalling the end of rendering. More... | |
void | representationVisibilityChanged (pqRepresentation *repr, bool visible) |
Fired when any representation visibility changes. More... | |
void | canUndoChanged (bool) |
Fired when interaction undo stack status changes. More... | |
void | canRedoChanged (bool) |
Fired when interaction undo stack status changes. More... | |
void | selected (pqOutputPort *opport) |
Fired when a selection is made in this view. More... | |
void | selectionModeChanged (bool frustum) |
Fired when the selection changes. More... | |
void | picked (pqOutputPort *opport) |
Fired when a port is picked. More... | |
void | beginProgress () |
Fired before doing any actions that may result in progress events that must be reported by the client. More... | |
void | endProgress () |
Fired after performing any actions that may result in progress events. More... | |
void | progress (const QString &message, int percent_progress) |
Fired to notify the current execution progress. More... | |
void | multipleSelected (QList< pqOutputPort *> opports) |
Fired when UseMultipleRepresentationSelection is set to on and selection on multiple representations is made in this view. More... | |
![]() | |
void | nameChanged (pqServerManagerModelItem *) |
Fired when the name of the proxy is changed. More... | |
void | modifiedStateChanged (pqServerManagerModelItem *) |
Fired when the modified status changes for the proxy. More... | |
Public Member Functions | |
virtual | ~pqView () |
vtkSMViewProxy * | getViewProxy () const |
Returns the internal render Module proxy associated with this object. More... | |
virtual vtkView * | getClientSideView () const |
Return the client-side vtkView encapsulated by this view (if any), or return NULL. More... | |
QWidget * | widget () |
Return a widget associated with this view. More... | |
virtual bool | supportsUndo () const |
Returns if this view module can support undo/redo. More... | |
QString | getViewType () const |
Returns the type of this view module. More... | |
virtual bool | canUndo () const |
Returns true if undo can be done. More... | |
virtual bool | canRedo () const |
Returns true if redo can be done. More... | |
virtual QSize | getSize () |
Returns the current size of the rendering context. More... | |
virtual vtkImageData * | captureImage (int magnification) |
Capture the view image into a new vtkImageData with the given magnification and returns it. More... | |
virtual vtkImageData * | captureImage (const QSize &size) |
Capture an image with the given size. More... | |
bool | writeImage (const QString &filename, const QSize &, int quality=-1) |
Capture an image and saves it out to a file. More... | |
bool | hasRepresentation (pqRepresentation *repr) const |
This method checks if the representation is shown in this view. More... | |
int | getNumberOfRepresentations () const |
Returns the number representations in the view. More... | |
int | getNumberOfVisibleRepresentations () const |
int | getNumberOfVisibleDataRepresentations () const |
pqRepresentation * | getRepresentation (int index) const |
Returns the representation for the specified index where (index < getNumberOfRepresentations()). More... | |
QList< pqRepresentation * > | getRepresentations () const |
Returns a list of representations in this view. More... | |
bool | canDisplay (pqOutputPort *opPort) const |
This method returns is any pqPipelineSource can be dislayed in this view. More... | |
virtual void | emitSelectionSignals (bool frustum) |
Called when a selection is made, passing in the mode as the sole argument. More... | |
![]() | |
pqProxy (const QString &group, const QString &name, vtkSMProxy *proxy, pqServer *server, QObject *parent=NULL) | |
virtual | ~pqProxy () |
pqServer * | getServer () const |
Get the server on which this proxy exists. More... | |
void | rename (const QString &newname) |
This is a convenience method. More... | |
const QString & | getSMName () |
Get the name with which this proxy is registered on the server manager. More... | |
const QString & | getSMGroup () |
vtkSMProxy * | getProxy () const |
Get the vtkSMProxy this object stands for. More... | |
ModifiedState | modifiedState () const |
Gets whether or not the source has been modified. More... | |
void | setModifiedState (ModifiedState modified) |
Sets whether or not the source has been modified. More... | |
vtkPVXMLElement * | getHints () const |
Returns the hints for this proxy, if any. More... | |
QList< vtkSMProxy * > | getHelperProxies () const |
Returns a list of all helper proxies. More... | |
QList< vtkSMProxy * > | getHelperProxies (const QString &key) const |
Returns a list of all the helper proxies added with a given key. More... | |
QList< QString > | getHelperKeys () const |
Returns the keys for helper proxies. More... | |
virtual void | addHelperProxy (const QString &key, vtkSMProxy *) |
Concept of helper proxies: A pqProxy is created for every important vtkSMProxy registered. More... | |
void | removeHelperProxy (const QString &key, vtkSMProxy *) |
void | updateHelperProxies () const |
Updates the internal datastructures using the proxies currently registered under the group that would be used for helper proxies. More... | |
vtkSMSessionProxyManager * | proxyManager () const |
Returns the proxy manager by calling this->getProxy()->GetProxyManager();. More... | |
![]() | |
pqServerManagerModelItem (QObject *parent=NULL) | |
virtual | ~pqServerManagerModelItem () |
Static Public Member Functions | |
static int | computeMagnification (const QSize &fullsize, QSize &viewsize) |
Computes the magnification and view size given the current view size for the full size for the view. More... | |
![]() | |
static std::string | rstToHtml (const char *rstStr) |
convert proxy documentation from RST to HTML (so that it can be used in Qt) More... | |
static pqProxy * | findProxyWithHelper (vtkSMProxy *aproxy, QString &key) |
Returns a pqProxy instance, of any, whose helper proxy is the aproxy. More... | |
Protected Member Functions | |
pqView (const QString &type, const QString &group, const QString &name, vtkSMViewProxy *view, pqServer *server, QObject *parent=NULL) | |
Constructor: type :- view type. More... | |
virtual void | initialize () |
Use this method to initialize the pqObject state using the underlying vtkSMProxy. More... | |
virtual QWidget * | createWidget ()=0 |
Subclasses must override this method to create a widget for the view. More... | |
![]() | |
void | setSMName (const QString &new_name) |
Make this pqProxy take on a new identity. More... | |
virtual void | addInternalHelperProxy (const QString &key, vtkSMProxy *) const |
virtual void | removeInternalHelperProxy (const QString &key, vtkSMProxy *) const |
![]() | |
vtkEventQtSlotConnect * | getConnector () |
All subclasses generally need some vtkEventQtSlotConnect instance to connect to VTK events. More... | |
Additional Inherited Members | |
![]() | |
void | onProxyRegistered (const QString &, const QString &, vtkSMProxy *) |
void | onProxyUnRegistered (const QString &, const QString &, vtkSMProxy *) |
This is a PQ abstraction of a generic view module.
Subclasses can be specific for different types of view such as render view, histogram view etc.
|
virtual |
|
protected |
Constructor: type
:- view type.
group
:- SManager registration group. name
:- SManager registration name. view
:- View proxy. server:-
server on which the proxy is created. parent:-
QObject parent.
vtkSMViewProxy* pqView::getViewProxy | ( | ) | const |
Returns the internal render Module proxy associated with this object.
|
virtual |
Return the client-side vtkView encapsulated by this view (if any), or return NULL.
QWidget* pqView::widget | ( | ) |
Return a widget associated with this view.
Every view in ParaView Qt application must be able to render itself in a QWidget. The first time this method is called, this will call pqView::createWidget(). Subclasses createWidget() to create a QWidget for the view. This may return NULL if the view doesn't have QWidget associated with it (which is rare, if impossible) or the QWidget was previously created but since has been destroyed due to Qt cleanup.
|
inlinevirtual |
Returns if this view module can support undo/redo.
Returns false by default. Subclassess must override if that's not the case. View modules that support undo must fire all undo related signals defined by this class.
Reimplemented in pqRenderView.
|
inline |
|
static |
Computes the magnification and view size given the current view size for the full size for the view.
|
virtualslot |
Request a StillRender on idle.
Multiple calls are collapsed into one.
|
virtualslot |
Forces an immediate render.
|
slot |
Cancels any pending renders.
|
inlinevirtualslot |
|
inlinevirtualslot |
|
inlinevirtualslot |
Called to reset the view's display.
For example, reset the camera or zoom level. The default implementation does nothing, but subclasses may override.
Reimplemented in pqContextView, and pqRenderViewBase.
|
inlinevirtual |
Returns true if undo can be done.
Reimplemented in pqRenderView.
|
inlinevirtual |
Returns true if redo can be done.
Reimplemented in pqRenderView.
|
virtual |
Returns the current size of the rendering context.
Default implementation returns the client size ofthe widget. Subclasses may override to change this behavior.
|
virtual |
Capture the view image into a new vtkImageData with the given magnification and returns it.
Default implementation forwards to vtkSMViewProxy::CaptureWindow(). Generally, it's not necessary to override this method. If you need to override it, be aware that the capture code will no work on other non-Qt based ParaView clients and hence it's not recommended. You should instead subclass vtkSMViewProxy and override the appropriate image capture method(s).
|
virtual |
Capture an image with the given size.
This will internally resize the widget to come up with a valid magnification factor and then simply calls captureImage(int).
bool pqView::writeImage | ( | const QString & | filename, |
const QSize & | , | ||
int | quality = -1 |
||
) |
Capture an image and saves it out to a file.
bool pqView::hasRepresentation | ( | pqRepresentation * | repr | ) | const |
This method checks if the representation is shown in this view.
int pqView::getNumberOfRepresentations | ( | ) | const |
Returns the number representations in the view.
int pqView::getNumberOfVisibleRepresentations | ( | ) | const |
int pqView::getNumberOfVisibleDataRepresentations | ( | ) | const |
pqRepresentation* pqView::getRepresentation | ( | int | index | ) | const |
Returns the representation for the specified index where (index < getNumberOfRepresentations()).
QList<pqRepresentation*> pqView::getRepresentations | ( | ) | const |
Returns a list of representations in this view.
bool pqView::canDisplay | ( | pqOutputPort * | opPort | ) | const |
This method returns is any pqPipelineSource can be dislayed in this view.
NOTE: This is no longer virtual. Simply forwards to
|
virtual |
Called when a selection is made, passing in the mode as the sole argument.
|
signal |
Fired when the vtkSMViewProxy fires the vtkCommand::UpdateDataEvent The view proxy fires this event at the end of vtkSMViewProxy::Update() when the update executes, not just when the method is called.
|
signal |
Fired after a representation has been added to this view.
|
signal |
Fired after a representation has been removed from this view.
|
signal |
Fired when the render module fires a vtkCommand::StartEvent signalling the beginning of rendering.
Subclasses must fire these signals at appropriate times.
|
signal |
Fired when the render module fires a vtkCommand::EndEvent signalling the end of rendering.
Subclasses must fire these signals at appropriate times.
|
signal |
Fired when any representation visibility changes.
|
signal |
Fired when interaction undo stack status changes.
|
signal |
Fired when interaction undo stack status changes.
|
signal |
Fired when a selection is made in this view.
opport
is the output port for the source that got selected. the selection input on the source proxy for the opport must already have been initialized to a selection source.
|
signal |
Fired when the selection changes.
frustum
is a boolean indicating whether the selection is frustum-based.
|
signal |
Fired when a port is picked.
opport
is the port that got picked.
|
signal |
Fired before doing any actions that may result in progress events that must be reported by the client.
|
signal |
Fired after performing any actions that may result in progress events.
Must match beginProgress() calls.
|
signal |
Fired to notify the current execution progress.
This will be generally have any effect only if beginProgress() has been fired before firing this signal.
|
signal |
Fired when UseMultipleRepresentationSelection is set to on and selection on multiple representations is made in this view.
opports
is a list of opport, and opport is the output port for the source that got selected. the selection input on the source proxy for the opport must already have been initialized to a selection source.
|
protectedvirtual |
Use this method to initialize the pqObject state using the underlying vtkSMProxy.
This needs to be done only once, after the object has been created. Overridden to update the list of representations currently available.
Reimplemented from pqProxy.
Reimplemented in pqRenderView, pqRenderViewBase, and pqPythonView.
|
protectedpure virtual |
Subclasses must override this method to create a widget for the view.
Implemented in pqRenderView, pqMultiSliceView, pqRenderViewBase, pqContextView, pqComparativeContextView, pqComparativeRenderView, and pqPythonView.