Merge branch 'master' into focused_dockwidget

This commit is contained in:
Uwe Kindler 2020-05-14 07:34:31 +02:00
commit c5333a2414
13 changed files with 41 additions and 14 deletions

View File

@ -54,6 +54,7 @@ of his docking system project.
- [Qt Creator IDE](#qt-creator-ide)
- [Qt Design Studio](#qt-design-studio)
- [QmixElements](#qmixelements)
- [ezEditor](#ezeditor)
### Docking everywhere - no central widget
@ -304,3 +305,11 @@ plugin-based and modular laboratory automation software for controlling CETONI d
Advanced Docking System in the QmixElements sofware.
![QmixElements](doc/qmix_elements.png)
### [ezEditor](https://github.com/ezEngine/ezEngine)
The ezEditor is a full blown graphical editor used for editing scenes and
importing and authoring assets for the [ezEngine](https://github.com/ezEngine/ezEngine) -
an open source C++ game engine in active development.
![ezEditor](doc/ezEngine_editor.png)

View File

@ -23,7 +23,7 @@ class CStatusDialog : public QDialog
Q_OBJECT
private:
StatusDialogPrivate* d; ///< private data (pimpl)
friend class StatusDialogPrivate;
friend struct StatusDialogPrivate;
private slots:
void on_dockWidgetsComboBox_currentIndexChanged(int index);

BIN
doc/ezEngine_editor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

View File

@ -4,10 +4,11 @@
#include <QMainWindow>
#include "DockManager.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
/**
* This example shows, how to place a dock widget container and a static

View File

@ -4,9 +4,11 @@
#include <QMainWindow>
#include "DockManager.h"
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{

View File

@ -34,7 +34,7 @@
#include "ads_globals.h"
class QAbstractButton;
QT_FORWARD_DECLARE_CLASS(QAbstractButton)
namespace ads
{

View File

@ -35,8 +35,8 @@
#include "ads_globals.h"
#include "DockWidget.h"
class QXmlStreamWriter;
class QAbstractButton;
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter)
QT_FORWARD_DECLARE_CLASS(QAbstractButton)
namespace ads
{

View File

@ -35,7 +35,7 @@
#include "ads_globals.h"
#include "DockWidget.h"
class QXmlStreamWriter;
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter)
namespace ads

View File

@ -36,8 +36,8 @@
#include "FloatingDockContainer.h"
class QSettings;
class QMenu;
QT_FORWARD_DECLARE_CLASS(QSettings)
QT_FORWARD_DECLARE_CLASS(QMenu)
namespace ads
{

View File

@ -26,10 +26,11 @@
#include <QHash>
#include <QRect>
#include <QFrame>
class QGridLayout;
#include "ads_globals.h"
QT_FORWARD_DECLARE_CLASS(QGridLayout)
namespace ads
{
struct DockOverlayPrivate;

View File

@ -34,8 +34,8 @@
#include "ads_globals.h"
class QToolBar;
class QXmlStreamWriter;
QT_FORWARD_DECLARE_CLASS(QToolBar)
QT_FORWARD_DECLARE_CLASS(QXmlStreamWriter)
namespace ads
{

View File

@ -68,6 +68,7 @@ struct FloatingDockContainerPrivate
CDockContainerWidget *DropContainer = nullptr;
CDockAreaWidget *SingleDockArea = nullptr;
QPoint DragStartPos;
bool Hiding = false;
#ifdef Q_OS_LINUX
QWidget* MouseEventHandler = nullptr;
CFloatingWidgetTitleBar* TitleBar = nullptr;
@ -455,6 +456,7 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
return;
}
d->Hiding = true;
for (auto DockArea : d->DockContainer->openedDockAreas())
{
for (auto DockWidget : DockArea->openedDockWidgets())
@ -462,6 +464,7 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
DockWidget->toggleView(false);
}
}
d->Hiding = false;
}
//============================================================================
@ -652,11 +655,22 @@ void CFloatingDockContainer::onDockAreasAddedOrRemoved()
//============================================================================
void CFloatingDockContainer::updateWindowTitle()
{
// If this floating container will be hidden, then updating the window
// tile is not required anymore
if (d->Hiding)
{
return;
}
auto TopLevelDockArea = d->DockContainer->topLevelDockArea();
if (TopLevelDockArea)
{
CDockWidget* CurrentWidget = TopLevelDockArea->currentDockWidget();
d->reflectCurrentWidget(CurrentWidget);
if (CurrentWidget)
{
d->reflectCurrentWidget(CurrentWidget);
}
}
else
{

View File

@ -37,7 +37,7 @@
#include <QDebug>
#include <QStyle>
class QAbstractButton;
QT_FORWARD_DECLARE_CLASS(QAbstractButton)
#ifndef ADS_STATIC
#ifdef ADS_SHARED_EXPORT
@ -60,7 +60,7 @@ class QAbstractButton;
// dumps to qDebug and std::cout after layout changes
#define ADS_DEBUG_LEVEL 0
class QSplitter;
QT_FORWARD_DECLARE_CLASS(QSplitter)
namespace ads
{