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

Class responsible for maintaining the drawing context of a MVC component. It is always used by the "Model" part of the MVC in draw method, as well as the part "View" in updateObserver method. More...

#include <ContextItem.h>

Public Member Functions

 ContextItem ()
 Constructor. More...
 
 ContextItem (ParamsCreate params, double zoomFactor)
 Constructor. More...
 
virtual te::map::CanvasgetCanvas ()
 Return canvas. More...
 
virtual double getDpiX ()
 
virtual double getDpiY ()
 
virtual ParamsCreate getParams ()
 
virtual te::color::RGBAColor ** getPixmap ()
 Returns pixmap generated after drawing. More...
 
te::gm::Coord2D getPos ()
 
virtual UtilsgetUtils ()
 
virtual double getZoomFactor ()
 Returns current zoom factor. More...
 
bool isChangePos ()
 
virtual bool isResizeCanvas ()
 Returns whether the canvas should or should not be resized. More...
 
virtual bool isShow ()
 
virtual void setCanvas (te::map::Canvas *canvas)
 Change canvas. More...
 
void setChangePos (bool change)
 
virtual void setDpiX (double dpi)
 
virtual void setDpiY (double dpi)
 
virtual void setParams (ParamsCreate params)
 
virtual void setPixmap (te::color::RGBAColor **pixmap)
 Stores pixmap generated after drawing. More...
 
void setPos (te::gm::Coord2D pos)
 
virtual void setResizeCanvas (bool clear)
 Change whether the canvas should or should not be resized. More...
 
virtual void setShow (bool show)
 
virtual void setUtils (Utils *utils)
 
virtual void setZoomFactor (double zoomFactor)
 Change current zoom factor. More...
 
virtual ~ContextItem ()
 Destructor. More...
 

Protected Attributes

te::map::Canvasm_canvas
 
bool m_changePos
 
double m_dpiX
 
double m_dpiY
 
ParamsCreate m_params
 
te::color::RGBAColor ** m_pixmap
 
te::gm::Coord2D m_pos
 
bool m_resizeCanvas
 
bool m_show
 
Utilsm_utils
 
double m_zoomFactor
 

Detailed Description

Class responsible for maintaining the drawing context of a MVC component. It is always used by the "Model" part of the MVC in draw method, as well as the part "View" in updateObserver method.

Definition at line 49 of file ContextItem.h.

Constructor & Destructor Documentation

te::layout::ContextItem::ContextItem ( )

Constructor.

Definition at line 31 of file ContextItem.cpp.

te::layout::ContextItem::ContextItem ( ParamsCreate  params,
double  zoomFactor 
)

Constructor.

Parameters
params
zoomFactorzoom factor

Definition at line 45 of file ContextItem.cpp.

te::layout::ContextItem::~ContextItem ( )
virtual

Destructor.

Definition at line 60 of file ContextItem.cpp.

Member Function Documentation

double te::layout::ContextItem::getDpiX ( )
virtual

Definition at line 125 of file ContextItem.cpp.

double te::layout::ContextItem::getDpiY ( )
virtual

Definition at line 135 of file ContextItem.cpp.

te::layout::ParamsCreate te::layout::ContextItem::getParams ( )
virtual

Definition at line 70 of file ContextItem.cpp.

te::color::RGBAColor ** te::layout::ContextItem::getPixmap ( )
virtual

Returns pixmap generated after drawing.

Returns
pixmap

Definition at line 90 of file ContextItem.cpp.

Referenced by te::layout::ItemGroup::updateObserver(), and te::layout::MapItem::updateObserver().

te::gm::Coord2D te::layout::ContextItem::getPos ( )

Definition at line 160 of file ContextItem.cpp.

Referenced by te::layout::ParentItem< T >::updateObserver().

double te::layout::ContextItem::getZoomFactor ( )
virtual

Returns current zoom factor.

Returns
current zoom factor

Definition at line 80 of file ContextItem.cpp.

bool te::layout::ContextItem::isChangePos ( )

Definition at line 170 of file ContextItem.cpp.

Referenced by te::layout::ParentItem< T >::updateObserver().

bool te::layout::ContextItem::isResizeCanvas ( )
virtual

Returns whether the canvas should or should not be resized.

Returns
true if canvas should be resized, false otherwise

Definition at line 95 of file ContextItem.cpp.

Referenced by te::layout::LegendChildModel::draw(), te::layout::MapModel::draw(), and te::layout::LegendModel::draw().

void te::layout::ContextItem::setCanvas ( te::map::Canvas canvas)
virtual

Change canvas.

Parameters
canvas

Definition at line 110 of file ContextItem.cpp.

Referenced by te::layout::AbstractVisitor::getContextItem(), and te::layout::ItemController::redraw().

void te::layout::ContextItem::setChangePos ( bool  change)
void te::layout::ContextItem::setDpiX ( double  dpi)
virtual
void te::layout::ContextItem::setDpiY ( double  dpi)
virtual
void te::layout::ContextItem::setParams ( ParamsCreate  params)
virtual

Definition at line 65 of file ContextItem.cpp.

void te::layout::ContextItem::setPixmap ( te::color::RGBAColor **  pixmap)
virtual

Stores pixmap generated after drawing.

Parameters
pixmapgenerated after drawing

Definition at line 85 of file ContextItem.cpp.

Referenced by te::layout::LegendChildModel::draw(), te::layout::MapModel::draw(), and te::layout::LegendModel::draw().

void te::layout::ContextItem::setPos ( te::gm::Coord2D  pos)
void te::layout::ContextItem::setResizeCanvas ( bool  clear)
virtual

Change whether the canvas should or should not be resized.

Parameters
cleartrue if canvas should be resized, false otherwise.

Definition at line 100 of file ContextItem.cpp.

void te::layout::ContextItem::setShow ( bool  show)
virtual

Definition at line 145 of file ContextItem.cpp.

void te::layout::ContextItem::setUtils ( Utils utils)
virtual
void te::layout::ContextItem::setZoomFactor ( double  zoomFactor)
virtual

Change current zoom factor.

Parameters
zoomFactorcurrent zoom factor

Definition at line 75 of file ContextItem.cpp.

Referenced by te::layout::AbstractVisitor::getContextItem().

Member Data Documentation

te::map::Canvas* te::layout::ContextItem::m_canvas
protected

Definition at line 192 of file ContextItem.h.

bool te::layout::ContextItem::m_changePos
protected

Definition at line 196 of file ContextItem.h.

double te::layout::ContextItem::m_dpiX
protected

Definition at line 193 of file ContextItem.h.

double te::layout::ContextItem::m_dpiY
protected

Definition at line 194 of file ContextItem.h.

ParamsCreate te::layout::ContextItem::m_params
protected

Definition at line 186 of file ContextItem.h.

te::color::RGBAColor** te::layout::ContextItem::m_pixmap
protected

Definition at line 188 of file ContextItem.h.

te::gm::Coord2D te::layout::ContextItem::m_pos
protected

Definition at line 195 of file ContextItem.h.

bool te::layout::ContextItem::m_resizeCanvas
protected

Definition at line 189 of file ContextItem.h.

bool te::layout::ContextItem::m_show
protected

Definition at line 190 of file ContextItem.h.

Utils* te::layout::ContextItem::m_utils
protected

Definition at line 191 of file ContextItem.h.

double te::layout::ContextItem::m_zoomFactor
protected

Definition at line 187 of file ContextItem.h.


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