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 Creator IDE](#qt-creator-ide)
- [Qt Design Studio](#qt-design-studio) - [Qt Design Studio](#qt-design-studio)
- [QmixElements](#qmixelements) - [QmixElements](#qmixelements)
- [ezEditor](#ezeditor)
### Docking everywhere - no central widget ### 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. Advanced Docking System in the QmixElements sofware.
![QmixElements](doc/qmix_elements.png) ![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 Q_OBJECT
private: private:
StatusDialogPrivate* d; ///< private data (pimpl) StatusDialogPrivate* d; ///< private data (pimpl)
friend class StatusDialogPrivate; friend struct StatusDialogPrivate;
private slots: private slots:
void on_dockWidgetsComboBox_currentIndexChanged(int index); 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 <QMainWindow>
#include "DockManager.h" #include "DockManager.h"
QT_BEGIN_NAMESPACE
namespace Ui { namespace Ui {
class MainWindow; class MainWindow;
} }
QT_END_NAMESPACE
/** /**
* This example shows, how to place a dock widget container and a static * This example shows, how to place a dock widget container and a static

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -68,6 +68,7 @@ struct FloatingDockContainerPrivate
CDockContainerWidget *DropContainer = nullptr; CDockContainerWidget *DropContainer = nullptr;
CDockAreaWidget *SingleDockArea = nullptr; CDockAreaWidget *SingleDockArea = nullptr;
QPoint DragStartPos; QPoint DragStartPos;
bool Hiding = false;
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
QWidget* MouseEventHandler = nullptr; QWidget* MouseEventHandler = nullptr;
CFloatingWidgetTitleBar* TitleBar = nullptr; CFloatingWidgetTitleBar* TitleBar = nullptr;
@ -455,6 +456,7 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
return; return;
} }
d->Hiding = true;
for (auto DockArea : d->DockContainer->openedDockAreas()) for (auto DockArea : d->DockContainer->openedDockAreas())
{ {
for (auto DockWidget : DockArea->openedDockWidgets()) for (auto DockWidget : DockArea->openedDockWidgets())
@ -462,6 +464,7 @@ void CFloatingDockContainer::hideEvent(QHideEvent *event)
DockWidget->toggleView(false); DockWidget->toggleView(false);
} }
} }
d->Hiding = false;
} }
//============================================================================ //============================================================================
@ -652,11 +655,22 @@ void CFloatingDockContainer::onDockAreasAddedOrRemoved()
//============================================================================ //============================================================================
void CFloatingDockContainer::updateWindowTitle() 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(); auto TopLevelDockArea = d->DockContainer->topLevelDockArea();
if (TopLevelDockArea) if (TopLevelDockArea)
{ {
CDockWidget* CurrentWidget = TopLevelDockArea->currentDockWidget(); CDockWidget* CurrentWidget = TopLevelDockArea->currentDockWidget();
d->reflectCurrentWidget(CurrentWidget); if (CurrentWidget)
{
d->reflectCurrentWidget(CurrentWidget);
}
} }
else else
{ {

View File

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