All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GridMapModel.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file GridMapModel.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "GridMapModel.h"
30 #include "../core/ContextItem.h"
31 #include "../../geometry/Envelope.h"
32 #include "../../geometry/Coord2D.h"
33 #include "../../color/RGBAColor.h"
34 #include "../../maptools/Canvas.h"
35 #include "../../srs/Config.h"
36 #include "../core/enum/Enums.h"
37 #include "MapModel.h"
38 #include "../core/property/Property.h"
39 #include "../core/property/Properties.h"
40 #include "../core/property/SharedProperties.h"
41 #include "../core/property/GridSettingsConfigProperties.h"
42 
44  m_mapName(""),
45  m_settingsConfig(0),
46  m_srid(TE_UNKNOWN_SRS),
47  m_systematic(0),
48  m_mapDisplacementX(0),
49  m_mapDisplacementY(0),
50  m_visible(false),
51  m_lneHrzGap(0),
52  m_lneVrtGap(0),
53  m_initialGridPointX(0),
54  m_initialGridPointY(0),
55  m_gridStyle(0),
56  m_lineStyle(0),
57  m_lineWidth(1),
58  m_pointTextSize(12),
59  m_fontText("Arial"),
60  m_visibleAllTexts(true),
61 
62  m_superscriptText(false),
63  m_lneVrtDisplacement(7),
64  m_lneHrzDisplacement(7),
65  m_bottomText(true),
66  m_leftText(true),
67  m_rightText(true),
68  m_topText(true),
69  m_bottomRotateText(false),
70  m_leftRotateText(false),
71  m_rightRotateText(false),
72  m_topRotateText(false)
73 {
74  init();
75 }
76 
78  m_mapName(""),
79  m_settingsConfig(settingsConfig),
80  m_srid(TE_UNKNOWN_SRS),
81  m_systematic(0),
82  m_mapDisplacementX(0),
83  m_mapDisplacementY(0),
84  m_visible(false),
85  m_lneHrzGap(0),
86  m_lneVrtGap(0),
87  m_initialGridPointX(0),
88  m_initialGridPointY(0),
89  m_gridStyle(0),
90  m_lineStyle(0),
91  m_lineWidth(1),
92  m_pointTextSize(12),
93  m_fontText("Arial"),
94  m_visibleAllTexts(true),
95 
96  m_superscriptText(false),
97  m_lneVrtDisplacement(7),
98  m_lneHrzDisplacement(7),
99  m_bottomText(true),
100  m_leftText(true),
101  m_rightText(true),
102  m_topText(true),
103  m_bottomRotateText(false),
104  m_leftRotateText(false),
105  m_rightRotateText(false),
106  m_topRotateText(false)
107 {
108  init();
109 }
110 
112 {
115 
117 
118  m_borderColor = te::color::RGBAColor(0, 0, 0, 255);
119  m_box = te::gm::Envelope(0., 0., 20., 20.);
120  m_border = false;
121 
122  m_lineColor = te::color::RGBAColor(0, 0, 0, 255);
123  m_textColor = te::color::RGBAColor(0, 0, 0, 255);
124 
125  if(!m_settingsConfig)
126  {
127  m_settingsConfig = new GridSettingsConfigProperties;
128  }
129 }
130 
132 {
133 
134 }
135 
137 {
138  return m_visible;
139 }
140 
142 {
143  m_visible = visible;
144 }
145 
147 {
148  m_mapScale = scale;
149 }
150 
152 {
153  m_worldBox = box;
154 }
155 
157 {
158  m_boxMapMM = box;
159 }
160 
162 {
163  m_boundingBoxItemMM = box;
164 }
165 
167 {
168  m_systematic = sys;
169 }
170 
172 {
173  m_visibleAllTexts = visible;
174 
175  m_bottomText = visible;
176  m_leftText = visible;
177  m_rightText = visible;
178  m_topText = visible;
179 }
180 
182 {
183  std::map<te::gm::Point*, std::string>::iterator it;
184  for(it = m_gridTexts.begin() ; it != m_gridTexts.end() ; ++it)
185  {
186  te::gm::Point* p = it->first;
187  if(p)
188  {
189  delete p;
190  p = 0;
191  }
192  }
193  m_gridTexts.clear();
194 }
195 
196 std::map<te::gm::Point*, std::string> te::layout::GridMapModel::getGridInfo()
197 {
198  return m_gridTexts;
199 }
200 
202 {
203  m_mapDisplacementX = displacement;
204 }
205 
207 {
208  m_mapDisplacementY = displacement;
209 }
210 
212 {
213  MapModel* map = dynamic_cast<MapModel*>(m_visitable);
214 
215  if(map)
216  {
217  //m_worldBox = map->getWorldInMeters();
218  if(map->getLayer())
219  {
220  m_srid = map->getLayer()->getSRID();
221  }
222  m_mapScale = map->getScale();
223  m_boxMapMM = map->getMapBox();
224  m_mapDisplacementX = map->getDisplacementX();
225  m_mapDisplacementY = map->getDisplacementY();
226  m_mapName = map->getName();
227  }
228 }
229 
231 {
233 
235 
236  Property pro_grid_name(m_hashCode);
237  pro_grid_name.setName("GridSettings");
238  pro_grid_name.setMenu(true);
239  pro_grid_name.setPublic(true);
240  pro_grid_name.setValue(m_name, dataType->getDataTypeGridSettings());
241  m_properties->addProperty(pro_grid_name);
242 
243  Property pro_mapName(m_hashCode);
244  pro_mapName.setName(m_sharedProps->getMapName());
245  pro_mapName.setComposeWidget(true);
246  pro_mapName.setValue(m_mapName, dataType->getDataTypeStringList());
247 
248  Variant v;
249  v.setValue(m_mapName, dataType->getDataTypeString());
250  pro_mapName.addOption(v);
251  m_properties->addProperty(pro_mapName);
252 
253  /* Grid */
254 
255  Property pro_visible(m_hashCode);
256  pro_visible.setName(m_settingsConfig->getVisible());
257  pro_visible.setComposeWidget(true);
258  pro_visible.setValue(m_visible, dataType->getDataTypeBool());
259  m_properties->addProperty(pro_visible);
260 
261  Property pro_lneHrzGap(m_hashCode);
262  pro_lneHrzGap.setName(m_settingsConfig->getLneHrzGap());
263  pro_lneHrzGap.setComposeWidget(true);
264  pro_lneHrzGap.setValue(m_lneHrzGap, dataType->getDataTypeDouble());
265  m_properties->addProperty(pro_lneHrzGap);
266 
267  Property pro_lneVrtGap(m_hashCode);
268  pro_lneVrtGap.setName(m_settingsConfig->getLneVrtGap());
269  pro_lneVrtGap.setComposeWidget(true);
270  pro_lneVrtGap.setValue(m_lneVrtGap, dataType->getDataTypeDouble());
271  m_properties->addProperty(pro_lneVrtGap);
272 
273  Property pro_initialGridPointX(m_hashCode);
274  pro_initialGridPointX.setName(m_settingsConfig->getInitialGridPointX());
275  pro_initialGridPointX.setComposeWidget(true);
276  pro_initialGridPointX.setValue(m_initialGridPointX, dataType->getDataTypeDouble());
277  m_properties->addProperty(pro_initialGridPointX);
278 
279  Property pro_initialGridPointY(m_hashCode);
280  pro_initialGridPointY.setName(m_settingsConfig->getInitialGridPointY());
281  pro_initialGridPointY.setComposeWidget(true);
282  pro_initialGridPointY.setValue(m_initialGridPointY, dataType->getDataTypeDouble());
283  m_properties->addProperty(pro_initialGridPointY);
284 
285  /* Just one is visible */
286  Property pro_gridStyle(m_hashCode);
287  pro_gridStyle.setName(m_settingsConfig->getStyle());
288  pro_gridStyle.setComposeWidget(true);
289  pro_gridStyle.setValue(m_gridStyle->getName(), dataType->getDataTypeString());
290  m_properties->addProperty(pro_gridStyle);
291 
292  /* Line */
293  Property pro_lineStyle(m_hashCode);
294  pro_lineStyle.setName(m_settingsConfig->getLineStyle());
295  pro_lineStyle.setComposeWidget(true);
296  pro_lineStyle.setValue(m_lineStyle->getName(), dataType->getDataTypeString());
297  m_properties->addProperty(pro_lineStyle);
298 
299  Property pro_lineColor(m_hashCode);
300  pro_lineColor.setName(m_settingsConfig->getLineColor());
301  pro_lineColor.setComposeWidget(true);
302  pro_lineColor.setValue(m_lineColor, dataType->getDataTypeColor());
303  m_properties->addProperty(pro_lineColor);
304 
305  Property pro_lineWidth(m_hashCode);
306  pro_lineWidth.setName(m_settingsConfig->getLineWidth());
307  pro_lineWidth.setComposeWidget(true);
308  pro_lineWidth.setValue(m_lineWidth, dataType->getDataTypeInt());
309  m_properties->addProperty(pro_lineWidth);
310 
311  /* Text: Basic Configuration */
312  Property pro_pointTextSize(m_hashCode);
313  pro_pointTextSize.setName(m_settingsConfig->getPointTextSize());
314  pro_pointTextSize.setComposeWidget(true);
315  pro_pointTextSize.setValue(m_pointTextSize, dataType->getDataTypeInt());
316  m_properties->addProperty(pro_pointTextSize);
317 
318  Property pro_fontText(m_hashCode);
319  pro_fontText.setName(m_settingsConfig->getFontText());
320  pro_fontText.setComposeWidget(true);
321  pro_fontText.setValue(m_fontText, dataType->getDataTypeString());
322  m_properties->addProperty(pro_fontText);
323 
324  Property pro_textColor(m_hashCode);
325  pro_textColor.setName(m_settingsConfig->getTextColor());
326  pro_textColor.setComposeWidget(true);
327  pro_textColor.setValue(m_textColor, dataType->getDataTypeColor());
328  m_properties->addProperty(pro_textColor);
329 
330  /* Text: Advanced configuration */
331  Property pro_visibleAllTexts(m_hashCode);
332  pro_visibleAllTexts.setName(m_settingsConfig->getVisibleAllTexts());
333  pro_visibleAllTexts.setComposeWidget(true);
334  pro_visibleAllTexts.setValue(m_visibleAllTexts, dataType->getDataTypeBool());
335  m_properties->addProperty(pro_visibleAllTexts);
336 
337  Property pro_superscriptText(m_hashCode);
338  pro_superscriptText.setName(m_settingsConfig->getSuperscriptText());
339  pro_superscriptText.setComposeWidget(true);
340  pro_superscriptText.setValue(m_superscriptText, dataType->getDataTypeBool());
341  m_properties->addProperty(pro_superscriptText);
342 
343  Property pro_lneVrtDisplacement(m_hashCode);
344  pro_lneVrtDisplacement.setName(m_settingsConfig->getLneVrtDisplacement());
345  pro_lneVrtDisplacement.setComposeWidget(true);
346  pro_lneVrtDisplacement.setValue(m_lneVrtDisplacement, dataType->getDataTypeDouble());
347  m_properties->addProperty(pro_lneVrtDisplacement);
348 
349  Property pro_lneHrzDisplacement(m_hashCode);
350  pro_lneHrzDisplacement.setName(m_settingsConfig->getLneHrzDisplacement());
351  pro_lneHrzDisplacement.setComposeWidget(true);
352  pro_lneHrzDisplacement.setValue(m_lneHrzDisplacement, dataType->getDataTypeDouble());
353  m_properties->addProperty(pro_lneHrzDisplacement);
354 
355  Property pro_bottomText(m_hashCode);
356  pro_bottomText.setName(m_settingsConfig->getBottomText());
357  pro_bottomText.setComposeWidget(true);
358  pro_bottomText.setValue(m_bottomText, dataType->getDataTypeBool());
359  m_properties->addProperty(pro_bottomText);
360 
361  Property pro_leftText(m_hashCode);
362  pro_leftText.setName(m_settingsConfig->getLeftText());
363  pro_leftText.setComposeWidget(true);
364  pro_leftText.setValue(m_leftText, dataType->getDataTypeBool());
365  m_properties->addProperty(pro_leftText);
366 
367  Property pro_rightText(m_hashCode);
368  pro_rightText.setName(m_settingsConfig->getRightText());
369  pro_rightText.setComposeWidget(true);
370  pro_rightText.setValue(m_rightText, dataType->getDataTypeBool());
371  m_properties->addProperty(pro_rightText);
372 
373  Property pro_topText(m_hashCode);
374  pro_topText.setName(m_settingsConfig->getTopText());
375  pro_topText.setComposeWidget(true);
376  pro_topText.setValue(m_topText, dataType->getDataTypeBool());
377  m_properties->addProperty(pro_topText);
378 
379  Property pro_bottomRotateText(m_hashCode);
380  pro_bottomRotateText.setName(m_settingsConfig->getBottomRotateText());
381  pro_bottomRotateText.setComposeWidget(true);
382  pro_bottomRotateText.setValue(m_bottomRotateText, dataType->getDataTypeBool());
383  m_properties->addProperty(pro_bottomRotateText);
384 
385  Property pro_leftRotateText(m_hashCode);
386  pro_leftRotateText.setName(m_settingsConfig->getLeftRotateText());
387  pro_leftRotateText.setComposeWidget(true);
388  pro_leftRotateText.setValue(m_leftRotateText, dataType->getDataTypeBool());
389  m_properties->addProperty(pro_leftRotateText);
390 
391  Property pro_rightRotateText(m_hashCode);
392  pro_rightRotateText.setName(m_settingsConfig->getRightRotateText());
393  pro_rightRotateText.setComposeWidget(true);
394  pro_rightRotateText.setValue(m_rightRotateText, dataType->getDataTypeBool());
395  m_properties->addProperty(pro_rightRotateText);
396 
397  Property pro_topRotateText(m_hashCode);
398  pro_topRotateText.setName(m_settingsConfig->getTopRotateText());
399  pro_topRotateText.setComposeWidget(true);
400  pro_topRotateText.setValue(m_topRotateText, dataType->getDataTypeBool());
401  m_properties->addProperty(pro_topRotateText);
402 
403  return m_properties;
404 }
405 
407 {
409 
410  Properties* vectorProps = const_cast<Properties*>(properties);
411 
412  if(!vectorProps)
413  {
414  return;
415  }
416 
417  Property pro_mapName = vectorProps->contains(m_sharedProps->getMapName());
418 
419  if(!pro_mapName.isNull())
420  {
421  m_mapName = pro_mapName.getOptionByCurrentChoice().toString();
422  }
423 
424  Property pro_visible = vectorProps->contains(m_settingsConfig->getVisible());
425 
426  if(!pro_visible.isNull())
427  {
428  m_visible = pro_visible.getValue().toBool();
429  }
430 
431  Property pro_lneHrzGap = vectorProps->contains(m_settingsConfig->getLneHrzGap());
432  if(!pro_lneHrzGap.isNull())
433  {
434  m_lneHrzGap = pro_lneHrzGap.getValue().toDouble();
435  }
436 
437  Property pro_lneVrtGap = vectorProps->contains(m_settingsConfig->getLneVrtGap());
438  if(!pro_lneVrtGap.isNull())
439  {
440  m_lneVrtGap = pro_lneVrtGap.getValue().toDouble();
441  }
442 
443  Property pro_initialGridPointX = vectorProps->contains(m_settingsConfig->getInitialGridPointX());
444  if(!pro_initialGridPointX.isNull())
445  {
446  m_initialGridPointX = pro_initialGridPointX.getValue().toDouble();
447  }
448 
449  Property pro_initialGridPointY = vectorProps->contains(m_settingsConfig->getInitialGridPointY());
450  if(!pro_initialGridPointY.isNull())
451  {
452  m_initialGridPointY = pro_initialGridPointY.getValue().toDouble();
453  }
454 
455  Property pro_gridStyle = vectorProps->contains(m_settingsConfig->getStyle());
456  if(!pro_gridStyle.isNull())
457  {
458  std::string style = pro_gridStyle.getValue().toString();
459  EnumType* styleType = Enums::getInstance().getEnumGridStyleType()->getEnum(style);
460  m_gridStyle = styleType;
461  }
462 
463  Property pro_lineStyle = vectorProps->contains(m_settingsConfig->getLineStyle());
464  if(!pro_lineStyle.isNull())
465  {
466  std::string style = pro_lineStyle.getValue().toString();
467  EnumType* lineStyle = Enums::getInstance().getEnumLineStyleType()->getEnum(style);
468  m_lineStyle = lineStyle;
469  }
470 
471  Property pro_lineColor = vectorProps->contains(m_settingsConfig->getLineColor());
472  if(!pro_lineColor.isNull())
473  {
474  m_lineColor = pro_lineColor.getValue().toColor();
475  }
476 
477  Property pro_lineWidth = vectorProps->contains(m_settingsConfig->getLineWidth());
478  if(!pro_lineWidth.isNull())
479  {
480  m_lineWidth = pro_lineWidth.getValue().toInt();
481  }
482 
483  Property pro_pointTextSize = vectorProps->contains(m_settingsConfig->getPointTextSize());
484  if(!pro_pointTextSize.isNull())
485  {
486  m_pointTextSize = pro_pointTextSize.getValue().toInt();
487  }
488 
489  Property pro_fontText = vectorProps->contains(m_settingsConfig->getFontText());
490  if(!pro_fontText.isNull())
491  {
492  m_fontText= pro_fontText.getValue().toString();
493  }
494 
495  Property pro_textColor = vectorProps->contains(m_settingsConfig->getTextColor());
496  if(!pro_textColor.isNull())
497  {
498  m_textColor = pro_textColor.getValue().toColor();
499  }
500 
501  Property pro_visibleAllTexts = vectorProps->contains(m_settingsConfig->getVisibleAllTexts());
502  if(!pro_visibleAllTexts.isNull())
503  {
504  m_visibleAllTexts = pro_visibleAllTexts.getValue().toBool();
505  }
506 
507  Property pro_superscriptText = vectorProps->contains(m_settingsConfig->getSuperscriptText());
508  if(!pro_superscriptText.isNull())
509  {
510  m_superscriptText = pro_superscriptText.getValue().toBool();
511  }
512 
513  Property pro_lneVrtDisplacement = vectorProps->contains(m_settingsConfig->getLneVrtDisplacement());
514  if(!pro_lneVrtDisplacement.isNull())
515  {
516  m_lneVrtDisplacement = pro_lneVrtDisplacement.getValue().toInt();
517  }
518 
519  Property pro_lneHrzDisplacement = vectorProps->contains(m_settingsConfig->getLneHrzDisplacement());
520  if(!pro_lneHrzDisplacement.isNull())
521  {
522  m_lneHrzDisplacement = pro_lneHrzDisplacement.getValue().toInt();
523  }
524 
525  Property pro_bottomText = vectorProps->contains(m_settingsConfig->getBottomText());
526  if(!pro_bottomText.isNull())
527  {
528  m_bottomText = pro_bottomText.getValue().toBool();
529  }
530 
531  Property pro_leftText = vectorProps->contains(m_settingsConfig->getLeftText());
532  if(!pro_leftText.isNull())
533  {
534  m_leftText = pro_leftText.getValue().toBool();
535  }
536 
537  Property pro_rightText = vectorProps->contains(m_settingsConfig->getRightText());
538  if(!pro_rightText.isNull())
539  {
540  m_rightText = pro_rightText.getValue().toBool();
541  }
542 
543  Property pro_topText = vectorProps->contains(m_settingsConfig->getTopText());
544  if(!pro_topText.isNull())
545  {
546  m_topText = pro_topText.getValue().toBool();
547  }
548 
549  Property pro_bottomRotateText = vectorProps->contains(m_settingsConfig->getBottomRotateText());
550  if(!pro_bottomRotateText.isNull())
551  {
552  m_bottomRotateText = pro_bottomRotateText.getValue().toBool();
553  }
554 
555  Property pro_leftRotateText = vectorProps->contains(m_settingsConfig->getLeftRotateText());
556  if(!pro_leftRotateText.isNull())
557  {
558  m_leftRotateText = pro_leftRotateText.getValue().toBool();
559  }
560 
561  Property pro_rightRotateText = vectorProps->contains(m_settingsConfig->getRightRotateText());
562  if(!pro_rightRotateText.isNull())
563  {
564  m_rightRotateText = pro_rightRotateText.getValue().toBool();
565  }
566 
567  Property pro_topRotateText = vectorProps->contains(m_settingsConfig->getTopRotateText());
568  if(!pro_topRotateText.isNull())
569  {
570  m_topRotateText = pro_topRotateText.getValue().toBool();
571  }
572 }
573 
575 {
576  //Do nothing
577 }
578 
579 void te::layout::GridMapModel::setMapName( std::string name )
580 {
581  m_mapName = name;
582 }
583 
585 {
586  return m_mapDisplacementX;
587 }
588 
590 {
591  return m_mapDisplacementY;
592 }
593 
595 {
596  return m_mapName;
597 }
598 
600 {
601  return m_mapScale;
602 }
603 
605 {
606  return m_srid;
607 }
608 
610 {
611  return m_boxMapMM;
612 }
613 
615 {
616  return m_worldBox;
617 }
618 
620 {
621  return m_lneHrzGap;
622 }
623 
625 {
626  return m_lneVrtGap;
627 }
628 
630 {
631  return m_initialGridPointX;
632 }
633 
635 {
636  return m_initialGridPointY;
637 }
638 
640 {
641  return m_gridStyle;
642 }
643 
645 {
646  return m_lineStyle;
647 }
648 
650 {
651  return m_lineColor;
652 }
653 
655 {
656  return m_lineWidth;
657 }
658 
660 {
661  return m_pointTextSize;
662 }
663 
665 {
666  return m_fontText;
667 }
668 
670 {
671  return m_textColor;
672 }
673 
675 {
676  return m_visibleAllTexts;
677 }
678 
680 {
681  return m_superscriptText;
682 }
683 
685 {
686  return m_lneVrtDisplacement;
687 }
688 
690 {
691  return m_lneHrzDisplacement;
692 }
693 
695 {
696  return m_bottomText;
697 }
698 
700 {
701  return m_leftText;
702 }
703 
705 {
706  return m_rightText;
707 }
708 
710 {
711  return m_topText;
712 }
713 
715 {
716  return m_bottomRotateText;
717 }
718 
720 {
721  return m_leftRotateText;
722 }
723 
725 {
726  return m_rightRotateText;
727 }
728 
730 {
731  return m_topRotateText;
732 }
733 
734 
735 
736 
virtual void setSystematic(Systematic *sys)
Class responsible for maintaining the drawing context of a MVC component. It is always used by the "M...
Definition: ContextItem.h:49
virtual bool isBottomText()
virtual double getMapDisplacementX()
virtual void setMapDisplacementX(double displacement)
virtual double getDisplacementX()
Definition: MapModel.cpp:409
virtual double getScale()
Definition: MapModel.cpp:231
virtual te::color::RGBAColor getLineColor()
virtual int getTextPointSize()
Variant getValue()
Returns stored value.
Definition: Property.cpp:72
virtual EnumDataType * getEnumDataType()
Returns data type enumeration.
Definition: Enums.cpp:52
void addOption(Variant variant)
Definition: Property.cpp:77
void setPublic(bool publicProperty)
Sets true if property is public, false otherwise If the component, father of this property...
Definition: Property.cpp:298
virtual EnumType * getDataTypeBool() const
Returns value that represents type bool belonging to enumeration.
virtual void setVisibleAllTexts(bool visible)
virtual EnumType * getDataTypeDouble() const
Returns value that represents type double belonging to enumeration.
bool isNull()
Returns true if no value has been set, false otherwise.
Definition: Property.cpp:146
virtual EnumType * getDataTypeInt() const
Returns value that represents type integer belonging to enumeration.
virtual void updateProperties(te::layout::Properties *properties)
Reimplemented from Observable.
virtual Properties * getProperties() const
Reimplemented from Observable.
Variant getOptionByCurrentChoice()
Definition: Property.cpp:104
virtual double getLneHrzDisplacement()
Class that represents a "Model" part of GridMap MVC component. Its coordinate system is the same of s...
The Properties class represents a persistent set of properties. The Properties can be saved to a file...
Definition: Properties.h:52
virtual double getInitialGridPointX()
virtual std::map< te::gm::Point *, std::string > getGridInfo()
virtual EnumType * getStyleNone() const
Returns value that represents none style type belonging to enumeration.
virtual EnumObjectType * getEnumObjectType()
Returns graphic object (MVC component) and widget object (MVC widget) type enumeration.
Definition: Enums.cpp:62
virtual void updateProperties(te::layout::Properties *properties)
Reimplemented from Observable.
virtual bool isSuperscriptText()
virtual void setMapScale(double scale)
virtual void setBoundingBoxItemMM(te::gm::Envelope box)
virtual double getMapDisplacementY()
virtual EnumGridStyleType * getEnumGridStyleType()
Returns grid style type enumeration.
Definition: Enums.cpp:72
virtual void gridTextFreeMemory()
static Enums & getInstance()
It returns a reference to the singleton instance.
A point with x and y coordinate values.
Definition: Point.h:50
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
Definition: Config.h:44
virtual EnumType * getDataTypeGridSettings() const
Returns value that represents type GridSettings (string) belonging to enumeration.
GridMapModel()
Constructor.
Class to represent a data type enumeration. Ex.: int, double, bool, te::color::RGBAColor (color)...
Definition: EnumDataType.h:48
virtual te::map::AbstractLayerPtr getLayer()
Definition: MapModel.cpp:226
Class that represents a "Model" part of Map MVC component. Its coordinate system is the same of scene...
virtual void visitDependent(ContextItem context)
visit and if necessary redraw
virtual std::string getMapName()
virtual void setBoxMapMM(te::gm::Envelope box)
Class acts like a union for some C++/TerraLib5 data types. Responsible for storing the value...
Definition: Variant.h:80
virtual double getLneVrtGap()
virtual void setWorldBox(te::gm::Envelope box)
virtual EnumType * getEnum(int enumId) const
Searching for a value of the enumeration by id.
virtual EnumType * getDataTypeColor() const
Returns value that represents type te::color::RGBAColor** (color) belonging to enumeration.
virtual te::gm::Envelope getWorldBox()
virtual double getMapScale()
virtual double getInitialGridPointY()
double toDouble()
Returns the value of double type. (The setValue method received a double)
Definition: Variant.cpp:316
virtual double getLneVrtDisplacement()
Class that represents a "Model" part of Map MVC component. Its coordinate system is the same of scene...
Definition: MapModel.h:61
void setComposeWidget(bool compose)
Sets true if property compose a widget, false otherwise If true, and the object that owns this proper...
Definition: Property.cpp:288
virtual te::gm::Envelope getMapBox()
Definition: MapModel.cpp:394
virtual Properties * getProperties() const
Reimplemented from Observable.
void setValue(ValueType value, EnumType *type)
Stores a copy of value.
Definition: Property.h:298
virtual std::string getName()
Reimplemented from Observable.
virtual bool isTopRotateText()
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Definition: EnumType.h:48
virtual double getDisplacementY()
Definition: MapModel.cpp:414
virtual EnumType * getDataTypeStringList() const
Returns value that represents type StringList (string) belonging to enumeration.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
virtual std::string getFontFamily()
virtual void calculateGaps(te::gm::Envelope box)
virtual EnumType * getStyleNone() const
Returns value that represents none style type belonging to enumeration.
std::string toString()
Returns the value of string type. (The setValue method received a string)
Definition: Variant.cpp:311
virtual EnumType * getGridMapItem() const
Returns value that represents gridmapitem (MVC Component) type belonging to enumeration.
virtual EnumType * getGridStyle()
void setName(std::string name)
Sets the name of this property.
Definition: Property.cpp:62
virtual bool isBottomRotateText()
virtual bool isRightText()
virtual EnumType * getLineStyle()
virtual void setMenu(bool menu)
Sets true if property will be used in a menu, false otherwise.
Definition: Property.cpp:228
virtual void setMapDisplacementY(double displacement)
te::color::RGBAColor toColor()
Returns the value of te::color::RGBAColor type. (The setValue method received a te::color::RGBAColor)...
Definition: Variant.cpp:341
virtual te::color::RGBAColor getTextColor()
virtual te::gm::Envelope getBoxMapMM()
virtual void setMapName(std::string name)
virtual EnumLineStyleType * getEnumLineStyleType()
Returns line style type enumeration.
Definition: Enums.cpp:82
virtual EnumType * getDataTypeString() const
Returns value that represents type string belonging to enumeration.
virtual bool isLeftRotateText()
virtual ~GridMapModel()
Destructor.
virtual bool contains(Property property)
Checks if the property is contained within the set of properties.
Definition: Properties.h:251
virtual bool isRightRotateText()
A property acts like a attribute member of a object and stores the state of this attribute. A set of properties stores the state of an object. Any data type, not included in the convertValue method in the class te::layout::Variant, it will be by default "std::string" value.
Definition: Property.h:47
int toInt()
Returns the value of int type. (The setValue method received a int)
Definition: Variant.cpp:321
virtual void setVisible(bool visible)
virtual bool isVisibleAllTexts()
bool toBool()
Returns the value of boolean type. (The setValue method received a boolean)
Definition: Variant.cpp:336
virtual double getLneHrzGap()
void setValue(ValueType value, EnumType *type)
Stores a copy of value.
Definition: Variant.h:288