CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkVTKMagnifyView Class Reference

#include <Libs/Visualization/VTK/Widgets/ctkVTKMagnifyView.h>

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

Public Types

typedef ctkCrosshairLabel Superclass
 Constructors. More...
 
- Public Types inherited from ctkCrosshairLabel
enum  CrosshairType { SimpleCrosshair = 0 , BullsEyeCrosshair }
 Enumeration over types of crosshairs. More...
 
typedef QLabel Superclass
 Constructors. More...
 

Signals

void enteredObservedWidget (QVTKWidget *widget)
 
void leftObservedWidget (QVTKWidget *widget)
 

Public Member Functions

 ctkVTKMagnifyView (QWidget *parent=0)
 
bool hasCursorInObservedWidget () const
 
bool isObserved (QVTKWidget *widget) const
 Returns whether a QVTKWidget is observed. More...
 
double magnification () const
 
int numberObserved () const
 Returns the number of observed QVTKWidgets. More...
 
void observe (QList< QVTKWidget * > widgets)
 
void observe (QVTKWidget *widget)
 
bool observeRenderWindowEvents () const
 
void remove (QList< QVTKWidget * > widgets)
 
void remove (QVTKWidget *widget)
 
void setMagnification (double newMagnification)
 
void setObserveRenderWindowEvents (bool newObserve)
 
void setUpdateInterval (int newInterval)
 
int updateInterval () const
 
virtual ~ctkVTKMagnifyView ()
 
- Public Member Functions inherited from ctkCrosshairLabel
int bullsEyeWidth () const
 
QColor crosshairColor () const
 
QPen crosshairPen () const
 
CrosshairTypes crosshairType () const
 Set/get the crosshair type. Default SimpleCrosshair. More...
 
 ctkCrosshairLabel (QWidget *parent=0)
 
virtual bool hasHeightForWidth () const
 
virtual int heightForWidth (int width) const
 
int lineWidth () const
 
QColor marginColor () const
 
virtual QSize minimumSizeHint () const
 Size hints. More...
 
void setBullsEyeWidth (int newWidth)
 
void setCrosshairColor (const QColor &newColor)
 
void setCrosshairPen (const QPen &newPen)
 
void setCrosshairType (const CrosshairTypes &newType)
 
void setLineWidth (int newWidth)
 
void setMarginColor (const QColor &newColor)
 
void setShowCrosshair (bool newShow)
 
bool showCrosshair () const
 Set/get whether or not to draw the crosshair. Default True. More...
 
virtual QSize sizeHint () const
 
virtual ~ctkCrosshairLabel ()
 

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *event)
 
- Protected Member Functions inherited from ctkCrosshairLabel
virtual void paintEvent (QPaintEvent *event)
 

Protected Attributes

QScopedPointer< ctkVTKMagnifyViewPrivate > d_ptr
 
- Protected Attributes inherited from ctkCrosshairLabel
QScopedPointer< ctkCrosshairLabelPrivate > d_ptr
 

Properties

double magnification
 
bool observeRenderWindowEvents
 
int updateInterval
 
- Properties inherited from ctkCrosshairLabel
int bullsEyeWidth
 
QColor crosshairColor
 
QPen crosshairPen
 
CrosshairTypes crosshairType
 
int lineWidth
 
QColor marginColor
 
bool showCrosshair
 

Detailed Description

Gives a magnified view of a QVTKWidget around the mouse position, with overlaid crosshair (ex. cross-hair). You must specify the QVTKWidget(s) to be observed.

See also
ctkCrosshairLabel

Definition at line 46 of file ctkVTKMagnifyView.h.

Member Typedef Documentation

◆ Superclass

Constructors.

Definition at line 57 of file ctkVTKMagnifyView.h.

Constructor & Destructor Documentation

◆ ctkVTKMagnifyView()

ctkVTKMagnifyView::ctkVTKMagnifyView ( QWidget *  parent = 0)
explicit

◆ ~ctkVTKMagnifyView()

virtual ctkVTKMagnifyView::~ctkVTKMagnifyView ( )
virtual

Member Function Documentation

◆ enteredObservedWidget

void ctkVTKMagnifyView::enteredObservedWidget ( QVTKWidget *  widget)
signal

◆ eventFilter()

virtual bool ctkVTKMagnifyView::eventFilter ( QObject *  obj,
QEvent *  event 
)
protectedvirtual

Handles mouse events on the observed QVTKWidgets (specifically, enterEvent, leaveEvent and mouseMoveEvent).

◆ hasCursorInObservedWidget()

bool ctkVTKMagnifyView::hasCursorInObservedWidget ( ) const

Returns true if the mouse cursor is over an observed widget, false otherwise.

◆ isObserved()

bool ctkVTKMagnifyView::isObserved ( QVTKWidget *  widget) const

Returns whether a QVTKWidget is observed.

◆ leftObservedWidget

void ctkVTKMagnifyView::leftObservedWidget ( QVTKWidget *  widget)
signal

◆ magnification()

double ctkVTKMagnifyView::magnification ( ) const

Set/get the magnification (zoom). Looks best when the magnification and the widget size are both either even or odd. Default 1.0.

◆ numberObserved()

int ctkVTKMagnifyView::numberObserved ( ) const

Returns the number of observed QVTKWidgets.

◆ observe() [1/2]

void ctkVTKMagnifyView::observe ( QList< QVTKWidget * >  widgets)

Add multiple QVTKWidgets at once to observe mouse events on. You can call this function multiple times to observe multiple QVTKWidgets.

See also
observe

◆ observe() [2/2]

void ctkVTKMagnifyView::observe ( QVTKWidget *  widget)

Add a QVTKWidget to observe mouse events on. You can call this function multiple times to observe multiple QVTKWidgets.

See also
observe

◆ observeRenderWindowEvents()

bool ctkVTKMagnifyView::observeRenderWindowEvents ( ) const

Set/get whether or not to observe EndEvents emitted by the observed QVTKWidgets' vtkRenderWindows after they have rendered. This triggers updates to the magnify widget whenever the vtkRenderWindow does a render, even if the mouse position does not move. Default true.

◆ remove() [1/2]

void ctkVTKMagnifyView::remove ( QList< QVTKWidget * >  widgets)

Remove multiple QVTKWidgets at once to observe mouse events on. You can call this function multiple times to remove multiple QVTKWidgets.

See also
unobserve

◆ remove() [2/2]

void ctkVTKMagnifyView::remove ( QVTKWidget *  widget)

Remove a QVTKWidget to observe mouse events on. You can call this function multiple times to remove multiple QVTKWidgets.

See also
remove

◆ setMagnification()

void ctkVTKMagnifyView::setMagnification ( double  newMagnification)

◆ setObserveRenderWindowEvents()

void ctkVTKMagnifyView::setObserveRenderWindowEvents ( bool  newObserve)

◆ setUpdateInterval()

void ctkVTKMagnifyView::setUpdateInterval ( int  newInterval)

◆ updateInterval()

int ctkVTKMagnifyView::updateInterval ( ) const

Set/get a fixed interval, in milliseconds, at which this widget will update itself. Default 20. Specify an update interval of 0 to handle all events as they occur.

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkVTKMagnifyViewPrivate> ctkVTKMagnifyView::d_ptr
protected

Definition at line 129 of file ctkVTKMagnifyView.h.

Property Documentation

◆ magnification

double ctkVTKMagnifyView::magnification
readwrite

Definition at line 1 of file ctkVTKMagnifyView.h.

◆ observeRenderWindowEvents

bool ctkVTKMagnifyView::observeRenderWindowEvents
readwrite

Definition at line 1 of file ctkVTKMagnifyView.h.

◆ updateInterval

int ctkVTKMagnifyView::updateInterval
readwrite

Definition at line 1 of file ctkVTKMagnifyView.h.


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