Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkWidgetModel Class Reference

mitkWidgetModel - abstract class used to represent a widget entity (e.g. a line or an angle) in a rendering scene More...

#include <mitkWidgetModel.h>

Inherits mitkModel.

Inherited by mitkWidgetModel2D, and mitkWidgetModel3D.

Inheritance diagram for mitkWidgetModel:

Inheritance graph
[legend]
Collaboration diagram for mitkWidgetModel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
virtual void Pick (const WidgetNames &names)=0
virtual void Release ()=0
virtual void Select (mitkScene *scene)
void OnMouseDown (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)
void OnMouseUp (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)
void OnMouseMove (bool ctrlDown, bool shiftDown, int xPos, int yPos, int deltaX, int deltaY)
virtual void SetSourceModel (mitkDataModel *model)
mitkDataModelGetSourceModel ()
virtual void SetScene (mitkScene *scene)=0
virtual void SetView (mitkView *view)
virtual bool IsOpaque ()
virtual bool IsActive ()
bool IsMouseLeftButtonDown ()
bool IsMouseRightButtonDown ()
bool IsMouseMiddleButtonDown ()
void UpdateObservers ()
virtual void Update ()=0

Protected Member Functions

virtual void _onMouseDown (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)=0
virtual void _onMouseUp (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)=0
virtual void _onMouseMove (bool ctrlDown, bool shiftDown, int xPos, int yPos, int deltaX, int deltaY)=0

Detailed Description

mitkWidgetModel - abstract class used to represent a widget entity (e.g. a line or an angle) in a rendering scene

mitkWidgetModel is an abstract class used to represent a widget entity (e.g. a line or an angle) in a rendering scene. It can make responses to the mouse events and manipulate the mitkDataModel to which it attaches.


Member Function Documentation

virtual void mitkWidgetModel::_onMouseDown int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
[protected, pure virtual]
 

Deal with mouse down event. Should be implemented in the concrete classes.

Parameters:
mouseButton indicates which mouse button is pressed
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse down event occurs
yPos y-coordinate of the mouse position when mouse down event occurs

Implemented in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, and mitkReslicePlaneWidgetModel.

virtual void mitkWidgetModel::_onMouseMove bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos,
int  deltaX,
int  deltaY
[protected, pure virtual]
 

Deal with mouse move event. Should be implemented in the concrete classes.

Parameters:
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse move event occurs
yPos y-coordinate of the mouse position when mouse move event occurs
deltaX movement along x-axis of the mouse when mouse move event occurs
deltaY movement along y-axis of the mouse when mouse move event occurs

Implemented in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, and mitkReslicePlaneWidgetModel.

virtual void mitkWidgetModel::_onMouseUp int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
[protected, pure virtual]
 

Deal with mouse up event. Should be implemented in the concrete classes.

Parameters:
mouseButton indicates which mouse button was pressed and now released
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse up event occurs
yPos y-coordinate of the mouse position when mouse up event occurs

Implemented in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, and mitkReslicePlaneWidgetModel.

mitkDataModel* mitkWidgetModel::GetSourceModel  )  [inline]
 

Get the source model to which this widget attach.

Returns:
Return the pointer to the source model.

virtual bool mitkWidgetModel::IsActive  )  [inline, virtual]
 

Whether this widget is active.

Returns:
Return true if this widget is active (been selected).

bool mitkWidgetModel::IsMouseLeftButtonDown  )  [inline]
 

Whether the left button of the mouse is down.

Returns:
Return true if the left button of the mouse is down.

bool mitkWidgetModel::IsMouseMiddleButtonDown  )  [inline]
 

Whether the middle button of the mouse is down.

Returns:
Return true if the left button of the mouse is down.

bool mitkWidgetModel::IsMouseRightButtonDown  )  [inline]
 

Whether the right button of the mouse is down.

Returns:
Return true if the left button of the mouse is down.

virtual bool mitkWidgetModel::IsOpaque  )  [inline, virtual]
 

Whether this model is opaque.

Returns:
Return true if this model is opaque.

Implements mitkModel.

void mitkWidgetModel::OnMouseDown int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
 

Deal with mouse down event.

Parameters:
mouseButton indicates which mouse button is pressed
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse down event occurs
yPos y-coordinate of the mouse position when mouse down event occurs

void mitkWidgetModel::OnMouseMove bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos,
int  deltaX,
int  deltaY
 

Deal with mouse move event.

Parameters:
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse move event occurs
yPos y-coordinate of the mouse position when mouse move event occurs
deltaX movement along x-axis of the mouse when mouse move event occurs
deltaY movement along y-axis of the mouse when mouse move event occurs

void mitkWidgetModel::OnMouseUp int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
 

Deal with mouse up event.

Parameters:
mouseButton indicates which mouse button was pressed and now released
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse up event occurs
yPos y-coordinate of the mouse position when mouse up event occurs

virtual void mitkWidgetModel::Pick const WidgetNames &  names  )  [pure virtual]
 

Maintain the selection status when this widget is picked.

Parameters:
names a constant reference to an WidgerNames which contains the names of selected parts of this widget.

Implemented in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, and mitkReslicePlaneWidgetModel.

virtual void mitkWidgetModel::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkModel.

Reimplemented in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, mitkReslicePlaneWidgetModel, mitkWidgetModel2D, and mitkWidgetModel3D.

virtual void mitkWidgetModel::Release  )  [pure virtual]
 

Maintain the selection status when this widget is released.

Implemented in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, and mitkReslicePlaneWidgetModel.

virtual void mitkWidgetModel::Select mitkScene scene  )  [virtual]
 

Use select mode to render this model.

Parameters:
scene the pointer of an mitkScene in which this model is contained.

Reimplemented from mitkModel.

virtual void mitkWidgetModel::SetScene mitkScene scene  )  [pure virtual]
 

Set the scene which contains this model.

Parameters:
scene pointer to the mitkScene contains this model
Note:
This is a pure virtual function and this class dose not has data member of scene class. The concrete class derived form this class must implement this function and does all necessary work itself including specifying the data member for the scene.

Implemented in mitkWidgetModel2D, and mitkWidgetModel3D.

virtual void mitkWidgetModel::SetSourceModel mitkDataModel model  )  [virtual]
 

Associate this widget with a model.

Parameters:
model pointer to an miekDataModel to which this widget attach

Reimplemented in mitkClippingPlaneWidgetModel, mitkPseudocolorWidgetModelEx, mitkReslicePlaneWidgetModel, mitkWidgetModel2D, and mitkWidgetModel3D.

virtual void mitkWidgetModel::SetView mitkView view  )  [virtual]
 

Set the view which contains this model.

Parameters:
view pointer to the mitkView contains this model

virtual void mitkWidgetModel::Update  )  [pure virtual]
 

Update the parameters of the widget.

Implemented in mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkLineWidgetModel3D, mitkPseudocolorWidgetModelEx, mitkReslicePlaneWidgetModel, mitkWidgetModel2D, and mitkWidgetModel3D.

void mitkWidgetModel::UpdateObservers  )  [inline]
 

Update the observers for calling from outside (e.g. by a manipulator).


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:07:44 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3