DockerEvents.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 DockerEvents.h
22 
23  \brief Contains a list of docker events.
24 */
25 
26 #ifndef __TERRALIB_QT_AF_EVENTS_INTERNAL_DOCKEREVENTS_H
27 #define __TERRALIB_QT_AF_EVENTS_INTERNAL_DOCKEREVENTS_H
28 
29 #include "Event.h"
30 #include "Enums.h"
31 
32 // Qt Include
33 #include <QDockWidget>
34 #include <QIcon>
35 
36 // STL
37 #include <memory>
38 
39 namespace te
40 {
41  namespace qt
42  {
43  namespace af
44  {
45  namespace evt
46  {
47  /*!
48  \struct AddDock
49 
50  \brief This event signals that a new dock must be added
51  */
52  struct AddDock : public Event
53  {
54  /*!
55  \brief Constructor.
56 
57  \param dock The Qt component dock widget to be added
58  \param area The Qt info to define the dock area
59  \param icon The Qt component icon for dockwidget
60  \param dockName String dock name
61  \param isCloseable Flag to indicate if this component can be closed
62  */
63  AddDock(QDockWidget* dock, Qt::DockWidgetArea area, const QIcon& icon, const QString& dockName, bool isCloseable) : Event(ADD_DOCK),
64  m_dockWidget(dock),
65  m_area(area),
66  m_icon(icon),
67  m_dockName(dockName),
68  m_isCloseable(isCloseable)
69  {
70  }
71 
72  QDockWidget* m_dockWidget;
73  Qt::DockWidgetArea m_area;
74  QIcon m_icon;
75  QString m_dockName;
77  };
78 
79  /*!
80  \struct RaiseDock
81 
82  \brief This event signals that a dock must be raised
83  */
84  struct RaiseDock : public Event
85  {
86  /*!
87  \brief Constructor.
88 
89  \param dock The Qt component dock widget to be raised
90  */
91  RaiseDock(QDockWidget* dock) : Event(RAISE_DOCK),
92  m_dockWidget(dock)
93  {
94  }
95 
96  QDockWidget* m_dockWidget;
97  };
98  }
99  }
100  }
101 }
102 
103 #endif //__TERRALIB_QT_AF_EVENTS_INTERNAL_DOCKEREVENTS_H
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::qt::af::evt::AddDock::m_icon
QIcon m_icon
Definition: DockerEvents.h:74
te::qt::af::evt::AddDock::m_dockName
QString m_dockName
Definition: DockerEvents.h:75
te::qt::af::evt::RaiseDock::RaiseDock
RaiseDock(QDockWidget *dock)
Constructor.
Definition: DockerEvents.h:91
te::qt::af::evt::RaiseDock::m_dockWidget
QDockWidget * m_dockWidget
Definition: DockerEvents.h:96
Event.h
This file contains a class to represent an event.
Enums.h
Enumerations of XML module.
te::qt::af::evt::AddDock::m_isCloseable
bool m_isCloseable
Definition: DockerEvents.h:76
te::qt::af::evt::Event
A base class for application events.
Definition: Event.h:60
te::qt::af::evt::AddDock::m_area
Qt::DockWidgetArea m_area
Definition: DockerEvents.h:73
te::qt::af::evt::RaiseDock
This event signals that a dock must be raised.
Definition: DockerEvents.h:85
te::qt::af::evt::AddDock::AddDock
AddDock(QDockWidget *dock, Qt::DockWidgetArea area, const QIcon &icon, const QString &dockName, bool isCloseable)
Constructor.
Definition: DockerEvents.h:63
te::qt::af::evt::AddDock
This event signals that a new dock must be added.
Definition: DockerEvents.h:53
te::qt::af::evt::AddDock::m_dockWidget
QDockWidget * m_dockWidget
Definition: DockerEvents.h:72
te::qt::af::evt::ADD_DOCK
@ ADD_DOCK
Definition: Enums.h:80
te::qt::af::evt::RAISE_DOCK
@ RAISE_DOCK
Definition: Enums.h:81