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

Class that represents a "Model" part of Paper MVC component. Its coordinate system is the same of scene (millimeters). This is also son of ItemModelObservable, so it can become observable. More...

#include <PaperModel.h>

Inheritance diagram for te::layout::PaperModel:
te::layout::ItemModelObservable te::layout::Observable

Public Member Functions

virtual bool addChildren (ItemObserver *item)
 Reimplemented from Observable. More...
 
virtual bool addObserver (Observer *o)
 Reimplemented from Observable. More...
 
virtual bool contains (const te::gm::Coord2D &coord) const
 Checks if the coordinate is contained within the bounding rectangle. More...
 
virtual void draw (ContextItem context)
 Drawing method of the MVC component. More...
 
virtual double getAngle ()
 Returns the value of rotation. More...
 
virtual te::color::RGBAColor getBackgroundColor ()
 Returns the background color of the MVC component. More...
 
virtual te::color::RGBAColor getBorderColor ()
 Returns the border color of the MVC component. More...
 
virtual te::gm::Envelope getBox ()
 Reimplemented from Observable. More...
 
virtual std::set< ItemObserver * > getChildren () const
 Reimplemented from Observable. More...
 
virtual int getHashCode ()
 Reimplemented from Observable. More...
 
virtual int getId ()
 Reimplemented from Observable. More...
 
virtual std::string getName ()
 Reimplemented from Observable. More...
 
virtual double getOldAngle ()
 Returns the value of old rotation. More...
 
virtual te::gm::Coord2D getOldPos ()
 Returns the value of old position. More...
 
virtual te::color::RGBAColor getPaperColor ()
 
virtual PaperConfiggetPaperConfig () const
 
virtual PropertiesgetProperties () const
 Reimplemented from Observable. More...
 
virtual te::layout::PropertiesgetPublicProperties () const
 Reimplemented from Observable. More...
 
virtual te::color::RGBAColor getShadowColor ()
 
virtual double getShadowPadding ()
 
virtual EnumTypegetType ()
 Reimplemented from Observable. More...
 
virtual int getZValue ()
 Reimplemented from Observable. More...
 
virtual bool isBorder ()
 Returns whether the border should be drawn or not. More...
 
virtual bool isEnableChildren ()
 Returns true if MVC component can have children, false otherwise. More...
 
virtual bool isResizable ()
 Reimplemented from Observable. More...
 
 PaperModel ()
 Constructor. More...
 
 PaperModel (PaperConfig *paperConfig)
 
virtual bool removeChildren (int hashCode)
 Reimplemented from Observable. More...
 
virtual bool removeObserver (Observer *o)
 Reimplemented from Observable. More...
 
virtual void resize (double w, double h)
 Resize the bounding rectangle of the MVC component. More...
 
virtual void setAngle (double angle)
 Change the value of rotation of the MVC component. More...
 
virtual void setBackgroundColor (te::color::RGBAColor color)
 Change the background color of the MVC component. More...
 
virtual void setBorder (bool value)
 Change whether the border should be drawn or not. More...
 
virtual void setBorderColor (te::color::RGBAColor color)
 Change the background color of the MVC component. More...
 
virtual void setBox (te::gm::Envelope box)
 Change the bounding rectangle. More...
 
virtual void setEnableChildren (bool value)
 Sets true if MVC component can have children, false otherwise. More...
 
virtual void setId (int id)
 Reimplemented from Observable. More...
 
virtual void setName (std::string name)
 Change the name of the MVC component. More...
 
virtual void setPaperColor (te::color::RGBAColor color)
 
virtual void setPaperConfig (PaperConfig *pConfig)
 
virtual void setPosition (const double &x, const double &y)
 Change coordinate llx,lly of the MVC component. More...
 
virtual void setResizable (bool resize)
 Reimplemented from Observable. More...
 
virtual void setShadowColor (te::color::RGBAColor color)
 
virtual void setShadowPadding (double padding)
 
virtual void setType (EnumType *type)
 Reimplemented from Observable. More...
 
virtual void setZValue (int zValue)
 Reimplemented from Observable. More...
 
virtual void updateProperties (te::layout::Properties *properties)
 Reimplemented from Observable. More...
 
virtual ~PaperModel ()
 Destructor. More...
 

Protected Member Functions

virtual void addChildrenProperties (Properties *properties)
 
virtual int calculateHashCode ()
 Returns a new hashcode. More...
 
virtual void config ()
 
virtual void drawBackground (ContextItem context)
 Draws the background of the MVC component. More...
 
virtual void notifyAll (ContextItem context)
 Reimplemented from Observable. More...
 
virtual void updateChildrenProperties (Property prop)
 

Protected Attributes

double m_angle
 value of rotation More...
 
te::color::RGBAColor m_backgroundColor
 background color More...
 
bool m_border
 true if should be drawn border, false otherwise More...
 
te::color::RGBAColor m_borderColor
 border color More...
 
te::gm::Envelope m_box
 bounding rectangle More...
 
te::gm::Envelope m_boxPaper
 
te::gm::Envelope m_boxShadow
 
te::gm::Coord2D m_centerCoordinate
 center coordinate of the bounding rectangle More...
 
std::set< ItemObserver * > m_children
 children components More...
 
bool m_enableChildren
 true if MVC component can have children, false otherwise More...
 
int m_hashCode
 
int m_id
 hashcode More...
 
std::string m_name
 name of the MVC component More...
 
std::set< Observer * > m_observers
 set of observers of this object More...
 
double m_oldAngle
 value of old rotation More...
 
te::gm::Coord2D m_oldPos
 value of old position More...
 
te::color::RGBAColor m_paperColor
 
PaperConfigm_paperConfig
 
Propertiesm_properties
 properties More...
 
Propertiesm_publicProperties
 public properties More...
 
bool m_resizable
 true if resizable, false otherwise More...
 
te::color::RGBAColor m_shadowColor
 
double m_shadowPadding
 
SharedPropertiesm_sharedProps
 Names of common properties among all MVC components. More...
 
EnumTypem_type
 type of the MVC component More...
 
int m_zValue
 The Z value decides the stacking order of drawing. More...
 

Detailed Description

Class that represents a "Model" part of Paper MVC component. Its coordinate system is the same of scene (millimeters). This is also son of ItemModelObservable, so it can become observable.

See also
te::layout::ItemModelObservable

Definition at line 54 of file PaperModel.h.

Constructor & Destructor Documentation

te::layout::PaperModel::~PaperModel ( )
virtual

Destructor.

Definition at line 68 of file PaperModel.cpp.

Member Function Documentation

bool te::layout::ItemModelObservable::addChildren ( ItemObserver item)
virtualinherited
void te::layout::ItemModelObservable::addChildrenProperties ( Properties properties)
protectedvirtualinherited
bool te::layout::ItemModelObservable::addObserver ( Observer o)
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 103 of file ItemModelObservable.cpp.

int te::layout::ItemModelObservable::calculateHashCode ( )
protectedvirtualinherited

Returns a new hashcode.

Returns
hashCode

Implements te::layout::Observable.

Definition at line 476 of file ItemModelObservable.cpp.

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

void te::layout::PaperModel::config ( )
protectedvirtual
bool te::layout::ItemModelObservable::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 280 of file ItemModelObservable.cpp.

References te::gm::Envelope::isValid(), te::gm::Coord2D::x, and te::gm::Coord2D::y.

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

void te::layout::ItemModelObservable::draw ( ContextItem  context)
virtualinherited

Drawing method of the MVC component.

Parameters
contextmaintaining the drawing context of a MVC component

Reimplemented in te::layout::LegendModel, te::layout::MapModel, and te::layout::LegendChildModel.

Definition at line 532 of file ItemModelObservable.cpp.

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

void te::layout::ItemModelObservable::drawBackground ( ContextItem  context)
protectedvirtualinherited
double te::layout::ItemModelObservable::getAngle ( )
virtualinherited

Returns the value of rotation.

Returns
value of rotation

Definition at line 466 of file ItemModelObservable.cpp.

Referenced by te::layout::ItemGroup::applyRotation(), and te::layout::ParentItem< T >::applyRotation().

te::color::RGBAColor te::layout::ItemModelObservable::getBackgroundColor ( )
virtualinherited
te::color::RGBAColor te::layout::ItemModelObservable::getBorderColor ( )
virtualinherited

Returns the border color of the MVC component.

Returns
border color

Definition at line 244 of file ItemModelObservable.cpp.

Referenced by te::layout::ParentItem< T >::drawBorder(), and te::layout::PaperItem::drawPaper().

std::set< te::layout::ItemObserver * > te::layout::ItemModelObservable::getChildren ( ) const
virtualinherited

Reimplemented from Observable.

Definition at line 547 of file ItemModelObservable.cpp.

int te::layout::ItemModelObservable::getHashCode ( )
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 471 of file ItemModelObservable.cpp.

int te::layout::ItemModelObservable::getId ( )
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 401 of file ItemModelObservable.cpp.

Referenced by te::layout::ItemUtils::maxTypeId().

std::string te::layout::ItemModelObservable::getName ( )
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 260 of file ItemModelObservable.cpp.

Referenced by te::layout::GridMapModel::visitDependent().

double te::layout::ItemModelObservable::getOldAngle ( )
virtualinherited

Returns the value of old rotation.

Returns
value of old rotation

Definition at line 522 of file ItemModelObservable.cpp.

Referenced by te::layout::ItemGroup::applyRotation(), and te::layout::ParentItem< T >::applyRotation().

te::gm::Coord2D te::layout::ItemModelObservable::getOldPos ( )
virtualinherited

Returns the value of old position.

Returns
value of old position

Definition at line 527 of file ItemModelObservable.cpp.

te::color::RGBAColor te::layout::PaperModel::getPaperColor ( )
virtual

Definition at line 136 of file PaperModel.cpp.

Referenced by te::layout::PaperItem::drawPaper().

te::layout::PaperConfig * te::layout::PaperModel::getPaperConfig ( ) const
virtual

Definition at line 109 of file PaperModel.cpp.

Referenced by te::layout::PaperItem::drawPaper().

te::layout::Properties * te::layout::ItemModelObservable::getPublicProperties ( ) const
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 601 of file ItemModelObservable.cpp.

References te::layout::Properties::clear().

te::color::RGBAColor te::layout::PaperModel::getShadowColor ( )
virtual

Definition at line 93 of file PaperModel.cpp.

Referenced by te::layout::PaperItem::drawPaper().

double te::layout::PaperModel::getShadowPadding ( )
virtual

Definition at line 119 of file PaperModel.cpp.

Referenced by te::layout::PaperItem::drawPaper().

te::layout::EnumType * te::layout::ItemModelObservable::getType ( )
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 371 of file ItemModelObservable.cpp.

int te::layout::ItemModelObservable::getZValue ( )
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 381 of file ItemModelObservable.cpp.

bool te::layout::ItemModelObservable::isBorder ( )
virtualinherited

Returns whether the border should be drawn or not.

Returns
true if should be drawn, false otherwise

Definition at line 391 of file ItemModelObservable.cpp.

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

bool te::layout::ItemModelObservable::isEnableChildren ( )
virtualinherited

Returns true if MVC component can have children, false otherwise.

Returns
true if MVC component can have children, false otherwise

Definition at line 537 of file ItemModelObservable.cpp.

Referenced by te::layout::BuildGraphicsItem::addChild().

bool te::layout::ItemModelObservable::isResizable ( )
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 428 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::notifyAll ( ContextItem  context)
protectedvirtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 123 of file ItemModelObservable.cpp.

bool te::layout::ItemModelObservable::removeChildren ( int  hashCode)
virtualinherited

Reimplemented from Observable.

Definition at line 580 of file ItemModelObservable.cpp.

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

bool te::layout::ItemModelObservable::removeObserver ( Observer o)
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 113 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::resize ( double  w,
double  h 
)
virtualinherited

Resize the bounding rectangle of the MVC component.

Parameters
trueif should be drawn, false otherwise

Definition at line 411 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::setAngle ( double  angle)
virtualinherited

Change the value of rotation of the MVC component.

Parameters
valueof rotation

Definition at line 460 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::setBackgroundColor ( te::color::RGBAColor  color)
virtualinherited

Change the background color of the MVC component.

Parameters
colorbackground color

Definition at line 234 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::setBorder ( bool  value)
virtualinherited

Change whether the border should be drawn or not.

Parameters
trueif should be drawn, false otherwise

Definition at line 396 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::setBorderColor ( te::color::RGBAColor  color)
virtualinherited

Change the background color of the MVC component.

Parameters
colorborder color

Definition at line 239 of file ItemModelObservable.cpp.

void te::layout::PaperModel::setBox ( te::gm::Envelope  box)
virtual

Change the bounding rectangle.

Parameters
boundingrectangle

Reimplemented from te::layout::ItemModelObservable.

Definition at line 124 of file PaperModel.cpp.

References te::gm::Envelope::m_llx, and te::gm::Envelope::m_lly.

void te::layout::ItemModelObservable::setEnableChildren ( bool  value)
virtualinherited

Sets true if MVC component can have children, false otherwise.

Parameters
trueif MVC component can have children, false otherwise

Definition at line 542 of file ItemModelObservable.cpp.

void te::layout::PaperModel::setPaperColor ( te::color::RGBAColor  color)
virtual

Definition at line 141 of file PaperModel.cpp.

void te::layout::PaperModel::setPaperConfig ( PaperConfig pConfig)
virtual

Definition at line 103 of file PaperModel.cpp.

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

Change coordinate llx,lly of the MVC component.

Parameters
xllx
ylly

Reimplemented in te::layout::MapModel.

Definition at line 265 of file ItemModelObservable.cpp.

Referenced by te::layout::ItemController::setPosition(), and te::layout::MapModel::setPosition().

void te::layout::ItemModelObservable::setResizable ( bool  resize)
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 423 of file ItemModelObservable.cpp.

void te::layout::PaperModel::setShadowColor ( te::color::RGBAColor  color)
virtual

Definition at line 98 of file PaperModel.cpp.

void te::layout::PaperModel::setShadowPadding ( double  padding)
virtual

Definition at line 114 of file PaperModel.cpp.

void te::layout::ItemModelObservable::setType ( EnumType type)
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 376 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::setZValue ( int  zValue)
virtualinherited

Reimplemented from Observable.

Implements te::layout::Observable.

Definition at line 386 of file ItemModelObservable.cpp.

void te::layout::ItemModelObservable::updateChildrenProperties ( Property  prop)
protectedvirtualinherited
void te::layout::ItemModelObservable::updateProperties ( te::layout::Properties properties)
virtualinherited

Member Data Documentation

double te::layout::ItemModelObservable::m_angle
protectedinherited

value of rotation

Definition at line 328 of file ItemModelObservable.h.

te::color::RGBAColor te::layout::ItemModelObservable::m_backgroundColor
protectedinherited
te::gm::Envelope te::layout::PaperModel::m_boxPaper
protected

Definition at line 93 of file PaperModel.h.

te::gm::Envelope te::layout::PaperModel::m_boxShadow
protected

Definition at line 94 of file PaperModel.h.

te::gm::Coord2D te::layout::ItemModelObservable::m_centerCoordinate
protectedinherited

center coordinate of the bounding rectangle

Definition at line 316 of file ItemModelObservable.h.

std::set<ItemObserver*> te::layout::ItemModelObservable::m_children
protectedinherited

children components

Definition at line 320 of file ItemModelObservable.h.

bool te::layout::ItemModelObservable::m_enableChildren
protectedinherited

true if MVC component can have children, false otherwise

Definition at line 332 of file ItemModelObservable.h.

Referenced by te::layout::MapLocationModel::MapLocationModel(), and te::layout::MapModel::MapModel().

int te::layout::ItemModelObservable::m_hashCode
protectedinherited
int te::layout::ItemModelObservable::m_id
protectedinherited

hashcode

Definition at line 314 of file ItemModelObservable.h.

std::string te::layout::ItemModelObservable::m_name
protectedinherited

name of the MVC component

Definition at line 326 of file ItemModelObservable.h.

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

std::set<Observer*> te::layout::ItemModelObservable::m_observers
protectedinherited

set of observers of this object

Definition at line 313 of file ItemModelObservable.h.

double te::layout::ItemModelObservable::m_oldAngle
protectedinherited

value of old rotation

Definition at line 330 of file ItemModelObservable.h.

te::gm::Coord2D te::layout::ItemModelObservable::m_oldPos
protectedinherited

value of old position

Definition at line 331 of file ItemModelObservable.h.

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

te::color::RGBAColor te::layout::PaperModel::m_paperColor
protected

Definition at line 97 of file PaperModel.h.

Referenced by PaperModel().

PaperConfig* te::layout::PaperModel::m_paperConfig
protected

Definition at line 92 of file PaperModel.h.

Properties* te::layout::ItemModelObservable::m_properties
protectedinherited
Properties* te::layout::ItemModelObservable::m_publicProperties
protectedinherited

public properties

Definition at line 321 of file ItemModelObservable.h.

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

bool te::layout::ItemModelObservable::m_resizable
protectedinherited

true if resizable, false otherwise

Definition at line 327 of file ItemModelObservable.h.

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

te::color::RGBAColor te::layout::PaperModel::m_shadowColor
protected

Definition at line 95 of file PaperModel.h.

Referenced by PaperModel().

double te::layout::PaperModel::m_shadowPadding
protected

Definition at line 96 of file PaperModel.h.

Referenced by PaperModel().

SharedProperties* te::layout::ItemModelObservable::m_sharedProps
protectedinherited

Names of common properties among all MVC components.

Definition at line 324 of file ItemModelObservable.h.

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

int te::layout::ItemModelObservable::m_zValue
protectedinherited

The Z value decides the stacking order of drawing.

Definition at line 323 of file ItemModelObservable.h.


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