Loading...
Searching...
No Matches
TerraViewController.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 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/*!
21 \file terraview/TerraViewController.h
22
23 \brief The API for controller of TerraView application.
24*/
25
26#ifndef __TERRAVIEW_INTERNAL_TERRAVIEWCONTROLLER_H
27#define __TERRAVIEW_INTERNAL_TERRAVIEWCONTROLLER_H
28
29// Terralib
31#include "Config.h"
32
33// STL
34#include <map>
35#include <set>
36#include <vector>
37
38
39// Qt
40#include <QObject>
41#include <QStringList>
42#include <QSettings>
43#include <QColor>
44
45// Forward declarations
46class QAction;
47class QActionGroup;
48class QMenu;
49class QMenuBar;
50class QToolBar;
51class QWidget;
52
53/*!
54 \class TerraViewController
55
56 \brief The API for controller of TerraView application.
57
58*/
59class TerraViewController : public QObject
60{
61 Q_OBJECT
62
63 public:
64
65 /*!
66 \brief Constructor.
67
68 \param parent The parent object.
69 */
71
72 /*!
73 \brief Destructor.
74 */
76
77
78 /*!
79 \brief Initializes the menus for the most recent open projects.
80 */
81 virtual void initializeProjectMenus();
82
83 /*!
84 \brief Update the list of recent projects. This is commonly used when there's a new most recent project.
85
86 \param prj_file Complete file name for the project file.
87
88 \param prj_title Title of the project.
89 */
90 void updateRecentProjects(const QString& prjFile, const QString& prjTitle);
91
93
94 /*!
95 \brief Returns the application project extension.
96
97 \return Application project extension.
98 */
99 const QString& getAppProjectExtension() const;
100
101 /*!
102 \brief Returns the most recent project.
103
104 \return Application most recent opened project.
105 */
106 QString getMostRecentProject() const;
107
108 /*!
109 \brief Returns the project extension filter .
110
111 \return Filter string.
112 */
114
115 protected:
116
118
119 QString m_appProjectExtension; //!< Application project extension.
120 QStringList m_recentProjs; //!< List of the recent projects.
121 QStringList m_recentProjsTitles; //!< List of the titles of the recent projects.
122};
123
124#endif // __TERRAVIEW_INTERNAL_TERRAVIEWCONTROLLER_H
125
The base API for controllers of TerraLib applications.
The API for controller of TerraView application.
const QString & getAppProjectExtension() const
Returns the application project extension.
QString m_appProjectExtension
Application project extension.
QStringList m_recentProjs
List of the recent projects.
QString getExtensionFilter()
Returns the project extension filter .
QString getMostRecentProject() const
Returns the most recent project.
QStringList m_recentProjsTitles
List of the titles of the recent projects.
virtual void initializeProjectMenus()
Initializes the menus for the most recent open projects.
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.
te::qt::af::ApplicationController * m_app
TerraViewController(te::qt::af::ApplicationController *app, std::string appConfigFile)
Constructor.
virtual ~TerraViewController()
Destructor.
The base API for TerraLib applications.
Proxy configuration file for TerraView (see terraview_config.h).