Loading...
Searching...
No Matches
ApplicationDockerController.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/ApplicationDockerController.h
22
23 \brief The base API for docker controllers of TerraLib applications.
24 */
25
26#ifndef __TERRALIB_QT_AF_INTERNAL_APPLICATIONDOCKERCONTROLLER_H
27#define __TERRALIB_QT_AF_INTERNAL_APPLICATIONDOCKERCONTROLLER_H
28
29 // Terralib
30#include "Config.h"
31
32#include "ApplicationDocker.h"
34
35// Qt
36#include <QDockWidget>
37#include <QMainWindow>
38#include <QMenu>
39#include <QObject>
40
41namespace te
42{
43 namespace qt
44 {
45 namespace af
46 {
47 /*!
48 \class ApplicationDockerController
49
50 \brief The base API for docker controllers of TerraLib applications.
51
52 \ingroup af
53 */
55 {
56 Q_OBJECT
57
58 public:
59
60 /*!
61 \brief Constructor.
62
63 \param parent The parent object.
64 */
65 ApplicationDockerController(QMainWindow* mainWindow);
66
67 /*!
68 \brief Destructor.
69 */
71
72 public:
73
74 void addDockWidget(const ApplicationDockerInfo& dockInfo, Qt::DockWidgetArea area);
75
76 void removeDockWidget(QDockWidget* dock);
77
78 void addDockerVisibilityActions(QMenu* menu);
79
80 void raiseDockWidget(QDockWidget* dock);
81
82 static te::qt::af::ApplicationDockerInfo createAppDockInfo(QDockWidget* dock, const QIcon& icon, const QString& dockName, bool isCloseable);
83
84 protected slots:
85
86 void onDockSelected(QString dockName);
87
89
90 void onPinDock();
91
92 void onMoveDock();
93
94 void onDockVisibilityChanged(bool state);
95
96 protected:
97
98 void startDocker(QDockWidget*& dockWidget, Qt::DockWidgetArea area, ApplicationDocker*& appDocker, ApplicationDockerTitleBar*& appDockerTitleBar, QAction*& action, QString title);
99
100 protected:
101
102 QMainWindow* m_mainWindow; //!< The application main window pointer.
103
104 ApplicationDocker* m_leftAppDocker; //!< The left application docker
105
106 ApplicationDocker* m_rightAppDocker; //!< The right application docker
107
108 ApplicationDockerTitleBar* m_leftAppDockerTitleBar; //!< The left docker title bar widget
109
110 ApplicationDockerTitleBar* m_rightAppDockerTitleBar; //!< The right docker title bar widget
111
112 QDockWidget* m_leftDockWidget; //!< The left Qt Dock Widget
113
114 QDockWidget* m_rightDockWidget; //!< The right Qt Dock Widget
115
116 QAction* m_leftDockVisibleAction; //!< Action to controll the left dock visibility
117
118 QAction* m_rightDockVisibleAction; //!< Action to controll the right dock visibility
119 };
120 } // end namespace af
121 } // end namespace qt
122} // end namespace te
123
124#endif // __TERRALIB_QT_AF_INTERNAL_APPLICATIONDOCKERCONTROLLER_H
The base API for docker title bar for TerraLib Docker.
The base API for docker controllers of TerraLib applications.
QAction * m_leftDockVisibleAction
Action to controll the left dock visibility.
static te::qt::af::ApplicationDockerInfo createAppDockInfo(QDockWidget *dock, const QIcon &icon, const QString &dockName, bool isCloseable)
ApplicationDockerTitleBar * m_leftAppDockerTitleBar
The left docker title bar widget.
ApplicationDockerTitleBar * m_rightAppDockerTitleBar
The right docker title bar widget.
void removeDockWidget(QDockWidget *dock)
QDockWidget * m_rightDockWidget
The right Qt Dock Widget.
ApplicationDockerController(QMainWindow *mainWindow)
Constructor.
void startDocker(QDockWidget *&dockWidget, Qt::DockWidgetArea area, ApplicationDocker *&appDocker, ApplicationDockerTitleBar *&appDockerTitleBar, QAction *&action, QString title)
QMainWindow * m_mainWindow
The application main window pointer.
void raiseDockWidget(QDockWidget *dock)
QDockWidget * m_leftDockWidget
The left Qt Dock Widget.
QAction * m_rightDockVisibleAction
Action to controll the right dock visibility.
void addDockWidget(const ApplicationDockerInfo &dockInfo, Qt::DockWidgetArea area)
ApplicationDocker * m_leftAppDocker
The left application docker.
ApplicationDocker * m_rightAppDocker
The right application docker.
void onDockSelected(QString dockName)
The base API for docker title bar for TerraLib Docker.
The base API for docker controllers of TerraLib applications.
Namespace for the Qt Application Framework module of TerraLib.
Definition af.h:46
Namespace for the Qt module of TerraLib.
Definition Renderer.h:56
TerraLib.
#define slots
Configuration flags for the TerraLib Application Framework.
#define TEQTAFEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition Config.h:71