2017-02-25 05:44:02 +08:00
|
|
|
#ifndef DockManagerH
|
|
|
|
#define DockManagerH
|
2017-02-27 21:15:20 +08:00
|
|
|
/*******************************************************************************
|
|
|
|
** QtAdcancedDockingSystem
|
|
|
|
** Copyright (C) 2017 Uwe Kindler
|
|
|
|
**
|
|
|
|
** This program is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** This program is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
|
2017-02-25 05:44:02 +08:00
|
|
|
//============================================================================
|
|
|
|
/// \file DockManager.h
|
|
|
|
/// \author Uwe Kindler
|
2017-02-27 01:13:56 +08:00
|
|
|
/// \date 26.02.2017
|
|
|
|
/// \brief Declaration of CDockManager class
|
2017-02-25 05:44:02 +08:00
|
|
|
//============================================================================
|
|
|
|
|
2017-02-27 21:15:20 +08:00
|
|
|
|
2017-02-25 05:44:02 +08:00
|
|
|
//============================================================================
|
|
|
|
// INCLUDES
|
|
|
|
//============================================================================
|
|
|
|
#include "DockContainerWidget.h"
|
|
|
|
|
|
|
|
namespace ads
|
|
|
|
{
|
2017-02-27 01:13:56 +08:00
|
|
|
struct DockManagerPrivate;
|
2017-03-01 21:09:56 +08:00
|
|
|
class CFloatingDockContainer;
|
2017-03-01 23:13:37 +08:00
|
|
|
class CDockContainerWidget;
|
|
|
|
class CDockOverlay;
|
2017-02-25 05:44:02 +08:00
|
|
|
|
|
|
|
/**
|
2017-02-27 01:13:56 +08:00
|
|
|
* The central dock manager that maintains the complete docking system
|
|
|
|
**/
|
2017-02-25 05:44:02 +08:00
|
|
|
class CDockManager : public CDockContainerWidget
|
|
|
|
{
|
2017-02-27 01:13:56 +08:00
|
|
|
Q_OBJECT
|
|
|
|
private:
|
|
|
|
DockManagerPrivate* d; ///< private data (pimpl)
|
|
|
|
friend class DockManagerPrivate;
|
2017-03-01 23:13:37 +08:00
|
|
|
|
2017-02-27 01:13:56 +08:00
|
|
|
protected:
|
2017-03-01 21:09:56 +08:00
|
|
|
|
2017-03-01 23:13:37 +08:00
|
|
|
|
2017-02-27 01:13:56 +08:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Default Constructor.
|
2017-03-01 21:09:56 +08:00
|
|
|
* If the given parent is a QMainWindow, the dock manager sets itself as the
|
2017-02-27 01:13:56 +08:00
|
|
|
* central widget
|
|
|
|
*/
|
|
|
|
CDockManager(QWidget* parent = 0);
|
2017-02-25 05:44:02 +08:00
|
|
|
|
2017-02-27 01:13:56 +08:00
|
|
|
/**
|
|
|
|
* Virtual Destructor
|
|
|
|
*/
|
|
|
|
virtual ~CDockManager();
|
2017-03-01 21:09:56 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Registers the given floating widget in the internal list of
|
|
|
|
* floating widgets
|
|
|
|
*/
|
|
|
|
void registerFloatingWidget(CFloatingDockContainer* FloatingWidget);
|
2017-03-01 23:13:37 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove the given floating widget from the list of registered floating
|
|
|
|
* widgets
|
|
|
|
*/
|
|
|
|
void removeFloatingWidget(CFloatingDockContainer* FloatingWidget);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Registers the given dock container widget
|
|
|
|
*/
|
|
|
|
void registerDockContainer(CDockContainerWidget* DockContainer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove dock container from the internal list of registered dock
|
|
|
|
* containers
|
|
|
|
*/
|
|
|
|
void removeDockContainer(CDockContainerWidget* DockContainer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Overlay for containers
|
|
|
|
*/
|
|
|
|
CDockOverlay* containerOverlay() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Overlay for dock areas
|
|
|
|
*/
|
|
|
|
CDockOverlay* dockAreaOverlay() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the list of all active and visible dock containers
|
|
|
|
* Dock containers are the main dock manager and all floating widgets
|
|
|
|
*/
|
|
|
|
const QList<CDockContainerWidget*> dockContainers() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the list of all floating widgets
|
|
|
|
*/
|
|
|
|
const QList<CFloatingDockContainer*> floatingWidgets() const;
|
2017-02-27 01:13:56 +08:00
|
|
|
}; // class DockManager
|
2017-02-25 05:44:02 +08:00
|
|
|
} // namespace ads
|
2017-02-27 01:13:56 +08:00
|
|
|
//-----------------------------------------------------------------------------
|
2017-02-25 05:44:02 +08:00
|
|
|
#endif // DockManagerH
|