All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::ImageController Class Reference

Class that represents a "Controller" part of Image MVC component. Its coordinate system is the same of scene (millimeters). He is also the son of ItemController, so it can become a controller. More...

#include <ImageController.h>

Inheritance diagram for te::layout::ImageController:
te::layout::ItemController

Public Member Functions

virtual bool contains (const te::gm::Coord2D &coord) const
 Checks if the coordinate is contained within the bounding rectangle. More...
 
const ObservablegetModel ()
 Returns the "Model" part of the MVC component. More...
 
const ObservergetView ()
 Returns the "View" part of the MVC component. More...
 
 ImageController (Observable *o)
 Constructor. More...
 
virtual void redraw ()
 Redraws the MVC component. Creates the ContextItem object and configures it. Calls the draw method of the model. More...
 
virtual void setBox (te::gm::Envelope box)
 Change the bounding rectangle. More...
 
virtual void setPosition (const double &x, const double &y)
 Change coordinate llx,lly of the MVC component. More...
 
virtual ~ImageController ()
 Destructor. More...
 

Protected Member Functions

virtual void create ()
 Call factory to create the "View" part of the MVC component and passes the model and himself as controller. More...
 

Protected Attributes

Observablem_model
 "Model" part of the MVC component. More...
 
Observerm_view
 "View" part of the MVC component. More...
 

Detailed Description

Class that represents a "Controller" part of Image MVC component. Its coordinate system is the same of scene (millimeters). He is also the son of ItemController, so it can become a controller.

See also
te::layout::ItemController

Definition at line 50 of file ImageController.h.

Constructor & Destructor Documentation

te::layout::ImageController::ImageController ( Observable o)

Constructor.

Parameters
o"Model" part of MVC component

Definition at line 40 of file ImageController.cpp.

te::layout::ImageController::~ImageController ( )
virtual

Destructor.

Definition at line 46 of file ImageController.cpp.

Member Function Documentation

bool te::layout::ItemController::contains ( const te::gm::Coord2D coord) const
virtualinherited

Checks if the coordinate is contained within the bounding rectangle.

Parameters
coordcoordinated to be verified
Returns
true if contains, false otherwise

Definition at line 104 of file ItemController.cpp.

References te::layout::ItemModelObservable::contains(), and te::layout::ItemObserver::refresh().

void te::layout::ItemController::create ( )
protectedvirtualinherited

Call factory to create the "View" part of the MVC component and passes the model and himself as controller.

Definition at line 121 of file ItemController.cpp.

References te::common::Singleton< Context >::getInstance(), te::layout::Context::getItemFactory(), and te::layout::AbstractItemFactory::make().

Referenced by te::layout::ItemController::ItemController().

const te::layout::Observable * te::layout::ItemController::getModel ( )
inherited

Returns the "Model" part of the MVC component.

Returns
model

Definition at line 84 of file ItemController.cpp.

void te::layout::ItemController::setBox ( te::gm::Envelope  box)
virtualinherited

Change the bounding rectangle.

Parameters
boundingrectangle

Definition at line 94 of file ItemController.cpp.

References te::layout::ItemModelObservable::setBox().

void te::layout::ItemController::setPosition ( const double &  x,
const double &  y 
)
virtualinherited

Change coordinate llx,lly of the MVC component.

Parameters
xllx
ylly

Definition at line 128 of file ItemController.cpp.

References te::layout::ItemModelObservable::setPosition().

Member Data Documentation

Observable* te::layout::ItemController::m_model
protectedinherited

"Model" part of the MVC component.

Definition at line 118 of file ItemController.h.

Observer* te::layout::ItemController::m_view
protectedinherited

"View" part of the MVC component.

Definition at line 119 of file ItemController.h.


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