TerraView.h
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 TerraView - A Free and Open Source GIS Application.
4 
5  TerraView is free software: you can redistribute it and/or modify
6  it under the terms of the GNU 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  TerraView 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 General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with TerraLib Code Editor. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@dpi.inpe.br>.
18  */
19 
20 /*!
21  \file terraview/TerraView.h
22 
23  \brief The main class of TerraView.
24 */
25 
26 #ifndef __TERRAVIEW_INTERNAL_TERRAVIEW_H
27 #define __TERRAVIEW_INTERNAL_TERRAVIEW_H
28 
29 // TerraLib
30 #include "TerraViewController.h"
32 
33 // STL
34 #include <string>
35 
36 // Forward declarations
37 class QWidget;
38 class QMenu;
39 
40 struct ProjectMetadata;
41 
42 namespace te
43 {
44  namespace qt
45  {
46  namespace af
47  {
48  class InterfaceController;
49  }
50  namespace widgets
51  {
52  class ChartDisplayWidget;
53  class CompositionModeMenuWidget;
54  class HelpManagerImpl;
55  class QueryDialog;
56  }
57  }
58 }
59 
60 /*!
61  \brief The main class of TerraView.
62 
63  \sa te::qt::af::BaseApplication
64 */
66 {
67  Q_OBJECT
68 
69  public:
70 
71  TerraView(QWidget* parent = 0);
72 
73  ~TerraView();
74 
75  void init();
76 
77  void startProject(const QString& projectFileName);
78 
79  protected:
80 
81  virtual void makeDialog();
82 
83  virtual void initActions();
84 
85  virtual void initMenus();
86 
87  virtual void initToolbars();
88 
89  virtual void initSlotsConnections();
90 
91  virtual void createDefaultSettings();
92 
93  void addMenusActions();
94 
95  void addPopUpMenu();
96 
97  protected slots:
98 
99  void showAboutDialog();
100 
101 
102  void onApplicationTriggered(te::qt::af::evt::Event* e);
103 
104 
105  void onRestartSystemTriggered();
106 
107  void onNewProjectTriggered();
108 
109  void onOpenProjectTriggered();
110 
111  void onSaveProjectTriggered(bool save_as = false);
112 
113  void onSaveProjectAsTriggered();
114 
115 
116  void onHelpTriggered();
117 
118 
119  void onLinkTriggered();
120 
121  void onLayerHistogramTriggered();
122 
123  void onLayerScatterTriggered();
124 
125  void onLayerChartTriggered();
126 
127  void onLayerGroupingTriggered();
128 
129  void onLayerCompositionModeTriggered();
130 
131  void onQueryLayerTriggered();
132 
133 
134  void onAddDataSetLayerTriggered();
135 
136  void onAddQueryLayerTriggered();
137 
138  void onAddTabularLayerTriggered();
139 
140  void onAddFolderLayerTriggered();
141 
142  void onProjectPropertiesTriggered();
143 
144  void onUpdateLayerDataSourceTriggered();
145 
146  void onRecentProjectsTriggered(QAction* proj);
147 
148 
149  void onPluginsManagerTriggered();
150 
151  void onToolsCustomizeTriggered();
152 
153  void onToolsDataExchangerTriggered();
154 
155  void onToolsDataExchangerDirectTriggered();
156 
157  void onToolsDataExchangerDirectPopUpTriggered();
158 
159  void onToolsQueryDataSourceTriggered();
160 
161  void onToolsRasterMultiResolutionTriggered();
162 
163  void onDataSourceExplorerTriggered();
164 
165 
166  void showProgressDockWidget();
167 
168  void onHighlightLayerObjects(const te::map::AbstractLayerPtr& layer, te::da::DataSet* dataset, const QColor& color);
169 
170  void onCreateNewLayer(te::map::AbstractLayerPtr layer);
171 
172  protected:
173 
174  void projectChanged();
175 
176  bool checkAndSaveProject();
177 
178  void openProject(const QString& prjFileName);
179 
180  void resetComponents();
181 
182  void closeEvent(QCloseEvent * event);
183 
184  void addActions(const QString& name, const QString& category, const QList<QAction*>& acts);
185 
190  QAction* m_fileExit;
191  QAction* m_filePrint;
194 
195  QAction* m_helpAbout;
196  QAction* m_helpContents;
197  QAction* m_helpUpdate;
198 
201  QAction* m_layerChart;
205  QAction* m_layerQuery;
206 
208 
216 
225 
226  QMenu* m_fileMenu;
227  QMenu* m_helpMenu;
228  QMenu* m_layerMenu;
229  QMenu* m_mapMenu;
234  QMenu* m_toolsMenu;
236  QMenu* m_viewMenu;
238 
239 
240  QDockWidget* m_progressDockWidget; //!< Dock widget used to show progress information
241 
243 
245 
247 
249 
251 
253 };
254 
255 #endif // __TERRAVIEW_INTERNAL_TERRAVIEW_H
QAction * m_projectAddLayerTabularDataSet
Definition: TerraView.h:211
QAction * m_layerChartsScatter
Definition: TerraView.h:200
QAction * m_projectAddLayerQueryDataSet
Definition: TerraView.h:210
QAction * m_layerCompositionMode
Definition: TerraView.h:204
QAction * m_fileRestartSystem
Definition: TerraView.h:193
QAction * m_toolsCustomize
Definition: TerraView.h:217
QDockWidget * m_progressDockWidget
Dock widget used to show progress information.
Definition: TerraView.h:240
The main class of TerraView.
Definition: TerraView.h:65
QAction * m_toolsQueryDataSource
Definition: TerraView.h:223
te::qt::widgets::CompositionModeMenuWidget * m_compModeMenu
Definition: TerraView.h:248
A base class for application events.
Definition: Event.h:59
QMenu * m_projectMenu
Definition: TerraView.h:231
QAction * m_projectAddLayerGraph
Definition: TerraView.h:212
QAction * m_filePrintPreview
Definition: TerraView.h:192
QAction * m_helpUpdate
Definition: TerraView.h:197
QAction * m_fileExit
Definition: TerraView.h:190
QAction * m_layerChartsHistogram
Definition: TerraView.h:199
QAction * m_fileSaveProject
Definition: TerraView.h:187
QAction * m_toolsDataExchangerDirect
Definition: TerraView.h:219
The API for controller of TerraView application.
QMenu * m_toolsMenu
Definition: TerraView.h:234
QMenu * m_projectAddLayerMenu
Definition: TerraView.h:232
QMenu * m_viewMenu
Definition: TerraView.h:236
QMenu * m_toolsExchangerMenu
Definition: TerraView.h:235
QAction * m_layerChart
Definition: TerraView.h:201
QAction * m_toolsDataSourceExplorer
Definition: TerraView.h:221
QAction * m_projectAddFolderLayer
Definition: TerraView.h:213
QMenu * m_mapMenu
Definition: TerraView.h:229
QAction * m_projectProperties
Definition: TerraView.h:215
QAction * m_fileNewProject
Definition: TerraView.h:186
URI C++ Library.
QAction * m_projectAddLayerDataset
Definition: TerraView.h:209
QMenu * m_pluginsMenu
Definition: TerraView.h:230
QAction * m_fileSaveProjectAs
Definition: TerraView.h:188
QAction * m_toolsDataSourceManagement
Definition: TerraView.h:222
QAction * m_toolsDataExchangerDirectPopUp
Definition: TerraView.h:220
QMenu * m_helpMenu
Definition: TerraView.h:227
QMenu * m_recentProjectsMenu
Definition: TerraView.h:233
te::qt::af::InterfaceController * m_iController
Definition: TerraView.h:244
QAction * m_projectUpdateLayerDataSource
Definition: TerraView.h:214
QMenu * m_fileMenu
Definition: TerraView.h:226
This file defines a class for a Query Dialog Dialog.
Definition: QueryDialog.h:66
ProjectMetadata * m_project
Definition: TerraView.h:250
QMenu * m_viewToolBarsMenu
Definition: TerraView.h:237
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
QAction * m_pluginsManager
Definition: TerraView.h:207
QAction * m_layerObjectGrouping
Definition: TerraView.h:203
QAction * m_fileOpenProject
Definition: TerraView.h:189
The API for controller of TerraView application.
QAction * m_toolsRasterMultiResolution
Definition: TerraView.h:224
QAction * m_helpContents
Definition: TerraView.h:196
QAction * m_helpAbout
Definition: TerraView.h:195
QAction * m_layerQuery
Definition: TerraView.h:205
A connector to controll all non modal interfaces.
te::qt::widgets::QueryDialog * m_queryDlg
Definition: TerraView.h:246
QAction * m_filePrint
Definition: TerraView.h:191
This class is widget that provides a menu for composition mode selection.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
QAction * m_toolsDataExchanger
Definition: TerraView.h:218
A QMainWindow to be used as the basis for TerraLib applications.
QAction * m_layerLinkTable
Definition: TerraView.h:202
An interface for help managers implementations.
QMenu * m_layerMenu
Definition: TerraView.h:228
te::qt::widgets::HelpManagerImpl * m_helpManager
Definition: TerraView.h:242
TerraViewController * m_tvController
Definition: TerraView.h:252