42 const std::string& title,
56 int numChildren = getChildrenCount();
57 std::vector<AbstractLayer*> childrenVec(numChildren);
59 for(
int i = 0; i < numChildren; ++i)
61 childrenVec[i] =
static_cast<AbstractLayer*
>(getChild(i).get());
67 m_visibilityChanged =
false;
71 if(m_visibility != prevVisibility)
72 m_visibilityChanged =
true;
78 m_visibilityChanged =
false;
80 if(hasChildren() ==
false)
84 if(m_visibility != prevVisibility)
85 m_visibilityChanged =
true;
90 bool allVisible =
true;
91 bool allNotVisible =
true;
93 int numChildren = getChildrenCount();
94 std::vector<AbstractLayer*> childrenVec(numChildren);
96 for(
int i = 0; i < numChildren; ++i)
98 childrenVec[i] =
static_cast<AbstractLayer*
>(getChild(i).get());
103 allNotVisible =
false;
107 allNotVisible =
false;
115 else if(allNotVisible)
118 if(m_visibility != prevVisibility)
119 m_visibilityChanged =
true;
121 updateVisibilityOfAncestors();
126 return std::auto_ptr<LayerSchema>(0);
132 return std::auto_ptr<te::da::DataSet>(0);
141 return std::auto_ptr<te::da::DataSet>(0);
150 return std::auto_ptr<te::da::DataSet>(0);
157 return std::auto_ptr<te::da::DataSet>(0);
164 return std::auto_ptr<te::da::DataSet>(0);
This class represents a set of unique ids created in the same context. i.e. from the same data set...
This is the base class for layers.
std::auto_ptr< LayerSchema > getSchema() const
It returns the layer schema.
void updateVisibility()
It updates the visibility of this layer.
A canvas is an abstraction of a drawing area.
Visibility
Each layer can have three states of visibility.
SpatialRelation
Spatial relations between geometric objects.
std::auto_ptr< te::da::DataSet > getData(te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess) const
It gets the dataset identified by the layer name.
AccessPolicy
Supported data access policies (can be used as bitfield).
const std::string & getType() const
It returns the layer type: FOLDERLAYER.
A layer that can be used as a container for other kind of layers.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
void draw(Canvas *canvas, const te::gm::Envelope &bbox, int srid)
It draws the layer geographic objects in the given canvas using the informed SRS. ...
TraverseType
A dataset can be traversed in two ways:
virtual void setVisibility(Visibility v)
It sets the layer visibility.
bool isValid() const
It returns true if the layer can be used for instance to draw, otherwise, it returns false...
This is an abstract class that models a query expression.
static const std::string sm_type
A static data member used in the implementation of getType method.
void setVisibility(Visibility v)
It sets the layer visibility.
~FolderLayer()
Destructor.
An Envelope defines a 2D rectangular region.
FolderLayer(AbstractLayer *parent=0)
It initializes a new layer.