Class that represents a "Controller" part of TextGrid MVC component. Its coordinate system is the same of scene (millimeters). This is also the son of ItemController, so it can become a controller. More...
#include <TextGridController.h>
Public Member Functions | |
virtual bool | contains (const te::gm::Coord2D &coord) const |
Checks if the coordinate is contained within the bounding rectangle. More... | |
const Observable * | getModel () |
Returns the "Model" part of the MVC component. More... | |
const Observer * | getView () |
Returns the "View" part of the MVC component. 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... | |
TextGridController (Observable *o) | |
Constructor. More... | |
virtual | ~TextGridController () |
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 | |
Observable * | m_model |
"Model" part of the MVC component. More... | |
Observer * | m_view |
"View" part of the MVC component. More... | |
Class that represents a "Controller" part of TextGrid MVC component. Its coordinate system is the same of scene (millimeters). This is also the son of ItemController, so it can become a controller.
Definition at line 50 of file TextGridController.h.
te::layout::TextGridController::TextGridController | ( | Observable * | o | ) |
Constructor.
o | "Model" part of MVC component |
Definition at line 40 of file TextGridController.cpp.
|
virtual |
Destructor.
Definition at line 46 of file TextGridController.cpp.
|
virtualinherited |
Checks if the coordinate is contained within the bounding rectangle.
coord | coordinated to be verified |
Definition at line 104 of file ItemController.cpp.
References te::layout::ItemModelObservable::contains(), and te::layout::ItemObserver::refresh().
|
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().
|
inherited |
Returns the "Model" part of the MVC component.
Definition at line 84 of file ItemController.cpp.
|
inherited |
Returns the "View" part of the MVC component.
Definition at line 89 of file ItemController.cpp.
Referenced by te::layout::BuildGraphicsItem::createArrow(), te::layout::BuildGraphicsItem::createBalloon(), te::layout::BuildGraphicsItem::createBarCode(), te::layout::BuildGraphicsItem::createEllipse(), te::layout::BuildGraphicsItem::createGridGeodesic(), te::layout::BuildGraphicsItem::createGridMap(), te::layout::BuildGraphicsItem::createGridPlanar(), te::layout::BuildGraphicsItem::createImage(), te::layout::BuildGraphicsItem::createItemGroup(), te::layout::BuildGraphicsItem::createLegend(), te::layout::BuildGraphicsItem::createLegendChild(), te::layout::BuildGraphicsItem::createLine(), te::layout::BuildGraphicsItem::createMap(), te::layout::BuildGraphicsItem::createMapLocation(), te::layout::BuildGraphicsItem::createMovingItemGroup(), te::layout::BuildGraphicsItem::createNorth(), te::layout::VisualizationArea::createPaper(), te::layout::BuildGraphicsItem::createPaper(), te::layout::BuildGraphicsItem::createPoint(), te::layout::BuildGraphicsItem::createPolygon(), te::layout::BuildGraphicsItem::createRectangle(), te::layout::BuildGraphicsItem::createScale(), te::layout::BuildGraphicsItem::createText(), te::layout::BuildGraphicsItem::createTextGrid(), and te::layout::BuildGraphicsItem::createTitle().
|
virtualinherited |
Redraws the MVC component. Creates the ContextItem object and configures it. Calls the draw method of the model.
Definition at line 56 of file ItemController.cpp.
References te::map::Canvas::clear(), te::layout::ItemModelObservable::draw(), te::layout::Context::getCanvas(), te::layout::Context::getDpiX(), te::layout::Context::getDpiY(), te::common::Singleton< Context >::getInstance(), te::layout::Context::getUtils(), te::layout::Context::getZoomFactor(), te::layout::Utils::resetCanvas(), te::layout::ContextItem::setCanvas(), te::layout::ContextItem::setDpiX(), te::layout::ContextItem::setDpiY(), and te::layout::ContextItem::setUtils().
|
virtualinherited |
Change the bounding rectangle.
bounding | rectangle |
Definition at line 94 of file ItemController.cpp.
References te::layout::ItemModelObservable::setBox().
|
virtualinherited |
Change coordinate llx,lly of the MVC component.
x | llx |
y | lly |
Definition at line 128 of file ItemController.cpp.
References te::layout::ItemModelObservable::setPosition().
|
protectedinherited |
"Model" part of the MVC component.
Definition at line 118 of file ItemController.h.
|
protectedinherited |
"View" part of the MVC component.
Definition at line 119 of file ItemController.h.