ParaView
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | List of all members
pq3DWidget Class Referenceabstract

pq3DWidget is the abstract superclass for all 3D widgets. More...

#include <pq3DWidget.h>

Inheritance diagram for pq3DWidget:
Inheritance graph
[legend]
Collaboration diagram for pq3DWidget:
Collaboration graph
[legend]

Public Slots

void setWidgetVisible (bool)
 Sets 3D widget visibility. More...
 
void showWidget ()
 Makes the 3D widget visible. More...
 
void hideWidget ()
 Hides the 3D widget. More...
 
virtual void select ()
 Activates the widget. Respects the visibility flag. More...
 
virtual void deselect ()
 Deactivates the widget. More...
 
virtual void accept ()
 Accepts pending changes. More...
 
virtual void reset ()
 Resets pending changes. More...
 
virtual void setView (pqView *)
 Set the view that this panel works with. More...
 
virtual void resetBounds ()
 Resets the bounds of the 3D widget to the reference proxy bounds. More...
 
virtual void setUseSelectionDataBounds (bool use)
 When set to true, instead of using the referenceProxy to obtain the default bounds to reset to, it will use the bounds for the selected sources as indicated by pqApplicationCore::getSelectionModel()->getSelectionDataBounds(). More...
 
bool useSelectionDataBounds ()
 
- Public Slots inherited from pqProxyPanel
virtual void accept ()
 accept the changes made to the properties changes will be propogated down to the server manager subclasses should only change properties when accept is called to work properly with undo/redo More...
 
virtual void reset ()
 reset the changes made editor will query properties from the server manager More...
 
virtual void select ()
 Called when the panel becomes active. More...
 
virtual void deselect ()
 Called when the panel becomes inactive. More...
 
virtual void setView (pqView *)
 Set the view that this panel works with. More...
 
virtual void setModified ()
 Fires modified. More...
 

Signals

void widgetVisibilityChanged (bool)
 Notifies observers that widget visibility has changed. More...
 
void widgetStartInteraction ()
 Notifies observers that the user is dragging the 3D widget. More...
 
void widgetEndInteraction ()
 Notifies observers that the user is done dragging the 3D widget. More...
 
void widgetInteraction ()
 Notifies observers that the user is dragging the 3D widget. More...
 
- Signals inherited from pqProxyPanel
void modified ()
 
void onaccept ()
 
void onreset ()
 
void onselect ()
 
void ondeselect ()
 
void viewChanged (pqView *)
 

Public Member Functions

 pq3DWidget (vtkSMProxy *referenceProxy, vtkSMProxy *proxy, QWidget *parent=0)
 
virtual ~pq3DWidget ()
 
vtkSMProxy * getControlledProxy () const
 Controlled proxy is a proxy which is controlled by the 3D widget. More...
 
vtkSMProxy * getReferenceProxy () const
 
void setHints (vtkPVXMLElement *element)
 Set the hints XML to be using to map the 3D widget to the controlled proxy. More...
 
vtkPVXMLElement * getHints () const
 
vtkSMNewWidgetRepresentationProxy * getWidgetProxy () const
 Return the 3D Widget proxy. More...
 
bool widgetVisible () const
 Returns true if 3D widget visibility is enabled. More...
 
bool widgetSelected () const
 Returns true if 3D widget is selected. More...
 
pqRenderViewBaserenderView () const
 Returns the current render view. More...
 
virtual void resetBounds (double bounds[6])=0
 Reset the bounds to the specified bounds. More...
 
- Public Member Functions inherited from pqProxyPanel
 pqProxyPanel (vtkSMProxy *proxy, QWidget *p)
 constructor More...
 
 ~pqProxyPanel ()
 destructor More...
 
vtkSMProxy * proxy () const
 get the proxy for which properties are displayed More...
 
pqViewview () const
 get the view that this object panel works with. More...
 
QSize sizeHint () const
 size hint for this widget More...
 
pqPropertyManagerpropertyManager ()
 property manager belongs to this panel More...
 
bool selected () const
 returns whether selected More...
 

Static Public Member Functions

static QList< pq3DWidget * > createWidgets (vtkSMProxy *refProxy, vtkSMProxy *proxy)
 

Protected Slots

void render ()
 Called to request a render. More...
 
void setPickOnMeshPoint (bool)
 
void pickPoint ()
 triggers a pick action using the current location of the mouse. More...
 
virtual void pick (double, double, double)
 Called on each pick, default implementation does nothing. More...
 
- Protected Slots inherited from pqProxyPanel
virtual void updateInformationAndDomains ()
 This method gets called to referesh all domains and information properties. More...
 
void dataUpdated ()
 Called after the algorithm executes. More...
 

Protected Member Functions

virtual void updateMasterEnableState (bool)
 Called when master/slave change. More...
 
void handleReferenceProxyUserEvent (vtkObject *, unsigned long, void *)
 Handle custom user notification to show/hide corresponding widget. More...
 
bool pickOnMeshPoint () const
 
virtual void setControlledProperty (const char *function, vtkSMProperty *controlled_property)
 Subclasses can override this method to map properties to GUI. More...
 
void pickingSupported (const QKeySequence &key)
 Subclasses should call this method if they support picking. More...
 
void setControlledProperty (vtkSMProperty *widget_property, vtkSMProperty *controlled_property)
 
void setWidgetProxy (vtkSMNewWidgetRepresentationProxy *)
 
virtual void onControlledPropertyChanged ()
 Called when one of the controlled properties change (e.g: by undo/redo) More...
 
int getReferenceInputBounds (double bounds[6]) const
 Used to get the input bounds on for the reference proxy, if any. More...
 
virtual void updateWidgetVisibility ()
 Update the widget visibility according to the WidgetVisible and Selected flags. More...
 
virtual void updateWidgetState (bool visible, bool enable)
 Update the widget visibility and enable state. More...
 
virtual void updatePickShortcut ()
 updates the enable state of the picking shortcut. More...
 
virtual void updatePickShortcut (bool pickable)
 
- Protected Member Functions inherited from pqProxyPanel
bool event (QEvent *e)
 

Detailed Description

pq3DWidget is the abstract superclass for all 3D widgets.

This class represents a 3D Widget proxy as well as the GUI for the widget.

Definition at line 51 of file pq3DWidget.h.

Constructor & Destructor Documentation

§ pq3DWidget()

pq3DWidget::pq3DWidget ( vtkSMProxy *  referenceProxy,
vtkSMProxy *  proxy,
QWidget *  parent = 0 
)

§ ~pq3DWidget()

virtual pq3DWidget::~pq3DWidget ( )
virtual

Member Function Documentation

§ createWidgets()

static QList<pq3DWidget*> pq3DWidget::createWidgets ( vtkSMProxy *  refProxy,
vtkSMProxy *  proxy 
)
static

§ getControlledProxy()

vtkSMProxy* pq3DWidget::getControlledProxy ( ) const

Controlled proxy is a proxy which is controlled by the 3D widget.

A controlled proxy must provide "Hints" describing how the properties of the controlled proxy are controlled by the 3D widget.

§ getReferenceProxy()

vtkSMProxy* pq3DWidget::getReferenceProxy ( ) const

§ setHints()

void pq3DWidget::setHints ( vtkPVXMLElement *  element)

Set the hints XML to be using to map the 3D widget to the controlled proxy.

This method must be called only after the controlled proxy has been set. The argument is the element <PropertyGroup> which will be controlled by this widget.

§ getHints()

vtkPVXMLElement* pq3DWidget::getHints ( ) const

§ getWidgetProxy()

vtkSMNewWidgetRepresentationProxy* pq3DWidget::getWidgetProxy ( ) const

Return the 3D Widget proxy.

§ widgetVisible()

bool pq3DWidget::widgetVisible ( ) const

Returns true if 3D widget visibility is enabled.

Note: this does not indicate that the 3D widget is currently visible in the display, since this widget's panel might not be visible.

§ widgetSelected()

bool pq3DWidget::widgetSelected ( ) const

Returns true if 3D widget is selected.

§ renderView()

pqRenderViewBase* pq3DWidget::renderView ( ) const

Returns the current render view.

§ resetBounds() [1/2]

virtual void pq3DWidget::resetBounds ( double  bounds[6])
pure virtual

Reset the bounds to the specified bounds.

This typically calls PlaceWidget on the underlying 3D Widget with reference proxy bounds.

Implemented in pqLineWidget, pqPointSourceWidget, pqHandleWidget, pqContourWidget, pqPolyLineWidget, pqSplineWidget, pqBoxWidget, and pqSphereWidget.

§ widgetVisibilityChanged

void pq3DWidget::widgetVisibilityChanged ( bool  )
signal

Notifies observers that widget visibility has changed.

§ widgetStartInteraction

void pq3DWidget::widgetStartInteraction ( )
signal

Notifies observers that the user is dragging the 3D widget.

§ widgetEndInteraction

void pq3DWidget::widgetEndInteraction ( )
signal

Notifies observers that the user is done dragging the 3D widget.

§ widgetInteraction

void pq3DWidget::widgetInteraction ( )
signal

Notifies observers that the user is dragging the 3D widget.

§ setWidgetVisible

void pq3DWidget::setWidgetVisible ( bool  )
slot

Sets 3D widget visibility.

§ showWidget

void pq3DWidget::showWidget ( )
slot

Makes the 3D widget visible.

§ hideWidget

void pq3DWidget::hideWidget ( )
slot

Hides the 3D widget.

§ select

virtual void pq3DWidget::select ( )
virtualslot

Activates the widget. Respects the visibility flag.

Reimplemented in pqContourWidget, and pqBoxWidget.

§ deselect

virtual void pq3DWidget::deselect ( )
virtualslot

Deactivates the widget.

Reimplemented in pqContourWidget.

§ accept

virtual void pq3DWidget::accept ( )
virtualslot

Accepts pending changes.

Default implementation pushes the 3D widget information property values to the corresponding properties on the controlled widget. The correspondence is determined from the <Hints> associated with the controlled proxy.

Reimplemented in pqBoxWidget, and pqSphereWidget.

§ reset

virtual void pq3DWidget::reset ( )
virtualslot

Resets pending changes.

Default implementation pushes the property values of the controlled widget to the 3D widget properties. The correspondence is determined from the <Hints> associated with the controlled proxy.

Reimplemented in pqBoxWidget, and pqSphereWidget.

§ setView

virtual void pq3DWidget::setView ( pqView )
virtualslot

Set the view that this panel works with.

§ resetBounds [2/2]

virtual void pq3DWidget::resetBounds ( )
virtualslot

Resets the bounds of the 3D widget to the reference proxy bounds.

This typically calls PlaceWidget on the underlying 3D Widget with reference proxy bounds. This should be explicitly called after the panel is created and the widget is initialized i.e. the reference proxy, controlled proxy and hints have been set. Default implementation uses the getReferenceInputBounds() to get the bounds and then calls resetBounds(double bounds[]). Subclasses generally need to override this resetBounds(double*) method.

Reimplemented in pqPointSourceWidget, pqLineWidget, pqContourWidget, pqHandleWidget, pqPolyLineWidget, pqSplineWidget, pqBoxWidget, and pqSphereWidget.

§ setUseSelectionDataBounds

virtual void pq3DWidget::setUseSelectionDataBounds ( bool  use)
inlinevirtualslot

When set to true, instead of using the referenceProxy to obtain the default bounds to reset to, it will use the bounds for the selected sources as indicated by pqApplicationCore::getSelectionModel()->getSelectionDataBounds().

Default is false.

Definition at line 161 of file pq3DWidget.h.

§ useSelectionDataBounds

bool pq3DWidget::useSelectionDataBounds ( )
inlineslot

Definition at line 163 of file pq3DWidget.h.

§ render

void pq3DWidget::render ( )
protectedslot

Called to request a render.

§ setPickOnMeshPoint

void pq3DWidget::setPickOnMeshPoint ( bool  )
protectedslot

§ pickPoint

void pq3DWidget::pickPoint ( )
protectedslot

triggers a pick action using the current location of the mouse.

§ pick

virtual void pq3DWidget::pick ( double  ,
double  ,
double   
)
inlineprotectedvirtualslot

Called on each pick, default implementation does nothing.

Reimplemented in pqImplicitPlaneWidget, pqLineWidget, and pqHandleWidget.

Definition at line 177 of file pq3DWidget.h.

§ updateMasterEnableState()

virtual void pq3DWidget::updateMasterEnableState ( bool  )
protectedvirtual

Called when master/slave change.

§ handleReferenceProxyUserEvent()

void pq3DWidget::handleReferenceProxyUserEvent ( vtkObject *  ,
unsigned  long,
void *   
)
protected

Handle custom user notification to show/hide corresponding widget.

§ pickOnMeshPoint()

bool pq3DWidget::pickOnMeshPoint ( ) const
protected

§ setControlledProperty() [1/2]

virtual void pq3DWidget::setControlledProperty ( const char *  function,
vtkSMProperty *  controlled_property 
)
protectedvirtual

Subclasses can override this method to map properties to GUI.

Default implementation updates the internal datastructures so that default implementations can be provided for accept/reset.

Reimplemented in pqImplicitPlaneWidget, pqLineWidget, pqPointSourceWidget, and pqLineSourceWidget.

§ pickingSupported()

void pq3DWidget::pickingSupported ( const QKeySequence &  key)
protected

Subclasses should call this method if they support picking.

When the user picks a position, the virtual method pick(double, double, double) will be called.

§ setControlledProperty() [2/2]

void pq3DWidget::setControlledProperty ( vtkSMProperty *  widget_property,
vtkSMProperty *  controlled_property 
)
protected

§ setWidgetProxy()

void pq3DWidget::setWidgetProxy ( vtkSMNewWidgetRepresentationProxy *  )
protected

§ onControlledPropertyChanged()

virtual void pq3DWidget::onControlledPropertyChanged ( )
protectedvirtual

Called when one of the controlled properties change (e.g: by undo/redo)

§ getReferenceInputBounds()

int pq3DWidget::getReferenceInputBounds ( double  bounds[6]) const
protected

Used to get the input bounds on for the reference proxy, if any.

returns 1 on success, 0 otherwise.

§ updateWidgetVisibility()

virtual void pq3DWidget::updateWidgetVisibility ( )
protectedvirtual

Update the widget visibility according to the WidgetVisible and Selected flags.

Reimplemented in pqContourWidget.

§ updateWidgetState()

virtual void pq3DWidget::updateWidgetState ( bool  visible,
bool  enable 
)
protectedvirtual

Update the widget visibility and enable state.

§ updatePickShortcut() [1/2]

virtual void pq3DWidget::updatePickShortcut ( )
protectedvirtual

updates the enable state of the picking shortcut.

§ updatePickShortcut() [2/2]

virtual void pq3DWidget::updatePickShortcut ( bool  pickable)
protectedvirtual

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