This class models the concept of a project for the TerraLib Application Framework. More...
#include <Project.h>
Public Member Functions | |
void | add (const te::map::AbstractLayerPtr &layer, const te::map::AbstractLayerPtr &parentLayer=te::map::AbstractLayerPtr()) |
It adds the specified layer to the list of layers of the parent layer. If the parent layer is not specified, the layer is added as a top layer of the project. More... | |
void | clear () |
It clears the project, setting it as having no layers. More... | |
std::list < te::map::AbstractLayerPtr > | getAllLayers (bool invalid=true) |
It gets all the layers (single and folder layers) of the project. More... | |
const std::string & | getAuthor () const |
It gets the author of the project. More... | |
const std::string & | getFileName () const |
It gets the filename where the project is saved. More... | |
const std::list < te::map::AbstractLayerPtr > | getSelectedLayers (bool invalid=true) const |
It gets all the layers that are selected. More... | |
std::list < te::map::AbstractLayerPtr > | getSingleLayers (bool invalid=true) |
It gets all the single layers of the project. More... | |
const std::string & | getTitle () const |
It gets the title of the project. More... | |
const std::list < te::map::AbstractLayerPtr > & | getTopLayers () const |
It gets all the top layers of the project (folder and single layers). More... | |
std::list < te::map::AbstractLayerPtr > & | getTopLayers () |
It gets all the top layers of the project (folder and single layers). More... | |
std::list < te::map::AbstractLayerPtr > | getVisibleSingleLayers (bool invalid=true) |
It gets all the single layers that are visible. More... | |
bool | hasChanged () |
It informs if the project has changed. More... | |
Project () | |
Constructor. More... | |
void | remove (const te::map::AbstractLayerPtr &layer) |
It removes the specified layer from the project. More... | |
void | setAuthor (const std::string &author) |
It sets the author of the project. More... | |
void | setFileName (const std::string &fName) |
It sets the filename where the project will be saved. More... | |
void | setProjectAsChanged (const bool &changed) |
It sets the project status as changed or not. More... | |
void | setSelectedLayers (const std::list< te::map::AbstractLayerPtr > &selectedLayers) |
It sets all the layers that are selected. More... | |
void | setTitle (const std::string &title) |
It sets the title of the project. More... | |
void | setTopLayers (const std::list< te::map::AbstractLayerPtr > &layers) |
It sets the top layers of the project. More... | |
~Project () | |
Destructor. More... | |
Private Attributes | |
std::string | m_author |
The author of the project. More... | |
bool | m_changed |
Flag indicating that the project needs to be saved. More... | |
std::string | m_fileName |
The project file. More... | |
std::list < te::map::AbstractLayerPtr > | m_selectedLayers |
The list of selected layers of the project. More... | |
std::string | m_title |
The title of the project. More... | |
std::list < te::map::AbstractLayerPtr > | m_topLayers |
The list of top layers of the project. More... | |
te::qt::af::Project::Project | ( | ) |
Constructor.
Definition at line 32 of file Project.cpp.
te::qt::af::Project::~Project | ( | ) |
Destructor.
Definition at line 40 of file Project.cpp.
void te::qt::af::Project::add | ( | const te::map::AbstractLayerPtr & | layer, |
const te::map::AbstractLayerPtr & | parentLayer = te::map::AbstractLayerPtr() |
||
) |
It adds the specified layer to the list of layers of the parent layer. If the parent layer is not specified, the layer is added as a top layer of the project.
layer | The layer that will be added to the list of layers of the project. |
parentLayer | The parent layer where the layer will be added. |
Definition at line 188 of file Project.cpp.
Referenced by te::qt::af::LayerExplorer::onApplicationTriggered().
void te::qt::af::Project::clear | ( | ) |
It clears the project, setting it as having no layers.
Definition at line 231 of file Project.cpp.
std::list< te::map::AbstractLayerPtr > te::qt::af::Project::getAllLayers | ( | bool | invalid = true | ) |
It gets all the layers (single and folder layers) of the project.
invalid | If including invalid layers. |
Definition at line 77 of file Project.cpp.
Referenced by te::qt::plugins::addressgeocoding::Plugin::getLayers(), te::qt::plugins::vp::AbstractAction::getLayers(), te::qt::plugins::cellspace::AbstractAction::getLayers(), te::qt::plugins::attributefill::AbstractAction::getLayers(), te::qt::af::BaseApplication::onAddQueryLayerTriggered(), te::qt::af::BaseApplication::onMapRemoveSelectionTriggered(), te::qt::af::BaseApplication::onToolsDataExchangerDirectTriggered(), and te::qt::af::BaseApplication::onToolsQueryDataSourceTriggered().
const std::string & te::qt::af::Project::getAuthor | ( | ) | const |
It gets the author of the project.
Definition at line 62 of file Project.cpp.
Referenced by te::qt::af::XMLFormatter::format(), te::qt::af::Save(), and te::qt::af::ProjectInfoWidget::setProject().
const std::string & te::qt::af::Project::getFileName | ( | ) | const |
It gets the filename where the project is saved.
Definition at line 221 of file Project.cpp.
Referenced by te::qt::af::GetWindowTitle(), and te::qt::af::ProjectInfoWidget::setProject().
const std::list< te::map::AbstractLayerPtr > te::qt::af::Project::getSelectedLayers | ( | bool | invalid = true | ) | const |
It gets all the layers that are selected.
invalid | If including invalid layers. |
Definition at line 157 of file Project.cpp.
std::list< te::map::AbstractLayerPtr > te::qt::af::Project::getSingleLayers | ( | bool | invalid = true | ) |
It gets all the single layers of the project.
invalid | If including invalid layers. |
Definition at line 113 of file Project.cpp.
Referenced by te::qt::plugins::sa::AbstractAction::getLayers(), te::qt::plugins::rp::AbstractAction::getLayers(), te::qt::plugins::attributefill::RasterToVectorAction::onActionActivated(), te::qt::plugins::attributefill::VectorToRasterAction::onActionActivated(), te::qt::plugins::vp::MultipartToSinglepartAction::onActionActivated(), te::qt::plugins::vp::LineToPolygonAction::onActionActivated(), te::qt::plugins::vp::PolygonToLineAction::onActionActivated(), te::qt::plugins::vp::BufferAction::onActionActivated(), te::qt::plugins::vp::SummarizationAction::onActionActivated(), te::qt::plugins::attributefill::VectorToVectorAction::onActionActivated(), te::qt::plugins::cellspace::CreateCellLayerAction::onActionActivated(), te::qt::plugins::vp::TransformationAction::onActionActivated(), te::qt::plugins::vp::AggregationAction::onActionActivated(), te::qt::plugins::vp::IntersectionAction::onActionActivated(), te::qt::plugins::addressgeocoding::Plugin::onActionActivated(), te::qt::af::BaseApplication::onLayerGroupingTriggered(), te::qt::af::BaseApplication::onQueryLayerTriggered(), te::qt::af::BaseApplication::onToolsFixGeometryTriggered(), and te::qt::af::BaseApplication::onToolsRasterMultiResolutionTriggered().
const std::string & te::qt::af::Project::getTitle | ( | ) | const |
It gets the title of the project.
Definition at line 51 of file Project.cpp.
Referenced by te::qt::af::XMLFormatter::format(), te::qt::af::GetWindowTitle(), te::qt::af::Save(), and te::qt::af::ProjectInfoWidget::setProject().
const std::list< te::map::AbstractLayerPtr > & te::qt::af::Project::getTopLayers | ( | ) | const |
It gets all the top layers of the project (folder and single layers).
Definition at line 67 of file Project.cpp.
Referenced by te::qt::af::XMLFormatter::format(), te::qt::af::LayerExplorer::onApplicationTriggered(), and te::qt::af::Save().
std::list< te::map::AbstractLayerPtr > & te::qt::af::Project::getTopLayers | ( | ) |
It gets all the top layers of the project (folder and single layers).
Definition at line 72 of file Project.cpp.
std::list< te::map::AbstractLayerPtr > te::qt::af::Project::getVisibleSingleLayers | ( | bool | invalid = true | ) |
It gets all the single layers that are visible.
invalid | If including invalid layers. |
Definition at line 133 of file Project.cpp.
References te::map::VISIBLE.
bool te::qt::af::Project::hasChanged | ( | ) |
It informs if the project has changed.
Definition at line 210 of file Project.cpp.
void te::qt::af::Project::remove | ( | const te::map::AbstractLayerPtr & | layer | ) |
It removes the specified layer from the project.
layer | The layer to be removed from the project. |
Definition at line 198 of file Project.cpp.
References te::common::TreeItem::remove().
Referenced by te::qt::af::LayerExplorer::onApplicationTriggered().
void te::qt::af::Project::setAuthor | ( | const std::string & | author | ) |
It sets the author of the project.
title | The author of the project to be set. |
Definition at line 56 of file Project.cpp.
Referenced by te::qt::af::XMLFormatter::format().
void te::qt::af::Project::setFileName | ( | const std::string & | fName | ) |
It sets the filename where the project will be saved.
fName | The file name where the project will be saved. |
Definition at line 215 of file Project.cpp.
Referenced by te::qt::af::ReadProject().
void te::qt::af::Project::setProjectAsChanged | ( | const bool & | changed | ) |
It sets the project status as changed or not.
changed | The flag that specifies if the project is to be set as changed or not. |
Definition at line 226 of file Project.cpp.
Referenced by te::qt::af::BaseApplication::openProject(), and te::qt::af::ReadProject().
void te::qt::af::Project::setSelectedLayers | ( | const std::list< te::map::AbstractLayerPtr > & | selectedLayers | ) |
It sets all the layers that are selected.
selectedLayers | The list of all the layers that are selected. |
Definition at line 181 of file Project.cpp.
Referenced by te::qt::af::LayerExplorer::onSelectedLayersChanged().
void te::qt::af::Project::setTitle | ( | const std::string & | title | ) |
It sets the title of the project.
title | The title of the project to be set. |
Definition at line 45 of file Project.cpp.
Referenced by te::qt::af::XMLFormatter::format().
void te::qt::af::Project::setTopLayers | ( | const std::list< te::map::AbstractLayerPtr > & | layers | ) |
It sets the top layers of the project.
layers | The layers that will be set as the top layers of the project. |
Definition at line 151 of file Project.cpp.
Referenced by te::qt::af::LayerExplorer::onLayerOrderChanged().
|
private |
The author of the project.
Definition at line 205 of file Project.h.
Referenced by te::qt::af::ProjectInfoWidget::setProject().
|
private |
|
private |
|
private |
|
private |
|
private |