All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ItemModelObservable.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 ItemModelObservable.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "ItemModelObservable.h"
30 #include "Observer.h"
31 #include "../../property/Property.h"
32 #include "../../../../geometry/Envelope.h"
33 #include "../../../../geometry/Coord2D.h"
34 #include "../../property/Properties.h"
35 #include "../../property/SharedProperties.h"
36 #include "../singleton/Context.h"
37 #include "../../enum/Enums.h"
38 #include "ItemObserver.h"
39 
40 // STL
41 #include <ctime>
42 #include <iostream>
43 
45  m_id(0),
46  m_publicProperties(0),
47  m_type(0),
48  m_zValue(0),
49  m_sharedProps(0),
50  m_border(true),
51  m_name("unknown"),
52  m_resizable(true),
53  m_angle(0),
54  m_hashCode(0),
55  m_oldAngle(0),
56  m_enableChildren(false)
57 {
58  EnumObjectType* type = Enums::getInstance().getEnumObjectType();
59  m_type = type->getObjectUnknown();
60 
61  m_box = te::gm::Envelope(0,0,0,0);
62 
63  m_oldPos.x = 0.;
64  m_oldPos.y = 0.;
65 
66  m_backgroundColor = te::color::RGBAColor(255, 255, 255, 0);
67 
68  m_borderColor = te::color::RGBAColor(0, 0, 0, 255);
69 
71 
73 
76 
78 }
79 
81 {
82  if(m_properties)
83  {
84  delete m_properties;
85  m_properties = 0;
86  }
87 
88  m_children.clear();
89 
90  if(m_publicProperties)
91  {
92  delete m_publicProperties;
93  m_publicProperties = 0;
94  }
95 
96  if(m_sharedProps)
97  {
98  delete m_sharedProps;
99  m_sharedProps = 0;
100  }
101 }
102 
104 {
105  std::pair<std::set<Observer*>::iterator,bool> p = m_observers.insert(o);
106 
107  if(p.second == true)
108  return true;
109 
110  return false;
111 }
112 
114 {
115  int num = m_observers.erase(o);
116 
117  if(num == 1)
118  return true;
119 
120  return false;
121 }
122 
124 {
125  std::set<Observer*>::iterator it;
126  for(it = m_observers.begin(); it != m_observers.end(); ++it)
127  {
128  (*it)->updateObserver(context);
129  }
130 }
131 
133 {
134  if(!m_properties)
135  {
136  return 0;
137  }
138 
139  m_properties->clear();
140 
142 
143  Property pro_name(m_hashCode);
144  pro_name.setName(m_sharedProps->getName());
145  pro_name.setEditable(false);
146  pro_name.setValue(m_name, dataType->getDataTypeString());
147  m_properties->addProperty(pro_name);
148 
149  Property pro_id(m_hashCode);
150  pro_id.setName(m_sharedProps->getId());
151  pro_id.setValue(m_id, dataType->getDataTypeInt());
152  m_properties->addProperty(pro_id);
153 
154  Property pro_angle(m_hashCode);
155  pro_angle.setName(m_sharedProps->getAngle());
156  pro_angle.setValue(m_angle, dataType->getDataTypeDouble());
157  m_properties->addProperty(pro_angle);
158 
159  Property pro_backgroundcolor(m_hashCode);
160  pro_backgroundcolor.setName(m_sharedProps->getBackgroundcolor());
161  pro_backgroundcolor.setValue(m_backgroundColor, dataType->getDataTypeColor());
162  pro_backgroundcolor.setMenu(true);
163  m_properties->addProperty(pro_backgroundcolor);
164 
165  Property pro_bordercolor(m_hashCode);
166  pro_bordercolor.setName(m_sharedProps->getBordercolor());
167  pro_bordercolor.setValue(m_borderColor, dataType->getDataTypeColor());
168  pro_bordercolor.setMenu(true);
169  m_properties->addProperty(pro_bordercolor);
170 
171  /* Box */
172 
173  double x1 = m_box.getLowerLeftX();
174  double y1 = m_box.getLowerLeftY();
175  double width = m_box.getWidth();
176  double height = m_box.getHeight();
177 
178  Property pro_x1(m_hashCode);
179  pro_x1.setName(m_sharedProps->getX1());
180  pro_x1.setValue(x1, dataType->getDataTypeDouble());
181  pro_x1.setEditable(false);
182  m_properties->addProperty(pro_x1);
183 
184  Property pro_y1(m_hashCode);
185  pro_y1.setName(m_sharedProps->getY1());
186  pro_y1.setValue(y1, dataType->getDataTypeDouble());
187  pro_y1.setEditable(false);
188  m_properties->addProperty(pro_y1);
189 
190  Property pro_width(m_hashCode);
191  pro_width.setName(m_sharedProps->getWidth());
192  pro_width.setValue(width, dataType->getDataTypeDouble());
193  pro_width.setEditable(false);
194  m_properties->addProperty(pro_width);
195 
196  Property pro_height(m_hashCode);
197  pro_height.setName(m_sharedProps->getHeight());
198  pro_height.setValue(height, dataType->getDataTypeDouble());
199  pro_height.setEditable(false);
200  m_properties->addProperty(pro_height);
201 
202  /* ---------- */
203 
204  Property pro_zValue(m_hashCode);
205  pro_zValue.setName(m_sharedProps->getZValue());
206  pro_zValue.setValue(m_zValue, dataType->getDataTypeInt());
207  pro_zValue.setEditable(false);
208  m_properties->addProperty(pro_zValue);
209 
210  Property pro_border(m_hashCode);
211  pro_border.setName(m_sharedProps->getBorder());
212  pro_border.setValue(m_border, dataType->getDataTypeBool());
213  m_properties->addProperty(pro_border);
214 
215  m_properties->setTypeObj(m_type);
216  return m_properties;
217 }
218 
220 {
221  return m_box;
222 }
223 
225 {
226  m_box = box;
227 }
228 
230 {
231  return m_backgroundColor;
232 }
233 
235 {
236  m_backgroundColor = color;
237 }
238 
240 {
241  m_borderColor = color;
242 }
243 
245 {
246  return m_borderColor;
247 }
248 
250 {
251  m_name = name;
252 
253  if(m_properties)
254  m_properties->setObjectName(m_name);
255 
256  if(m_publicProperties)
257  m_publicProperties->setObjectName(m_name);
258 }
259 
261 {
262  return m_name;
263 }
264 
265 void te::layout::ItemModelObservable::setPosition( const double& x, const double& y )
266 {
267  m_oldPos.x = m_box.m_llx;
268  m_oldPos.y = m_box.m_lly;
269 
270  //Initial point to draw is : x1, y1, that corresponds 0,0 of local coordinate of a item
271  double x1 = x;
272  double x2 = x + m_box.getWidth();
273 
274  double y1 = y;
275  double y2 = y + m_box.getHeight();
276 
277  m_box = te::gm::Envelope(x1, y1, x2, y2);
278 }
279 
281 {
282  te::gm::Envelope env(coord.x, coord.y, coord.x, coord.y);
283 
284  if(env.isValid())
285  return m_box.contains(env);
286 
287  return false;
288 }
289 
291 {
292  Properties* vectorProps = const_cast<Properties*>(properties);
293 
294  if(!vectorProps)
295  {
296  return;
297  }
298 
299  Property pro_name = vectorProps->contains(m_sharedProps->getName());
300  if(!pro_name.isNull())
301  {
302  m_name = pro_name.getValue().toString();
303  }
304 
305  Property pro_id = vectorProps->contains(m_sharedProps->getId());
306  if(!pro_id.isNull())
307  {
308  m_id = pro_id.getValue().toInt();
309  }
310 
311  Property pro_angle = vectorProps->contains(m_sharedProps->getAngle());
312  if(!pro_angle.isNull())
313  {
314  m_oldAngle = m_angle;
315  m_angle = pro_angle.getValue().toDouble();
316  }
317 
318  Property pro_backgroundcolor = vectorProps->contains(m_sharedProps->getBackgroundcolor());
319  if(!pro_backgroundcolor.isNull())
320  {
321  m_backgroundColor = pro_backgroundcolor.getValue().toColor();
322  }
323 
324  Property pro_bordercolor = vectorProps->contains(m_sharedProps->getBordercolor());
325  if(!pro_bordercolor.isNull())
326  {
327  m_borderColor = pro_bordercolor.getValue().toColor();
328  }
329 
330  /* Box */
331 
332  Property pro_x1 = vectorProps->contains(m_sharedProps->getX1());
333  if(!pro_x1.isNull())
334  {
335  m_oldPos.x = m_box.m_llx;
336  m_box.m_llx = pro_x1.getValue().toDouble();
337  }
338 
339  Property pro_y1 = vectorProps->contains(m_sharedProps->getY1());
340  if(!pro_y1.isNull())
341  {
342  m_oldPos.y = m_box.m_lly;
343  m_box.m_lly = pro_y1.getValue().toDouble();
344  }
345 
346  Property pro_width = vectorProps->contains(m_sharedProps->getWidth());
347  if(!pro_width.isNull())
348  {
349  m_box.m_urx = m_box.m_llx + pro_width.getValue().toDouble();
350  }
351 
352  Property pro_height = vectorProps->contains(m_sharedProps->getHeight());
353  if(!pro_height.isNull())
354  {
355  m_box.m_ury = m_box.m_lly + pro_height.getValue().toDouble();
356  }
357 
358  Property pro_zValue = vectorProps->contains(m_sharedProps->getZValue());
359  if(!pro_zValue.isNull())
360  {
361  m_zValue = pro_zValue.getValue().toInt();
362  }
363 
364  Property pro_border = vectorProps->contains(m_sharedProps->getBorder());
365  if(!pro_border.isNull())
366  {
367  m_border = pro_border.getValue().toBool();
368  }
369 }
370 
372 {
373  return m_type;
374 }
375 
377 {
378  m_type = type;
379 }
380 
382 {
383  return m_zValue;
384 }
385 
387 {
388  m_zValue = zValue;
389 }
390 
392 {
393  return m_border;
394 }
395 
397 {
398  m_border = value;
399 }
400 
402 {
403  return m_id;
404 }
405 
407 {
408  m_id = id;
409 }
410 
411 void te::layout::ItemModelObservable::resize( double w, double h )
412 {
413  if((w <= 0) || (h <= 0))
414  return;
415 
416  if(w == m_box.getWidth() && h == m_box.getHeight())
417  return;
418 
419  m_box.m_urx = m_box.m_llx + w;
420  m_box.m_ury = m_box.m_lly + h;
421 }
422 
424 {
425  m_resizable = resize;
426 }
427 
429 {
430  return m_resizable;
431 }
432 
434 {
435  te::map::Canvas* canvas = context.getCanvas();
436  Utils* utils = context.getUtils();
437 
438  if((!canvas) || (!utils))
439  return;
440 
441  if(m_border)
442  {
443  canvas->setPolygonContourWidth(1);
444  canvas->setPolygonContourColor(m_borderColor);
445  }
446  else
447  {
448  canvas->setPolygonContourColor(te::color::RGBAColor(255,255,255, 0));
449  }
450  canvas->setPolygonFillColor(m_backgroundColor);
451 
452  te::gm::Envelope box(m_box);
453  box.m_llx += 0.4;
454  box.m_lly += 0.4;
455  box.m_urx -= 0.2;
456 
457  utils->drawRectW(box);
458 }
459 
461 {
462  m_oldAngle = m_angle;
463  m_angle = angle;
464 }
465 
467 {
468  return m_angle;
469 }
470 
472 {
473  return m_hashCode;
474 }
475 
477 {
478  int nameLength = m_name.length();
479  int id = m_id;
480  int type = 0;
481  if(m_type)
482  {
483  type = m_type->getId();
484  }
485 
486  int propertiesLength = 0;
487 
488  if(m_properties)
489  {
490  Properties* props = getProperties();
491 
492  if(props)
493  {
494  propertiesLength = getProperties()->getProperties().size();
495  }
496  }
497 
498  int hashcode = (nameLength + id + type + propertiesLength) * 5;
499 
500  // current date/time based on current system
501  std::time_t now = std::time(0);
502 
503  std::tm *ltm = localtime(&now);
504 
505  if(!ltm)
506  return hashcode;
507 
508  // print various components of tm structure.
509  int year = 1900 + ltm->tm_year;
510  int month = 1 + ltm->tm_mon;
511  int day = ltm->tm_mday;
512  int hour = 1 + ltm->tm_hour;
513  int numberSecond = 1 + ltm->tm_min;
514  int numberMilliseconds = 1 + ltm->tm_sec;
515 
516  hashcode *= year + month + day;
517  hashcode *= hour + numberSecond + numberMilliseconds;
518 
519  return hashcode;
520 }
521 
523 {
524  return m_oldAngle;
525 }
526 
528 {
529  return m_oldPos;
530 }
531 
533 {
534 
535 }
536 
538 {
539  return m_enableChildren;
540 }
541 
543 {
544  m_enableChildren = value;
545 }
546 
547 std::set<te::layout::ItemObserver*> te::layout::ItemModelObservable::getChildren() const
548 {
549  return m_children;
550 }
551 
553 {
554  bool result = false;
555  if(!item)
556  {
557  return result;
558  }
559 
560  if(!m_enableChildren)
561  {
562  return result;
563  }
564 
565  if(item->getModel()->getHashCode() == m_hashCode)
566  {
567  return result;
568  }
569 
570  std::pair<std::set<ItemObserver*>::iterator,bool> p = m_children.insert(item);
571 
572  if(p.second == true)
573  {
574  result = true;
575  }
576 
577  return result;
578 }
579 
581 {
582  bool result = false;
583  std::set<ItemObserver*>::iterator it = m_children.begin();
584 
585  for( ; it != m_children.end(); it++)
586  {
587  if((*it)->getModel()->getHashCode() == hashCode)
588  {
589  int num = m_children.erase(*it);
590 
591  if(num == 1)
592  {
593  result = true;
594  break;
595  }
596  }
597  }
598  return result;
599 }
600 
602 {
603  if(!m_properties || m_publicProperties)
604  {
605  return 0;
606  }
607 
608  m_publicProperties->clear();
609 
610  std::vector<Property>::iterator it = m_properties->getProperties().begin();
611 
612  for( ; it != m_properties->getProperties().end() ; ++it )
613  {
614  if((*it).isPublic())
615  {
616  m_publicProperties->addProperty(*it);
617  }
618  }
619 
620  m_publicProperties->setTypeObj(m_type);
621 
622  return m_publicProperties;
623 }
624 
626 {
627  std::set<ItemObserver*>::iterator it = m_children.begin();
628 
629  for( ; it != m_children.end(); it++)
630  {
631  Properties* props = (*it)->getModel()->getPublicProperties();
632 
633  std::vector<Property>::iterator itProp = props->getProperties().begin();
634  for( ; itProp != props->getProperties().end(); itProp++)
635  {
636  properties->addProperty(*itProp);
637  }
638  }
639 }
640 
642 {
643  int hashCode = prop.getParentItemHashCode();
644 
645  std::set<ItemObserver*>::iterator it = m_children.begin();
646 
647  for( ; it != m_children.end(); it++)
648  {
649  if((*it)->getModel()->getHashCode() == hashCode)
650  {
651 
652  }
653  }
654 }
655 
656 
657 
658 
659 
660 
661 
662 
virtual void setPosition(const double &x, const double &y)
Change coordinate llx,lly of the MVC component.
virtual void setAngle(double angle)
Change the value of rotation of the MVC component.
Class responsible for maintaining the drawing context of a MVC component. It is always used by the "M...
Definition: ContextItem.h:49
Class to represent a graphic object (MVC component) and widget object (MVC widget) type enumeration...
virtual ~ItemModelObservable()
Destructor.
virtual bool addProperty(Property property)
Adds the specified property to the set of properties for this object.
Definition: Properties.h:193
Variant getValue()
Returns stored value.
Definition: Property.cpp:72
double y
y-coordinate.
Definition: Coord2D.h:114
virtual EnumDataType * getEnumDataType()
Returns data type enumeration.
Definition: Enums.cpp:52
virtual int getZValue()
Reimplemented from Observable.
virtual EnumType * getDataTypeBool() const
Returns value that represents type bool belonging to enumeration.
Abstract class to represent an observer. "View" part of MVC component. All classes representing the g...
virtual void setResizable(bool resize)
Reimplemented from Observable.
double x
x-coordinate.
Definition: Coord2D.h:113
virtual void setType(EnumType *type)
Reimplemented from Observable.
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 void setPolygonFillColor(const te::color::RGBAColor &color)=0
It sets the color used to fill the draw of polygon geometries.
virtual void drawRectW(te::gm::Envelope box)
Draw a rectangle in world coordinates (mm).
Definition: Utils.cpp:58
int getParentItemHashCode()
Returns the hashcode of the object that owns this property.
Definition: Property.cpp:278
virtual EnumType * getDataTypeInt() const
Returns value that represents type integer belonging to enumeration.
Properties * m_publicProperties
public properties
virtual void setHashCode(int hashCode)
Sets the hashcode of a MVC component.
Definition: Properties.h:295
virtual bool isResizable()
Reimplemented from Observable.
Abstract class to represent an observer. "View" part of MVC component.
double m_urx
Upper right corner x-coordinate.
Definition: Envelope.h:346
virtual te::gm::Coord2D getOldPos()
Returns the value of old position.
The Properties class represents a persistent set of properties. The Properties can be saved to a file...
Definition: Properties.h:52
Abstract class to represent an observer. "View" part of MVC component. All classes representing the g...
Definition: ItemObserver.h:52
virtual std::vector< Property > getProperties()
Returns set of all properties.
Definition: Properties.h:220
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
EnumType * m_type
type of the MVC component
virtual EnumType * getObjectUnknown() const
Returns value that represents unknown type belonging to enumeration.
virtual void updateProperties(te::layout::Properties *properties)
Reimplemented from Observable.
virtual void setBorder(bool value)
Change whether the border should be drawn or not.
virtual te::layout::Properties * getPublicProperties() const
Reimplemented from Observable.
virtual double getAngle()
Returns the value of rotation.
Abstract class to represent an observer. "View" part of MVC component.
Definition: Observer.h:48
virtual int getHashCode()
Reimplemented from Observable.
virtual te::color::RGBAColor getBorderColor()
Returns the border color of the MVC component.
virtual void notifyAll(ContextItem context)
Reimplemented from Observable.
virtual void updateChildrenProperties(Property prop)
double m_llx
Lower left corner x-coordinate.
Definition: Envelope.h:344
virtual bool isEnableChildren()
Returns true if MVC component can have children, false otherwise.
static Enums & getInstance()
It returns a reference to the singleton instance.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
virtual Utils * getUtils()
virtual int getId()
Reimplemented from Observable.
virtual void setZValue(int zValue)
Reimplemented from Observable.
Class to represent a data type enumeration. Ex.: int, double, bool, te::color::RGBAColor (color)...
Definition: EnumDataType.h:48
te::gm::Envelope m_box
bounding rectangle
virtual EnumType * getType()
Reimplemented from Observable.
virtual int calculateHashCode()
Returns a new hashcode.
virtual void setBackgroundColor(te::color::RGBAColor color)
Change the background color of the MVC component.
std::string m_name
name of the MVC component
virtual int getHashCode()=0
Returns the hashcode of a MVC component. Reimplement this function in a Observable subclass to provid...
virtual EnumType * getDataTypeColor() const
Returns value that represents type te::color::RGBAColor** (color) belonging to enumeration.
te::color::RGBAColor m_backgroundColor
background color
virtual te::map::Canvas * getCanvas()
Return canvas.
virtual void setName(std::string name)
Change the name of the MVC component.
double toDouble()
Returns the value of double type. (The setValue method received a double)
Definition: Variant.cpp:316
virtual te::color::RGBAColor getBackgroundColor()
Returns the background color of the MVC component.
virtual void setPolygonContourWidth(int w)=0
It sets the polygon contour width.
virtual bool isBorder()
Returns whether the border should be drawn or not.
Properties * m_properties
properties
double m_lly
Lower left corner y-coordinate.
Definition: Envelope.h:345
virtual std::set< ItemObserver * > getChildren() const
Reimplemented from Observable.
virtual bool addChildren(ItemObserver *item)
Reimplemented from Observable.
virtual void drawBackground(ContextItem context)
Draws the background of the MVC component.
A canvas is an abstraction of a drawing area.
Definition: Canvas.h:91
Abstract class to represent an observable. "Model" part of MVC component. All classes representing th...
virtual Properties * getProperties() const
Reimplemented from Observable.
virtual void setId(int id)
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.
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Definition: EnumType.h:48
virtual void setPolygonContourColor(const te::color::RGBAColor &color)=0
It sets the pen color used to draw the boundary of polygon geometries.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
virtual bool addObserver(Observer *o)
Reimplemented from Observable.
virtual Observable * getModel()
Returns the "Model" part of the MVC.
virtual bool clear()
Clear set of properties of this object.
Definition: Properties.h:225
std::string toString()
Returns the value of string type. (The setValue method received a string)
Definition: Variant.cpp:311
void setEditable(bool editable)
Sets true if property is editable, false otherwise.
Definition: Property.cpp:119
void setName(std::string name)
Sets the name of this property.
Definition: Property.cpp:62
virtual void setMenu(bool menu)
Sets true if property will be used in a menu, false otherwise.
Definition: Property.cpp:228
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::gm::Envelope getBox()
Reimplemented from Observable.
virtual void resize(double w, double h)
Resize the bounding rectangle of the MVC component.
te::color::RGBAColor m_borderColor
border color
te::gm::Coord2D m_oldPos
value of old position
virtual void setBorderColor(te::color::RGBAColor color)
Change the background color of the MVC component.
virtual EnumType * getDataTypeString() const
Returns value that represents type string belonging to enumeration.
virtual void draw(ContextItem context)
Drawing method of the MVC component.
Utility class with functions to manipulate the canvas and conversion between projections.
Definition: Utils.h:61
virtual double getOldAngle()
Returns the value of old rotation.
virtual bool contains(const te::gm::Coord2D &coord) const
Checks if the coordinate is contained within the bounding rectangle.
virtual void setBox(te::gm::Envelope box)
Change the bounding rectangle.
virtual bool contains(Property property)
Checks if the property is contained within the set of properties.
Definition: Properties.h:251
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
bool isValid() const
It tells if the rectangle is valid or not.
Definition: Envelope.h:438
virtual bool removeChildren(int hashCode)
Reimplemented from Observable.
virtual void addChildrenProperties(Properties *properties)
bool toBool()
Returns the value of boolean type. (The setValue method received a boolean)
Definition: Variant.cpp:336
virtual void setEnableChildren(bool value)
Sets true if MVC component can have children, false otherwise.
virtual bool removeObserver(Observer *o)
Reimplemented from Observable.
SharedProperties * m_sharedProps
Names of common properties among all MVC components.