27 #include "../dataaccess/dataset/ObjectIdSet.h" 28 #include "../maptools/RasterContrast.h" 29 #include "../se/Style.h" 30 #include "../srs/Config.h" 36 :
te::common::TreeItem(parent),
39 m_visibilityChanged(false),
42 m_selectionStyle(nullptr),
69 const std::string& title,
120 std::vector<AbstractLayer*> layers;
121 std::vector<AbstractLayer*> childrenLayers;
124 for(std::size_t i = 0; i < numChildren; ++i)
127 layers.push_back(childLayer);
132 for(std::size_t i = 0; i < childrenLayers.size(); ++i)
133 layers.push_back(childrenLayers[i]);
142 std::vector<AbstractLayer*> layers;
147 layers.push_back(parentLayer);
186 bool allVisible =
true;
187 bool allNotVisible =
true;
194 std::vector<AbstractLayer*> childrenVec(numChildren);
196 for(
size_t i = 0; i < numChildren; ++i)
203 allNotVisible =
false;
207 allNotVisible =
false;
215 else if(allNotVisible)
220 if(parentVisibility != prevParentVisibility)
te::map::RasterContrast * m_contrast
The contrast information to be applied to a raster object in the layer.
te::map::Grouping * m_grouping
The grouping information.
virtual const std::string & getId() const
It returns the layer id.
virtual void setDataSourceId(const std::string &id)
std::string m_datasetName
The dataset name where we will retrieve the layer objects.
const TreeItemPtr & getChild(std::size_t i) const
It returns the n-th child.
virtual ~AbstractLayer()
Virtual destructor.
std::size_t getChildrenCount() const
It returns the number of children of this node.
te::map::Chart * m_chart
The chart information.
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
This is the base class for layers.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
std::string m_id
Layer id.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
virtual const std::string & getTitle() const
It returns the layer title.
virtual te::se::Style * getSelectionStyle() const
It returns the selection Style associated to the layer.
virtual void setRasterContrast(te::map::RasterContrast *contrast)
It sets the raster contrast associated to the Layer.
void setDataSetName(const std::string &name)
virtual void updateVisibility()
It updates the visibility of this layer.
bool hasChildren() const
It returns true if the item has descendants.
void setCompositionMode(te::map::CompositionMode mode)
It sets the composition mode.
This is the base class for Layers.
bool hasVisibilityChanged()
It gets the flag that indicates if the layer visibility has changed.
virtual void setGrouping(te::map::Grouping *grouping)
It sets the Grouping associated to the Layer.
virtual void setOutOfDate()
Its indicate that the layer schema is out of date.
te::da::ObjectIdSet * m_selected
The selected group of the layer.
virtual Visibility getVisibility() const
It returns the layer visibility.
virtual void setTitle(const std::string &title)
It sets the layer title.
std::string m_geomPropertyName
The name of the referenced geometry property.
virtual te::map::Chart * getChart() const
It returns the Chart associated to the Layer.
int m_srid
The identifier of the layer spatial reference system.
TreeItem(TreeItem *parent=0)
It initializes a new item having a parent.
te::core::EncodingType getEncoding() const
It returns the encoding type.
EncodingType
Supported character encodings.
te::map::CompositionMode getCompositionMode() const
It returns the composition mode.
CompositionMode
The composition mode used to render the canvas.
virtual void setGeomPropertytName(const std::string &name)
This class contains the parameters needed for grouping the values of a Property.
te::map::CompositionMode m_compositionMode
The composition mode used to merged the canvas.
virtual void setChart(te::map::Chart *chart)
It sets the Chart associated to the Layer.
This class represents the informations needed to build map charts.
An Envelope defines a 2D rectangular region.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
std::size_t size() const
It returns the object id set size.
std::vector< te::map::AbstractLayer * > getAncestors()
It returns a list with the ancestors of this layer.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
void updateVisibilityOfAncestors()
It updates the visibility of the ancestors of this layer, if any.
virtual void setVisibility(Visibility v)
It sets the layer visibility.
std::vector< te::map::AbstractLayer * > getDescendants()
It returns a list with the descendants of this layer.
te::gm::Envelope m_mbr
The layer bounding box.
virtual void clearSelected()
It clears the selected group of this Layer.
te::se::Style * m_selectionStyle
The selection style to be applied to the geographic objects in the layer.
virtual void setExtent(const te::gm::Envelope &mbr)
It sets the Layer extent (or minimum bounding box).
This class represents the informations needed to build map charts.
virtual void setSelectionStyle(te::se::Style *style)
It sets the selection Style associated to the layer.
std::string m_title
A brief description of this Layer that can be used by applications to show a text identifying this la...
void setEncoding(te::core::EncodingType et)
It set the encoding type.
virtual void select(te::da::ObjectIdSet *oids)
It adds the given oids to the selected group of this Layer.
virtual te::map::RasterContrast * getRasterContrast() const
It returns the raster contrast associated to the Layer.
This class contains the parameters needed to apply dynamic contrast over a raster.
virtual const te::da::ObjectIdSet * getSelected() const
It returns the selected group of this Layer.
const std::string & getDataSetName() const
virtual void setSRID(int srid)
It sets the Spatial Reference System ID associated to the Layer.
virtual te::map::Grouping * getGrouping() const
It returns the Grouping associated to the Layer.
std::string m_datasourceId
DataSource id.
TreeItem * getParent() const
It returns a pointer to the parent of this node.
void Union(ObjectIdSet *rhs)
It performs the union operation between this ObjectIdSet and the given ObjectIdSet.
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.
void clear()
It clears this object id set.
virtual const std::string & getGeomPropertyName() const
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
te::se::Style * m_style
The style to be applied to the geographic objects in the layer.
This class contains the parameters needed for grouping the values of a Property.
AbstractLayer(AbstractLayer *parent=0)
It initializes a new layer.
Visibility
Each layer can have three states of visibility.
Visibility m_visibility
It indicates the layer visibility.
virtual void setId(const std::string &id)
It sets the layer id.
virtual const std::string & getDataSourceId() const
void setVisibilityAsChanged(bool visChanged)
It sets that the status of the layer visibility is to be changed or not..
void difference(const ObjectIdSet *rhs)
It performs the difference operation between this ObjectIdSet and the given ObjectIdSet.
te::core::EncodingType m_encoding
The char encoding of the layer;.
bool m_visibilityChanged
It indicates if the layer visibility has changed.
virtual void deselect(const te::da::ObjectIdSet *oids)
It removes the given oids from the selected group of this Layer.