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::Canvas * | getCanvas () |
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 Utils * | getUtils () |
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::Canvas * | m_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 |
Utils * | m_utils |
double | m_zoomFactor |
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.
te::layout::ContextItem::ContextItem | ( | ) |
Constructor.
Definition at line 31 of file ContextItem.cpp.
te::layout::ContextItem::ContextItem | ( | ParamsCreate | params, |
double | zoomFactor | ||
) |
|
virtual |
Destructor.
Definition at line 60 of file ContextItem.cpp.
|
virtual |
Return canvas.
Definition at line 105 of file ContextItem.cpp.
Referenced by te::layout::LegendChildModel::draw(), te::layout::MapModel::draw(), te::layout::LegendModel::draw(), te::layout::ItemModelObservable::drawBackground(), and te::layout::LegendModel::updateBox().
|
virtual |
Definition at line 125 of file ContextItem.cpp.
|
virtual |
Definition at line 135 of file ContextItem.cpp.
|
virtual |
Definition at line 70 of file ContextItem.cpp.
|
virtual |
Returns pixmap generated after drawing.
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().
|
virtual |
Definition at line 115 of file ContextItem.cpp.
Referenced by te::layout::LegendChildModel::draw(), te::layout::MapModel::draw(), te::layout::LegendModel::draw(), te::layout::ItemModelObservable::drawBackground(), te::layout::LegendModel::updateBox(), te::layout::ItemGroup::updateObserver(), te::layout::LegendItem::updateObserver(), and te::layout::MapItem::updateObserver().
|
virtual |
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().
|
virtual |
Returns whether the canvas should or should not be resized.
Definition at line 95 of file ContextItem.cpp.
Referenced by te::layout::LegendChildModel::draw(), te::layout::MapModel::draw(), and te::layout::LegendModel::draw().
|
virtual |
Definition at line 150 of file ContextItem.cpp.
Referenced by te::layout::EditTemplateOutside::updateObserver(), te::layout::PageSetupOutside::updateObserver(), te::layout::SystematicScaleOutside::updateObserver(), te::layout::TextGridSettingsOutside::updateObserver(), te::layout::ObjectInspectorOutside::updateObserver(), te::layout::GridSettingsOutside::updateObserver(), te::layout::MapLayerChoiceOutside::updateObserver(), te::layout::ToolbarOutside::updateObserver(), and te::layout::PropertiesOutside::updateObserver().
|
virtual |
Change canvas.
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 | ) |
Definition at line 165 of file ContextItem.cpp.
Referenced by te::layout::PaperModel::config(), te::layout::ItemObserver::redraw(), and te::layout::LineModel::setCoords().
|
virtual |
Definition at line 130 of file ContextItem.cpp.
Referenced by te::layout::AbstractVisitor::getContextItem(), and te::layout::ItemController::redraw().
|
virtual |
Definition at line 140 of file ContextItem.cpp.
Referenced by te::layout::AbstractVisitor::getContextItem(), and te::layout::ItemController::redraw().
|
virtual |
Definition at line 65 of file ContextItem.cpp.
|
virtual |
Stores pixmap generated after drawing.
pixmap | generated 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 | ) |
Definition at line 155 of file ContextItem.cpp.
Referenced by te::layout::PaperModel::config(), te::layout::ItemObserver::redraw(), and te::layout::LineModel::setCoords().
|
virtual |
Change whether the canvas should or should not be resized.
clear | true if canvas should be resized, false otherwise. |
Definition at line 100 of file ContextItem.cpp.
|
virtual |
Definition at line 145 of file ContextItem.cpp.
|
virtual |
Definition at line 120 of file ContextItem.cpp.
Referenced by te::layout::AbstractVisitor::getContextItem(), and te::layout::ItemController::redraw().
|
virtual |
Change current zoom factor.
zoomFactor | current zoom factor |
Definition at line 75 of file ContextItem.cpp.
Referenced by te::layout::AbstractVisitor::getContextItem().
|
protected |
Definition at line 192 of file ContextItem.h.
|
protected |
Definition at line 196 of file ContextItem.h.
|
protected |
Definition at line 193 of file ContextItem.h.
|
protected |
Definition at line 194 of file ContextItem.h.
|
protected |
Definition at line 186 of file ContextItem.h.
|
protected |
Definition at line 188 of file ContextItem.h.
|
protected |
Definition at line 195 of file ContextItem.h.
|
protected |
Definition at line 189 of file ContextItem.h.
|
protected |
Definition at line 190 of file ContextItem.h.
|
protected |
Definition at line 191 of file ContextItem.h.
|
protected |
Definition at line 187 of file ContextItem.h.