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
46 class QAction;
47 class QActionGroup;
48 class QMenu;
49 class QMenuBar;
50 class QToolBar;
51 class QWidget;
52 
53 /*!
54  \class TerraViewController
55 
56  \brief The API for controller of TerraView application.
57 
58 */
59 class TerraViewController : public QObject
60 {
61  Q_OBJECT
62 
63  public:
64 
65  /*!
66  \brief Constructor.
67 
68  \param parent The parent object.
69  */
70  TerraViewController(te::qt::af::ApplicationController* app, std::string appConfigFile);
71 
72  /*!
73  \brief Destructor.
74  */
75  virtual ~TerraViewController();
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 
92  /*!
93  \brief Returns the application project extension.
94 
95  \return Application project extension.
96  */
97  const QString& getAppProjectExtension() const;
98 
99  /*!
100  \brief Returns the most recent project.
101 
102  \return Application most recent opened project.
103  */
104  QString getMostRecentProject() const;
105 
106  /*!
107  \brief Returns the project extension filter .
108 
109  \return Filter string.
110  */
111  QString getExtensionFilter();
112 
113  protected:
114 
116 
117  QString m_appProjectExtension; //!< Application project extension.
118  QStringList m_recentProjs; //!< List of the recent projects.
119  QStringList m_recentProjsTitles; //!< List of the titles of the recent projects.
120 };
121 
122 #endif // __TERRAVIEW_INTERNAL_TERRAVIEWCONTROLLER_H
123 
virtual void initializeProjectMenus()
Initializes the menus for the most recent open projects.
QStringList m_recentProjsTitles
List of the titles of the recent projects.
The base API for TerraLib applications.
QString m_appProjectExtension
Application project extension.
QString getMostRecentProject() const
Returns the most recent project.
const QString & getAppProjectExtension() const
Returns the application project extension.
QStringList m_recentProjs
List of the recent projects.
te::qt::af::ApplicationController * m_app
QString getExtensionFilter()
Returns the project extension filter .
Proxy configuration file for TerraView (see terraview_config.h).
virtual ~TerraViewController()
Destructor.
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...
TerraViewController(te::qt::af::ApplicationController *app, std::string appConfigFile)
Constructor.
The API for controller of TerraView application.
The base API for controllers of TerraLib applications.