This class models the concept of a project for the TerraView application. More...
#include "Project.h"#include "../terralib/common/BoostUtils.h"#include "../terralib/core/utils/Platform.h"#include "../terralib/core/uri/Utils.h"#include "../terralib/dataaccess/datasource/DataSourceInfoManager.h"#include "../terralib/dataaccess/serialization/xml/Serializer.h"#include "../terralib/maptools/serialization/xml/Layer.h"#include "../terralib/xml/AbstractWriter.h"#include "../terralib/xml/AbstractWriterFactory.h"#include "../terralib/xml/Reader.h"#include "../terralib/xml/ReaderFactory.h"#include "../terralib/Version.h"#include <boost/algorithm/string/replace.hpp>#include <QFileInfo>Go to the source code of this file.
Functions | |
| std::vector< std::string > | getDataSourceIds (const std::list< te::map::AbstractLayerPtr > &layers) |
| void | LoadProject (const QString &projFile, ProjectMetadata &proj, std::list< te::map::AbstractLayerPtr > &layers) |
| void | SaveProject (const ProjectMetadata &proj, const std::list< te::map::AbstractLayerPtr > &layers) |
| void | updateLayerDataSource (const te::map::AbstractLayerPtr &layer, const std::map< std::string, std::string > &invalidToValidIds) |
This class models the concept of a project for the TerraView application.
Definition in file Project.cpp.
| std::vector<std::string> getDataSourceIds | ( | const std::list< te::map::AbstractLayerPtr > & | layers | ) |
Definition at line 64 of file Project.cpp.
Referenced by SaveProject().
| void LoadProject | ( | const QString & | projFile, |
| ProjectMetadata & | proj, | ||
| std::list< te::map::AbstractLayerPtr > & | layers | ||
| ) |
Definition at line 185 of file Project.cpp.
References ds, te::xml::END_DOCUMENT, te::xml::END_ELEMENT, te::common::Singleton< DataSourceInfoManager >::getInstance(), te::common::Singleton< T >::getInstance(), ProjectMetadata::m_author, ProjectMetadata::m_fileName, ProjectMetadata::m_title, te::xml::ReaderFactory::make(), te::map::serialize::Layer::read(), te::serialize::xml::ReadDataSourceInfo(), te::xml::START_ELEMENT, updateLayerDataSource(), and te::xml::VALUE.
Referenced by TerraView::openProject().
| void SaveProject | ( | const ProjectMetadata & | proj, |
| const std::list< te::map::AbstractLayerPtr > & | layers | ||
| ) |
Definition at line 97 of file Project.cpp.
References te::core::FindInTerraLibPath(), getDataSourceIds(), te::common::Singleton< T >::getInstance(), te::common::Singleton< DataSourceInfoManager >::getInstance(), ProjectMetadata::m_author, ProjectMetadata::m_fileName, ProjectMetadata::m_title, te::xml::AbstractWriterFactory::make(), te::core::URIEncode(), and te::map::serialize::Layer::write().
Referenced by TerraView::onSaveProjectTriggered().
| void updateLayerDataSource | ( | const te::map::AbstractLayerPtr & | layer, |
| const std::map< std::string, std::string > & | invalidToValidIds | ||
| ) |
Definition at line 47 of file Project.cpp.
Referenced by LoadProject().