Loading...
Searching...
No Matches
ApplicationDocker.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 terralib/qt/af/ApplicationDocker.h
22
23 \brief The base API for docker controllers of TerraLib applications.
24 */
25
26#ifndef __TERRALIB_QT_AF_INTERNAL_APPLICATIONDOCKER_H
27#define __TERRALIB_QT_AF_INTERNAL_APPLICATIONDOCKER_H
28
29 // Terralib
30#include "Config.h"
31
32// STL
33#include <map>
34
35
36// Qt
37#include <QMainWindow>
38
39// Forward Declaration Qt
40class QAction;
41class QDockWidget;
42class QToolBar;
43
44namespace te
45{
46 namespace qt
47 {
48 namespace af
49 {
51 {
52 QDockWidget* m_dockWidget;
53 QIcon m_icon;
54 QString m_dockName;
56
58 {
59 m_dockWidget = nullptr;
60 m_isCloseable = false;
61 }
62 };
63
64 /*!
65 \class ApplicationDocker
66
67 \brief The base API for docker controllers of TerraLib applications.
68
69 \ingroup af
70 */
71 class TEQTAFEXPORT ApplicationDocker : public QMainWindow
72 {
73 Q_OBJECT
74
75 public:
76
77 /*!
78 \brief Constructor.
79
80 \param parent The parent object.
81 */
82 ApplicationDocker(QWidget* parent, Qt::ToolBarArea area);
83
84 /*!
85 \brief Destructor.
86 */
88
89 public:
90
91 bool eventFilter(QObject* watched, QEvent* e);
92
93 QSize sizeHint() const;
94
95 QSize minimumSizeHint() const;
96
98
99 bool hasDockWidget(QDockWidget* dock);
100
101 void raiseDockWidget(QDockWidget* dock);
102
103 void addDock(const ApplicationDockerInfo& dockInfo, Qt::DockWidgetArea area);
104
106
107 void removeDock(QDockWidget* dock);
108
110
112
113 protected:
114
116
118
119 void resizeEvent(QResizeEvent *event);
120
121 protected slots:
122
124
126
127 signals:
128
129 void dockSelected(QString dockName);
130
132
133 protected:
134
135 QToolBar* m_sideBar;
136
137 std::map<QAction*, ApplicationDockerInfo> m_dockInfoActionMap;
138
140
142
144 };
145 } // end namespace af
146 } // end namespace qt
147} // end namespace te
148
149#endif // __TERRALIB_QT_AF_INTERNAL_APPLICATIONDOCKER_H
The base API for docker controllers of TerraLib applications.
bool hasDockWidget(QDockWidget *dock)
ApplicationDocker(QWidget *parent, Qt::ToolBarArea area)
Constructor.
void resizeEvent(QResizeEvent *event)
void dockSelected(QString dockName)
void removeDock(QDockWidget *dock)
bool eventFilter(QObject *watched, QEvent *e)
void addDock(const ApplicationDockerInfo &dockInfo, Qt::DockWidgetArea area)
void onDockActionVisibilityChanged(bool state)
std::map< QAction *, ApplicationDockerInfo > m_dockInfoActionMap
void takeDock(ApplicationDockerInfo &dockInfo)
void raiseDockWidget(QDockWidget *dock)
TerraLib.
#define slots
#define TEQTAFEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:71
Proxy configuration file for TerraView (see terraview_config.h).