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
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 
34 {
35  te::plugin::PluginInfo* info = te::plugin::GetInstalledPlugin(TE_PLUGINS_PATH + std::string("/te.da.ogr.teplg.json"));
37 
39 }
40 
41 int main(int argc, char** argv)
42 {
43  int res;
44 
45  try
46  {
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 
71 
73 
74  return res;
75 }
An utility class to control the startup and cleanup of the TerraLib Platform and its resources...
void finalize()
It finalizes the TerraLib Platform.
static PluginManager & getInstance()
It returns a reference to the singleton instance.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
void initialize()
It initializes the TerraLib Platform.
void LoadDrivers()
TerraLib include files.
int main(int argc, char **argv)
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
The basic information about a plugin.
TEPLUGINEXPORT PluginInfo * GetInstalledPlugin(const std::string &pluginFilePath)
It returns information about a given plugin provided its plugin configuration file name or dir...