27 #include "../../../geometry/GeometryProperty.h" 28 #include "../../../qt/widgets/dataset/selector/DataSetSelectorWizardPage.h" 29 #include "../../../qt/widgets/datasource/selector/DataSourceSelectorWidget.h" 30 #include "../../../qt/widgets/datasource/selector/DataSourceSelectorWizardPage.h" 31 #include "../../../qt/widgets/help/HelpPushButton.h" 32 #include "../../../se/Utils.h" 33 #include "../../../st/core/timeseries/TimeSeriesDataSetInfo.h" 36 #include "ui_TimeSeriesWizardForm.h" 39 #include <boost/uuid/random_generator.hpp> 40 #include <boost/uuid/uuid_io.hpp> 47 static boost::uuids::basic_random_generator<boost::mt19937> gen;
48 boost::uuids::uuid u = gen();
49 std::string
id = boost::uuids::to_string(u);
50 std::string title = dataType->getTitle().empty() ? dataType->getName() : dataType->getTitle();
54 timeSeriesLayer->setRendererType(
"ABSTRACT_LAYER_RENDERER");
58 timeSeriesLayer->setSRID(gp->
getSRID());
59 timeSeriesLayer->setExtent(*mbr);
61 return timeSeriesLayer;
66 m_ui(new
Ui::TimeSeriesWizardForm)
84 m_datasetSelectorPage->setSubTitle(tr(
"Please, select the datasets you want to transfer to another data source"));
92 connect(this->button(QWizard::NextButton), SIGNAL(pressed()),
this, SLOT(
next()));
93 connect(this->button(QWizard::BackButton), SIGNAL(pressed()),
this, SLOT(
back()));
94 connect(this->button(QWizard::FinishButton), SIGNAL(pressed()),
this, SLOT(
finish()));
97 this->setButton(QWizard::HelpButton, helpButton);
107 if(datasources.empty())
110 return datasources.front();
117 if(dataTypes.empty())
120 return dataTypes.front();
148 QApplication::setOverrideCursor(Qt::WaitCursor);
159 std::cout << std::endl <<
"Failed to create a new layer and insert it into the application: " << e.
what() << std::endl;
160 QWizard::finished(1);
164 std::cout << std::endl <<
"Failed to create a new layer and insert it into the application: unknown exception!" << std::endl;
165 QWizard::finished(1);
168 QApplication::restoreOverrideCursor();
169 QWizard::finished(0);
TEDATAACCESSEXPORT te::gm::Envelope * GetExtent(const std::string &datasetName, const std::string &propertyName, const std::string &datasourceId)
A layer with reference to a dataset that contains trajectories.
boost::shared_ptr< DataSetType > DataSetTypePtr
This is the base class for layers.
virtual const char * what() const
It outputs the exception message.
te::st::TimeSeriesDataSetLayerPtr generateLayer(te::da::DataSetTypePtr dataType, te::st::TimeSeriesDataSetInfo *timeSeriesInfo, te::da::DataSourceInfoPtr dataInfo, te::map::AbstractLayer *parent=nullptr)
TESEEXPORT Style * CreateFeatureTypeStyle(const te::gm::GeomType &geomType)
Try creates an appropriate feature type style based on given geometry type.
int getSRID() const
It returns the spatial reference system identifier associated to this property.
GeomType getGeometryType() const
It returns the geometry subtype allowed for the property.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
A WizardPage used to configure the general properties of a new spatio-temporal layer.
A class that contains infos about a DataSet that contains observations of one or more time series...
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
boost::intrusive_ptr< TimeSeriesDataSetLayer > TimeSeriesDataSetLayerPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
const std::string & getName() const
It returns the property name.