All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LayoutEditor.h
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of TerraView - A 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 terralib/qt/af/connectors/DataFrame.h
22 
23  \brief A connector of the te::qt::widgets::DataFrame class to the Application Framework.
24 */
25 
26 #ifndef __TERRALIB_QT_AF_CONNECTORS_INTERNAL_LAYOUT_EDITOR_H
27 #define __TERRALIB_QT_AF_CONNECTORS_INTERNAL_LAYOUT_EDITOR_H
28 
29 // Terralib
30 #include "../../../maptools/AbstractLayer.h"
31 #include "../../../qt/widgets/layout/LayoutEditor.h"
32 #include "../Config.h"
33 
34 // Qt
35 #include <QtCore/QObject>
36 #include <QtCore/QString>
37 
38 namespace te
39 {
40 // Forward declaration
41  namespace qt
42  {
43  namespace widgets
44  {
45  class AbstractTool;
46  }
47 
48  namespace af
49  {
50  namespace evt
51  {
52  // Forward declaration
53  struct Event;
54  }
55 
56  /*!
57  \class DataFrame
58 
59  \brief A connector of the te::qt::widgets::MultiThreadMapDisplay used in te::qt::widgets::DataFrame class to the Application Framework.
60 
61  It is used to listen events sent by the application framework.
62  It is a proxy for the te::qt::widgets::MultiThreadMapDisplay used in te::qt::widgets::DataFrame.
63  */
64  class TEQTAFEXPORT LayoutEditor : public QObject
65  {
66  Q_OBJECT
67 
68  public:
69 
70  /*!
71  \brief Constructor.
72 
73  \param md te::qt::widgets::MultiThreadMapDisplay to be listened.
74  */
76 
77  /*! \brief destructor. */
78  virtual ~LayoutEditor();
79 
80  te::qt::widgets::LayoutEditor* getLayoutEditor();
81 
82  /*!
83  \brief Updates the current tool being used on te::qt::widgets::MapDisplay.
84 
85  \param tool The new te::qt::widgets::AbstractTool.
86 
87  \note The class will take the ownership of the given pointer.
88  */
89  void setCurrentTool(te::qt::widgets::AbstractTool* tool);
90 
91  protected slots:
92 
93  /*!
94  \brief Listener to the application framewrork events.
95 
96  \param e An event sent by framework.
97  */
98  void onApplicationTriggered(te::qt::af::evt::Event* e);
99 
100  //void onDrawLayersFinished(const QMap<QString, QString>& errors);
101 
102  protected:
103 
104  //void drawLayerSelection(te::map::AbstractLayer* layer);
105 
106  protected:
107 
108  te::qt::widgets::LayoutEditor* m_layoutEditor; //!< Pointer to a component te::qt::widgets::LayoutEditor.
109  te::qt::widgets::AbstractTool* m_tool; //!< Pointer to the current tool being used.
110  };
111  }
112  }
113 }
114 
115 #endif // __TERRALIB_QT_AF_CONNECTORS_INTERNAL_LAYOUT_EDITOR_H
This class defines an interface for objects that can receive application events and respond to them...
Definition: AbstractTool.h:62
#define TEQTAFEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:108
te::qt::widgets::LayoutEditor * m_layoutEditor
Pointer to a component te::qt::widgets::LayoutEditor.
Definition: LayoutEditor.h:108
A base class for application events.
Definition: Event.h:59
te::qt::widgets::AbstractTool * m_tool
Pointer to the current tool being used.
Definition: LayoutEditor.h:109