Abstract class to represent an observable. "Model" part of MVC component. More...
#include <Observable.h>
Public Member Functions | |
virtual bool | addObserver (Observer *o)=0 |
Adds the specified observer to the set of observers for this object. Reimplement this function in a Observable subclass to provide the model's addObserver implementation. More... | |
virtual te::gm::Envelope | getBox ()=0 |
Returns the bounding rectangle of the component in scene coordinates(millimeters). Starting point is llx, lly. Reimplement this function in a Observable subclass to provide the model's getBox implementation. More... | |
virtual int | getHashCode ()=0 |
Returns the hashcode of a MVC component. Reimplement this function in a Observable subclass to provide the model's getHashCode implementation. More... | |
virtual int | getId ()=0 |
Returns the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's getId implementation. More... | |
virtual std::string | getName ()=0 |
Method that returns the name of the MVC component. Reimplement this function in a Observable subclass to provide the model's getName implementation. More... | |
virtual te::layout::Properties * | getProperties () const =0 |
Returns the model state as properties. Reimplement this function in a Observable subclass to provide the model's getProperties implementation. More... | |
virtual te::layout::Properties * | getPublicProperties () const =0 |
Returns the model state just the public properties. Reimplement this function in a Observable subclass to provide the model's getProperties implementation. More... | |
virtual EnumType * | getType ()=0 |
Returns the type of component Reimplement this function in a Observable subclass to provide the model's getType implementation. More... | |
virtual int | getZValue ()=0 |
Return the Z value. Reimplement this function in a Observable subclass to provide the model's getZValue implementation. More... | |
virtual bool | isResizable ()=0 |
Returns whether or not the component is resizable. Reimplement this function in a Observable subclass to provide the model's isResizable implementation. More... | |
virtual bool | removeObserver (Observer *o)=0 |
Removes an observer from the set of observers of this object. Reimplement this function in a Observable subclass to provide the model's removeObserver implementation. More... | |
virtual void | setId (int id)=0 |
Change the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's setId implementation. More... | |
virtual void | setResizable (bool resize)=0 |
Change the component state for resizable or not Reimplement this function in a Observable subclass to provide the model's setResizable implementation. More... | |
virtual void | setType (EnumType *type)=0 |
Change the type of component. Reimplement this function in a Observable subclass to provide the model's setType implementation. More... | |
virtual void | setZValue (int zValue)=0 |
The Z value decides the stacking order of drawing. Reimplement this function in a Observable subclass to provide the model's addObserver implementation. More... | |
virtual void | updateProperties (te::layout::Properties *properties)=0 |
Updated model state with properties. Reimplement this function in a Observable subclass to provide the model's updateProperties implementation. More... | |
virtual | ~Observable (void) |
Destructor. More... | |
Protected Member Functions | |
virtual int | calculateHashCode ()=0 |
Returns a new hashcode. More... | |
virtual void | notifyAll (ContextItem context)=0 |
Notifies all set of observers that the state of model changed Reimplement this function in a Observable subclass to provide the model's notifyAll implementation. More... | |
Abstract class to represent an observable. "Model" part of MVC component.
Definition at line 56 of file Observable.h.
|
inlinevirtual |
Destructor.
Definition at line 63 of file Observable.h.
|
pure virtual |
Adds the specified observer to the set of observers for this object. Reimplement this function in a Observable subclass to provide the model's addObserver implementation.
o | specified observer |
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
Referenced by te::layout::ItemObserver::ItemObserver(), and te::layout::OutsideObserver::OutsideObserver().
|
protectedpure virtual |
Returns a new hashcode.
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
pure virtual |
Returns the bounding rectangle of the component in scene coordinates(millimeters). Starting point is llx, lly. Reimplement this function in a Observable subclass to provide the model's getBox implementation.
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
Referenced by te::layout::MapItem::MapItem(), te::layout::ObjectInspectorOutside::ObjectInspectorOutside(), te::layout::ParentItem< T >::ParentItem(), and te::layout::PropertiesOutside::PropertiesOutside().
|
pure virtual |
Returns the hashcode of a MVC component. Reimplement this function in a Observable subclass to provide the model's getHashCode implementation.
Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.
Referenced by te::layout::ItemModelObservable::addChildren(), te::layout::MenuBuilder::changePropertyValue(), te::layout::PropertiesUtils::equalsHashCode(), and te::layout::ParentItem< T >::itemChange().
|
pure virtual |
Returns the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's getId implementation.
Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.
|
pure virtual |
Method that returns the name of the MVC component. Reimplement this function in a Observable subclass to provide the model's getName implementation.
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
Referenced by te::layout::ObjectInspectorOutside::createProperty(), te::layout::Scene::deleteItems(), te::layout::Scene::exportItemsToImage(), te::layout::ItemUtils::getMapItem(), te::layout::GridMapItem::itemChange(), te::layout::ItemUtils::mapNameList(), te::layout::Scene::removeSelectedItems(), te::layout::Scene::selectItem(), and te::layout::ObjectInspectorOutside::selectItems().
|
pure virtual |
Returns the model state as properties. Reimplement this function in a Observable subclass to provide the model's getProperties implementation.
Implemented in te::layout::OutsideModelObservable, te::layout::GridMapModel, te::layout::ItemModelObservable, te::layout::LegendModel, te::layout::MapModel, te::layout::ScaleModel, te::layout::ImageModel, te::layout::TextModel, te::layout::PointModel, te::layout::TitleModel, te::layout::LineModel, te::layout::MapLayerChoiceModel, te::layout::PageSetupModel, te::layout::SystematicScaleModel, and te::layout::TextGridSettingsModel.
Referenced by te::layout::MenuBuilder::changePropertyValue(), te::layout::PropertiesUtils::getAllProperties(), te::layout::Scene::getItemsProperties(), te::layout::PropertiesUtils::intersection(), te::layout::PropertiesUtils::sameProperties(), te::layout::PropertiesOutside::sendPropertyToSelectedItem(), and te::layout::PropertiesOutside::sendPropertyToSelectedItems().
|
pure virtual |
Returns the model state just the public properties. Reimplement this function in a Observable subclass to provide the model's getProperties implementation.
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
pure virtual |
Returns the type of component Reimplement this function in a Observable subclass to provide the model's getType implementation.
Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.
Referenced by te::layout::ItemUtils::countType(), te::layout::AddCommand::createCommandString(), te::layout::MoveCommand::createCommandString(), te::layout::ChangePropertyCommand::createCommandString(), te::layout::ObjectInspectorOutside::hasMoveItemGroup(), te::layout::ObjectInspectorOutside::itemsInspector(), and te::layout::ItemUtils::maxTypeId().
|
pure virtual |
Return the Z value. Reimplement this function in a Observable subclass to provide the model's getZValue implementation.
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
pure virtual |
Returns whether or not the component is resizable. Reimplement this function in a Observable subclass to provide the model's isResizable implementation.
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
protectedpure virtual |
Notifies all set of observers that the state of model changed Reimplement this function in a Observable subclass to provide the model's notifyAll implementation.
context | maintaining the drawing context of a MVC component. |
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
pure virtual |
Removes an observer from the set of observers of this object. Reimplement this function in a Observable subclass to provide the model's removeObserver implementation.
o | specified observer |
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
pure virtual |
Change the id of a MVC component. Id is calculated as the number of components of the same type already created. The Id to be created is the amount at the time + 1. This number is used to create the object name. Reimplement this function in a Observable subclass to provide the model's setId implementation.
id | hashCode |
Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.
|
pure virtual |
Change the component state for resizable or not Reimplement this function in a Observable subclass to provide the model's setResizable implementation.
resize | true if resizable, false otherwise |
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
pure virtual |
Change the type of component. Reimplement this function in a Observable subclass to provide the model's setType implementation.
type | Type of component |
Implemented in te::layout::OutsideModelObservable, and te::layout::ItemModelObservable.
Referenced by te::layout::OutsideController::OutsideController().
|
pure virtual |
The Z value decides the stacking order of drawing. Reimplement this function in a Observable subclass to provide the model's addObserver implementation.
Z | Value |
Implemented in te::layout::ItemModelObservable, and te::layout::OutsideModelObservable.
|
pure virtual |
Updated model state with properties. Reimplement this function in a Observable subclass to provide the model's updateProperties implementation.
properties |
Implemented in te::layout::ItemModelObservable, te::layout::OutsideModelObservable, te::layout::GridMapModel, te::layout::LegendModel, te::layout::MapModel, te::layout::ScaleModel, te::layout::ImageModel, te::layout::TextModel, te::layout::PointModel, te::layout::TitleModel, te::layout::LineModel, te::layout::MapLayerChoiceModel, te::layout::PageSetupModel, te::layout::SystematicScaleModel, and te::layout::TextGridSettingsModel.
Referenced by te::layout::MenuBuilder::changePropertyValue(), te::layout::PropertiesOutside::sendPropertyToSelectedItem(), and te::layout::PropertiesOutside::sendPropertyToSelectedItems().