99 #include <QApplication> 100 #include <QCloseEvent> 101 #include <QFileDialog> 102 #include <QInputDialog> 105 #include <QMessageBox> 106 #include <QModelIndex> 110 #include <boost/filesystem.hpp> 111 #include <boost/format.hpp> 112 #include <boost/uuid/random_generator.hpp> 113 #include <boost/uuid/uuid_io.hpp> 118 title +=
TE_TR(
"Project:");
123 boost::filesystem::path
p(project.
m_fileName.toUtf8().data());
125 std::string filename =
p.filename().string();
127 title += filename.c_str();
134 QSettings s(QSettings::IniFormat,
135 QSettings::UserScope,
136 qApp->organizationName(),
137 qApp->applicationName());
139 s.beginGroup(
"projects");
141 s.beginGroup(
"most_recent");
142 QString path = s.value(
"path").toString();
143 QString title = s.value(
"title").toString();
147 if(path.isEmpty() || title.isEmpty())
150 prjPaths.append(path);
151 prjTitles.append(title);
153 int size = s.beginReadArray(
"recents");
155 for(
int i=0; i<size; i++)
159 path = s.value(
"project/path").toString();
160 title = s.value(
"project/title").toString();
162 prjPaths.append(path);
163 prjTitles.append(title);
172 QSettings s(QSettings::IniFormat,
173 QSettings::UserScope,
174 qApp->organizationName(),
175 qApp->applicationName());
177 s.beginGroup(
"projects");
178 s.beginGroup(
"most_recent");
179 s.setValue(
"path", *prjPaths.begin());
180 s.setValue(
"title", *prjTitles.begin());
183 s.beginWriteArray(
"recents");
184 for(
int i=1; i<prjTitles.size(); i++)
186 s.setArrayIndex(i-1);
188 s.setValue(
"project/path", prjPaths.at(i));
189 s.setValue(
"project/title", prjTitles.at(i));
197 QStringList prjPaths,
202 if(!prjPaths.contains(prjPath))
204 prjTitles.prepend(prjTitle);
205 prjPaths.prepend(prjPath);
209 int prjPathIdx = prjPaths.indexOf(prjPath);
211 if(!prjTitles.contains(prjTitle))
212 prjTitles.replace(prjPathIdx, prjTitle);
214 prjTitles.move(prjPathIdx, 0);
215 prjPaths.move(prjPathIdx, 0);
225 QModelIndexList idxs = view->selectionModel()->selectedIndexes();
229 QModelIndex idx = idxs.at(0);
232 if(item->
getType() ==
"FOLDER")
242 p->
m_title = QObject::tr(
"Default project");
247 :
te::qt::af::BaseApplication(parent),
248 m_helpManager(nullptr),
249 m_iController(nullptr),
251 m_compModeMenu(nullptr),
252 m_tvController(nullptr),
284 BaseApplication::init(cfgFile);
287 m_app, cfgFile.toUtf8().data());
291 QStringList prjTitles,
296 if(!prjPaths.empty())
327 m_pvb->setFixedWidth(220);
445 QSettings sett(QSettings::IniFormat, QSettings::UserScope, qApp->organizationName(), qApp->applicationName());
447 sett.beginGroup(
"toolbars");
449 sett.beginGroup(
"File Tool Bar");
450 sett.setValue(
"name",
"File Tool Bar");
451 sett.beginWriteArray(
"Actions");
452 sett.setArrayIndex(0);
453 sett.setValue(
"action",
"File.New Project");
454 sett.setArrayIndex(1);
455 sett.setValue(
"action",
"File.Open Project");
456 sett.setArrayIndex(2);
457 sett.setValue(
"action",
"File.Save Project");
458 sett.setArrayIndex(3);
459 sett.setValue(
"action",
"");
460 sett.setArrayIndex(4);
461 sett.setValue(
"action",
"Project.New Folder");
462 sett.setArrayIndex(5);
463 sett.setValue(
"action",
"Project.Add Layer.All Sources");
467 sett.beginGroup(
"View Tool Bar");
468 sett.setValue(
"name",
"View Tool Bar");
469 sett.beginWriteArray(
"Actions");
470 sett.setArrayIndex(0);
471 sett.setValue(
"action",
"View.Layer Explorer");
472 sett.setArrayIndex(1);
473 sett.setValue(
"action",
"View.Map Display");
474 sett.setArrayIndex(2);
475 sett.setValue(
"action",
"View.Data Table");
476 sett.setArrayIndex(3);
477 sett.setValue(
"action",
"View.Style Explorer");
481 sett.beginGroup(
"Map Tool Bar");
482 sett.setValue(
"name",
"Map Tool Bar");
483 sett.beginWriteArray(
"Actions");
484 sett.setArrayIndex(0);
485 sett.setValue(
"action",
"Map.Draw");
486 sett.setArrayIndex(1);
487 sett.setValue(
"action",
"Map.Previous Extent");
488 sett.setArrayIndex(2);
489 sett.setValue(
"action",
"Map.Next Extent");
490 sett.setArrayIndex(3);
491 sett.setValue(
"action",
"Map.Zoom Extent");
492 sett.setArrayIndex(4);
493 sett.setValue(
"action",
"");
494 sett.setArrayIndex(5);
495 sett.setValue(
"action",
"Map.Zoom In");
496 sett.setArrayIndex(6);
497 sett.setValue(
"action",
"Map.Zoom Out");
498 sett.setArrayIndex(7);
499 sett.setValue(
"action",
"Map.Pan");
500 sett.setArrayIndex(8);
501 sett.setValue(
"action",
"");
502 sett.setArrayIndex(9);
503 sett.setValue(
"action",
"Map.Info");
504 sett.setArrayIndex(10);
505 sett.setValue(
"action",
"Map.Selection");
506 sett.setArrayIndex(11);
507 sett.setValue(
"action",
"Layer.Invert Selection");
513 sett.beginGroup(
"projects");
515 sett.setValue(
"author_name",
"");
516 sett.setValue(
"recents_history_size",
"8");
543 #if TE_PLATFORM != TE_PLATFORMCODE_APPLE 665 m_pluginsMenu->addSeparator()->setObjectName(
"ManagePluginsSeparator");
679 treeView->setAnimated(
true);
684 QAction* noItemSelectedSep =
new QAction(
this);
685 noItemSelectedSep->setSeparator(
true);
698 QAction* folderSep1 =
new QAction(
this);
699 folderSep1->setSeparator(
true);
704 QAction* folderSep2 =
new QAction(
this);
705 folderSep2->setSeparator(
true);
716 QAction* actionStyleSep1 =
new QAction(
this);
717 actionStyleSep1->setSeparator(
true);
728 QAction* actionChartSep =
new QAction(
this);
729 actionChartSep->setSeparator(
true);
735 QAction* actionStyleSep =
new QAction(
this);
736 actionStyleSep->setSeparator(
true);
739 QAction* actionRemoveSep =
new QAction(
this);
740 actionRemoveSep->setSeparator(
true);
747 QAction* actionFitSep =
new QAction(
this);
748 actionFitSep->setSeparator(
true);
753 QAction* actionSaveAsSep =
new QAction(
this);
754 actionSaveAsSep->setSeparator(
true);
760 QAction* actionSRSSep =
new QAction(
this);
761 actionSRSSep->setSeparator(
true);
770 actionStyleSep1 =
new QAction(
this);
771 actionStyleSep1->setSeparator(
true);
778 QAction* rasterSep1 =
new QAction(
this);
779 rasterSep1->setSeparator(
true);
784 QAction* rasterSep2 =
new QAction(
this);
785 rasterSep2->setSeparator(
true);
788 QAction* rasterSep3 =
new QAction(
this);
789 rasterSep3->setSeparator(
true);
794 QAction* rasterSep4 =
new QAction(
this);
795 rasterSep4->setSeparator(
true);
800 QAction* rasterSep5 =
new QAction(
this);
801 rasterSep5->setSeparator(
true);
810 actionStyleSep1 =
new QAction(
this);
811 actionStyleSep1->setSeparator(
true);
819 actionChartSep =
new QAction(
this);
820 actionChartSep->setSeparator(
true);
825 actionSaveAsSep =
new QAction(
this);
826 actionSaveAsSep->setSeparator(
true);
831 actionSRSSep =
new QAction(
this);
832 actionSRSSep->setSeparator(
true);
885 for (std::size_t t = 0; t < toolBars.size(); ++t)
887 QToolBar* bar = toolBars[t];
918 QMainWindow::addToolBar(Qt::TopToolBarArea, evt->
m_toolbar);
924 std::list<te::map::AbstractLayerPtr> layers;
941 BaseApplication::onApplicationTriggered(e);
948 QMessageBox msgBox(
this);
950 msgBox.setText(tr(
"The system will be restarted."));
951 msgBox.setInformativeText(tr(
"Do you want to continue?"));
952 msgBox.setWindowTitle(tr(
"Restart system"));
954 msgBox.addButton(QMessageBox::No);
955 msgBox.addButton(QMessageBox::Yes);
957 msgBox.setDefaultButton(QMessageBox::Yes);
959 if (msgBox.exec() == QMessageBox::Yes)
1000 QString msg = tr(
"Fail to open project.");
1011 if (projFile.isEmpty() || save_as)
1013 QFileDialog
d(
this);
1017 QString fileName = d.getSaveFileName(
this, tr(
"Save project"), qApp->applicationDirPath(), filter);
1019 if(fileName.isEmpty())
1022 QFileInfo info(fileName);
1024 if(info.suffix().isEmpty())
1073 if(selectedLayers.empty())
1075 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"Select a layer in the layer explorer!"));
1080 for(std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin(); it != selectedLayers.end(); ++it)
1082 if(!it->get()->isValid())
1084 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"There are invalid layers selected!"));
1093 elb->setInputLayer(selectedLayer);
1095 int retval = elb->exec();
1097 if(retval == QDialog::Rejected)
1101 std::list<te::map::AbstractLayerPtr> layers;
1103 layers.push_back(layer);
1109 catch(
const std::exception& e)
1115 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"Unknown error while trying to add a layer from a queried dataset!"));
1125 if(selectedLayers.empty())
1128 tr(
"Select a layer in the layer explorer!"));
1133 for(std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin(); it != selectedLayers.end(); ++it)
1135 if(!it->get()->isValid())
1138 tr(
"There are invalid layers selected!"));
1149 dlg.setWindowTitle(dlg.windowTitle() +
" (" + tr(
"Layer") +
":" + selectedLayer->getTitle().c_str() +
")");
1151 int res = dlg.exec();
1152 if(res == QDialog::Accepted)
1156 doc->setWindowTitle(tr(
"Histogram"));
1157 doc->setWindowIcon(QIcon::fromTheme(
"chart-bar"));
1158 doc->
setLayer(selectedLayer.get());
1162 addDockWidget(Qt::RightDockWidgetArea, doc, Qt::Horizontal);
1166 catch(
const std::exception& e)
1178 if(selectedLayers.empty())
1180 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"Select a layer in the layer explorer!"));
1185 for(std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin(); it != selectedLayers.end(); ++it)
1187 if(!it->get()->isValid())
1189 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"There are invalid layers selected!"));
1205 dlg.setWindowTitle(dlg.windowTitle() +
" (" + tr(
"Layer") +
":" + selectedLayer->getTitle().c_str() +
")");
1207 int res = dlg.exec();
1208 if(res == QDialog::Accepted)
1213 doc->setWindowTitle(tr(
"Scatter"));
1214 doc->setWindowIcon(QIcon::fromTheme(
"chart-scatter"));
1216 doc->
setLayer(selectedLayer.get());
1219 addDockWidget(Qt::RightDockWidgetArea, doc, Qt::Horizontal);
1223 catch(
const std::exception& e)
1235 if(selectedLayers.empty())
1238 tr(
"Select a single layer in the layer explorer!"));
1243 for(std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin(); it != selectedLayers.end(); ++it)
1245 if(!(*it)->isValid())
1248 tr(
"There are invalid layers selected!"));
1259 dlg.setWindowTitle(dlg.windowTitle() +
" (" + tr(
"Layer") +
":" + selectedLayer->getTitle().c_str() +
")");
1270 if(dlg.exec() == QDialog::Accepted)
1279 catch(
const std::exception& e)
1291 if (selectedLayers.empty())
1293 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"Select a single layer in the layer explorer!"));
1298 for (std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin(); it != selectedLayers.end(); ++it)
1304 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"There are invalid layers selected!"));
1316 QModelIndexList idxs =
getLayerExplorer()->selectionModel()->selectedIndexes();
1318 if (idxs.size() == 1)
1323 if (item->
getType() ==
"FOLDER")
1327 std::list<te::map::AbstractLayerPtr> layers;
1328 layers.push_back(newLayer);
1334 catch (
const std::exception& e)
1346 if(selectedLayers.empty())
1348 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"Select a single layer in the layer explorer!"));
1353 for(std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin(); it != selectedLayers.end(); ++it)
1355 if(!(*it)->isValid())
1357 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"There are invalid layers selected!"));
1368 std::vector<te::map::AbstractLayerPtr> allLayers;
1372 dlg.
setLayers(selectedLayer, allLayers);
1375 if(dlg.exec() == QDialog::Accepted)
1387 catch(
const std::exception& e)
1397 if(!selectedLayers.empty())
1399 std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin();
1409 if(selectedLayers.empty())
1412 tr(
"Select a layer in the layer explorer!"));
1417 std::list<te::map::AbstractLayerPtr>::iterator it = selectedLayers.begin();
1419 while(it != selectedLayers.end())
1421 if(!it->get()->isValid())
1424 tr(
"There are invalid layers selected!"));
1448 std::list<te::map::AbstractLayerPtr> allLayersList;
1455 if(!selectedLayers.empty())
1465 std::list<te::map::AbstractLayerPtr> layers;
1466 layers.push_back(layer);
1486 QApplication::setOverrideCursor(Qt::WaitCursor);
1496 if(!dsTypeSett.isNull() && !dsTypeSett.isEmpty())
1497 dselector->setDataSourceToUse(dsTypeSett);
1499 QApplication::restoreOverrideCursor();
1501 int retval = dselector->exec();
1503 QApplication::setOverrideCursor(Qt::WaitCursor);
1505 if(retval == QDialog::Rejected)
1507 QApplication::restoreOverrideCursor();
1511 std::list<te::da::DataSourceInfoPtr> selectedDatasources = dselector->getSelecteds();
1513 if(selectedDatasources.empty())
1515 QApplication::restoreOverrideCursor();
1519 dselector.reset(
nullptr);
1521 const std::string& dsTypeId = selectedDatasources.front()->getType();
1527 if(lselectorw.get() ==
nullptr)
1529 QApplication::restoreOverrideCursor();
1530 throw te::common::Exception((boost::format(
TE_TR(
"No layer selector widget found for this type of data source: %1%!")) % dsTypeId).str());
1535 if(lselector ==
nullptr)
1537 QApplication::restoreOverrideCursor();
1541 lselector->
set(selectedDatasources);
1543 QApplication::restoreOverrideCursor();
1545 std::list<te::map::AbstractLayerPtr> layers = lselector->
getLayers();
1550 QApplication::setOverrideCursor(Qt::WaitCursor);
1552 lselectorw.reset(
nullptr);
1560 catch(
const std::exception& e)
1562 QApplication::restoreOverrideCursor();
1567 QApplication::restoreOverrideCursor();
1568 QMessageBox::warning(
this,
1570 tr(
"Unknown error while trying to add a layer from a dataset!"));
1573 QApplication::restoreOverrideCursor();
1588 std::list<te::map::AbstractLayerPtr> layers;
1591 qlb->setLayerList(layers);
1593 int retval = qlb->exec();
1595 if(retval == QDialog::Rejected)
1602 std::list<te::map::AbstractLayerPtr> ls;
1603 ls.push_back(layer);
1610 catch(
const std::exception& e)
1616 QMessageBox::warning(
this,
1618 tr(
"Unknown error while trying to add a layer from a queried dataset!"));
1634 int res = dlg.exec();
1636 if(res == QDialog::Accepted)
1640 std::list<te::map::AbstractLayerPtr> ls;
1649 catch(
const std::exception& e)
1655 QMessageBox::warning(
this,
1657 tr(
"Unknown error while trying to add a layer from a queried dataset!"));
1670 tr(
"Enter folder layer name"), &ok);
1677 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"Enter the layer name!"));
1690 QMessageBox::warning(
this,
m_app->
getAppTitle(), tr(
"There's no current project!"));
1697 if (editor.exec() == QDialog::Accepted)
1711 if(selectedLayerItems.empty())
1721 std::list<te::da::DataSourceInfoPtr> selecteds;
1727 selecteds.push_back(ds);
1729 const std::string& dsTypeId = selecteds.front()->getType();
1735 if (connectorw.get() ==
nullptr)
1737 throw te::common::Exception((boost::format(
TE_TR(
"No layer selector widget found for this type of data source: %1%!")) % dsTypeId).str());
1742 if (connector ==
nullptr)
1747 connector->
update(selecteds);
1754 if (dlg.exec() == QDialog::Rejected)
1763 catch(
const std::exception& e)
1769 QMessageBox::warning(
this,
1771 tr(
"Unknown error while trying to update a layer data source!"));
1782 QString projFile = proj->data().toString();
1797 catch (
const std::exception& e)
1811 catch (
const std::exception& e)
1824 catch (
const std::exception& e)
1836 std::list<te::map::AbstractLayerPtr> layers;
1843 if(!dsTypeSett.isNull() && !dsTypeSett.isEmpty())
1848 catch(
const std::exception& e)
1862 if(selectedLayerItems.empty())
1865 tr(
"Select a single layer in the layer explorer!"));
1869 std::list<te::map::AbstractLayerPtr> layers;
1870 layers.push_back(selectedLayerItems.front());
1876 catch(
const std::exception& e)
1890 std::list<te::map::AbstractLayerPtr> layers;
1898 catch(
const std::exception& e)
1910 std::list<te::map::AbstractLayerPtr> layers;
1917 catch(
const std::exception& e)
1931 if (!dsTypeSett.isNull() && !dsTypeSett.isEmpty())
1932 dExplorer->setDataSourceToUse(dsTypeSett);
1935 int retval = dExplorer->exec();
1937 if (retval == QDialog::Rejected)
1940 std::list<te::da::DataSourceInfoPtr> selectedDatasources = dExplorer->getSelecteds();
1942 if (selectedDatasources.empty())
1945 dExplorer.reset(
nullptr);
1947 const std::string& dsTypeId = selectedDatasources.front()->getType();
1951 catch (
const std::exception& e)
1957 QMessageBox::warning(
this,
1959 tr(
"DataSetExplorer Error!"));
1971 assert(layer.get());
1989 setWindowTitle(qApp->applicationName() +
" - " +
m_project->
m_title +
" *");
1996 QString msg = tr(
"The current project has unsaved changes. Do you want to save them?");
1997 QMessageBox::StandardButton btn = QMessageBox::question(
this, windowTitle(), msg,
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel,
QMessageBox::Save);
2002 if (btn == QMessageBox::Cancel)
2011 std::list<te::map::AbstractLayerPtr> lst;
2030 QString msg = tr(
"The project ") +
m_project->
m_title + tr(
" is invalid or from an older TerraView version. \nAn empty project will be created.");
2035 catch (
const boost::exception&)
2037 QString msg = tr(
"The project ") +
m_project->
m_title + tr(
" is invalid or from an older TerraView version. \nAn empty project will be created.");
2051 for (std::size_t i = 0; i <
m_tables.size(); ++i)
2058 std::list<te::map::AbstractLayerPtr> ls;
2081 QMainWindow::close();
2088 if(category ==
"Processing")
2095 QMenu*
p =
new QMenu(plgName, mnu);
2097 for(QList<QAction*>::const_iterator it = acts.begin(); it != acts.end(); ++it)
2102 else if(category ==
"Dataaccess")
2104 for(QList<QAction*>::const_iterator it = acts.begin(); it != acts.end(); ++it)
2109 for(QList<QAction*>::const_iterator it = acts.begin(); it != acts.end(); ++it)
QAction * m_projectAddLayerTabularDataSet
QAction * m_layerChartsScatter
This event signals that a new layer was created.
QAction * m_projectAddLayerQueryDataSet
ApplicationController * m_app
void onLayerScatterTriggered()
QAction * m_layerCompositionMode
TEXSDEXPORT void Save(All *all, te::xml::AbstractWriter &writer)
void onAddTabularLayerTriggered()
void onOpenProjectTriggered()
QAction * m_layerClearSelectedLayer
QAction * m_fileRestartSystem
QAction * m_toolsCustomize
virtual void setDataSourceId(const std::string &id)
QAction * m_mapShowGeographicGrid
virtual void initSlotsConnections()
void onToolsDataExchangerTriggered()
QAction * m_viewFullScreen
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
QDockWidget * m_progressDockWidget
Dock widget used to show progress information.
This is the base class for layers.
void onSaveProjectAsTriggered()
void onApplicationTriggered(te::qt::af::evt::Event *e)
A dialog used to build a chart.
void onToolsDataExchangerDirectPopUpTriggered()
A for customization of the application components.
QAction * m_toolsQueryDataSource
TEQTAFEXPORT void SaveDataSourcesFile(te::qt::af::ApplicationController *appController)
Saves data sources file.
A Qt dialog that allows users to create query builder based on TerraLib query framework.
A singleton class used to manage tasks progresses and their viewers.
const QString & getAppTitle() const
Returns the application title.
void onProjectPropertiesTriggered()
void onLayerSelectedObjectsChanged(const te::map::AbstractLayerPtr &layer)
void SaveProject(const ProjectMetadata &proj, const std::list< te::map::AbstractLayerPtr > &layers)
QMenu * getMenu(const QString &id)
Returns a menu registered with key id.
QAction * m_mapZoomExtent
A class that models the description of a dataset.
void onToolsDataExchangerDirectTriggered()
te::qt::widgets::CompositionModeMenuWidget * m_compModeMenu
void setApplicationController(te::qt::af::ApplicationController *app)
QAction * m_mapPreviousExtent
A base class for application events.
te::qt::widgets::MapDisplay * getDisplay()
virtual const char * what() const
It outputs the exception message.
void addInterface(te::qt::widgets::InterfaceController *i)
QList< QAction * > m_actions
QAction * m_filePrintPreview
This event indicates that the objects of the given layer must be highlighted.
This event signals that the srid of the map display changed.
The base API for TerraLib applications.
QAction * m_mapStopDrawing
This class models the concept of a project for the TerraView.
virtual void makeDialog()
A connector for the te::qt::widgets::StyleDockWidget class to the Application Framework.
void LoadProject(const QString &projFile, ProjectMetadata &proj, std::list< te::map::AbstractLayerPtr > &layers)
Contains a list of the map display events.
QAction * m_layerChartsHistogram
te::qt::widgets::StyleDockWidget * getExplorer() const
virtual void initializeProjectMenus()
Initializes the menus for the most recent open projects.
static te::dt::Date ds(2010, 01, 01)
QAction * m_fileSaveProject
A dialog to create multi resolution over a raster.
QAction * m_toolsDataExchangerDirect
TEQTAFEXPORT void SaveLastDatasourceOnSettings(const QString &dsType)
#define TE_TR(message)
It marks a string in order to get translated.
QAction * m_layerProperties
virtual void makeDialog()
const QString & getAppProjectExtension() const
Returns the application project extension.
A dialog used to build a grouping.
QMenu * m_projectAddLayerMenu
void onAddFolderLayerTriggered()
virtual bool isValid() const =0
It returns true if the layer can be used for instance to draw, otherwise, it returns false...
A multi thread Qt4 widget to control the display of a set of layers.
A dialog for edition of Project informations.
te::qt::widgets::LayerItemView * getExplorer() const
This class implements a concrete tool to measure operation (distance, area, and angle).
virtual void initAction(QAction *&act, const QString &icon, const QString &name, const QString &text, const QString &tooltip, bool iconVisibleInMenu, bool isCheckable, bool enabled, QObject *parent)
A singleton to keep all the registered data sources.
QMenu * m_toolsExchangerMenu
void onToolsRasterMultiResolutionTriggered()
Contains the list of the project events.
void setTerraViewLogoFilePath(std::string path)
const QString & getAppName() const
Returns the application name.
virtual void initActions()
QAction * m_mapMeasureAngle
QAction * m_layerCharEncoding
QAction * m_toolsDataSourceExplorer
virtual void setLayerList(const std::list< te::map::AbstractLayerPtr > &layers)
It sets the layer list to be showed in the Map Display.
QAction * m_projectAddFolderLayer
void onDataSourceExplorerTriggered()
QAction * m_projectProperties
QColor getSelectionColor() const
Returns the application selection color.
A connector of the te::qt::widgets::MapDisplay class to the Application Framework.
QAction * m_viewDataTable
void WriteProjectsToSettings(const QStringList &prjTitles, const QStringList &prjPaths)
This class represents the informations needed to build map charts.
QString GetWindowTitle(const ProjectMetadata &project, te::qt::af::ApplicationController *app)
void showProgressDockWidget()
void onPluginsManagerTriggered()
static ProgressManager & getInstance()
It returns a reference to the singleton instance.
te::qt::widgets::ProgressViewerBar * m_pvb
A connector for the te::qt::widgets::LayerExplorer class to the Application Framework.
void startProject(const QString &projectFileName)
A base class for widgets that allows application to create, edit or remove data sources.
bool checkAndSaveProject()
QAction * m_fileNewProject
void removeInteface(te::qt::widgets::InterfaceController *i)
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
void ResetProject(ProjectMetadata *p)
Contains a list of the layer events.
QAction * m_projectAddLayerDataset
const_iterator begin() const
It returns the constant iterator associated to the first child of this item.
A Qt dialog showing MGis about window.
QAction * m_fileSaveProjectAs
void onLayerDuplicateLayerTriggered()
te::qt::widgets::LayerItemView * getLayerExplorer()
An abstract class for layer selection widgets.
void onAddQueryLayerTriggered()
virtual void initSlotsConnections()
void openProject(const QString &prjFileName)
QAction * m_toolsDataExchangerDirectPopUp
void onToolsQueryDataSourceTriggered()
te::qt::widgets::ProgressViewerWidget * m_pvw
void init(const QString &cfgFile)
QString getExtensionFilter()
Returns the project extension filter .
QMenu * m_recentProjectsMenu
A singleton that contains a pointer to a help manager implementation.
A dialog for selecting a data source.
te::qt::af::InterfaceController * m_iController
void onRecentProjectsTriggered(QAction *proj)
virtual void createDefaultSettings()
A direct exchanger dialog for ADO, POSTGIS and SHP data sources.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
QAction * m_layerRemoveObjectSelection
Defines a layer item view for Qt5.
QAction * m_projectUpdateLayerDataSource
QAction * m_mapEditGraphicScale
QAction * m_mapUnknownSRID
void addActions(const QString &name, const QString &category, const QList< QAction * > &acts)
void triggered(te::qt::af::evt::Event *e)
void addListener(QObject *obj, const ListenerType &type=BOTH)
Insert an application item that will listen to framework events.
QAction * m_layerCheckSelectedLayer
ProjectMetadata * m_project
This class is designed for dealing with multi-language text translation in TerraLib.
QMenu * m_viewToolBarsMenu
A dataset is the unit of information manipulated by the data access module of TerraLib.
This file defines a class for a Query Dialog Dialog.
QAction * m_pluginsManager
void onNewProjectTriggered()
QAction * m_mapNextExtent
std::vector< te::qt::af::DataSetTableDockWidget * > m_tables
void setTerraLibLogoFilePath(std::string path)
Utility routines for the TerraLib Application Framework module.
QAction * m_layerSaveSelectedObjects
te::map::DataSetLayerPtr createLayer(te::da::DataSourcePtr source, te::da::DataSetTypePtr &dataset)
TerraView(QWidget *parent=0)
void onAddDataSetLayerTriggered()
void updateRecentProjects(const QString &prjFile, const QString &prjTitle)
Update the list of recent projects. This is commonly used when there's a new most recent project...
QAction * m_layerObjectGrouping
void trigger(te::qt::af::evt::Event *)
te::qt::widgets::MapDisplay * getMapDisplay()
void onQueryLayerCreateLayer(te::map::AbstractLayerPtr layer)
void onHighlightLayerObjects(const te::map::AbstractLayerPtr &layer, te::da::DataSet *dataset, te::se::Style *style)
void GetProjectsFromSettings(QStringList &prjTitles, QStringList &prjPaths)
QAction * m_layerFitOnMapDisplay
QAction * findAction(const QString &id) const
Returns the action identified by id or NULL if there's not an action identified by id...
void onLayerGroupingTriggered()
QAction * m_fileOpenProject
The API for controller of TerraView application.
virtual void initToolbars()
std::vector< QToolBar * > getToolBars() const
Return the list of registered toolbars.
QAction * m_toolsRasterMultiResolution
QAction * m_mapMeasureArea
The main class of TerraView.
QAction * m_viewStyleExplorer
QAction * m_layerPanToSelectedOnMapDisplay
virtual void initActions()
A dialog used to configure the properties of a new textual file based layer.
const QString & getTlibLogo() const
QAction * m_mapPanToCoordinateTool
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
Proxy configuration file for TerraView (see terraview_config.h).
QAction * m_layerShowTable
void onLayerChartTriggered()
A layer with reference to a dataset.
A connector to controll all non modal interfaces.
void onLayerHistogramTriggered()
te::qt::widgets::QueryDialog * m_queryDlg
void onQueryLayerTriggered()
A Qt dialog for plugin management.
void clearAll()
Removes references for Viewers and tasks.
std::list< te::map::AbstractLayerPtr > GetSelectedLayersOnly(te::qt::widgets::LayerItemView *view)
A dialog used to define the basic parameters of a new histogram.
QAction * m_mapRemoveSelection
QAction * m_viewLayerExplorer
A class that defines the interface of a qt bar progress viewer.
void onUpdateLayerDataSourceTriggered()
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
void onLayerCompositionModeTriggered()
QAction * m_toolsDataExchanger
Contains the list of the application events.
void setProject(ProjectMetadata *proj)
Sets the project to be inspected.
QAction * m_layerLinkTable
virtual const std::string & getDataSourceId() const
The base API for controllers of TerraLib applications.
This file defines a class for a Query DataSource Dialog Dialog.
QAction * m_mapMeasureDistance
virtual void initToolbars()
A dialog for selecting a data source.
A connector to controll all non modal interfaces.
TEQTAFEXPORT QString GetLastDatasourceFromSettings()
TerraViewController * m_tvController
file(WRITE ${CMAKE_BINARY_DIR}/config_qhelp.cmake"configure_file (${TERRALIB_ABSOLUTE_ROOT_DIR}/doc/qhelp/help.qhcp.in ${CMAKE_BINARY_DIR}/share/terraview/help/help.qhcp @ONLY)") add_custom_command(OUTPUT del_dir COMMAND $
void closeEvent(QCloseEvent *event)
QAction * m_layerDuplicateLayer
StyleExplorer * m_styleExplorer
void onToolsCustomizeTriggered()
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
QAction * m_layerInvertObjectSelection
void AddRecentProjectToSettings(const QString &prjTitle, const QString &prjPath)
QAction * m_mapShowGraphicScale
void onSaveProjectTriggered(bool save_as=false)
void onCreateNewLayer(te::map::AbstractLayerPtr layer)
LayerExplorer * m_layerExplorer
QAction * m_layerFitSelectedOnMapDisplay
const QString & getAboutLogo() const
Returns the application project extension.
void onRestartSystemTriggered()
QModelIndex GetParent(QTreeView *view)