mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
Remove last traces of MDI
This commit is contained in:
1 parent
967975828c
commit
a1fe3739d1
27 files changed
+27
-251
No files matched your search
@@ -36,7 +36,6 @@
|
||||
#include "cafPdmUiTreeView.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QMdiSubWindow>
|
||||
#include <QModelIndex>
|
||||
|
||||
// Dark title bar is taken from
|
||||
@@ -167,68 +166,6 @@ void RiuMainWindowTools::collapseSiblings( const caf::PdmUiItem* sourceUiItem )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindowTools::setWindowSizeOnWidgetsInMdiWindows( RiuMainWindowBase* mainWindow, int width, int height )
|
||||
{
|
||||
if ( !mainWindow ) return;
|
||||
|
||||
auto widgets = mainWindow->findChildren<QMdiSubWindow*>();
|
||||
for ( auto w : widgets )
|
||||
{
|
||||
if ( !w ) continue;
|
||||
|
||||
w->showNormal();
|
||||
}
|
||||
|
||||
// Process events before resize to make sure the widget is ready for resize
|
||||
// If not, a maximized window with not get the prescribed window size
|
||||
QApplication::processEvents();
|
||||
|
||||
for ( auto w : widgets )
|
||||
{
|
||||
if ( !w ) continue;
|
||||
auto viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( w->widget() );
|
||||
|
||||
if ( viewWindow && viewWindow->viewWidget() )
|
||||
{
|
||||
QWidget* viewWidget = viewWindow->viewWidget();
|
||||
|
||||
viewWidget->resize( width, height );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindowTools::setFixedWindowSizeFor3dViews( RiuMainWindowBase* mainWindow, int width, int height )
|
||||
{
|
||||
if ( !mainWindow ) return;
|
||||
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( !proj ) return;
|
||||
|
||||
for ( Rim3dView* riv : proj->allViews() )
|
||||
{
|
||||
if ( riv && riv->viewer() )
|
||||
{
|
||||
//// Make sure all views are maximized for snapshotting
|
||||
// QMdiSubWindow* subWnd = mainWindow->findMdiSubWindow( riv->viewer()->layoutWidget() );
|
||||
// if ( subWnd )
|
||||
//{
|
||||
// subWnd->showMaximized();
|
||||
// }
|
||||
|
||||
// This size is set to match the regression test reference images
|
||||
QSize windowSize( width, height );
|
||||
|
||||
riv->viewer()->setFixedSize( windowSize );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user