Main Page
Modules
Namespaces
Classes
Files
File List
File Members
examples/dataview/main.cpp
Go to the documentation of this file.
1
/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
#include "
TabularViewerEx.h
"
21
22
//! TerraLib include files
23
#include <
terralib/common/TerraLib.h
>
24
#include <
terralib/common/Exception.h
>
25
#include <terralib/qt/widgets/dataview/HLDelegateDecorator.h>
26
27
//#include <terralib/qt/widgets/dataview/TabularViewer.h>
28
29
//! Qt include files
30
#include <QApplication>
31
#include <QIcon>
32
33
void
LoadDrivers
()
34
{
35
te::plugin::PluginInfo
* info =
te::plugin::GetInstalledPlugin
(TE_PLUGINS_PATH + std::string(
"/te.da.ogr.teplg.json"
));
36
te::plugin::PluginManager::getInstance
().add(info);
37
38
te::plugin::PluginManager::getInstance
().loadAll();
39
}
40
41
int
main
(
int
argc,
char
** argv)
42
{
43
int
res;
44
45
try
46
{
47
TerraLib::getInstance
().
initialize
();
48
49
LoadDrivers
();
50
51
52
QApplication
app(argc, argv);
53
54
QString spaths = std::string(ICON_THEME_PATH).c_str();
55
QStringList paths = spaths.split(
";"
);
56
57
QIcon::setThemeName(ICON_THEME);
58
QIcon::setThemeSearchPaths(paths);
59
60
TabularViewerEx
win;
61
win.show();
62
63
res = app.exec();
64
}
65
catch
(
te::common::Exception
&)
66
{
67
return
-1;
68
}
69
70
te::plugin::PluginManager::getInstance
().unloadAll();
71
72
TerraLib::getInstance
().
finalize
();
73
74
return
res;
75
}
QApplication
TerraLib.h
An utility class to control the startup and cleanup of the TerraLib Platform and its resources...
TabularViewerEx
Definition:
TabularViewerEx.h:47
TerraLib::finalize
void finalize()
It finalizes the TerraLib Platform.
Definition:
common/TerraLib.cpp:67
te::common::Singleton< PluginManager >::getInstance
static PluginManager & getInstance()
It returns a reference to the singleton instance.
te::common::Exception
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
Definition:
src/terralib/common/Exception.h:58
TerraLib::initialize
void initialize()
It initializes the TerraLib Platform.
Definition:
common/TerraLib.cpp:34
LoadDrivers
void LoadDrivers()
TerraLib include files.
Definition:
examples/dataview/main.cpp:33
main
int main(int argc, char **argv)
Definition:
examples/dataview/main.cpp:41
Exception.h
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
te::plugin::PluginInfo
The basic information about a plugin.
Definition:
attic/src/plugin/PluginInfo.h:61
TabularViewerEx.h
te::plugin::GetInstalledPlugin
TEPLUGINEXPORT PluginInfo * GetInstalledPlugin(const std::string &pluginFilePath)
It returns information about a given plugin provided its plugin configuration file name or dir...
Definition:
attic/src/plugin/Utils.cpp:81
terralib5_src
examples
dataview
main.cpp
Generated on Wed Jun 6 2018 12:16:10 for TerraLib by
1.8.11