27 #include "../dataaccess/dataset/ObjectIdSet.h" 
   28 #include "../se/Style.h" 
   29 #include "../srs/Config.h" 
   35   : te::common::TreeItem(parent),
 
   38     m_visibilityChanged(false),
 
   47   : te::common::TreeItem(parent),
 
   51     m_visibilityChanged(false),
 
   60                                       const std::string& title,
 
   62   : te::common::TreeItem(parent),
 
   67     m_visibilityChanged(false),
 
  105   std::vector<AbstractLayer*> layers;
 
  106   std::vector<AbstractLayer*> childrenLayers;
 
  108   std::size_t numChildren = getChildrenCount();
 
  109   for(std::size_t i = 0; i < numChildren; ++i)
 
  112     layers.push_back(childLayer);
 
  117       for(std::size_t i = 0; i < childrenLayers.size(); ++i)
 
  118         layers.push_back(childrenLayers[i]);
 
  127   std::vector<AbstractLayer*> layers;
 
  132     layers.push_back(parentLayer);
 
  148   m_visibilityChanged = 
false;
 
  152   if(m_visibility != prevVisibility)
 
  153     m_visibilityChanged = 
true;
 
  158   return m_visibilityChanged;
 
  163   m_visibilityChanged = visChanged;
 
  171     bool allVisible = 
true;
 
  172     bool allNotVisible = 
true;
 
  178     std::vector<AbstractLayer*> childrenVec(numChildren);
 
  180     for(
int i = 0; i < numChildren; ++i)
 
  187         allNotVisible = 
false;
 
  191         allNotVisible = 
false;
 
  199     else if(allNotVisible)
 
  204     if(parentVisibility != prevParentVisibility)
 
  245   if(m_selected->size() == 0)
 
  254   m_selected->Union(oids);
 
  272   if(m_selected->size() == 0)
 
  275   m_selected->difference(oids);
 
  297   m_grouping = grouping;
 
This class represents the informations needed to build map charts. 
 
virtual void setExtent(const te::gm::Envelope &mbr)
It sets the Layer extent (or minimum bounding box). 
 
virtual void clearSelected()
It clears the selected group of this Layer. 
 
virtual te::map::Chart * getChart() const 
It returns the Chart associated to the Layer. 
 
This class represents a set of unique ids created in the same context. i.e. from the same data set...
 
This class contains the parameters needed for grouping the values of a Property. 
 
virtual void select(te::da::ObjectIdSet *oids)
It adds the given oids to the selected group of this Layer. 
 
bool hasChildren() const 
It returns true if the item has descendants. 
 
virtual const std::string & getTitle() const 
It returns the layer title. 
 
This is the base class for layers. 
 
virtual const te::da::ObjectIdSet * getSelected() const 
It returns the selected group of this Layer. 
 
void setVisibilityAsChanged(bool visChanged)
It sets that the status of the layer visibility is to be changed or not.. 
 
virtual ~AbstractLayer()
Virtual destructor. 
 
Visibility
Each layer can have three states of visibility. 
 
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib. 
 
virtual te::map::Grouping * getGrouping() const 
It returns the Grouping associated to the Layer. 
 
virtual void setId(const std::string &id)
It sets the layer id. 
 
virtual void setTitle(const std::string &title)
It sets the layer title. 
 
std::size_t getChildrenCount() const 
It returns the number of children of this node. 
 
std::vector< te::map::AbstractLayer * > getDescendants()
It returns a list with the descendants of this layer. 
 
virtual te::se::Style * getStyle() const 
It returns the Style associated to the layer. 
 
virtual const te::gm::Envelope & getExtent() const 
It returns the Layer extent (or minimum bounding box). 
 
virtual void deselect(const te::da::ObjectIdSet *oids)
It removes the given oids from the selected group of this Layer. 
 
virtual void setGrouping(te::map::Grouping *grouping)
It sets the Grouping associated to the Layer. 
 
virtual void setChart(te::map::Chart *chart)
It sets the Chart associated to the Layer. 
 
const TreeItemPtr & getChild(std::size_t i) const 
It returns the n-th child. 
 
void updateVisibilityOfAncestors()
It updates the visibility of the ancestors of this layer, if any. 
 
Visibility m_visibility
It indicates the layer visibility. 
 
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
 
virtual void setVisibility(Visibility v)
It sets the layer visibility. 
 
This class contains the parameters needed for grouping the values of a Property. 
 
bool m_visibilityChanged
It indicates if the layer visibility has changed. 
 
This class represents the informations needed to build map charts. 
 
virtual void updateVisibility()
It updates the visibility of this layer. 
 
TreeItem * getParent() const 
It returns a pointer to the parent of this node. 
 
AbstractLayer(AbstractLayer *parent=0)
It initializes a new layer. 
 
This is the base class for Layers. 
 
virtual Visibility getVisibility() const 
It returns the layer visibility. 
 
An Envelope defines a 2D rectangular region. 
 
virtual int getSRID() const 
It returns the Spatial Reference System ID associated to the Layer. 
 
virtual void setSRID(int srid)
It sets the Spatial Reference System ID associated to the Layer. 
 
virtual const std::string & getId() const 
It returns the layer id. 
 
std::vector< te::map::AbstractLayer * > getAncestors()
It returns a list with the ancestors of this layer. 
 
bool hasVisibilityChanged()
It gets the flag that indicates if the layer visibility has changed. 
 
virtual void setStyle(te::se::Style *style)
It sets the Style associated to the layer.