Improve edit view 3D "on top" logic

- Proxy dialog removed
- When the QDS window is minimized/maximized, the edit view 3D follows.
  The opposite is not true (edit view 3D can be minimized separately).
- Edit view 3D is always on top of QDS window. Only exception is when
  a popup is shown (so that the user can handle the popup).
- External apps go normally on top of the edit view 3D.

Known (non critical) issues:
- Activating the edit view 3D doesn't raise() the QDS window, so if an
external app is on top of the edit view 3D then the view is clicked,
the external app will be in between the view and the QDS window.
- Closing the edit view 3D from the x button doesnt work (causes a
  restart). This is not in the scope of this commit.

Task-number: QDS-1179
Change-Id: I1dd72590037be295b94735de96772307ba14c59c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Mahmoud Badri
2019-12-11 21:29:10 +02:00
parent c2bfdff70b
commit f97de35dd4
31 changed files with 307 additions and 403 deletions

View File

@@ -201,6 +201,19 @@ MainWindow::MainWindow()
this, &MainWindow::openDroppedFiles);
}
// Edit View 3D needs to know when the main windows's state or activation change
void MainWindow::changeEvent(QEvent *event)
{
if (event->type() == QEvent::WindowStateChange) {
emit m_coreImpl->windowStateChanged(m_previousWindowStates, windowState());
m_previousWindowStates = windowState();
} else if (event->type() == QEvent::ActivationChange) {
auto lastChild = qobject_cast<QWidget *>(children().last());
bool hasPopup = lastChild && lastChild->isActiveWindow();
emit m_coreImpl->windowActivationChanged(isActiveWindow(), hasPopup);
}
}
NavigationWidget *MainWindow::navigationWidget(Side side) const
{
return side == Side::Left ? m_leftNavigationWidget : m_rightNavigationWidget;