diff --git a/ApplicationExeCode/Resources/ActiveWindow.svg b/ApplicationExeCode/Resources/ActiveWindow.svg
new file mode 100644
index 00000000000..8ca0244ac1c
--- /dev/null
+++ b/ApplicationExeCode/Resources/ActiveWindow.svg
@@ -0,0 +1,25 @@
+
\ No newline at end of file
diff --git a/ApplicationExeCode/Resources/ResInsight.qrc b/ApplicationExeCode/Resources/ResInsight.qrc
index c28205b776a..a5680729e1c 100644
--- a/ApplicationExeCode/Resources/ResInsight.qrc
+++ b/ApplicationExeCode/Resources/ResInsight.qrc
@@ -6,7 +6,8 @@
3DView16x16.png
3DViewGeoMech16x16.png
3DWindow.svg
- AICDValve16x16.png
+ ActiveWindow.svg
+ AICDValve16x16.png
SICDValve16x16.png
Annotations16x16.png
AnalysisPlot16x16.png
diff --git a/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp b/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp
index 8cc14aec1ba..9b6c0bd280a 100644
--- a/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp
+++ b/ApplicationLibCode/Application/RiaCompletionTypeCalculationScheduler.cpp
@@ -151,7 +151,7 @@ void RiaCompletionTypeCalculationScheduler::performScheduledUpdates()
RiaApplication::instance()->setActiveReservoirView( activeView );
if ( RiuMainWindow::instance() )
{
- RiuMainWindow::instance()->setActiveViewer( activeView->viewer()->layoutWidget() );
+ RiuMainWindow::instance()->setActiveViewer( activeView->dockWindowName() );
}
}
}
diff --git a/ApplicationLibCode/Application/RiaGuiApplication.cpp b/ApplicationLibCode/Application/RiaGuiApplication.cpp
index 5b59bae3924..490c1e990c5 100644
--- a/ApplicationLibCode/Application/RiaGuiApplication.cpp
+++ b/ApplicationLibCode/Application/RiaGuiApplication.cpp
@@ -57,6 +57,7 @@
#include "RimAnnotationCollection.h"
#include "RimAnnotationInViewCollection.h"
#include "RimAnnotationTextAppearance.h"
+#include "RimDockWindowController.h"
#include "RimEclipseCaseCollection.h"
#include "RimEclipseView.h"
#include "RimFlowPlotCollection.h"
@@ -103,7 +104,6 @@
#include "RiuGuiTheme.h"
#include "RiuMainWindow.h"
#include "RiuMainWindowTools.h"
-#include "RiuMdiMaximizeWindowGuard.h"
#include "RiuMessagePanel.h"
#include "RiuPlotMainWindow.h"
#include "RiuPlotMainWindowTools.h"
@@ -134,7 +134,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -229,11 +228,6 @@ RiaGuiApplication::~RiaGuiApplication()
}
processEvents();
-
- delete m_mainWindow.data();
- m_mainWindow.clear();
-
- m_mainPlotWindow.reset();
}
//--------------------------------------------------------------------------------------------------
@@ -406,6 +400,52 @@ void RiaGuiApplication::storeTreeViewState()
}
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RiaGuiApplication::storeDockState()
+{
+ if ( m_mainWindow )
+ {
+ project()->mainWindowDockState = m_mainWindow->dockWidgetStateString();
+ }
+
+ if ( m_mainPlotWindow )
+ {
+ project()->plotWindowDockState = m_mainPlotWindow->dockWidgetStateString();
+ }
+}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RiaGuiApplication::restoreDockState()
+{
+ if ( m_mainWindow )
+ {
+ bool useDefault = true;
+ if ( !project()->mainWindowDockState().isEmpty() )
+ {
+ useDefault = !m_mainWindow->restoreDockWidgetState( project()->mainWindowDockState );
+ }
+ if ( useDefault )
+ {
+ RiuDockWidgetTools::setDockLayout( m_mainWindow, RiuDockWidgetTools::dockState3DEclipseName() );
+ }
+ }
+ if ( m_mainPlotWindow )
+ {
+ bool useDefault = true;
+ if ( !project()->plotWindowDockState().isEmpty() )
+ {
+ useDefault = !m_mainPlotWindow->restoreDockWidgetState( project()->plotWindowDockState );
+ }
+ if ( useDefault )
+ {
+ RiuDockWidgetTools::setDockLayout( m_mainPlotWindow, RiuDockWidgetTools::dockStatePlotWindowName() );
+ }
+ }
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -447,11 +487,7 @@ RimViewWindow* RiaGuiApplication::activePlotWindow() const
if ( m_mainPlotWindow )
{
- QList subwindows = m_mainPlotWindow->subWindowList( QMdiArea::StackingOrder );
- if ( !subwindows.empty() )
- {
- viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( subwindows.back()->widget() );
- }
+ return m_mainPlotWindow->activePlotView();
}
return viewWindow;
@@ -866,14 +902,9 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
mainPlotWnd->show();
mainPlotWnd->raise();
- if ( snapshotHeight > -1 && snapshotWidth > -1 )
- {
- RiuMainWindowTools::setWindowSizeOnWidgetsInMdiWindows( mainPlotWnd, snapshotWidth, snapshotHeight );
- }
-
processEvents();
- RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( snapshotFolder );
+ RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( snapshotFolder, snapshotWidth, snapshotHeight );
}
}
@@ -883,14 +914,9 @@ RiaApplication::ApplicationStatus RiaGuiApplication::handleArguments( gsl::not_n
mainWnd->show();
mainWnd->raise();
- if ( snapshotHeight > -1 && snapshotWidth > -1 )
- {
- RiuMainWindowTools::setFixedWindowSizeFor3dViews( mainWnd, snapshotWidth, snapshotHeight );
- }
-
processEvents();
- RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( snapshotFolder );
+ RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( snapshotFolder, snapshotWidth, snapshotHeight );
}
auto mainPlotWnd = mainPlotWindow();
@@ -1078,7 +1104,7 @@ void RiaGuiApplication::createMainPlotWindow()
// Always enable undo/redo framework, as multi-select operations perform significantly better with it enabled
caf::CmdExecCommandManager::instance()->enableUndoCommandSystem( true );
- m_mainPlotWindow = std::make_unique();
+ m_mainPlotWindow = new RiuPlotMainWindow();
m_mainPlotWindow->setWindowTitle( "Plots - ResInsight" );
m_mainPlotWindow->setDefaultWindowSize();
m_mainPlotWindow->loadWinGeoAndDockToolBarLayout();
@@ -1125,9 +1151,9 @@ RiuPlotMainWindow* RiaGuiApplication::mainPlotWindow()
//--------------------------------------------------------------------------------------------------
RiuMainWindowBase* RiaGuiApplication::mainWindowByID( int mainWindowID )
{
- if ( mainWindowID == 0 )
+ if ( mainWindowID == RimDockWindowController::MAIN_WINDOW_ID_3D )
return m_mainWindow;
- else if ( mainWindowID == 1 )
+ else if ( mainWindowID == RimDockWindowController::MAIN_WINDOW_ID_PLOTS )
return m_mainPlotWindow.get();
else
return nullptr;
@@ -1146,15 +1172,9 @@ RimViewWindow* RiaGuiApplication::activeViewWindow()
{
viewWindow = RiaGuiApplication::instance()->activeReservoirView();
}
- else if ( dynamic_cast( mainWindowWidget ) )
+ else if ( auto mainPlotWindow = dynamic_cast( mainWindowWidget ) )
{
- RiuPlotMainWindow* mainPlotWindow = dynamic_cast( mainWindowWidget );
-
- QList subwindows = mainPlotWindow->subWindowList( QMdiArea::StackingOrder );
- if ( !subwindows.empty() )
- {
- viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( subwindows.back()->widget() );
- }
+ viewWindow = mainPlotWindow->activePlotView();
}
return viewWindow;
@@ -1315,9 +1335,6 @@ void RiaGuiApplication::onFileSuccessfullyLoaded( const QString& fileName, RiaDe
//--------------------------------------------------------------------------------------------------
void RiaGuiApplication::onProjectBeingOpened()
{
- // When importing a project, do not maximize the first MDI window to be created
- m_maximizeWindowGuard = std::make_unique();
-
if ( m_mainWindow ) m_mainWindow->setBlockSubWindowActivatedSignal( true );
if ( mainPlotWindow() ) mainPlotWindow()->setBlockSubWindowActivatedSignal( true );
}
@@ -1376,8 +1393,6 @@ void RiaGuiApplication::onProjectOpened()
setWindowCaptionFromAppState();
- m_maximizeWindowGuard.reset();
-
processEvents();
if ( m_mainWindow ) m_mainWindow->setBlockSubWindowActivatedSignal( false );
@@ -1391,6 +1406,8 @@ void RiaGuiApplication::onProjectOpened()
m_mainPlotWindow->raise();
m_mainPlotWindow->activateWindow();
}
+
+ restoreDockState();
}
//--------------------------------------------------------------------------------------------------
@@ -1432,6 +1449,7 @@ void RiaGuiApplication::onProjectBeingSaved()
{
setLastUsedDialogDirectory( "BINARY_GRID", QFileInfo( m_project->fileName() ).absolutePath() );
storeTreeViewState();
+ storeDockState();
if ( auto sumCaseMainColl = RiaSummaryTools::summaryCaseMainCollection() )
{
@@ -1817,13 +1835,30 @@ bool RiaGuiApplication::notify( QObject* receiver, QEvent* event )
if ( plot ) done = plot->handleGlobalKeyEvent( keyEvent );
}
}
+ else if ( event->type() == QEvent::MouseButtonPress )
+ {
+ if ( activeWindow() != mainWindow() )
+ {
+ if ( auto plotMain = mainPlotWindow() )
+ {
+ QMouseEvent* mouseEvent = static_cast( event );
+ for ( auto view : plotMain->viewWindows() )
+ {
+ RimPlotWindow* plot = dynamic_cast( view );
+ if ( plot ) done = plot->handleGlobalMousePressEvent( mouseEvent );
+ }
+ }
+ }
+ }
else if ( event->type() == QEvent::Wheel )
{
if ( activeWindow() != mainWindow() )
{
- QWheelEvent* wheelEvent = static_cast( event );
- RimPlotWindow* plot = dynamic_cast( activePlotWindow() );
- if ( plot ) done = plot->handleGlobalWheelEvent( wheelEvent );
+ QWheelEvent* wheelEvent = static_cast( event );
+ if ( RimPlotWindow* plot = dynamic_cast( activePlotWindow() ) )
+ {
+ done = plot->handleGlobalWheelEvent( wheelEvent );
+ }
}
}
if ( !done )
diff --git a/ApplicationLibCode/Application/RiaGuiApplication.h b/ApplicationLibCode/Application/RiaGuiApplication.h
index 67dfcbfd5e9..caaaf5da00c 100644
--- a/ApplicationLibCode/Application/RiaGuiApplication.h
+++ b/ApplicationLibCode/Application/RiaGuiApplication.h
@@ -55,7 +55,6 @@ class RimWellAllocationPlot;
class RiuMainWindow;
class RiuMainWindowBase;
-class RiuMdiMaximizeWindowGuard;
class RiuPlotMainWindow;
class RiuRecentFileActionProvider;
class RiaArgumentParser;
@@ -157,16 +156,16 @@ class RiaGuiApplication : public QApplication, public RiaApplication
void createMainPlotWindow();
void storeTreeViewState();
+ void storeDockState();
+ void restoreDockState();
private slots:
void slotWorkerProcessFinished( int exitCode, QProcess::ExitStatus exitStatus );
void onLastWindowClosed();
private:
- QPointer m_mainWindow;
- std::unique_ptr m_mainPlotWindow;
+ QPointer m_mainWindow;
+ QPointer m_mainPlotWindow;
std::unique_ptr m_recentFileActionProvider;
-
- std::unique_ptr m_maximizeWindowGuard;
};
diff --git a/ApplicationLibCode/Application/RiaPlotWindowRedrawScheduler.cpp b/ApplicationLibCode/Application/RiaPlotWindowRedrawScheduler.cpp
index 8225ea7c082..ef74e91302c 100644
--- a/ApplicationLibCode/Application/RiaPlotWindowRedrawScheduler.cpp
+++ b/ApplicationLibCode/Application/RiaPlotWindowRedrawScheduler.cpp
@@ -18,10 +18,14 @@
#include "RiaPlotWindowRedrawScheduler.h"
+#include "RimViewWindow.h"
+
#include "RiuMultiPlotBook.h"
#include "RiuMultiPlotPage.h"
#include "RiuPlotWidget.h"
+#include "DockWidget.h"
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -108,6 +112,12 @@ void RiaPlotWindowRedrawScheduler::performScheduledUpdates()
if ( pagesToUpdate.count( page ) > 0 ) pagesToUpdate.erase( page );
}
}
+
+ if ( auto pdmView = plotBook->ownerViewWindow() )
+ {
+ QSize s = pdmView->dockWidget()->size();
+ plotBook->resize( s );
+ }
plotBook->performUpdate( updateType );
}
diff --git a/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.cpp b/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.cpp
index 7515bd584ec..60c367b4de4 100644
--- a/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.cpp
+++ b/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.cpp
@@ -249,18 +249,20 @@ void RiaRegressionTestRunner::runRegressionTest()
QString fullPathGeneratedFolder = testCaseFolder.absoluteFilePath( generatedFolderName );
if ( regressionTestConfig.exportSnapshots3dViews )
{
- setDefaultSnapshotSizeFor3dViews();
-
- RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( fullPathGeneratedFolder );
+ QSize defaultSize = RiaRegressionTestRunner::regressionDefaultImageSize();
+ RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( fullPathGeneratedFolder,
+ defaultSize.width(),
+ defaultSize.height() );
QApplication::processEvents();
}
if ( regressionTestConfig.exportSnapshotsPlots )
{
- setDefaultSnapshotSizeForPlotWindows();
-
- RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( fullPathGeneratedFolder );
+ QSize defaultSize = RiaRegressionTestRunner::regressionDefaultImageSize();
+ RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( fullPathGeneratedFolder,
+ defaultSize.width(),
+ defaultSize.height() );
}
uint64_t usedMemoryBeforeClose = caf::MemoryInspector::getApplicationPhysicalMemoryUsageMiB();
@@ -546,32 +548,6 @@ void RiaRegressionTestRunner::removeDirectoryWithContent( QDir& dirToDelete )
caf::Utils::removeDirectoryAndFilesRecursively( dirToDelete.absolutePath() );
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiaRegressionTestRunner::setDefaultSnapshotSizeFor3dViews()
-{
- RiuMainWindow* mainWnd = RiuMainWindow::instance();
- if ( !mainWnd ) return;
-
- QSize defaultSize = RiaRegressionTestRunner::regressionDefaultImageSize();
-
- RiuMainWindowTools::setFixedWindowSizeFor3dViews( mainWnd, defaultSize.width(), defaultSize.height() );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiaRegressionTestRunner::setDefaultSnapshotSizeForPlotWindows()
-{
- RiuPlotMainWindow* plotMainWindow = RiaGuiApplication::instance()->mainPlotWindow();
- if ( !plotMainWindow ) return;
-
- QSize defaultSize = RiaRegressionTestRunner::regressionDefaultImageSize();
-
- RiuMainWindowTools::setWindowSizeOnWidgetsInMdiWindows( plotMainWindow, defaultSize.width(), defaultSize.height() );
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.h b/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.h
index 6033e993b11..fd1cb2bfd79 100644
--- a/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.h
+++ b/ApplicationLibCode/Application/Tools/RiaRegressionTestRunner.h
@@ -45,8 +45,7 @@ class RiaRegressionTestRunner
static void updateRegressionTest( const QString& testRootPath );
- static void setDefaultSnapshotSizeFor3dViews();
- static void setDefaultSnapshotSizeForPlotWindows();
+ static QSize regressionDefaultImageSize();
private:
RiaRegressionTestRunner();
@@ -64,7 +63,6 @@ class RiaRegressionTestRunner
const QDir& testDir );
static void removeDirectoryWithContent( QDir& dirToDelete );
- static QSize regressionDefaultImageSize();
static QString diff2htmlHeaderText( const QString& testRootPath );
QFileInfoList subDirectoriesForTestExecution( const QDir& directory );
diff --git a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.cpp b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.cpp
index 73fa5b359ca..6e6390c2742 100644
--- a/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.cpp
+++ b/ApplicationLibCode/Application/Tools/Summary/RiaSummaryPlotTools.cpp
@@ -114,6 +114,7 @@ std::vector duplicatePlots( const std::vector& sourcePlots )
for ( auto plot : sourcePlots )
{
auto copy = plot->copyObject();
+ copy->resetDockWindowId();
{
// TODO: Workaround for fixing the PdmPointer in RimEclipseResultDefinition
// caf::PdmPointer m_eclipseCase;
@@ -145,6 +146,7 @@ std::vector duplicateSummaryPlots( const std::vectorcopyObject();
if ( copy )
{
+ copy->resetDockWindowId();
plots.push_back( copy );
}
}
@@ -161,7 +163,7 @@ RimMultiPlot* createAndAppendMultiPlot( const std::vector& plots )
auto* plotWindow = new RimMultiPlot;
plotWindow->setMultiPlotTitle( QString( "Multi Plot %1" ).arg( plotCollection->multiPlots().size() + 1 ) );
- plotWindow->setAsPlotMdiWindow();
+ plotWindow->dockAsPlotWindow();
plotCollection->addMultiPlot( plotWindow );
appendPlotsToMultiPlot( plotWindow, plots );
@@ -190,7 +192,7 @@ RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vectorsetMultiPlotTitle( QString( "Multi Plot %1" ).arg( plotCollection->multiPlots().size() + 1 ) );
- plotWindow->setAsPlotMdiWindow();
+ plotWindow->dockAsPlotWindow();
plotCollection->addSummaryMultiPlot( plotWindow );
plotWindow->handleDroppedObjects( objects );
@@ -221,7 +223,7 @@ void appendPlotsToMultiPlot( RimMultiPlot* multiPlot, const std::vectorrevokeMdiWindowStatus();
+ plot->removeWindowFromDock();
multiPlot->addPlot( plot );
@@ -266,7 +268,7 @@ RimSummaryMultiPlot* createAndAppendDefaultSummaryMultiPlot( const std::vectorsummaryMultiPlotCollection();
auto* summaryMultiPlot = new RimSummaryMultiPlot();
- summaryMultiPlot->setAsPlotMdiWindow();
+ summaryMultiPlot->dockAsPlotWindow();
plotCollection->addSummaryMultiPlot( summaryMultiPlot );
RimSummaryPlot* plot = new RimSummaryPlot();
@@ -318,7 +320,7 @@ RimSummaryMultiPlot* createAndAppendSingleSummaryMultiPlotNoAutoSettings( RimSum
auto* summaryMultiPlot = new RimSummaryMultiPlot();
summaryMultiPlot->setColumnCount( RiaDefines::ColumnCount::COLUMNS_1 );
summaryMultiPlot->setRowCount( RiaDefines::RowCount::ROWS_1 );
- summaryMultiPlot->setAsPlotMdiWindow();
+ summaryMultiPlot->dockAsPlotWindow();
if ( !plot->autoPlotTitle() )
{
@@ -353,7 +355,7 @@ RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vectorsummaryMultiPlotCollection();
auto* summaryMultiPlot = new RimSummaryMultiPlot();
- summaryMultiPlot->setAsPlotMdiWindow();
+ summaryMultiPlot->dockAsPlotWindow();
plotCollection->addSummaryMultiPlot( summaryMultiPlot );
appendPlotsToSummaryMultiPlot( summaryMultiPlot, plots );
@@ -407,7 +409,7 @@ void appendPlotsToSummaryMultiPlot( RimSummaryMultiPlot* multiPlot, const std::v
multiPlot->startBatchAddOperation();
for ( auto plot : plots )
{
- plot->revokeMdiWindowStatus();
+ plot->removeWindowFromDock();
multiPlot->addPlot( plot );
diff --git a/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp b/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp
index 0c40125a251..012a09565de 100644
--- a/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp
+++ b/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.cpp
@@ -69,6 +69,8 @@ RicfExportSnapshots::RicfExportSnapshots()
CAF_PDM_InitScriptableField( &m_viewId, "viewId", -1, "View Id" );
CAF_PDM_InitScriptableField( &m_exportFolder, "exportFolder", QString(), "Export Folder" );
CAF_PDM_InitScriptableFieldNoDefault( &m_plotOutputFormat, "plotOutputFormat", "Output Format" );
+ CAF_PDM_InitScriptableField( &m_width, "width", -1, "Width" );
+ CAF_PDM_InitScriptableField( &m_height, "height", -1, "Height" );
}
//--------------------------------------------------------------------------------------------------
@@ -83,14 +85,12 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, error );
}
+ int width = m_width();
+ int height = m_height();
+
RiuMainWindow* mainWnd = RiuMainWindow::instance();
CVF_ASSERT( mainWnd );
- QByteArray curState = mainWnd->dockManager()->saveState( 0 );
- mainWnd->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
-
- QApplication::processEvents();
-
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS );
if ( !m_exportFolder().isEmpty() )
@@ -105,21 +105,26 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
{
if ( RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
{
- RiaRegressionTestRunner::setDefaultSnapshotSizeFor3dViews();
-
- QApplication::processEvents();
+ QSize defaultSize = RiaRegressionTestRunner::regressionDefaultImageSize();
+ width = defaultSize.width();
+ height = defaultSize.height();
}
- RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir, m_prefix, m_caseId(), m_viewId() );
+ RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( absolutePathToSnapshotDir,
+ width,
+ height,
+ m_prefix,
+ m_caseId(),
+ m_viewId() );
}
if ( m_type == RicfExportSnapshots::SnapshotsType::PLOTS || m_type == RicfExportSnapshots::SnapshotsType::ALL )
{
bool activateWidget = false;
if ( RiaRegressionTestRunner::instance()->isRunningRegressionTests() )
{
- RiaRegressionTestRunner::setDefaultSnapshotSizeForPlotWindows();
-
- QApplication::processEvents();
+ QSize defaultSize = RiaRegressionTestRunner::regressionDefaultImageSize();
+ width = defaultSize.width();
+ height = defaultSize.height();
}
else
{
@@ -128,12 +133,14 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
QString fileSuffix = ".png";
if ( m_plotOutputFormat == PlotOutputFormat::PDF ) fileSuffix = ".pdf";
- RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir, activateWidget, m_prefix, m_viewId(), fileSuffix );
+ RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( absolutePathToSnapshotDir,
+ width,
+ height,
+ activateWidget,
+ m_prefix,
+ m_viewId(),
+ fileSuffix );
}
- QApplication::processEvents();
-
- mainWnd->dockManager()->restoreState( curState );
-
return caf::PdmScriptResponse();
}
diff --git a/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.h b/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.h
index 52c58cfc65d..4c515b459f0 100644
--- a/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.h
+++ b/ApplicationLibCode/CommandFileInterface/RicfExportSnapshots.h
@@ -62,4 +62,6 @@ class RicfExportSnapshots : public RicfCommandObject
caf::PdmField m_viewId;
caf::PdmField m_exportFolder;
caf::PdmField m_plotOutputFormat;
+ caf::PdmField m_width;
+ caf::PdmField m_height;
};
diff --git a/ApplicationLibCode/CommandFileInterface/RicfSetMainWindowSize.cpp b/ApplicationLibCode/CommandFileInterface/RicfSetMainWindowSize.cpp
index c7247f672db..be1f087f156 100644
--- a/ApplicationLibCode/CommandFileInterface/RicfSetMainWindowSize.cpp
+++ b/ApplicationLibCode/CommandFileInterface/RicfSetMainWindowSize.cpp
@@ -19,7 +19,7 @@
#include "RicfSetMainWindowSize.h"
-#include "RiuMainWindow.h"
+#include "RiaLogging.h"
#include "cafPdmFieldScriptingCapability.h"
@@ -39,6 +39,7 @@ RicfSetMainWindowSize::RicfSetMainWindowSize()
//--------------------------------------------------------------------------------------------------
caf::PdmScriptResponse RicfSetMainWindowSize::execute()
{
- if ( RiuMainWindow::instance() ) RiuMainWindow::instance()->resize( m_width, m_height );
- return caf::PdmScriptResponse();
+ RiaLogging::warning( "Method set_main_window_size has been obsoleted. Set image sizes directly in the snapshot methods." );
+ return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_WARNING,
+ "Obsolete command. Set image sizes directly in the snapshot methods." );
}
diff --git a/ApplicationLibCode/CommandFileInterface/RicfSetPlotWindowSize.cpp b/ApplicationLibCode/CommandFileInterface/RicfSetPlotWindowSize.cpp
index cfa4e22fe95..1cc10388b41 100644
--- a/ApplicationLibCode/CommandFileInterface/RicfSetPlotWindowSize.cpp
+++ b/ApplicationLibCode/CommandFileInterface/RicfSetPlotWindowSize.cpp
@@ -18,8 +18,7 @@
#include "RicfSetPlotWindowSize.h"
-#include "RiaGuiApplication.h"
-#include "RiuPlotMainWindow.h"
+#include "RiaLogging.h"
#include "cafPdmFieldScriptingCapability.h"
@@ -39,11 +38,7 @@ RicfSetPlotWindowSize::RicfSetPlotWindowSize()
//--------------------------------------------------------------------------------------------------
caf::PdmScriptResponse RicfSetPlotWindowSize::execute()
{
- RiaGuiApplication* guiApp = RiaGuiApplication::instance();
- if ( guiApp )
- {
- guiApp->getOrCreateAndShowMainPlotWindow()->resize( m_width, m_height );
- return caf::PdmScriptResponse();
- }
- return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_ERROR, "Need GUI ResInsight to set plot window size" );
+ RiaLogging::warning( "Method set_plot_window_size has been obsoleted. Set image sizes directly in the snapshot methods." );
+ return caf::PdmScriptResponse( caf::PdmScriptResponse::COMMAND_WARNING,
+ "Obsolete command. Set image sizes directly in the snapshot methods." );
}
diff --git a/ApplicationLibCode/Commands/3dView/CMakeLists_files.cmake b/ApplicationLibCode/Commands/3dView/CMakeLists_files.cmake
index 372fa0843a6..18caa0121b0 100644
--- a/ApplicationLibCode/Commands/3dView/CMakeLists_files.cmake
+++ b/ApplicationLibCode/Commands/3dView/CMakeLists_files.cmake
@@ -1,6 +1,8 @@
set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicApplyUserDefinedCameraFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicStoreUserDefinedCameraFeature.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/RicDockIn3dViewFeature.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/RicDockInPlotViewFeature.cpp
)
list(APPEND COMMAND_CODE_SOURCE_FILES ${SOURCE_GROUP_SOURCE_FILES})
diff --git a/ApplicationLibCode/Commands/3dView/RicDockIn3dViewFeature.cpp b/ApplicationLibCode/Commands/3dView/RicDockIn3dViewFeature.cpp
new file mode 100644
index 00000000000..39897fe364d
--- /dev/null
+++ b/ApplicationLibCode/Commands/3dView/RicDockIn3dViewFeature.cpp
@@ -0,0 +1,68 @@
+/////////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2026 Equinor ASA
+//
+// ResInsight 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.
+//
+// ResInsight 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 at
+// for more details.
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+#include "RicDockIn3dViewFeature.h"
+
+#include "RiaGuiApplication.h"
+
+#include "RimGridView.h"
+#include "RiuMainWindow.h"
+
+#include "RiuViewer.h"
+
+#include "cafSelectionManager.h"
+
+#include
+#include
+
+CAF_CMD_SOURCE_INIT( RicDockIn3dViewFeature, "RicDockIn3dViewFeature" );
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+bool RicDockIn3dViewFeature::isCommandEnabled() const
+{
+ if ( auto view = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ) )
+ {
+ if ( ( view->showWindow() ) && ( !view->isDockedIn3DView() ) )
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RicDockIn3dViewFeature::onActionTriggered( bool isChecked )
+{
+ if ( auto view = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ) )
+ {
+ view->dockInMainWindow();
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RicDockIn3dViewFeature::setupActionLook( QAction* actionToSetup )
+{
+ actionToSetup->setText( "Dock in 3D Window" );
+ actionToSetup->setIcon( QIcon( ":/3DWindow.svg" ) );
+}
diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.h b/ApplicationLibCode/Commands/3dView/RicDockIn3dViewFeature.h
similarity index 81%
rename from ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.h
rename to ApplicationLibCode/Commands/3dView/RicDockIn3dViewFeature.h
index f0df4473831..811be16ba8c 100644
--- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.h
+++ b/ApplicationLibCode/Commands/3dView/RicDockIn3dViewFeature.h
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////
//
-// Copyright (C) 2023- Equinor ASA
+// Copyright (C) 2026 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -18,15 +18,17 @@
#pragma once
-#include "RicOpenSummaryPlotEditorFeature.h"
+#include "cafCmdFeature.h"
//==================================================================================================
///
//==================================================================================================
-class RicOpenSummaryPlotEditorFromMdiAreaFeature : public RicOpenSummaryPlotEditorFeature
+class RicDockIn3dViewFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
bool isCommandEnabled() const override;
+ void onActionTriggered( bool isChecked ) override;
+ void setupActionLook( QAction* actionToSetup ) override;
};
diff --git a/ApplicationLibCode/Commands/3dView/RicDockInPlotViewFeature.cpp b/ApplicationLibCode/Commands/3dView/RicDockInPlotViewFeature.cpp
new file mode 100644
index 00000000000..8712babafa0
--- /dev/null
+++ b/ApplicationLibCode/Commands/3dView/RicDockInPlotViewFeature.cpp
@@ -0,0 +1,63 @@
+/////////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2026 Equinor ASA
+//
+// ResInsight 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.
+//
+// ResInsight 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 at
+// for more details.
+//
+/////////////////////////////////////////////////////////////////////////////////
+
+#include "RicDockInPlotViewFeature.h"
+
+#include "Rim3dView.h"
+
+#include "cafSelectionManager.h"
+
+#include
+#include
+
+CAF_CMD_SOURCE_INIT( RicDockInPlotViewFeature, "RicDockInPlotViewFeature" );
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+bool RicDockInPlotViewFeature::isCommandEnabled() const
+{
+ if ( auto view = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ) )
+ {
+ if ( ( view->showWindow() ) && ( !view->isDockedInPlotView() ) )
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RicDockInPlotViewFeature::onActionTriggered( bool isChecked )
+{
+ if ( auto view = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ) )
+ {
+ view->dockInPlotWindow();
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RicDockInPlotViewFeature::setupActionLook( QAction* actionToSetup )
+{
+ actionToSetup->setText( "Dock in Plot Window" );
+ actionToSetup->setIcon( QIcon( ":/PlotWindow.svg" ) );
+}
diff --git a/ApplicationLibCode/UserInterface/RiuMdiMaximizeWindowGuard.h b/ApplicationLibCode/Commands/3dView/RicDockInPlotViewFeature.h
similarity index 59%
rename from ApplicationLibCode/UserInterface/RiuMdiMaximizeWindowGuard.h
rename to ApplicationLibCode/Commands/3dView/RicDockInPlotViewFeature.h
index 7c1ddb53362..a85b4942442 100644
--- a/ApplicationLibCode/UserInterface/RiuMdiMaximizeWindowGuard.h
+++ b/ApplicationLibCode/Commands/3dView/RicDockInPlotViewFeature.h
@@ -1,8 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////
//
-// Copyright (C) 2011- Statoil ASA
-// Copyright (C) 2013- Ceetron Solutions AS
-// Copyright (C) 2011-2012 Ceetron AS
+// Copyright (C) 2026 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -17,14 +15,20 @@
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
+
#pragma once
-//--------------------------------------------------------------------------------------------------
+#include "cafCmdFeature.h"
+
+//==================================================================================================
///
-//--------------------------------------------------------------------------------------------------
-class RiuMdiMaximizeWindowGuard
+//==================================================================================================
+class RicDockInPlotViewFeature : public caf::CmdFeature
{
-public:
- RiuMdiMaximizeWindowGuard();
- ~RiuMdiMaximizeWindowGuard();
+ CAF_CMD_HEADER_INIT;
+
+protected:
+ bool isCommandEnabled() const override;
+ void onActionTriggered( bool isChecked ) override;
+ void setupActionLook( QAction* actionToSetup ) override;
};
diff --git a/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake
index 1ef296520cc..492c3823c42 100644
--- a/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake
+++ b/ApplicationLibCode/Commands/ApplicationCommands/CMakeLists_files.cmake
@@ -1,7 +1,6 @@
set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicShowPlotWindowFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicShowMainWindowFeature.cpp
- ${CMAKE_CURRENT_LIST_DIR}/RicTileWindowsFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicOpenProjectFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicOpenLastUsedFileFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSaveProjectFeature.cpp
diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp
deleted file mode 100644
index 7eeb39b7244..00000000000
--- a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp
+++ /dev/null
@@ -1,357 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2015- Statoil ASA
-// Copyright (C) 2015- Ceetron Solutions AS
-//
-// ResInsight 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.
-//
-// ResInsight 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 at
-// for more details.
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-#include "RicTileWindowsFeature.h"
-
-#include "RiaGuiApplication.h"
-
-#include "RimProject.h"
-
-#include "RiuMainWindow.h"
-#include "RiuMdiArea.h"
-#include "RiuPlotMainWindow.h"
-
-#include
-#include
-
-CAF_CMD_SOURCE_INIT( RicTileWindowsFeature, "RicTileWindowsFeature" );
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTileWindowsFeature::applyTiling( RiuMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode )
-{
- auto mode = requestedTileMode;
-
- if ( auto proj = RimProject::current() )
- {
- // If requested mode is set, reset tiling mode to undefined
- if ( proj->subWindowsTileMode3DWindow() == requestedTileMode ) mode = RiaDefines::WindowTileMode::UNDEFINED;
-
- proj->setSubWindowsTileMode3DWindow( mode );
- }
-
- if ( mainWindow )
- {
- mainWindow->mdiArea()->applyTiling();
- }
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTileWindowsFeature::isCommandEnabled() const
-{
- auto* mainWindow = RiuMainWindow::instance();
- if ( mainWindow )
- {
- return mainWindow->isAnyMdiSubWindowVisible();
- }
-
- return false;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTileWindowsFeature::onActionTriggered( bool isChecked )
-{
- disableModelChangeContribution();
-
- auto* mainWindow = RiuMainWindow::instance();
- applyTiling( mainWindow, RiaDefines::WindowTileMode::DEFAULT );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTileWindowsFeature::setupActionLook( QAction* actionToSetup )
-{
- actionToSetup->setText( "Tile Windows" );
- actionToSetup->setIcon( QIcon( ":/TileWindows.svg" ) );
- actionToSetup->setCheckable( true );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTileWindowsFeature::isCommandChecked() const
-{
- auto proj = RimProject::current();
-
- return proj ? ( proj->subWindowsTileMode3DWindow() == RiaDefines::WindowTileMode::DEFAULT ) : false;
-}
-
-CAF_CMD_SOURCE_INIT( RicTilePlotWindowsFeature, "RicTilePlotWindowsFeature" );
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTilePlotWindowsFeature::applyTiling( RiuPlotMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode )
-{
- auto mode = requestedTileMode;
-
- if ( auto proj = RimProject::current() )
- {
- // If requested mode is set, reset tiling mode to undefined
- if ( proj->subWindowsTileModePlotWindow() == requestedTileMode ) mode = RiaDefines::WindowTileMode::UNDEFINED;
-
- proj->setSubWindowsTileModePlotWindow( mode );
- }
-
- if ( mainWindow )
- {
- mainWindow->mdiArea()->applyTiling();
- }
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTilePlotWindowsFeature::isCommandEnabled() const
-{
- RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
- if ( mainPlotWindow )
- {
- return mainPlotWindow->isAnyMdiSubWindowVisible();
- }
-
- return false;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTilePlotWindowsFeature::onActionTriggered( bool isChecked )
-{
- disableModelChangeContribution();
-
- auto* mainWindow = RiuPlotMainWindow::instance();
- RicTilePlotWindowsFeature::applyTiling( mainWindow, RiaDefines::WindowTileMode::DEFAULT );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTilePlotWindowsFeature::setupActionLook( QAction* actionToSetup )
-{
- actionToSetup->setText( "Tile Windows" );
- actionToSetup->setIcon( QIcon( ":/TileWindows.svg" ) );
- actionToSetup->setCheckable( true );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTilePlotWindowsFeature::isCommandChecked() const
-{
- auto proj = RimProject::current();
-
- return proj ? ( proj->subWindowsTileModePlotWindow() == RiaDefines::WindowTileMode::DEFAULT ) : false;
-}
-
-CAF_CMD_SOURCE_INIT( RicTileWindowsVerticallyFeature, "RicTileWindowsVerticallyFeature" );
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTileWindowsVerticallyFeature::isCommandEnabled() const
-{
- RiuMainWindow* mainWindow = RiuMainWindow::instance();
- if ( mainWindow )
- {
- return mainWindow->isAnyMdiSubWindowVisible();
- }
-
- return false;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTileWindowsVerticallyFeature::onActionTriggered( bool isChecked )
-{
- disableModelChangeContribution();
-
- auto* mainWindow = RiuMainWindow::instance();
- RicTileWindowsFeature::applyTiling( mainWindow, RiaDefines::WindowTileMode::VERTICAL );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTileWindowsVerticallyFeature::setupActionLook( QAction* actionToSetup )
-{
- actionToSetup->setText( "Tile Windows Vertically" );
- actionToSetup->setIcon( QIcon( ":/TileWindows.svg" ) );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTileWindowsVerticallyFeature::isCommandChecked() const
-{
- auto proj = RimProject::current();
-
- return proj ? ( proj->subWindowsTileMode3DWindow() == RiaDefines::WindowTileMode::VERTICAL ) : false;
-}
-
-CAF_CMD_SOURCE_INIT( RicTileWindowsHorizontallyFeature, "RicTileWindowsHorizontallyFeature" );
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTileWindowsHorizontallyFeature::isCommandEnabled() const
-{
- RiuMainWindow* mainWindow = RiuMainWindow::instance();
- if ( mainWindow )
- {
- return mainWindow->isAnyMdiSubWindowVisible();
- }
-
- return false;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTileWindowsHorizontallyFeature::onActionTriggered( bool isChecked )
-{
- disableModelChangeContribution();
-
- auto* mainWindow = RiuMainWindow::instance();
- RicTileWindowsFeature::applyTiling( mainWindow, RiaDefines::WindowTileMode::HORIZONTAL );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTileWindowsHorizontallyFeature::setupActionLook( QAction* actionToSetup )
-{
- actionToSetup->setText( "Tile Windows Horizontally" );
- actionToSetup->setIcon( QIcon( ":/TileWindows.svg" ) );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTileWindowsHorizontallyFeature::isCommandChecked() const
-{
- auto proj = RimProject::current();
-
- return proj ? ( proj->subWindowsTileMode3DWindow() == RiaDefines::WindowTileMode::HORIZONTAL ) : false;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-/// Main Plot window features
-///
-//--------------------------------------------------------------------------------------------------
-
-CAF_CMD_SOURCE_INIT( RicTilePlotWindowsVerticallyFeature, "RicTilePlotWindowsVerticallyFeature" );
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTilePlotWindowsVerticallyFeature::isCommandEnabled() const
-{
- auto* mainWindow = RiuPlotMainWindow::instance();
- if ( mainWindow )
- {
- return mainWindow->isAnyMdiSubWindowVisible();
- }
-
- return false;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTilePlotWindowsVerticallyFeature::onActionTriggered( bool isChecked )
-{
- disableModelChangeContribution();
-
- auto* mainWindow = RiuPlotMainWindow::instance();
- RicTilePlotWindowsFeature::applyTiling( mainWindow, RiaDefines::WindowTileMode::VERTICAL );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTilePlotWindowsVerticallyFeature::setupActionLook( QAction* actionToSetup )
-{
- actionToSetup->setText( "Tile Windows Vertically" );
- actionToSetup->setIcon( QIcon( ":/TileWindows.svg" ) );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTilePlotWindowsVerticallyFeature::isCommandChecked() const
-{
- auto proj = RimProject::current();
-
- return proj ? ( proj->subWindowsTileModePlotWindow() == RiaDefines::WindowTileMode::VERTICAL ) : false;
-}
-
-CAF_CMD_SOURCE_INIT( RicTilePlotWindowsHorizontallyFeature, "RicTilePlotWindowsHorizontallyFeature" );
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTilePlotWindowsHorizontallyFeature::isCommandEnabled() const
-{
- auto* mainWindow = RiuPlotMainWindow::instance();
- if ( mainWindow )
- {
- return mainWindow->isAnyMdiSubWindowVisible();
- }
-
- return false;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTilePlotWindowsHorizontallyFeature::onActionTriggered( bool isChecked )
-{
- disableModelChangeContribution();
-
- auto* mainWindow = RiuPlotMainWindow::instance();
- RicTilePlotWindowsFeature::applyTiling( mainWindow, RiaDefines::WindowTileMode::HORIZONTAL );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RicTilePlotWindowsHorizontallyFeature::setupActionLook( QAction* actionToSetup )
-{
- actionToSetup->setText( "Tile Windows Horizontally" );
- actionToSetup->setIcon( QIcon( ":/TileWindows.svg" ) );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicTilePlotWindowsHorizontallyFeature::isCommandChecked() const
-{
- auto proj = RimProject::current();
-
- return proj ? ( proj->subWindowsTileModePlotWindow() == RiaDefines::WindowTileMode::HORIZONTAL ) : false;
-}
diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.h
deleted file mode 100644
index 57729c238d9..00000000000
--- a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2015- Statoil ASA
-// Copyright (C) 2015- Ceetron Solutions AS
-//
-// ResInsight 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.
-//
-// ResInsight 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 at
-// for more details.
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-#pragma once
-
-#include "RiaPlotDefines.h"
-
-#include "cafCmdFeature.h"
-
-class RiuMainWindow;
-class RiuPlotMainWindow;
-
-//==================================================================================================
-///
-//==================================================================================================
-class RicTileWindowsFeature : public caf::CmdFeature
-{
- CAF_CMD_HEADER_INIT;
-
-public:
- static void applyTiling( RiuMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode );
-
-protected:
- bool isCommandEnabled() const override;
- void onActionTriggered( bool isChecked ) override;
- void setupActionLook( QAction* actionToSetup ) override;
- bool isCommandChecked() const override;
-};
-
-//==================================================================================================
-///
-//==================================================================================================
-class RicTileWindowsVerticallyFeature : public caf::CmdFeature
-{
- CAF_CMD_HEADER_INIT;
-
-protected:
- bool isCommandEnabled() const override;
- void onActionTriggered( bool isChecked ) override;
- void setupActionLook( QAction* actionToSetup ) override;
- bool isCommandChecked() const override;
-};
-
-//==================================================================================================
-///
-//==================================================================================================
-class RicTileWindowsHorizontallyFeature : public caf::CmdFeature
-{
- CAF_CMD_HEADER_INIT;
-
-protected:
- bool isCommandEnabled() const override;
- void onActionTriggered( bool isChecked ) override;
- void setupActionLook( QAction* actionToSetup ) override;
- bool isCommandChecked() const override;
-};
-
-//==================================================================================================
-///
-//==================================================================================================
-class RicTilePlotWindowsFeature : public caf::CmdFeature
-{
- CAF_CMD_HEADER_INIT;
-
-public:
- static void applyTiling( RiuPlotMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode );
-
-protected:
- bool isCommandEnabled() const override;
- void onActionTriggered( bool isChecked ) override;
- void setupActionLook( QAction* actionToSetup ) override;
- bool isCommandChecked() const override;
-};
-
-//==================================================================================================
-///
-//==================================================================================================
-class RicTilePlotWindowsVerticallyFeature : public caf::CmdFeature
-{
- CAF_CMD_HEADER_INIT;
-
-protected:
- bool isCommandEnabled() const override;
- void onActionTriggered( bool isChecked ) override;
- void setupActionLook( QAction* actionToSetup ) override;
- bool isCommandChecked() const override;
-};
-
-//==================================================================================================
-///
-//==================================================================================================
-class RicTilePlotWindowsHorizontallyFeature : public caf::CmdFeature
-{
- CAF_CMD_HEADER_INIT;
-
-protected:
- bool isCommandEnabled() const override;
- void onActionTriggered( bool isChecked ) override;
- void setupActionLook( QAction* actionToSetup ) override;
- bool isCommandChecked() const override;
-};
diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp
index 585883ca5e9..a8f4cf2cc55 100644
--- a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp
+++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp
@@ -415,7 +415,7 @@ RimStimPlanModelPlot* RicNewStimPlanModelPlotFeature::createStimPlanModelPlot( b
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
RimStimPlanModelPlot* plot = new RimStimPlanModelPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
stimPlanModelPlotColl->addStimPlanModelPlot( plot );
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp
index 98cc41a0a2b..ec0779ed12a 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp
+++ b/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp
@@ -159,6 +159,7 @@ void RicAdvancedSnapshotExportFeature::exportMultipleSnapshots( const QString& f
{
auto copyOfGeoMechView = sourceGeoMechView->copyObject();
CVF_ASSERT( copyOfGeoMechView );
+ copyOfGeoMechView->resetDockWindowId();
geomCase->geoMechViews().push_back( copyOfGeoMechView );
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp
index dad235d16b3..86aae644fe7 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp
@@ -37,7 +37,6 @@
#include
#include
#include
-#include
CAF_CMD_SOURCE_INIT( RicSnapshotAllPlotsToFileFeature, "RicSnapshotAllPlotsToFileFeature" );
@@ -57,8 +56,8 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots()
// Save images in snapshot catalog relative to project directory
QString snapshotFolderName = app->createAbsolutePathFromProjectRelativePath( "snapshots" );
- bool activateWidget = true;
- exportSnapshotOfPlotsIntoFolder( snapshotFolderName, activateWidget );
+ // save using existing plot sizes
+ exportSnapshotOfPlotsIntoFolder( snapshotFolderName, -1, -1, true /* activateWidget */ );
QString text = QString( "Exported snapshots to folder : \n%1" ).arg( snapshotFolderName );
RiaLogging::info( text.toStdString() );
@@ -68,6 +67,8 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots()
///
//--------------------------------------------------------------------------------------------------
void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( const QString& snapshotFolderName,
+ int width,
+ int height,
bool activateWidget,
const QString& prefix,
int viewId,
@@ -89,7 +90,7 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( const QS
std::vector viewWindows = RimMainPlotCollection::current()->descendantsIncludingThisOfType();
for ( auto viewWindow : viewWindows )
{
- if ( viewWindow->isMdiWindow() && viewWindow->viewWidget() && ( viewId == -1 || viewId == viewWindow->id() ) )
+ if ( viewWindow->isMainDockedWindow() && viewWindow->viewWidget() && ( viewId == -1 || viewId == viewWindow->id() ) )
{
QString fileName = RicSnapshotFilenameGenerator::generateSnapshotFileName( viewWindow );
if ( !prefix.isEmpty() )
@@ -101,16 +102,13 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( const QS
if ( activateWidget )
{
- // If the active MDI widget is maximized, all widgets will be maximized in the MDI area before taking
- // snapshots
-
RiuPlotMainWindowTools::selectAsCurrentItem( viewWindow );
QApplication::processEvents();
}
QString absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath, fileName, preferredFileSuffix );
- RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, viewWindow );
+ RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, viewWindow, width, height );
}
}
}
@@ -120,17 +118,17 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( const QS
//--------------------------------------------------------------------------------------------------
void RicSnapshotAllPlotsToFileFeature::onActionTriggered( bool isChecked )
{
- QWidget* currentActiveWidget = nullptr;
+ QString currentActiveViewerName;
if ( RiaGuiApplication::activeViewWindow() )
{
- currentActiveWidget = RiaGuiApplication::activeViewWindow()->viewWidget();
+ currentActiveViewerName = RiaGuiApplication::activeViewWindow()->dockWindowName();
}
RicSnapshotAllPlotsToFileFeature::saveAllPlots();
- if ( currentActiveWidget )
+ if ( !currentActiveViewerName.isEmpty() )
{
- RiuPlotMainWindowTools::setActiveViewer( currentActiveWidget );
+ RiuPlotMainWindowTools::setActiveViewer( currentActiveViewerName );
}
}
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h
index 658bdac2ae2..7fee4334af3 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h
@@ -33,6 +33,8 @@ class RicSnapshotAllPlotsToFileFeature : public caf::CmdFeature
static void saveAllPlots();
static void exportSnapshotOfPlotsIntoFolder( const QString& snapshotFolderName,
+ int width = -1,
+ int height = -1,
bool activateWidget = false,
const QString& prefix = "",
int viewId = -1,
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp
index 91daaf1ddec..c7f0d28ab40 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp
@@ -47,7 +47,6 @@
#include
#include
#include
-#include
CAF_CMD_SOURCE_INIT( RicSnapshotAllViewsToFileFeature, "RicSnapshotAllViewsToFileFeature" );
@@ -71,11 +70,14 @@ void RicSnapshotAllViewsToFileFeature::saveAllViews()
//--------------------------------------------------------------------------------------------------
/// Export snapshots of a given view (or viewId == -1 for all views) for the given case (or caseId == -1 for all cases)
+/// <= 0 for width and height means to use the existing view size
//--------------------------------------------------------------------------------------------------
void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QString& snapshotFolderName,
- const QString& prefix /*= ""*/,
- int caseId /*= -1*/,
- int viewId /*= -1*/ )
+ int width,
+ int height,
+ const QString& prefix,
+ int caseId,
+ int viewId )
{
RimProject* project = RimProject::current();
if ( project == nullptr ) return;
@@ -117,10 +119,11 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
{
RiuViewer* viewer = riv->viewer();
if ( !viewer ) continue;
+ if ( !viewer->ownerViewWindow() ) continue;
RiaApplication::instance()->setActiveReservoirView( riv );
- Riu3DMainWindowTools::setActiveViewer( viewer->layoutWidget() );
+ Riu3DMainWindowTools::setActiveViewer( viewer->ownerViewWindow()->dockWindowName() );
RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate();
RiaPlotWindowRedrawScheduler::instance()->clearAllScheduledUpdates();
@@ -136,7 +139,7 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
QString absoluteFileName = caf::Utils::constructFullFileName( absSnapshotPath, fileName, ".png" );
- RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, riv );
+ RicSnapshotViewToFileFeature::saveSnapshotAs( absoluteFileName, riv, width, height );
if ( RimGridView* rigv = dynamic_cast( riv ) )
{
@@ -152,17 +155,17 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
//--------------------------------------------------------------------------------------------------
void RicSnapshotAllViewsToFileFeature::onActionTriggered( bool isChecked )
{
- QWidget* currentActiveWidget = nullptr;
+ QString currentActiveViewerName;
if ( RiaGuiApplication::activeViewWindow() )
{
- currentActiveWidget = RiaGuiApplication::activeViewWindow()->viewWidget();
+ currentActiveViewerName = RiaGuiApplication::activeViewWindow()->dockWindowName();
}
RicSnapshotAllViewsToFileFeature::saveAllViews();
- if ( currentActiveWidget )
+ if ( !currentActiveViewerName.isEmpty() )
{
- Riu3DMainWindowTools::setActiveViewer( currentActiveWidget );
+ Riu3DMainWindowTools::setActiveViewer( currentActiveViewerName );
}
}
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h
index c95b5d4698c..e317183ab05 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h
@@ -29,8 +29,12 @@ class RicSnapshotAllViewsToFileFeature : public caf::CmdFeature
public:
static void saveAllViews();
- static void
- exportSnapshotOfViewsIntoFolder( const QString& snapshotFolderName, const QString& prefix = "", int caseId = -1, int viewId = -1 );
+ static void exportSnapshotOfViewsIntoFolder( const QString& snapshotFolderName,
+ int width = -1,
+ int height = -1,
+ const QString& prefix = "",
+ int caseId = -1,
+ int viewId = -1 );
protected:
void onActionTriggered( bool isChecked ) override;
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp
index 673fecd0ec5..9b72baefc55 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp
@@ -33,7 +33,6 @@
#include
#include
#include
-#include
CAF_CMD_SOURCE_INIT( RicSnapshotViewToClipboardFeature, "RicSnapshotViewToClipboardFeature" );
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp
index 5127561f9ac..b4c726e935c 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp
@@ -40,7 +40,6 @@
#include
#include
#include
-#include
#include
#include
@@ -49,7 +48,7 @@ CAF_CMD_SOURCE_INIT( RicSnapshotViewToFileFeature, "RicSnapshotViewToFileFeature
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RicSnapshotViewToFileFeature::saveSnapshotAs( const QString& fileName, RimViewWindow* viewWindow )
+void RicSnapshotViewToFileFeature::saveSnapshotAs( const QString& fileName, RimViewWindow* viewWindow, int width, int height )
{
auto* plotWindow = dynamic_cast( viewWindow );
if ( plotWindow && fileName.endsWith( ".pdf" ) )
@@ -58,7 +57,7 @@ void RicSnapshotViewToFileFeature::saveSnapshotAs( const QString& fileName, RimV
}
else if ( viewWindow )
{
- QImage image = viewWindow->snapshotWindowContent();
+ QImage image = viewWindow->captureSnapshot( width, height );
saveSnapshotAs( fileName, image );
}
}
@@ -114,10 +113,17 @@ void RicSnapshotViewToFileFeature::savePlotPdfReportAs( const QString& fileName,
else
{
QRect pageRect = pdfPrinter.pageLayout().paintRectPixels( resolution );
- viewWidget->resize( pageRect.size() );
+ viewWidget->setFixedSize( pageRect.size() );
plot->renderWindowContent( &pdfPrinter );
+ viewWidget->setMinimumSize( 0, 0 );
+ viewWidget->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
viewWidget->resize( widgetRect.size() );
}
+
+ if ( multiPlot )
+ {
+ multiPlot->updateLayout();
+ }
}
else
{
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h
index 9eb446ab59b..dd72e9d1370 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h
@@ -32,7 +32,7 @@ class RicSnapshotViewToFileFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT;
public:
- static void saveSnapshotAs( const QString& fileName, RimViewWindow* viewWindow );
+ static void saveSnapshotAs( const QString& fileName, RimViewWindow* viewWindow, int width = -1, int height = -1 );
static void saveSnapshotAs( const QString& fileName, const QImage& image );
static void savePlotPdfReportAs( const QString& fileName, RimPlotWindow* plotWindow );
diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp
index 649c46b8fe3..8dc6d65e34a 100644
--- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp
+++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp
@@ -46,7 +46,7 @@ void RicSnapshotViewToPdfFeature::onActionTriggered( bool isChecked )
RimViewWindow* viewWindow = RiaGuiApplication::activeViewWindow();
if ( !viewWindow )
{
- RiaLogging::error( "No view window is available, nothing to do" );
+ RiaLogging::error( "No plot window is available, nothing to do" );
return;
}
diff --git a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp
index 1a123191cd5..21bf3c3c730 100644
--- a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp
+++ b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp
@@ -65,6 +65,7 @@ void RicAddStoredFlowCharacteristicsPlotFeature::onActionTriggered( bool isCheck
auto flowCharacteristicsPlot = sourceObject->copyObject();
CVF_ASSERT( flowCharacteristicsPlot );
+ flowCharacteristicsPlot->resetDockWindowId();
flowPlotColl->addFlowCharacteristicsPlotToStoredPlots( flowCharacteristicsPlot );
flowCharacteristicsPlot->resolveReferencesRecursively();
diff --git a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp
index 9fb03b5f079..efc9f947b60 100644
--- a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp
+++ b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp
@@ -64,6 +64,7 @@ void RicAddStoredWellAllocationPlotFeature::onActionTriggered( bool isChecked )
auto wellAllocationPlot = sourceObject->copyObject();
CVF_ASSERT( wellAllocationPlot );
+ wellAllocationPlot->resetDockWindowId();
flowPlotColl->addWellAllocPlotToStoredPlots( wellAllocationPlot );
wellAllocationPlot->resolveReferencesRecursively();
diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp
index 76288ac3074..cbd5a6ce89a 100644
--- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp
+++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp
@@ -89,6 +89,7 @@ void RicPasteEclipseViewsFeature::onActionTriggered( bool isChecked )
{
auto* rimReservoirView = eclipseView->copyObject();
CVF_ASSERT( rimReservoirView );
+ rimReservoirView->resetDockWindowId();
QString nameOfCopy = QString( "Copy of " ) + rimReservoirView->name();
rimReservoirView->setName( nameOfCopy );
diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp
index 2a469aa8bb9..243cb3e9584 100644
--- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp
+++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp
@@ -80,8 +80,9 @@ void RicPasteGeoMechViewsFeature::onActionTriggered( bool isChecked )
// Add cases to case group
for ( size_t i = 0; i < geomViews.size(); i++ )
{
- auto rimReservoirView = geomViews[i]->copyObject();
- QString nameOfCopy = QString( "Copy of " ) + rimReservoirView->name();
+ auto rimReservoirView = geomViews[i]->copyObject();
+ rimReservoirView->resetDockWindowId();
+ QString nameOfCopy = QString( "Copy of " ) + rimReservoirView->name();
rimReservoirView->setName( nameOfCopy );
geomCase->geoMechViews().push_back( rimReservoirView );
diff --git a/ApplicationLibCode/Commands/RicHistogramPlotTools.cpp b/ApplicationLibCode/Commands/RicHistogramPlotTools.cpp
index 8fbadc56be0..bc4f7e61b56 100644
--- a/ApplicationLibCode/Commands/RicHistogramPlotTools.cpp
+++ b/ApplicationLibCode/Commands/RicHistogramPlotTools.cpp
@@ -124,7 +124,7 @@ RimHistogramMultiPlot* RicHistogramPlotTools::addNewHistogramMultiplot( RimHisto
CAF_ASSERT( collection );
RimHistogramMultiPlot* multiplot = collection->appendHistogramMultiPlot();
- multiplot->setAsPlotMdiWindow();
+ multiplot->dockAsPlotWindow();
multiplot->setShowWindow( true );
multiplot->loadDataAndUpdate();
collection->updateConnectedEditors();
diff --git a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp
index 4eec8fccd53..6d4cb032233 100644
--- a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp
+++ b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp
@@ -212,6 +212,8 @@ RimEclipseContourMapView*
{
auto contourMap = existingContourMap->copyObject();
CVF_ASSERT( contourMap );
+
+ contourMap->resetDockWindowId();
contourMap->setEclipseCase( eclipseCase );
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor2" );
@@ -242,6 +244,7 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMapFr
caf::PdmDefaultObjectFactory::instance() ) );
CVF_ASSERT( contourMap );
+ contourMap->resetDockWindowId();
contourMap->setEclipseCase( eclipseCase );
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor2" );
@@ -308,6 +311,7 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMap(
RimEclipseContourMapView* contourMap = new RimEclipseContourMapView();
contourMap->setEclipseCase( eclipseCase );
+ contourMap->resetDockWindowId();
assignDefaultResultAndLegend( contourMap );
@@ -339,6 +343,7 @@ RimGeoMechContourMapView*
auto contourMap = existingContourMap->copyObject();
CVF_ASSERT( contourMap );
contourMap->setGeoMechCase( geoMechCase );
+ contourMap->resetDockWindowId();
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor2" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
@@ -369,6 +374,7 @@ RimGeoMechContourMapView* RicNewContourMapViewFeature::createGeoMechContourMapFr
CVF_ASSERT( contourMap );
contourMap->setGeoMechCase( geoMechCase );
+ contourMap->resetDockWindowId();
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor2" );
contourMap->setBackgroundColor( RiaColorTools::fromQColorTo3f( col ) ); // Ignore original view background
@@ -395,6 +401,7 @@ RimGeoMechContourMapView* RicNewContourMapViewFeature::createGeoMechContourMap(
{
RimGeoMechContourMapView* contourMap = new RimGeoMechContourMapView();
contourMap->setGeoMechCase( geoMechCase );
+ contourMap->resetDockWindowId();
caf::PdmDocument::updateUiIconStateRecursively( contourMap );
diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake b/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake
index a3bfe916f47..0e1e3a99098 100644
--- a/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake
+++ b/ApplicationLibCode/Commands/SummaryPlotCommands/CMakeLists_files.cmake
@@ -41,7 +41,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicDeleteSubPlotCtxFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicToggleYAxisLinkingFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicToggleXAxisLinkingFeature.cpp
- ${CMAKE_CURRENT_LIST_DIR}/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryTableFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicDuplicateSummaryTableFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicCreateDeclineCurvesFeature.cpp
diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp
deleted file mode 100644
index 7a6161b699a..00000000000
--- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2023- Equinor ASA
-//
-// ResInsight 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.
-//
-// ResInsight 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 at
-// for more details.
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-#include "RicOpenSummaryPlotEditorFromMdiAreaFeature.h"
-
-CAF_CMD_SOURCE_INIT( RicOpenSummaryPlotEditorFromMdiAreaFeature, "RicOpenSummaryPlotEditorFromMdiAreaFeature" );
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RicOpenSummaryPlotEditorFromMdiAreaFeature::isCommandEnabled() const
-{
- return true;
-}
diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp
index 896a09e8b64..622ea627bc1 100644
--- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp
+++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryPlotEditorUi.cpp
@@ -644,7 +644,7 @@ void RicSummaryPlotEditorUi::createNewPlot()
if ( m_plotContainer )
{
newSummaryPlot = new RimSummaryPlot();
- newSummaryPlot->setAsPlotMdiWindow();
+ newSummaryPlot->dockAsPlotWindow();
newSummaryPlot->enableAutoPlotTitle( true );
m_plotContainer->addPlot( newSummaryPlot );
}
diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp
index 8d58f8b97f4..ca50ab582c5 100644
--- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp
+++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp
@@ -28,7 +28,6 @@
#include "RiuPlotMainWindow.h"
#include
-#include
CAF_CMD_SOURCE_INIT( RicViewZoomAllFeature, "RicViewZoomAllFeature" );
@@ -43,24 +42,16 @@ void RicViewZoomAllFeature::onActionTriggered( bool isChecked )
if ( dynamic_cast( topLevelWidget ) )
{
- RimViewWindow* viewWindow = RiaGuiApplication::instance()->activeReservoirView();
- if ( viewWindow )
+ if ( auto viewWindow = RiaGuiApplication::instance()->activeReservoirView() )
{
viewWindow->zoomAll();
}
}
- else if ( dynamic_cast( topLevelWidget ) )
+ else if ( auto plotMainWin = dynamic_cast( topLevelWidget ) )
{
- RiuPlotMainWindow* mainPlotWindow = dynamic_cast( topLevelWidget );
- QList subwindows = mainPlotWindow->subWindowList( QMdiArea::StackingOrder );
- if ( !subwindows.empty() )
+ if ( auto activePlotView = plotMainWin->activePlotView() )
{
- RimViewWindow* viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( subwindows.back()->widget() );
-
- if ( viewWindow )
- {
- viewWindow->zoomAll();
- }
+ activePlotView->zoomAll();
}
}
}
diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicCreateRftPlotsFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicCreateRftPlotsFeature.cpp
index 459b2fcdf4a..9d4458184fa 100644
--- a/ApplicationLibCode/Commands/WellLogCommands/RicCreateRftPlotsFeature.cpp
+++ b/ApplicationLibCode/Commands/WellLogCommands/RicCreateRftPlotsFeature.cpp
@@ -105,6 +105,7 @@ void RicCreateRftPlotsFeature::appendRftPlotForWell( const QString& wellName, Ri
auto rftPlot = sourcePlot->copyObject();
if ( !rftPlot ) return;
+ rftPlot->resetDockWindowId();
rftPlot->setSimWellOrWellPathName( wellName );
rftPlotColl->addPlot( rftPlot );
rftPlot->resolveReferencesRecursively();
diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp
index 96a6f1be449..930837e6803 100644
--- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp
+++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeatureImpl.cpp
@@ -62,7 +62,7 @@ RimWellBoreStabilityPlot* RicNewWellLogPlotFeatureImpl::createWellBoreStabilityP
plot->copyWbsParameters( params );
}
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
wellLogPlotColl->addWellLogPlot( plot );
@@ -131,7 +131,7 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createWellLogPlot( bool showAfterC
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
RimWellLogPlot* plot = new RimWellLogPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
wellLogPlotColl->addWellLogPlot( plot );
diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp
index 1304dcfa98f..9c9d9926f01 100644
--- a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp
+++ b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp
@@ -75,6 +75,7 @@ void RicPasteWellLogPlotFeature::onActionTriggered( bool isChecked )
auto newObject = fileCurve->copyObject();
CVF_ASSERT( newObject );
+ newObject->resetDockWindowId();
wellLogPlotCollection->addWellLogPlot( newObject );
// Resolve references after object has been inserted into the project data model
diff --git a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp
index dad8f3dda85..29bec7d032e 100644
--- a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp
@@ -170,7 +170,7 @@ RimAnalysisPlot::RimAnalysisPlot()
//--------------------------------------------------------------------------------------------------
RimAnalysisPlot::~RimAnalysisPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
cleanupBeforeClose();
}
@@ -776,7 +776,7 @@ void RimAnalysisPlot::deleteViewWidget()
//--------------------------------------------------------------------------------------------------
void RimAnalysisPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
updateAndGetCurveAnalyzer();
diff --git a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlotCollection.cpp
index b891a691466..8dd124b03a7 100644
--- a/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlotCollection.cpp
@@ -51,7 +51,7 @@ RimAnalysisPlotCollection::~RimAnalysisPlotCollection()
RimAnalysisPlot* RimAnalysisPlotCollection::createAnalysisPlot()
{
RimAnalysisPlot* plot = new RimAnalysisPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
if ( firstEnsemble() )
{
@@ -86,7 +86,7 @@ RimAnalysisPlot* RimAnalysisPlotCollection::createAnalysisPlot()
RimAnalysisPlot* RimAnalysisPlotCollection::createAnalysisPlot( RimSummaryEnsemble* ensemble, const QString& quantityName, std::time_t timeStep )
{
RimAnalysisPlot* plot = new RimAnalysisPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
applySummaryCaseCollectionAndFieldAddressToPlot( plot, ensemble, quantityName.toStdString() );
plot->setTimeSteps( { timeStep } );
diff --git a/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake b/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake
index 696a124c966..8e4ccd74936 100644
--- a/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake
+++ b/ApplicationLibCode/ProjectDataModel/CMakeLists_files.cmake
@@ -62,7 +62,7 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimPlotCurveAppearance.cpp
${CMAKE_CURRENT_LIST_DIR}/RimStackablePlotCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimAdvancedSnapshotExportDefinition.cpp
- ${CMAKE_CURRENT_LIST_DIR}/RimMdiWindowController.cpp
+ ${CMAKE_CURRENT_LIST_DIR}/RimDockWindowController.cpp
${CMAKE_CURRENT_LIST_DIR}/RimNamedObject.cpp
${CMAKE_CURRENT_LIST_DIR}/RimCheckableNamedObject.cpp
${CMAKE_CURRENT_LIST_DIR}/RimCheckableObject.cpp
diff --git a/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.cpp b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.cpp
index 6377d4731e7..6411c193ec7 100644
--- a/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.cpp
+++ b/ApplicationLibCode/ProjectDataModel/ContourMap/RimEclipseContourMapView.cpp
@@ -546,7 +546,7 @@ void RimEclipseContourMapView::childFieldChangedByUi( const caf::PdmFieldHandle*
{
if ( changedChildField == &m_contourMapProjection )
{
- updateMdiWindowTitle();
+ updateWindowTitle();
}
}
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp
index 4b68add5837..b99ef230fdf 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationMatrixPlot.cpp
@@ -144,7 +144,7 @@ RimCorrelationMatrixPlot::RimCorrelationMatrixPlot()
//--------------------------------------------------------------------------------------------------
RimCorrelationMatrixPlot::~RimCorrelationMatrixPlot()
{
- if ( isMdiWindow() ) removeMdiWindowFromMdiArea();
+ if ( isMainDockedWindow() ) removeWindowFromDock();
cleanupBeforeClose();
}
@@ -385,7 +385,7 @@ QList RimCorrelationMatrixPlot::calculateValueOptions( c
//--------------------------------------------------------------------------------------------------
void RimCorrelationMatrixPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
m_selectedVarsUiField = selectedVectorNamesText();
@@ -735,7 +735,7 @@ void RimCorrelationMatrixPlot::updatePlotTitle()
{
m_plotWidget->setPlotTitle( m_description );
m_plotWidget->setPlotTitleEnabled( m_showPlotTitle );
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
m_plotWidget->setPlotTitleFontSize( titleFontSize() );
}
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp
index 6b985549da3..b256ca85cef 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlot.cpp
@@ -86,7 +86,7 @@ RimCorrelationPlot::RimCorrelationPlot()
//--------------------------------------------------------------------------------------------------
RimCorrelationPlot::~RimCorrelationPlot()
{
- if ( isMdiWindow() ) removeMdiWindowFromMdiArea();
+ if ( isMainDockedWindow() ) removeWindowFromDock();
cleanupBeforeClose();
}
@@ -177,7 +177,7 @@ QList RimCorrelationPlot::calculateValueOptions( const c
//--------------------------------------------------------------------------------------------------
void RimCorrelationPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
m_selectedVarsUiField = selectedVectorNamesText();
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp
index a6e9dd7c753..a01c33d0365 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationPlotCollection.cpp
@@ -79,7 +79,7 @@ RimCorrelationPlotCollection::~RimCorrelationPlotCollection()
RimCorrelationPlot* RimCorrelationPlotCollection::createCorrelationPlot( bool defaultToFirstEnsembleFopt )
{
RimCorrelationPlot* plot = new RimCorrelationPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
if ( defaultToFirstEnsembleFopt ) applyFirstEnsembleFieldAddressesToPlot( plot, { "FOPT" } );
plot->selectAllParameters();
@@ -96,7 +96,7 @@ RimCorrelationPlot*
RimCorrelationPlotCollection::createCorrelationPlot( RimSummaryEnsemble* ensemble, const QString& quantityName, std::time_t timeStep )
{
RimCorrelationPlot* plot = new RimCorrelationPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
applyEnsembleFieldAndTimeStepToPlot( plot, ensemble, { quantityName }, timeStep );
plot->selectAllParameters();
@@ -112,7 +112,7 @@ RimCorrelationPlot*
RimCorrelationMatrixPlot* RimCorrelationPlotCollection::createCorrelationMatrixPlot( bool defaultToFirstEnsembleField )
{
RimCorrelationMatrixPlot* plot = new RimCorrelationMatrixPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
if ( defaultToFirstEnsembleField ) applyFirstEnsembleFieldAddressesToPlot( plot, { "FOPT", "FWPT", "FGPT" } );
plot->selectAllParameters();
@@ -129,7 +129,7 @@ RimCorrelationMatrixPlot* RimCorrelationPlotCollection::createCorrelationMatrixP
std::time_t timeStep )
{
RimCorrelationMatrixPlot* plot = new RimCorrelationMatrixPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
applyEnsembleFieldAndTimeStepToPlot( plot, ensemble, quantityNames, timeStep );
plot->selectAllParameters();
@@ -144,7 +144,7 @@ RimCorrelationMatrixPlot* RimCorrelationPlotCollection::createCorrelationMatrixP
RimParameterResultCrossPlot* RimCorrelationPlotCollection::createParameterResultCrossPlot( bool defaultToFirstEnsembleFopt )
{
RimParameterResultCrossPlot* plot = new RimParameterResultCrossPlot;
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
if ( defaultToFirstEnsembleFopt ) applyFirstEnsembleFieldAddressesToPlot( plot, { "FOPT" } );
addPlot( plot );
@@ -160,7 +160,7 @@ RimParameterResultCrossPlot* RimCorrelationPlotCollection::createParameterResult
std::time_t timeStep )
{
RimParameterResultCrossPlot* plot = new RimParameterResultCrossPlot;
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
applyEnsembleFieldAndTimeStepToPlot( plot, ensemble, { quantityName }, timeStep );
plot->setEnsembleParameter( paramName );
@@ -174,7 +174,7 @@ RimParameterResultCrossPlot* RimCorrelationPlotCollection::createParameterResult
RimCorrelationReportPlot* RimCorrelationPlotCollection::createCorrelationReportPlot( bool defaultToFirstEnsembleField /*= true */ )
{
RimCorrelationReportPlot* report = new RimCorrelationReportPlot;
- report->setAsPlotMdiWindow();
+ report->dockAsPlotWindow();
if ( defaultToFirstEnsembleField ) applyFirstEnsembleFieldAddressesToReport( report, { "FOPT", "FWPT", "FGPT" }, "FOPT" );
report->matrixPlot()->selectAllParameters();
report->correlationPlot()->selectAllParameters();
@@ -191,7 +191,7 @@ RimCorrelationReportPlot* RimCorrelationPlotCollection::createCorrelationReportP
std::time_t timeStep )
{
RimCorrelationReportPlot* report = new RimCorrelationReportPlot;
- report->setAsPlotMdiWindow();
+ report->dockAsPlotWindow();
applyEnsembleFieldAndTimeStepToReport( report, ensemble, matrixQuantityNames, tornadoAndCrossPlotQuantityName, timeStep );
report->matrixPlot()->selectAllParameters();
report->correlationPlot()->selectAllParameters();
@@ -205,7 +205,7 @@ RimCorrelationReportPlot* RimCorrelationPlotCollection::createCorrelationReportP
RimRftCorrelationReportPlot* RimCorrelationPlotCollection::createRftCorrelationReportPlot( RimWellRftPlot* source )
{
auto* report = new RimRftCorrelationReportPlot;
- report->setAsPlotMdiWindow();
+ report->dockAsPlotWindow();
if ( source )
{
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp
index 6bd84af54f0..d4f01114a85 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimCorrelationReportPlot.cpp
@@ -217,7 +217,7 @@ RimCorrelationReportPlot::RimCorrelationReportPlot()
CAF_PDM_InitField( &m_dockState, "DockState", QString(), "Dock State" );
m_dockState.uiCapability()->setUiHidden( true );
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
m_showWindow = true;
m_showPlotLegends = false;
@@ -255,7 +255,7 @@ RimCorrelationReportPlot::RimCorrelationReportPlot()
//--------------------------------------------------------------------------------------------------
RimCorrelationReportPlot::~RimCorrelationReportPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
cleanupBeforeClose();
}
@@ -550,7 +550,7 @@ void RimCorrelationReportPlot::deleteViewWidget()
//--------------------------------------------------------------------------------------------------
void RimCorrelationReportPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_showWindow )
{
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp
index 50d8d42084a..92fc189506c 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterResultCrossPlot.cpp
@@ -97,7 +97,7 @@ RimParameterResultCrossPlot::RimParameterResultCrossPlot()
//--------------------------------------------------------------------------------------------------
RimParameterResultCrossPlot::~RimParameterResultCrossPlot()
{
- if ( isMdiWindow() ) removeMdiWindowFromMdiArea();
+ if ( isMainDockedWindow() ) removeWindowFromDock();
cleanupBeforeClose();
}
@@ -255,7 +255,7 @@ void RimParameterResultCrossPlot::defineEditorAttribute( const caf::PdmFieldHand
//--------------------------------------------------------------------------------------------------
void RimParameterResultCrossPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
m_selectedVarsUiField = selectedVectorNamesText();
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterRftCrossPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterRftCrossPlot.cpp
index 7c34cc39cd0..8f85eda9a0c 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterRftCrossPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimParameterRftCrossPlot.cpp
@@ -514,7 +514,7 @@ RiuPlotWidget* RimParameterRftCrossPlot::doCreatePlotViewWidget( QWidget* parent
//--------------------------------------------------------------------------------------------------
void RimParameterRftCrossPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_plotWidget )
{
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftCorrelationReportPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftCorrelationReportPlot.cpp
index 8f1c5455a0a..1445af9fafb 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftCorrelationReportPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftCorrelationReportPlot.cpp
@@ -114,13 +114,13 @@ RimRftCorrelationReportPlot::RimRftCorrelationReportPlot()
CAF_PDM_InitField( &m_dockState, "DockState", QString(), "Dock State" );
m_dockState.uiCapability()->setUiHidden( true );
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
m_showWindow = true;
m_showPlotLegends = false;
m_wellRftPlot = new RimWellRftPlot;
- m_wellRftPlot->revokeMdiWindowStatus();
+ m_wellRftPlot->removeWindowFromDock();
m_wellRftPlot->setShowWindow( true );
m_parameterRftCrossPlot = new RimParameterRftCrossPlot;
@@ -134,7 +134,7 @@ RimRftCorrelationReportPlot::RimRftCorrelationReportPlot()
//--------------------------------------------------------------------------------------------------
RimRftCorrelationReportPlot::~RimRftCorrelationReportPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
cleanupBeforeClose();
}
@@ -374,7 +374,7 @@ void RimRftCorrelationReportPlot::deleteViewWidget()
//--------------------------------------------------------------------------------------------------
void RimRftCorrelationReportPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_showWindow )
{
diff --git a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftTornadoPlot.cpp b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftTornadoPlot.cpp
index ed12253d9a9..3f5311f1a62 100644
--- a/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftTornadoPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/CorrelationPlots/RimRftTornadoPlot.cpp
@@ -279,7 +279,7 @@ RiuPlotWidget* RimRftTornadoPlot::doCreatePlotViewWidget( QWidget* parent )
//--------------------------------------------------------------------------------------------------
void RimRftTornadoPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_plotWidget )
{
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp
index ba2819da21d..58e0e3ba543 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimFlowCharacteristicsPlot.cpp
@@ -98,7 +98,7 @@ RimFlowCharacteristicsPlot::RimFlowCharacteristicsPlot()
CAF_PDM_InitField( &m_maxTof, "MaxTof", 146000, "Max Time of Flight [days]" );
m_showWindow = false;
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
setDeletable( true );
}
@@ -107,7 +107,7 @@ RimFlowCharacteristicsPlot::RimFlowCharacteristicsPlot()
//--------------------------------------------------------------------------------------------------
RimFlowCharacteristicsPlot::~RimFlowCharacteristicsPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
if ( m_flowCharPlotWidget )
{
@@ -585,7 +585,7 @@ void RimFlowCharacteristicsPlot::fieldChangedByUi( const caf::PdmFieldHandle* ch
//--------------------------------------------------------------------------------------------------
void RimFlowCharacteristicsPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_flowDiagSolution && m_flowCharPlotWidget )
{
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimFlowPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimFlowPlotCollection.cpp
index a673ecae8d3..26e7a94fc2f 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimFlowPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimFlowPlotCollection.cpp
@@ -66,7 +66,7 @@ void RimFlowPlotCollection::deleteAllPlots()
{
if ( m_defaultWellAllocPlot )
{
- m_defaultWellAllocPlot->removeFromMdiAreaAndDeleteViewWidget();
+ m_defaultWellAllocPlot->removeFromDockAreaAndDeleteViewWidget();
delete m_defaultWellAllocPlot();
}
delete m_defaultWellConnectivityTable;
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimTofAccumulatedPhaseFractionsPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimTofAccumulatedPhaseFractionsPlot.cpp
index 248910fb430..c89b015760d 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimTofAccumulatedPhaseFractionsPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimTofAccumulatedPhaseFractionsPlot.cpp
@@ -61,7 +61,7 @@ RimTofAccumulatedPhaseFractionsPlot::RimTofAccumulatedPhaseFractionsPlot()
//--------------------------------------------------------------------------------------------------
RimTofAccumulatedPhaseFractionsPlot::~RimTofAccumulatedPhaseFractionsPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
if ( m_tofAccumulatedPhaseFractionsPlotWidget )
{
@@ -173,7 +173,7 @@ void RimTofAccumulatedPhaseFractionsPlot::fieldChangedByUi( const caf::PdmFieldH
if ( changedField == &m_userName || changedField == &m_showPlotTitle )
{
- updateMdiWindowTitle();
+ updateWindowTitle();
}
else if ( changedField == &m_maxTof )
{
@@ -199,7 +199,7 @@ QImage RimTofAccumulatedPhaseFractionsPlot::snapshotWindowContent()
void RimTofAccumulatedPhaseFractionsPlot::setDescription( const QString& description )
{
m_userName = description;
- updateMdiWindowTitle();
+ updateWindowTitle();
}
//--------------------------------------------------------------------------------------------------
@@ -222,7 +222,7 @@ void RimTofAccumulatedPhaseFractionsPlot::assignIdIfNecessary()
//--------------------------------------------------------------------------------------------------
void RimTofAccumulatedPhaseFractionsPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_tofAccumulatedPhaseFractionsPlotWidget && m_showWindow() )
{
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.cpp
index b629fa7c006..fde9deabca1 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimTotalWellAllocationPlot.cpp
@@ -55,7 +55,7 @@ RimTotalWellAllocationPlot::RimTotalWellAllocationPlot()
//--------------------------------------------------------------------------------------------------
RimTotalWellAllocationPlot::~RimTotalWellAllocationPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
if ( m_wellTotalAllocationPlotWidget )
{
@@ -127,7 +127,7 @@ void RimTotalWellAllocationPlot::fieldChangedByUi( const caf::PdmFieldHandle* ch
if ( changedField == &m_userName || changedField == &m_showPlotTitle )
{
- updateMdiWindowTitle();
+ updateWindowTitle();
}
}
@@ -156,7 +156,7 @@ QImage RimTotalWellAllocationPlot::snapshotWindowContent()
void RimTotalWellAllocationPlot::setDescription( const QString& description )
{
m_userName = description;
- updateMdiWindowTitle();
+ updateWindowTitle();
}
//--------------------------------------------------------------------------------------------------
@@ -220,7 +220,7 @@ void RimTotalWellAllocationPlot::clearSlices()
//--------------------------------------------------------------------------------------------------
void RimTotalWellAllocationPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
}
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationOverTimePlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationOverTimePlot.cpp
index 99c82f6f4f9..4bc43d4139c 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationOverTimePlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationOverTimePlot.cpp
@@ -126,7 +126,7 @@ RimWellAllocationOverTimePlot::RimWellAllocationOverTimePlot()
m_axisValueFontSize = caf::FontTools::RelativeSize::Medium;
m_legendFontSize = caf::FontTools::RelativeSize::Medium;
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
setShowWindow( false );
}
@@ -135,7 +135,7 @@ RimWellAllocationOverTimePlot::RimWellAllocationOverTimePlot()
//--------------------------------------------------------------------------------------------------
RimWellAllocationOverTimePlot::~RimWellAllocationOverTimePlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
deleteViewWidget();
}
@@ -302,7 +302,7 @@ void RimWellAllocationOverTimePlot::deleteViewWidget()
//--------------------------------------------------------------------------------------------------
void RimWellAllocationOverTimePlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_plotWidget == nullptr || m_case == nullptr )
{
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp
index ec71ce0e595..877ee9cf6f8 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp
@@ -121,7 +121,7 @@ RimWellAllocationPlot::RimWellAllocationPlot()
CAF_PDM_InitFieldNoDefault( &m_tofAccumulatedPhaseFractionsPlot, "TofAccumulatedPhaseFractionsPlot", "TOF Accumulated Phase Fractions" );
m_tofAccumulatedPhaseFractionsPlot = new RimTofAccumulatedPhaseFractionsPlot;
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
m_accumulatedWellFlowPlot->setAvailableDepthUnits( {} );
m_accumulatedWellFlowPlot->setAvailableDepthTypes(
@@ -141,7 +141,7 @@ RimWellAllocationPlot::RimWellAllocationPlot()
//--------------------------------------------------------------------------------------------------
RimWellAllocationPlot::~RimWellAllocationPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
delete m_accumulatedWellFlowPlot();
delete m_totalWellAllocationPlot();
@@ -524,7 +524,7 @@ void RimWellAllocationPlot::addStackedCurve( const QString& tracerNa
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::updateWidgetTitleWindowTitle()
{
- updateMdiWindowTitle();
+ updateWindowTitle();
if ( m_wellAllocationPlotWidget )
{
@@ -737,9 +737,9 @@ QString RimWellAllocationPlot::wellName() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimWellAllocationPlot::removeFromMdiAreaAndDeleteViewWidget()
+void RimWellAllocationPlot::removeFromDockAreaAndDeleteViewWidget()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
deleteViewWidget();
}
@@ -862,7 +862,7 @@ QString RimWellAllocationPlot::description() const
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( !m_case )
{
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.h b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.h
index 84cfb4e54b1..11c39fe4ab9 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.h
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.h
@@ -87,7 +87,7 @@ class RimWellAllocationPlot : public RimViewWindow
QString wellName() const;
- void removeFromMdiAreaAndDeleteViewWidget();
+ void removeFromDockAreaAndDeleteViewWidget();
void showPlotLegend( bool doShow );
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp
index a400ec25237..1b52596e9d2 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellConnectivityTable.cpp
@@ -194,7 +194,7 @@ RimWellConnectivityTable::RimWellConnectivityTable()
CAF_PDM_InitFieldNoDefault( &m_rangeType, "RangeType", "Range Type" );
setLegendsVisible( true );
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
setShowWindow( false );
}
@@ -203,7 +203,7 @@ RimWellConnectivityTable::RimWellConnectivityTable()
//--------------------------------------------------------------------------------------------------
RimWellConnectivityTable::~RimWellConnectivityTable()
{
- if ( isMdiWindow() ) removeMdiWindowFromMdiArea();
+ if ( isMainDockedWindow() ) removeWindowFromDock();
cleanupBeforeClose();
}
@@ -531,7 +531,7 @@ void RimWellConnectivityTable::defineEditorAttribute( const caf::PdmFieldHandle*
//--------------------------------------------------------------------------------------------------
void RimWellConnectivityTable::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_matrixPlotWidget == nullptr || m_case == nullptr )
{
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp
index b47fa6fdc42..d57b0f8dd25 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp
@@ -80,7 +80,7 @@ RimWellDistributionPlotCollection::RimWellDistributionPlotCollection()
m_showWindow = false;
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::OIL_PHASE ) );
addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::GAS_PHASE ) );
@@ -92,7 +92,7 @@ RimWellDistributionPlotCollection::RimWellDistributionPlotCollection()
//--------------------------------------------------------------------------------------------------
RimWellDistributionPlotCollection::~RimWellDistributionPlotCollection()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
m_plots.deleteChildren();
cleanupBeforeClose();
@@ -188,7 +188,7 @@ caf::PdmFieldHandle* RimWellDistributionPlotCollection::userDescriptionField()
void RimWellDistributionPlotCollection::onLoadDataAndUpdate()
{
// cvf::Trace::show("RimWellDistributionPlotCollection::onLoadDataAndUpdate()");
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
updatePlots();
updateLayout();
}
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp
index addf5f72d08..e616e0b6815 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellPltPlot.cpp
@@ -137,7 +137,7 @@ RimWellPltPlot::RimWellPltPlot()
m_nameConfig->setCustomName( "PLT Plot" );
setNamingMethod( RiaDefines::ObjectNamingMethod::CUSTOM );
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
m_doInitAfterLoad = false;
m_isOnLoad = true;
m_plotLegendsHorizontal = false;
@@ -151,7 +151,7 @@ RimWellPltPlot::RimWellPltPlot()
//--------------------------------------------------------------------------------------------------
RimWellPltPlot::~RimWellPltPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
deleteViewWidget();
}
@@ -1073,7 +1073,7 @@ void RimWellPltPlot::onLoadDataAndUpdate()
m_isOnLoad = false;
}
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
updateFormationsOnPlot();
syncCurvesFromUiSelection();
}
diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp
index ebcce2fd4c1..9ff924952b1 100644
--- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellRftPlot.cpp
@@ -147,7 +147,7 @@ RimWellRftPlot::RimWellRftPlot()
setPlotTitleVisible( true );
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
m_isOnLoad = true;
}
@@ -156,7 +156,7 @@ RimWellRftPlot::RimWellRftPlot()
//--------------------------------------------------------------------------------------------------
RimWellRftPlot::~RimWellRftPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
deleteViewWidget();
}
@@ -1358,7 +1358,7 @@ void RimWellRftPlot::onLoadDataAndUpdate()
m_isOnLoad = false;
}
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
updateFormationsOnPlot();
if ( depthType() == RiaDefines::DepthType::MEASURED_DEPTH )
diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp
index 74051c12832..e73685a6a45 100644
--- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp
+++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechCase.cpp
@@ -244,6 +244,7 @@ RimGeoMechView* RimGeoMechCase::createCopyAndAddView( const RimGeoMechView* sour
auto rimGeoMechView = sourceView->copyObject();
CVF_ASSERT( rimGeoMechView );
+ rimGeoMechView->resetDockWindowId();
rimGeoMechView->setGeoMechCase( this );
caf::PdmDocument::updateUiIconStateRecursively( rimGeoMechView );
diff --git a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp
index df53e9964aa..6f01c02ef7a 100644
--- a/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp
+++ b/ApplicationLibCode/ProjectDataModel/GeoMech/RimGeoMechView.cpp
@@ -193,7 +193,7 @@ void RimGeoMechView::onLoadDataAndUpdate()
progress.incrementProgress();
progress.setProgressDescription( "Create Display model" );
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
geoMechPropertyFilterCollection()->loadAndInitializePropertyFilters();
m_wellMeasurementCollection->syncWithChangesInWellMeasurementCollection();
diff --git a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp
index de0f2cc3600..328c5205443 100644
--- a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlot.cpp
@@ -72,7 +72,7 @@ RimGridCrossPlot::RimGridCrossPlot()
//--------------------------------------------------------------------------------------------------
RimGridCrossPlot::~RimGridCrossPlot()
{
- removeMdiWindowFromMdiArea();
+ if ( isMainDockedWindow() ) removeWindowFromDock();
cleanupBeforeClose();
}
@@ -464,7 +464,7 @@ void RimGridCrossPlot::deleteViewWidget()
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
for ( auto dataSet : m_crossPlotDataSets )
{
@@ -485,7 +485,7 @@ void RimGridCrossPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
caf::PdmUiGroup* generalGroup = uiOrdering.addNewGroup( "Plot Options" );
generalGroup->add( &m_showInfoBox );
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
RimPlotWindow::uiOrderingForLegendsAndFonts( uiConfigName, uiOrdering );
}
@@ -595,7 +595,7 @@ void RimGridCrossPlot::updateCurveNamesAndPlotTitle()
m_plotWidget->setPlotTitle( plotTitle );
m_plotWidget->setPlotTitleEnabled( m_showPlotTitle && !isSubPlot() );
}
- updateMdiWindowTitle();
+ updateWindowTitle();
updateInfoBox();
}
diff --git a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotCollection.cpp
index e60eca9681f..b746b473d65 100644
--- a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimGridCrossPlotCollection.cpp
@@ -61,7 +61,7 @@ size_t RimGridCrossPlotCollection::plotCount() const
RimGridCrossPlot* RimGridCrossPlotCollection::createGridCrossPlot()
{
RimGridCrossPlot* plot = new RimGridCrossPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
// plot->setDescription(QString("Summary Cross Plot %1").arg(m_gridCrossPlots.size()));
addPlot( plot );
diff --git a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp
index 0041ddad7b9..ae550c5115a 100644
--- a/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/GridCrossPlots/RimSaturationPressurePlotCollection.cpp
@@ -87,7 +87,7 @@ std::vector
if ( eqlnumRegionIdsFound.find( zeroBasedEquilibriumRegion + 1 ) != eqlnumRegionIdsFound.end() )
{
RimSaturationPressurePlot* plot = new RimSaturationPressurePlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
// As discussed with Liv Merete, it is not any use for creation of different plots for matrix/fracture. For
// now, use hardcoded value for MATRIX
diff --git a/ApplicationLibCode/ProjectDataModel/Histogram/RimHistogramPlot.cpp b/ApplicationLibCode/ProjectDataModel/Histogram/RimHistogramPlot.cpp
index 971427179e0..05935dccb1e 100644
--- a/ApplicationLibCode/ProjectDataModel/Histogram/RimHistogramPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Histogram/RimHistogramPlot.cpp
@@ -131,7 +131,7 @@ RimHistogramPlot::~RimHistogramPlot()
{
m_isValid = false;
- removeMdiWindowFromMdiArea();
+ if ( isMainDockedWindow() ) removeWindowFromDock();
deletePlotCurvesAndPlotWidget();
}
@@ -261,7 +261,7 @@ void RimHistogramPlot::updatePlotTitle()
}
updateCurveNames();
- updateMdiWindowTitle();
+ updateWindowTitle();
if ( plotWidget() )
{
@@ -662,7 +662,7 @@ void RimHistogramPlot::onLoadDataAndUpdate()
updatePlotTitle();
auto plotWindow = firstAncestorOrThisOfType();
- if ( plotWindow == nullptr ) updateMdiWindowVisibility();
+ if ( plotWindow == nullptr ) updateDockWindowVisibility();
if ( m_histogramCurveCollection )
{
@@ -987,7 +987,7 @@ void RimHistogramPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
{
caf::PdmUiGroup* mainOptions = uiOrdering.addNewGroup( "General Plot Options" );
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
mainOptions->add( &m_showPlotTitle );
if ( m_showPlotTitle )
@@ -1008,7 +1008,7 @@ void RimHistogramPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
uiOrdering.add( &m_histogramFrequencyType );
uiOrdering.add( &m_graphType );
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
RimPlotWindow::uiOrderingForLegendsAndFonts( uiConfigName, uiOrdering );
}
diff --git a/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp b/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp
index a9d5f62c45f..73f302d9a0c 100644
--- a/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp
@@ -794,7 +794,7 @@ cvf::Transform* Rim2dIntersectionView::scaleTransform()
//--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
scheduleCreateDisplayModelAndRedraw();
}
diff --git a/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp b/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp
index 242ca265d56..f4bf46c9564 100644
--- a/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Rim3dView.cpp
@@ -21,6 +21,7 @@
#include "RiaApplication.h"
#include "RiaFieldHandleTools.h"
+#include "RiaGuiApplication.h"
#include "RiaOptionItemFactory.h"
#include "RiaPreferences.h"
#include "RiaPreferencesSystem.h"
@@ -31,6 +32,7 @@
#include "RimAnnotationCollection.h"
#include "RimAnnotationInViewCollection.h"
#include "RimCase.h"
+#include "RimDockWindowController.h"
#include "RimGridView.h"
#include "RimLegendConfig.h"
#include "RimMainPlotCollection.h"
@@ -52,12 +54,16 @@
#include "RiuTimeStepChangedHandler.h"
#include "RiuViewer.h"
+#include "DockManager.h"
+
+#include "cafCmdFeatureMenuBuilder.h"
#include "cafDisplayCoordTransform.h"
#include "cafFrameAnimationControl.h"
#include "cafPdmFieldScriptingCapability.h"
#include "cafPdmFieldScriptingCapabilityCvfColor3.h"
#include "cafPdmFieldScriptingCapabilityCvfVec3d.h"
#include "cafPdmUiComboBoxEditor.h"
+
#include "cvfCamera.h"
#include "cvfModelBasicList.h"
#include "cvfPart.h"
@@ -180,7 +186,7 @@ Rim3dView::Rim3dView()
m_annotationsPartManager = new RivAnnotationsPartMgr( this );
m_measurementPartManager = new RivMeasurementPartMgr( this );
- this->setAs3DViewMdiWindow();
+ dockAs3DViewWindow();
// Every timer tick, send a signal for updating animations.
// Any animation is supposed to connect to this signal
@@ -200,6 +206,8 @@ Rim3dView::~Rim3dView()
RiaApplication::instance()->setActiveReservoirView( nullptr );
}
+ removeWindowFromDock();
+
if ( m_viewer )
{
m_viewer->clearRimView();
@@ -208,10 +216,11 @@ Rim3dView::~Rim3dView()
// Make sure the object is disconnected from other objects before delete
prepareForDelete();
- removeMdiWindowFromMdiArea();
-
- delete m_viewer;
- m_viewer = nullptr;
+ if ( m_viewer )
+ {
+ m_viewer->deleteLater();
+ m_viewer = nullptr;
+ }
}
//--------------------------------------------------------------------------------------------------
@@ -390,7 +399,7 @@ void Rim3dView::assignIdIfNecessary()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void Rim3dView::updateMdiWindowTitle()
+void Rim3dView::updateWindowTitle()
{
if ( m_viewer )
{
@@ -407,6 +416,7 @@ void Rim3dView::updateMdiWindowTitle()
m_viewer->layoutWidget()->setWindowTitle( title );
}
+ RimViewWindow::updateWindowTitle();
}
//--------------------------------------------------------------------------------------------------
@@ -453,9 +463,12 @@ void Rim3dView::deleteViewWidget()
// Earlier implementations has used m_viewer->deleteLater(). This caused issues triggered by 3D editors and
// interaction with the event processing. deleteLater() will not be handled by processEvents() if we are in the
// state of processing UI events, ie in the process of handling a QAction
-
- delete m_viewer;
- m_viewer = nullptr;
+ if ( m_viewer )
+ {
+ m_viewer->setParent( nullptr );
+ delete m_viewer;
+ m_viewer = nullptr;
+ }
}
//--------------------------------------------------------------------------------------------------
@@ -503,6 +516,38 @@ QImage Rim3dView::snapshotWindowContent()
return QImage();
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+QImage Rim3dView::captureSnapshot( int width, int height )
+{
+ QImage image;
+ if ( m_viewer )
+ {
+ if ( width <= 0 || height <= 0 )
+ {
+ image = m_viewer->snapshotImage();
+ }
+ else
+ {
+ QSize orgSize = m_viewer->layoutWidget()->size();
+
+ // adjust for possible display DPI scaling
+ const auto ratio = m_viewer->displayScalingRatio();
+ m_viewer->layoutWidget()->setFixedSize( (int)( 1.0 * width / ratio ), (int)( 1.0 * height / ratio ) );
+
+ image = m_viewer->snapshotImage();
+
+ // reset fixed size and restore original size
+ m_viewer->layoutWidget()->setMinimumSize( 0, 0 );
+ m_viewer->layoutWidget()->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
+ m_viewer->layoutWidget()->resize( orgSize );
+ }
+ }
+
+ return image;
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -985,7 +1030,7 @@ void Rim3dView::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const
}
else if ( changedField == m_nameConfig->nameField() )
{
- updateMdiWindowTitle();
+ updateWindowTitle();
if ( viewController() )
{
@@ -1431,7 +1476,7 @@ void Rim3dView::updateFonts()
//--------------------------------------------------------------------------------------------------
void Rim3dView::performAutoNameUpdate()
{
- updateMdiWindowTitle();
+ updateWindowTitle();
}
//--------------------------------------------------------------------------------------------------
@@ -1663,22 +1708,6 @@ void Rim3dView::disablePerspectiveProjectionField()
RiaFieldHandleTools::disableWriteAndSetFieldHidden( &isPerspectiveView );
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void Rim3dView::handleMdiWindowClosed()
-{
- RimViewWindow::handleMdiWindowClosed();
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void Rim3dView::setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry )
-{
- RimViewWindow::setMdiWindowGeometry( windowGeometry );
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1897,3 +1926,36 @@ void Rim3dView::synchronizeLocalAnnotationsFromGlobal()
}
}
}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void Rim3dView::appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const
+{
+ menuBuilder << "RicDockIn3dViewFeature";
+ menuBuilder << "RicDockInPlotViewFeature";
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void Rim3dView::dockInMainWindow()
+{
+ removeWindowFromDock();
+ dockAs3DViewWindow();
+ updateDockWindowVisibility();
+ setAsActiveViewer();
+ scheduleCreateDisplayModelAndRedraw();
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void Rim3dView::dockInPlotWindow()
+{
+ removeWindowFromDock();
+ dockAsPlotWindow();
+ updateDockWindowVisibility();
+ setAsActiveViewer();
+ scheduleCreateDisplayModelAndRedraw();
+}
diff --git a/ApplicationLibCode/ProjectDataModel/Rim3dView.h b/ApplicationLibCode/ProjectDataModel/Rim3dView.h
index 658393f66c4..a95c7598169 100644
--- a/ApplicationLibCode/ProjectDataModel/Rim3dView.h
+++ b/ApplicationLibCode/ProjectDataModel/Rim3dView.h
@@ -53,6 +53,7 @@ class RiuViewer;
class RivAnnotationsPartMgr;
class RivMeasurementPartMgr;
class RivWellPathsPartMgr;
+class RiuMainWindowBase;
class RimViewNameConfig;
namespace cvf
@@ -146,6 +147,7 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public
cvf::ref displayCoordTransform() const override;
virtual std::vector legendConfigs() const = 0;
+ QImage captureSnapshot( int width, int height ) override;
QImage snapshotWindowContent() override;
void zoomAll() override;
void forceShowWindowOn();
@@ -192,7 +194,7 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public
Rim3dView* activeComparisonView() const;
void setComparisonView( Rim3dView* compView );
std::set viewsUsingThisAsComparisonView();
- void updateMdiWindowTitle() override;
+ void updateWindowTitle() override;
std::vector validComparisonViews() const;
RimViewLinker* assosiatedViewLinker() const override;
@@ -203,6 +205,9 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public
RimAnnotationInViewCollection* annotationCollection() const;
void synchronizeLocalAnnotationsFromGlobal();
+ void dockInMainWindow();
+ void dockInPlotWindow();
+
protected:
static void removeModelByName( cvf::Scene* scene, const cvf::String& modelName );
@@ -256,6 +261,8 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public
void onViewNavigationChanged() override;
+ void appendMenuItems( caf::CmdFeatureMenuBuilder& menuBuilder ) const override;
+
protected:
caf::PdmFieldHandle* userDescriptionField() override;
caf::PdmFieldHandle* backgroundColorField();
@@ -304,9 +311,6 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public
caf::PdmObjectHandle* implementingPdmObject() override;
- void handleMdiWindowClosed() override;
- void setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry ) override;
-
// Pure private methods
void createHighlightAndGridBoxDisplayModel();
@@ -326,7 +330,7 @@ class Rim3dView : public RimViewWindow, public RiuViewerToViewInterface, public
QPointer m_viewer;
QPointer m_overrideViewer;
bool m_isCallingUpdateDisplayModelForCurrentTimestepAndRedraw; // To avoid infinite recursion if comparison views
- // are pointing to each other.
+ // are pointing to each other.
// Fields
caf::PdmField m_id;
diff --git a/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp b/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp
index 229a608bd10..8a882d799a7 100644
--- a/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimDepthTrackPlot.cpp
@@ -185,7 +185,7 @@ RimDepthTrackPlot::~RimDepthTrackPlot()
delete m_commonDataSource;
delete m_nameConfig;
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
m_plots.deleteChildren();
cleanupBeforeClose();
@@ -791,7 +791,7 @@ void RimDepthTrackPlot::performAutoNameUpdate()
m_viewer->setTitleVisible( m_showPlotTitle() );
m_viewer->setPlotTitle( m_plotWindowTitle );
}
- updateMdiWindowTitle();
+ updateWindowTitle();
}
//--------------------------------------------------------------------------------------------------
@@ -1228,7 +1228,7 @@ void RimDepthTrackPlot::initAfterRead()
//--------------------------------------------------------------------------------------------------
void RimDepthTrackPlot::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
performAutoNameUpdate();
updatePlots();
updateLayout();
diff --git a/ApplicationLibCode/ProjectDataModel/RimMdiWindowController.cpp b/ApplicationLibCode/ProjectDataModel/RimDockWindowController.cpp
similarity index 52%
rename from ApplicationLibCode/ProjectDataModel/RimMdiWindowController.cpp
rename to ApplicationLibCode/ProjectDataModel/RimDockWindowController.cpp
index 53b7bbb5d7b..6be1f22a043 100644
--- a/ApplicationLibCode/ProjectDataModel/RimMdiWindowController.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimDockWindowController.cpp
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////
//
-// Copyright (C) 2017 Statoil ASA
+// Copyright (C) 2026 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,114 +16,91 @@
//
/////////////////////////////////////////////////////////////////////////////////
-#include "RimMdiWindowController.h"
+#include "RimDockWindowController.h"
#include "RiaGuiApplication.h"
+#include "Rim3dView.h"
+#include "RimPlotWindow.h"
#include "RimProject.h"
#include "RimViewWindow.h"
-#include "RiuMainWindowBase.h"
-
-#include
-CAF_PDM_XML_SOURCE_INIT( RimMdiWindowController, "MdiWindowController" );
+#include "RiuDockWidgetTools.h"
+#include "RiuMainWindow.h"
+#include "RiuMainWindowBase.h"
+#include "RiuPlotMainWindowTools.h"
+#include "RiuViewer.h"
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RimMdiWindowController::RimMdiWindowController()
-{
- CAF_PDM_InitField( &m_mainWindowID, "MainWindowID", -1, "" );
- CAF_PDM_InitField( &m_x, "xPos", -1, "" );
- CAF_PDM_InitField( &m_y, "yPos", -1, "" );
- CAF_PDM_InitField( &m_width, "Width", -1, "" );
- CAF_PDM_InitField( &m_height, "Height", -1, "" );
- CAF_PDM_InitField( &m_isMaximized, "IsMaximized", false, "" );
-}
+#include "DockManager.h"
+#include "DockWidget.h"
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RimMdiWindowController::~RimMdiWindowController()
-{
-}
+CAF_PDM_XML_SOURCE_INIT( RimDockWindowController, "DockWindowController", "MdiWindowController" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimMdiWindowController::setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry )
+RimDockWindowController::RimDockWindowController()
{
- m_mainWindowID = windowGeometry.mainWindowID;
- m_x = windowGeometry.x;
- m_y = windowGeometry.y;
- m_width = windowGeometry.width;
- m_height = windowGeometry.height;
- m_isMaximized = windowGeometry.isMaximized;
+ CAF_PDM_InitField( &m_mainWindowID, "MainWindowID", RimDockWindowController::MAIN_WINDOW_ID_UNASSIGNED, "" );
+ CAF_PDM_InitFieldNoDefault( &m_viewToControl, "ViewToControl", "" );
+ m_viewToControl = nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-RimMdiWindowGeometry RimMdiWindowController::mdiWindowGeometry()
+RimDockWindowController::~RimDockWindowController()
{
- RimMdiWindowGeometry windowGeometry;
-
- windowGeometry.mainWindowID = m_mainWindowID;
- windowGeometry.x = m_x;
- windowGeometry.y = m_y;
- windowGeometry.width = m_width;
- windowGeometry.height = m_height;
- windowGeometry.isMaximized = m_isMaximized;
-
- return windowGeometry;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimMdiWindowController::handleViewerDeletion()
+void RimDockWindowController::handleViewerDeletion()
{
viewPdmObject()->m_showWindow = false;
viewPdmObject()->updateConnectedEditors();
viewPdmObject()->updateUiIconFromToggleField();
uiCapability()->updateUiIconFromToggleField();
- removeWindowFromMDI();
-
+ removeWindowFromDock();
updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimMdiWindowController::removeWindowFromMDI()
+void RimDockWindowController::removeWindowFromDock()
{
RiuMainWindowBase* mainWin = getMainWindow();
- if ( mainWin && viewWidget() )
+ if ( mainWin && viewPdmObject() )
{
- mainWin->removeViewer( viewWidget() );
+ viewPdmObject()->deleteDockWidget();
viewPdmObject()->deleteViewWidget();
+
+ mainWin->onViewerRemoved();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-RimViewWindow* RimMdiWindowController::viewPdmObject()
+RimViewWindow* RimDockWindowController::viewPdmObject()
{
- return firstAncestorOrThisOfType();
+ return m_viewToControl;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-QWidget* RimMdiWindowController::viewWidget()
+QWidget* RimDockWindowController::viewWidget()
{
+ if ( !viewPdmObject() ) return nullptr;
return viewPdmObject()->viewWidget();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-RiuMainWindowBase* RimMdiWindowController::getMainWindow()
+RiuMainWindowBase* RimDockWindowController::getMainWindow()
{
if ( RiaGuiApplication::isRunning() )
{
@@ -135,44 +112,101 @@ RiuMainWindowBase* RimMdiWindowController::getMainWindow()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimMdiWindowController::setupBeforeSave()
-{
- if ( viewWidget() && getMainWindow() )
- {
- setMdiWindowGeometry( getMainWindow()->windowGeometryForViewer( viewWidget() ) );
- }
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RimMdiWindowController::updateViewerWidget()
+void RimDockWindowController::updateViewerWidget()
{
RiuMainWindowBase* mainWindow = getMainWindow();
if ( !mainWindow ) return;
+ if ( !viewPdmObject() ) return;
if ( viewPdmObject()->isWindowVisible() )
{
if ( !viewWidget() )
{
- QMdiSubWindow* viewWindow = mainWindow->createViewWindow();
- QWidget* viewWidget = viewPdmObject()->createViewWidget( viewWindow );
- mainWindow->initializeViewer( viewWindow, viewWidget, mdiWindowGeometry() );
+ ads::CDockWidget* dockWidget = viewPdmObject()->createDockWidget();
+ QWidget* viewWidget = viewPdmObject()->createViewWidget();
+ dockWidget->setWidget( viewWidget );
+ dockWidget->setObjectName( viewPdmObject()->dockWindowName() );
+ viewWidget->setObjectName( viewPdmObject()->dockWindowName() );
+ mainWindow->initializeViewer( dockWidget, viewWidget );
+
+ mainWindow->connect( dockWidget, SIGNAL( closed() ), mainWindow, SLOT( slotDockViewerClosed() ) );
+ mainWindow->connect( dockWidget, SIGNAL( visibilityChanged( bool ) ), mainWindow, SLOT( slotDockViewerVisibilityChanged( bool ) ) );
viewPdmObject()->updateViewWidgetAfterCreation();
}
- viewPdmObject()->updateMdiWindowTitle();
+ viewPdmObject()->updateWindowTitle();
}
else
{
+ viewPdmObject()->deleteDockWidget();
if ( viewWidget() )
{
- setMdiWindowGeometry( mainWindow->windowGeometryForViewer( viewWidget() ) );
+ viewPdmObject()->deleteViewWidget();
+ mainWindow->onViewerRemoved();
+ }
+ }
+}
- mainWindow->removeViewer( viewWidget() );
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RimDockWindowController::setMainWindowId( int mainId )
+{
+ m_mainWindowID = mainId;
+}
- viewPdmObject()->deleteViewWidget();
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RimDockWindowController::setViewToControl( RimViewWindow* view )
+{
+ m_viewToControl = view;
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+int RimDockWindowController::mainWindowId() const
+{
+ return m_mainWindowID();
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RimDockWindowController::setAsActiveViewer()
+{
+ if ( getMainWindow() == nullptr ) return;
+
+ if ( auto pdmView = viewPdmObject() )
+ {
+ for ( auto viewWin : getMainWindow()->viewWindows() )
+ {
+ if ( viewWin->isActive() )
+ {
+ viewWin->setActive( false );
+ viewWin->updateWindowTitle();
+ }
+ }
+
+ pdmView->setActive( true );
+ pdmView->updateWindowTitle();
+
+ if ( auto resView = dynamic_cast( pdmView ) )
+ {
+ RiaApplication::instance()->setActiveReservoirView( resView );
+ if ( auto mainWin = dynamic_cast( getMainWindow() ) )
+ {
+ mainWin->refreshViewActions();
+ mainWin->refreshAnimationActions();
+ mainWin->refreshDrawStyleActions();
+ }
+ }
+ else if ( auto plotView = dynamic_cast( pdmView ) )
+ {
+ RiuPlotMainWindowTools::selectAsCurrentItem( plotView );
+ RiuPlotMainWindowTools::refreshToolbars();
}
}
}
diff --git a/ApplicationLibCode/ProjectDataModel/RimMdiWindowController.h b/ApplicationLibCode/ProjectDataModel/RimDockWindowController.h
similarity index 66%
rename from ApplicationLibCode/ProjectDataModel/RimMdiWindowController.h
rename to ApplicationLibCode/ProjectDataModel/RimDockWindowController.h
index dbb22bfa063..e742e3d1460 100644
--- a/ApplicationLibCode/ProjectDataModel/RimMdiWindowController.h
+++ b/ApplicationLibCode/ProjectDataModel/RimDockWindowController.h
@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////
//
-// Copyright (C) 2017 Statoil ASA
+// Copyright (C) 2026 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -21,45 +21,46 @@
#include "cafPdmChildField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
+#include "cafPdmPtrField.h"
+
+#include "RiaDefines.h"
class RiuMainWindowBase;
-class RiuMdiSubWindow;
class RimViewWindow;
-struct RimMdiWindowGeometry;
//==================================================================================================
///
///
//==================================================================================================
-class RimMdiWindowController : public caf::PdmObject
+class RimDockWindowController : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
- RimMdiWindowController();
- ~RimMdiWindowController() override;
+ static constexpr int MAIN_WINDOW_ID_UNASSIGNED = -1;
+ static constexpr int MAIN_WINDOW_ID_3D = 0;
+ static constexpr int MAIN_WINDOW_ID_PLOTS = 1;
+
+public:
+ RimDockWindowController();
+ ~RimDockWindowController() override;
- void setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry );
- RimMdiWindowGeometry mdiWindowGeometry();
+ void setMainWindowId( int mainId );
+ void setViewToControl( RimViewWindow* view );
+ int mainWindowId() const;
+
+ void setAsActiveViewer();
void updateViewerWidget();
void handleViewerDeletion();
- void removeWindowFromMDI();
+ void removeWindowFromDock();
protected:
RimViewWindow* viewPdmObject();
QWidget* viewWidget();
RiuMainWindowBase* getMainWindow();
- // Overridden PDM methods
- void setupBeforeSave() override;
-
private:
- caf::PdmField m_mainWindowID;
-
- caf::PdmField m_x;
- caf::PdmField m_y;
- caf::PdmField m_width;
- caf::PdmField m_height;
- caf::PdmField m_isMaximized;
+ caf::PdmField m_mainWindowID;
+ caf::PdmPtrField m_viewToControl;
};
diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp
index c8020ebca8e..4da1d7a45d6 100644
--- a/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimEclipseCase.cpp
@@ -400,6 +400,7 @@ RimEclipseView* RimEclipseCase::createCopyAndAddView( const RimEclipseView* sour
auto rimEclipseView = sourceView->copyObject();
CVF_ASSERT( rimEclipseView );
+ rimEclipseView->resetDockWindowId();
rimEclipseView->setEclipseCase( this );
caf::PdmDocument::updateUiIconStateRecursively( rimEclipseView );
diff --git a/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp
index 402b940622a..7f118f2c290 100644
--- a/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp
@@ -579,7 +579,7 @@ void RimEclipseView::childFieldChangedByUi( const caf::PdmFieldHandle* changedCh
{
if ( changedChildField == &m_cellResult )
{
- updateMdiWindowTitle();
+ updateWindowTitle();
m_propertyFilterCollection->updateDefaultResult( m_cellResult() );
}
@@ -1268,7 +1268,7 @@ void RimEclipseView::onLoadDataAndUpdate()
faultResultSettings()->customFaultResult()->loadResult();
fractureColors()->loadDataAndUpdate();
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
m_propertyFilterCollection()->loadAndInitializePropertyFilters();
diff --git a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp
index a20d04f5cb1..5b707dc7fe9 100644
--- a/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimMainPlotCollection.cpp
@@ -172,7 +172,7 @@ void RimMainPlotCollection::initAfterRead()
auto* summaryMultiPlot = new RimSummaryMultiPlot;
summaryMultiPlot->setMultiPlotTitle( QString( "Multi Plot %1" ).arg( m_summaryMultiPlotCollection->multiPlots().size() + 1 ) );
- summaryMultiPlot->setAsPlotMdiWindow();
+ summaryMultiPlot->dockAsPlotWindow();
m_summaryMultiPlotCollection->addSummaryMultiPlot( summaryMultiPlot );
// We want to convert RimSummaryCrossPlot into a RimSummaryPlot. The cross plot is derived from RimSummaryPlot, but we need to
diff --git a/ApplicationLibCode/ProjectDataModel/RimMultiPlot.cpp b/ApplicationLibCode/ProjectDataModel/RimMultiPlot.cpp
index cc7866185ed..166037aa232 100644
--- a/ApplicationLibCode/ProjectDataModel/RimMultiPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimMultiPlot.cpp
@@ -85,7 +85,7 @@ RimMultiPlot::~RimMultiPlot()
{
m_isValid = false;
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
m_plots.deleteChildren();
cleanupBeforeClose();
@@ -259,7 +259,7 @@ void RimMultiPlot::movePlotsToThis( const std::vector& plotsToMove, in
}
else
{
- plotsToMove[tIdx]->removeFromMdiAreaAndCollection();
+ plotsToMove[tIdx]->removeFromDockAreaAndCollection();
}
}
@@ -353,6 +353,7 @@ void RimMultiPlot::doUpdateLayout()
m_viewer->setPagePreviewModeEnabled( m_pagePreviewMode() );
m_viewer->scheduleUpdate();
+ m_viewer->updateGeometry();
m_viewer->adjustSize();
}
}
@@ -638,6 +639,25 @@ QImage RimMultiPlot::snapshotWindowContent()
return image;
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+QImage RimMultiPlot::captureSnapshot( int width, int height )
+{
+ QImage image;
+
+ if ( m_viewer.isNull() ) return image;
+
+ QSize orgViewSize = m_viewer->size();
+
+ image = RimViewWindow::internalCaptureSnapshot( m_viewer->bookWidget(), width, height );
+
+ m_viewer->resize( orgViewSize );
+ doUpdateLayout();
+
+ return image;
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -790,7 +810,7 @@ void RimMultiPlot::onLoadDataAndUpdate()
bool originalShowState = m_showPlotLegends();
m_showPlotLegends = false;
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
updatePlotTitles();
applyPlotWindowTitleToWidgets();
updatePlots();
@@ -820,7 +840,7 @@ void RimMultiPlot::applyPlotWindowTitleToWidgets()
m_viewer->setTitleVisible( m_showPlotWindowTitle() );
m_viewer->setPlotTitle( multiPlotTitle() );
}
- updateMdiWindowTitle();
+ updateWindowTitle();
}
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h b/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h
index 220b5d205ae..d8fb7aec550 100644
--- a/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h
+++ b/ApplicationLibCode/ProjectDataModel/RimMultiPlot.h
@@ -117,6 +117,7 @@ class RimMultiPlot : public RimPlotWindow, public RimTypedPlotCollection();
@@ -165,7 +165,7 @@ void RimPlot::updateAfterInsertingIntoMultiPlot()
//--------------------------------------------------------------------------------------------------
void RimPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
- if ( !isMdiWindow() )
+ if ( !isMainDockedWindow() )
{
uiOrdering.add( &m_rowSpan );
uiOrdering.add( &m_colSpan );
diff --git a/ApplicationLibCode/ProjectDataModel/RimPlot.h b/ApplicationLibCode/ProjectDataModel/RimPlot.h
index 5839de52db6..ba8776705d9 100644
--- a/ApplicationLibCode/ProjectDataModel/RimPlot.h
+++ b/ApplicationLibCode/ProjectDataModel/RimPlot.h
@@ -73,7 +73,7 @@ class RimPlot : public QObject, public RimPlotWindow, public RimPlainPlotDataPro
RowOrColSpan colSpan() const;
void setRowSpan( RowOrColSpan rowSpan );
void setColSpan( RowOrColSpan colSpan );
- void removeFromMdiAreaAndCollection();
+ void removeFromDockAreaAndCollection();
void updateAfterInsertingIntoMultiPlot();
// Pure virtual interface methods
diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotWindow.cpp b/ApplicationLibCode/ProjectDataModel/RimPlotWindow.cpp
index 63c486e1c9f..d4dced0aa81 100644
--- a/ApplicationLibCode/ProjectDataModel/RimPlotWindow.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimPlotWindow.cpp
@@ -29,6 +29,7 @@
#include "cafPdmFieldScriptingCapability.h"
#include "cafPdmUiComboBoxEditor.h"
+#include
#include
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimPlotWindow, "RimPlotWindow" ); // Do not use. Abstract class
@@ -389,9 +390,9 @@ bool RimPlotWindow::hasCustomPageLayout( QPageLayout* customPageLayout ) const
//--------------------------------------------------------------------------------------------------
void RimPlotWindow::updateWindowVisibility()
{
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
}
else
{
@@ -414,7 +415,7 @@ void RimPlotWindow::setId( int id )
//--------------------------------------------------------------------------------------------------
void RimPlotWindow::assignIdIfNecessary()
{
- if ( m_id == -1 && isMdiWindow() )
+ if ( m_id == -1 && isMainDockedWindow() )
{
RimProject::current()->assignPlotIdToPlotWindow( this );
}
@@ -435,3 +436,15 @@ bool RimPlotWindow::handleGlobalWheelEvent( QWheelEvent* wheelEvent )
{
return false;
}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+bool RimPlotWindow::handleGlobalMousePressEvent( QMouseEvent* mouseEvent )
+{
+ if ( mouseEvent && viewWidget() && viewWidget()->underMouse() )
+ {
+ setAsActiveViewer();
+ }
+ return false;
+}
diff --git a/ApplicationLibCode/ProjectDataModel/RimPlotWindow.h b/ApplicationLibCode/ProjectDataModel/RimPlotWindow.h
index 5d0518ff9f5..8d57904e53b 100644
--- a/ApplicationLibCode/ProjectDataModel/RimPlotWindow.h
+++ b/ApplicationLibCode/ProjectDataModel/RimPlotWindow.h
@@ -35,6 +35,7 @@ class QwtPlotCurve;
class QKeyEvent;
class QWheelEvent;
class QPaintDevice;
+class QMouseEvent;
//==================================================================================================
///
@@ -91,6 +92,7 @@ class RimPlotWindow : public RimViewWindow
virtual bool handleGlobalKeyEvent( QKeyEvent* keyEvent );
virtual bool handleGlobalWheelEvent( QWheelEvent* wheelEvent );
+ virtual bool handleGlobalMousePressEvent( QMouseEvent* mouseEvent );
protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
diff --git a/ApplicationLibCode/ProjectDataModel/RimProject.cpp b/ApplicationLibCode/ProjectDataModel/RimProject.cpp
index e1d0d4c06dc..38ab26da75c 100644
--- a/ApplicationLibCode/ProjectDataModel/RimProject.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimProject.cpp
@@ -171,11 +171,11 @@ RimProject::RimProject()
CAF_PDM_InitField( &m_showPlotWindowOnTopOf3DWindow, "showPlotWindowOnTopOf3DWindow", false, "Show Plot On Top" );
m_showPlotWindowOnTopOf3DWindow.uiCapability()->setUiHidden( true );
- CAF_PDM_InitField( &m_subWindowsTiled3DWindow_OBSOLETE, "tiled3DWindow", false, "Tile 3D Window" );
- m_subWindowsTiled3DWindow_OBSOLETE.uiCapability()->setUiHidden( true );
+ CAF_PDM_InitField( &mainWindowDockState, "MainWindowDockState", QString(), "Dock State 3D Window" );
+ mainWindowDockState.uiCapability()->setUiHidden( true );
- CAF_PDM_InitField( &m_subWindowsTiledPlotWindow_OBSOLETE, "tiledPlotWindow", false, "Tile Plot Window" );
- m_subWindowsTiledPlotWindow_OBSOLETE.uiCapability()->setUiHidden( true );
+ CAF_PDM_InitField( &plotWindowDockState, "PlotWindowDockState", QString(), "Dock State Plot Window" );
+ plotWindowDockState.uiCapability()->setUiHidden( true );
CAF_PDM_InitFieldNoDefault( &m_dialogData, "DialogData", "DialogData" );
m_dialogData = new RimDialogData();
@@ -188,11 +188,6 @@ RimProject::RimProject()
CAF_PDM_InitFieldNoDefault( &caseGroupsObsolete, "CaseGroups", "" );
RiaFieldHandleTools::disableWriteAndSetFieldHidden( &caseGroupsObsolete );
- CAF_PDM_InitFieldNoDefault( &m_subWindowsTileMode3DWindow, "TileMode3DWindow", "TileMode3DWindow" );
- m_subWindowsTileMode3DWindow.uiCapability()->setUiHidden( true );
- CAF_PDM_InitFieldNoDefault( &m_subWindowsTileModePlotWindow, "TileModePlotWindow", "TileModePlotWindow" );
- m_subWindowsTileModePlotWindow.uiCapability()->setUiHidden( true );
-
// Initialization
scriptCollection = new RimScriptCollection();
@@ -272,6 +267,8 @@ void RimProject::close()
mainWindowTreeViewStates = "";
plotWindowCurrentModelIndexPaths = "";
plotWindowTreeViewStates = "";
+ mainWindowDockState = "";
+ plotWindowDockState = "";
}
//--------------------------------------------------------------------------------------------------
@@ -329,9 +326,6 @@ void RimProject::updatesAfterProjectFileIsRead()
RimOilField* oilField = oilFields[oilFieldIdx];
if ( oilField == nullptr || oilField->wellPathCollection == nullptr ) continue;
}
-
- if ( m_subWindowsTiled3DWindow_OBSOLETE ) m_subWindowsTileMode3DWindow = RiaDefines::WindowTileMode::DEFAULT;
- if ( m_subWindowsTiledPlotWindow_OBSOLETE ) m_subWindowsTileModePlotWindow = RiaDefines::WindowTileMode::DEFAULT;
}
//--------------------------------------------------------------------------------------------------
@@ -1008,38 +1002,6 @@ bool RimProject::showPlotWindowOnTop() const
return m_showPlotWindowOnTopOf3DWindow();
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiaDefines::WindowTileMode RimProject::subWindowsTileMode3DWindow() const
-{
- return m_subWindowsTileMode3DWindow();
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiaDefines::WindowTileMode RimProject::subWindowsTileModePlotWindow() const
-{
- return m_subWindowsTileModePlotWindow();
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RimProject::setSubWindowsTileMode3DWindow( RiaDefines::WindowTileMode tileMode )
-{
- m_subWindowsTileMode3DWindow = tileMode;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RimProject::setSubWindowsTileModePlotWindow( RiaDefines::WindowTileMode tileMode )
-{
- m_subWindowsTileModePlotWindow = tileMode;
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/ProjectDataModel/RimProject.h b/ApplicationLibCode/ProjectDataModel/RimProject.h
index 25e592e4212..c2eb9917437 100644
--- a/ApplicationLibCode/ProjectDataModel/RimProject.h
+++ b/ApplicationLibCode/ProjectDataModel/RimProject.h
@@ -113,6 +113,9 @@ class RimProject : public caf::PdmDocument
caf::PdmField plotWindowTreeViewStates;
caf::PdmField plotWindowCurrentModelIndexPaths;
+ caf::PdmField mainWindowDockState;
+ caf::PdmField plotWindowDockState;
+
bool writeProjectFile();
void setScriptDirectories( const QString& scriptDirectories, int maxFolderDepth );
@@ -154,11 +157,6 @@ class RimProject : public caf::PdmDocument
bool showPlotWindow() const;
bool showPlotWindowOnTop() const;
- RiaDefines::WindowTileMode subWindowsTileMode3DWindow() const;
- RiaDefines::WindowTileMode subWindowsTileModePlotWindow() const;
- void setSubWindowsTileMode3DWindow( RiaDefines::WindowTileMode tileMode );
- void setSubWindowsTileModePlotWindow( RiaDefines::WindowTileMode tileMode );
-
void reloadCompletionTypeResultsInAllViews();
void reloadCompletionTypeResultsForEclipseCase( RimEclipseCase* eclipseCase );
@@ -222,12 +220,6 @@ class RimProject : public caf::PdmDocument
caf::PdmField m_showPlotWindow;
caf::PdmField m_showPlotWindowOnTopOf3DWindow;
- caf::PdmField m_subWindowsTiled3DWindow_OBSOLETE;
- caf::PdmField m_subWindowsTiledPlotWindow_OBSOLETE;
-
- caf::PdmField> m_subWindowsTileMode3DWindow;
- caf::PdmField> m_subWindowsTileModePlotWindow;
-
caf::PdmChildArrayField casesObsolete; // obsolete
caf::PdmChildArrayField caseGroupsObsolete; // obsolete
};
diff --git a/ApplicationLibCode/ProjectDataModel/RimTools.cpp b/ApplicationLibCode/ProjectDataModel/RimTools.cpp
index 91d8fcfa130..f5ad272361a 100644
--- a/ApplicationLibCode/ProjectDataModel/RimTools.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimTools.cpp
@@ -654,7 +654,7 @@ void RimTools::updateViewWindowContent( std::vector& obje
}
else
{
- viewWindow->updateMdiWindowVisibility();
+ viewWindow->updateDockWindowVisibility();
}
}
}
diff --git a/ApplicationLibCode/ProjectDataModel/RimViewController.cpp b/ApplicationLibCode/ProjectDataModel/RimViewController.cpp
index 0aaed335d98..6232f24e827 100644
--- a/ApplicationLibCode/ProjectDataModel/RimViewController.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimViewController.cpp
@@ -168,7 +168,7 @@ void RimViewController::fieldChangedByUi( const caf::PdmFieldHandle* changedFiel
updateDisplayNameAndIcon();
updateTimeStepLink();
- if ( m_managedView ) m_managedView->updateMdiWindowTitle();
+ if ( m_managedView ) m_managedView->updateWindowTitle();
}
else if ( changedField == &m_syncCamera )
{
diff --git a/ApplicationLibCode/ProjectDataModel/RimViewLinker.cpp b/ApplicationLibCode/ProjectDataModel/RimViewLinker.cpp
index 2a01c849d54..985315247c7 100644
--- a/ApplicationLibCode/ProjectDataModel/RimViewLinker.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimViewLinker.cpp
@@ -233,13 +233,13 @@ void RimViewLinker::updateOverrides()
//--------------------------------------------------------------------------------------------------
void RimViewLinker::updateWindowTitles()
{
- if ( m_masterView ) m_masterView->updateMdiWindowTitle();
+ if ( m_masterView ) m_masterView->updateWindowTitle();
for ( RimViewController* viewController : m_viewControllers )
{
if ( auto view = viewController->managedView() )
{
- view->updateMdiWindowTitle();
+ view->updateWindowTitle();
}
}
}
diff --git a/ApplicationLibCode/ProjectDataModel/RimViewWindow.cpp b/ApplicationLibCode/ProjectDataModel/RimViewWindow.cpp
index 8990fa386a9..975369d6e20 100644
--- a/ApplicationLibCode/ProjectDataModel/RimViewWindow.cpp
+++ b/ApplicationLibCode/ProjectDataModel/RimViewWindow.cpp
@@ -26,14 +26,20 @@
#include "RicfCommandObject.h"
-#include "RimMdiWindowController.h"
+#include "RimDockWindowController.h"
#include "RimProject.h"
+#include "RiuDockWidgetTools.h"
+
#include "cafPdmUiTreeAttributes.h"
#include "cafPdmUiTreeViewEditor.h"
+#include "DockManager.h"
+#include "DockWidget.h"
+
#include
#include
+#include
#include
#include
@@ -43,6 +49,8 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimViewWindow, "ViewWindow" ); // Do not use.
///
//--------------------------------------------------------------------------------------------------
RimViewWindow::RimViewWindow()
+ : m_dockWidget( nullptr )
+ , m_isActiveViewer( false )
{
CAF_PDM_InitScriptableObjectWithNameAndComment( "View window", "", "", "", "ViewWindow", "The Base Class for all Views and Plots in ResInsight" );
@@ -52,9 +60,8 @@ RimViewWindow::RimViewWindow()
CAF_PDM_InitField( &m_showWindow, "ShowWindow", true, "Show Window" );
m_showWindow.uiCapability()->setUiHidden( true );
- // Obsolete field
- CAF_PDM_InitFieldNoDefault( &obsoleteField_windowGeometry, "WindowGeometry", "" );
- RiaFieldHandleTools::disableWriteAndSetFieldHidden( &obsoleteField_windowGeometry );
+ CAF_PDM_InitField( &m_dockWindowId, "DockWindowId", QString(), "Dock Window Id" );
+ m_dockWindowId.uiCapability()->setUiHidden( true );
}
//--------------------------------------------------------------------------------------------------
@@ -81,6 +88,14 @@ void RimViewWindow::setShowWindow( bool showWindow )
m_showWindow = showWindow;
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RimViewWindow::setAsActiveViewer()
+{
+ if ( m_windowController ) m_windowController->setAsActiveViewer();
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -94,9 +109,33 @@ void RimViewWindow::loadDataAndUpdate()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::removeMdiWindowFromMdiArea()
+bool RimViewWindow::isMainDockedWindow() const
+{
+ return m_windowController != nullptr;
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+bool RimViewWindow::isDockedIn3DView() const
+{
+ return ( m_windowController != nullptr ) && ( m_windowController->mainWindowId() == RimDockWindowController::MAIN_WINDOW_ID_3D );
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+bool RimViewWindow::isDockedInPlotView() const
+{
+ return ( m_windowController != nullptr ) && ( m_windowController->mainWindowId() == RimDockWindowController::MAIN_WINDOW_ID_PLOTS );
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RimViewWindow::removeWindowFromDock()
{
- if ( m_windowController() ) m_windowController->removeWindowFromMDI();
+ if ( m_windowController != nullptr ) m_windowController->removeWindowFromDock();
}
//--------------------------------------------------------------------------------------------------
@@ -119,20 +158,26 @@ QString RimViewWindow::windowTitle()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::handleMdiWindowClosed()
+void RimViewWindow::deleteDockWidget()
{
- if ( m_windowController() ) m_windowController->handleViewerDeletion();
+ if ( m_dockWidget && m_dockWidget->dockManager() )
+ {
+ m_dockWidget->dockManager()->removeDockWidget( m_dockWidget );
+ m_dockWidget->deleteLater();
+ m_dockWidget = nullptr;
+ }
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::updateMdiWindowVisibility()
+void RimViewWindow::updateDockWindowVisibility()
{
if ( !RiaGuiApplication::isRunning() ) return;
- if ( m_windowController() )
+ if ( m_windowController != nullptr )
{
+ m_windowController->setViewToControl( this );
m_windowController->updateViewerWidget();
}
else
@@ -154,75 +199,78 @@ void RimViewWindow::updateMdiWindowVisibility()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::setAs3DViewMdiWindow()
+void RimViewWindow::dockAs3DViewWindow()
{
- setAsMdiWindow( 0 );
+ dockInWindow( RimDockWindowController::MAIN_WINDOW_ID_3D );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::setAsPlotMdiWindow()
+void RimViewWindow::dockAsPlotWindow()
{
- setAsMdiWindow( 1 );
+ dockInWindow( RimDockWindowController::MAIN_WINDOW_ID_PLOTS );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::revokeMdiWindowStatus()
+QImage RimViewWindow::snapshotWindowContent()
{
- if ( m_windowController() )
+ QImage image;
+
+ QWidget* widget = viewWidget();
+ if ( widget )
{
- handleMdiWindowClosed();
- deleteViewWidget();
- delete m_windowController();
- m_windowController = nullptr;
+ QPixmap pix = widget->grab();
+ image = pix.toImage();
}
-}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RimViewWindow::isMdiWindow() const
-{
- return m_windowController() != nullptr;
+ return image;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry )
+QImage RimViewWindow::captureSnapshot( int width, int height )
{
- if ( m_windowController() ) m_windowController()->setMdiWindowGeometry( windowGeometry );
+ return internalCaptureSnapshot( viewWidget(), width, height );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-RimMdiWindowGeometry RimViewWindow::mdiWindowGeometry()
+QImage RimViewWindow::internalCaptureSnapshot( QWidget* widget, int width, int height )
{
- if ( m_windowController() )
- return m_windowController()->mdiWindowGeometry();
+ if ( !widget ) return QImage();
+
+ bool shouldResize = width > 0 && height > 0 && ( widget->width() != width || widget->height() != height );
+
+ QSize orgSize = widget->size();
+ if ( shouldResize )
+ {
+ widget->setFixedSize( width, height );
+ }
else
- return RimMdiWindowGeometry();
-}
+ {
+ width = widget->width();
+ height = widget->height();
+ }
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-QImage RimViewWindow::snapshotWindowContent()
-{
- QImage image;
+ QPixmap pix( width, height );
+ pix.fill( Qt::transparent );
- QWidget* widget = viewWidget();
- if ( widget )
+ QPainter painter( &pix );
+ widget->render( &painter );
+
+ if ( shouldResize )
{
- QPixmap pix = widget->grab();
- image = pix.toImage();
+ widget->setMinimumSize( 0, 0 );
+ widget->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
+ widget->resize( orgSize );
}
- return image;
+ return pix.toImage();
}
//--------------------------------------------------------------------------------------------------
@@ -266,10 +314,11 @@ void RimViewWindow::fieldChangedByUi( const caf::PdmFieldHandle* changedField, c
if ( isWindowVisible() )
{
onLoadDataAndUpdate();
+ setAsActiveViewer();
}
else
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
}
uiCapability()->updateUiIconFromToggleField();
}
@@ -278,55 +327,55 @@ void RimViewWindow::fieldChangedByUi( const caf::PdmFieldHandle* changedField, c
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::updateMdiWindowTitle()
+void RimViewWindow::updateWindowTitle()
{
- if ( viewWidget() )
+ if ( viewWidget() && dockWidget() )
{
viewWidget()->setWindowTitle( windowTitle() );
+ dockWidget()->setWindowTitle( windowTitle() );
+
+ if ( isActive() )
+ {
+ dockWidget()->setIcon( QIcon( ":/ActiveWindow.svg" ) );
+ }
+ else
+ {
+ dockWidget()->setIcon( QIcon() );
+ }
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RimViewWindow::setAsMdiWindow( int mainWindowID )
+QString RimViewWindow::dockWindowName()
{
- if ( !m_windowController() )
+ if ( m_dockWindowId().isEmpty() )
{
- m_windowController = new RimMdiWindowController;
- RimMdiWindowGeometry mwg;
- mwg.mainWindowID = mainWindowID;
- setMdiWindowGeometry( mwg );
+ m_dockWindowId = RiuDockWidgetTools::uniqueIdForDockWidget();
}
+ return m_dockWindowId();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-#include "Rim3dView.h"
+void RimViewWindow::resetDockWindowId()
+{
+ m_dockWindowId = "";
+}
-void RimViewWindow::initAfterRead()
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RimViewWindow::dockInWindow( int mainWindowID )
{
- if ( obsoleteField_windowGeometry.value().size() == 5 )
+ if ( m_windowController == nullptr )
{
- RimMdiWindowGeometry wg;
- int mainWindowID = -1;
-
- if ( dynamic_cast( this ) )
- mainWindowID = 0;
- else
- mainWindowID = 1;
-
- wg.mainWindowID = mainWindowID;
- wg.x = obsoleteField_windowGeometry.value()[0];
- wg.y = obsoleteField_windowGeometry.value()[1];
- wg.width = obsoleteField_windowGeometry.value()[2];
- wg.height = obsoleteField_windowGeometry.value()[3];
- wg.isMaximized = obsoleteField_windowGeometry.value()[4];
-
- setAsMdiWindow( mainWindowID );
- setMdiWindowGeometry( wg );
+ m_windowController = new RimDockWindowController();
+ m_windowController->setViewToControl( this );
}
+ m_windowController->setMainWindowId( mainWindowID );
}
//--------------------------------------------------------------------------------------------------
@@ -347,3 +396,39 @@ void RimViewWindow::defineObjectEditorAttribute( QString uiConfigName, caf::PdmU
treeItemAttribute->tags.push_back( std::move( tag ) );
}
}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+ads::CDockWidget* RimViewWindow::dockWidget() const
+{
+ return m_dockWidget;
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+ads::CDockWidget* RimViewWindow::createDockWidget()
+{
+ if ( !m_dockWidget )
+ {
+ m_dockWidget = new ads::CDockWidget( windowTitle() );
+ }
+ return m_dockWidget;
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RimViewWindow::setActive( bool active )
+{
+ m_isActiveViewer = active;
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+bool RimViewWindow::isActive() const
+{
+ return m_isActiveViewer;
+}
diff --git a/ApplicationLibCode/ProjectDataModel/RimViewWindow.h b/ApplicationLibCode/ProjectDataModel/RimViewWindow.h
index ca6b310166f..7679c3dfe03 100644
--- a/ApplicationLibCode/ProjectDataModel/RimViewWindow.h
+++ b/ApplicationLibCode/ProjectDataModel/RimViewWindow.h
@@ -25,31 +25,14 @@
#include "cafPdmField.h"
#include "cafPdmObject.h"
-#include
+#include
-class RimMdiWindowController;
+class RimDockWindowController;
-struct RimMdiWindowGeometry
+namespace ads
{
- RimMdiWindowGeometry()
- : mainWindowID( -1 )
- , x( 0 )
- , y( 0 )
- , width( -1 )
- , height( -1 )
- , isMaximized( false )
- {
- }
- bool isValid() const { return ( mainWindowID >= 0 && width >= 0 && height >= 0 ); }
-
- int mainWindowID;
-
- int x;
- int y;
- int width;
- int height;
- bool isMaximized;
-};
+class CDockWidget;
+} // namespace ads
class RimViewWindow : public caf::PdmObject, public caf::FontHolderInterface
{
@@ -64,33 +47,42 @@ class RimViewWindow : public caf::PdmObject, public caf::FontHolderInterface
bool showWindow() const;
void setShowWindow( bool showWindow );
- void loadDataAndUpdate();
- void handleMdiWindowClosed();
- void updateMdiWindowVisibility();
+ void setAsActiveViewer();
+ bool isActive() const;
+
+ bool isMainDockedWindow() const;
- void setAs3DViewMdiWindow();
- void setAsPlotMdiWindow();
- void revokeMdiWindowStatus();
+ bool isDockedIn3DView() const;
+ bool isDockedInPlotView() const;
- bool isMdiWindow() const;
+ void loadDataAndUpdate();
+ void updateDockWindowVisibility();
+
+ void removeWindowFromDock();
- void setMdiWindowGeometry( const RimMdiWindowGeometry& windowGeometry );
- RimMdiWindowGeometry mdiWindowGeometry();
+ void dockAs3DViewWindow();
+ void dockAsPlotWindow();
virtual QWidget* viewWidget() = 0;
+ ads::CDockWidget* dockWidget() const;
+ ads::CDockWidget* createDockWidget();
+
+ virtual QImage captureSnapshot( int width, int height );
+
virtual QImage snapshotWindowContent();
virtual void zoomAll() = 0;
void viewNavigationChanged();
- virtual void updateMdiWindowTitle();
+ virtual void updateWindowTitle();
-protected:
- void removeMdiWindowFromMdiArea();
+ void resetDockWindowId();
+ QString dockWindowName();
- ///////// Interface for the Window controller
- friend class RimMdiWindowController;
+protected:
+ //// Interface for the Window controller
+ friend class RimDockWindowController;
QString windowTitle();
virtual QWidget* createViewWidget( QWidget* mainWindowParent = nullptr ) = 0;
@@ -99,29 +91,31 @@ class RimViewWindow : public caf::PdmObject, public caf::FontHolderInterface
virtual void onLoadDataAndUpdate() = 0;
virtual void onViewNavigationChanged();
virtual bool isWindowVisible() const; // Virtual To allow special visibility control
- //////////
+ void deleteDockWidget();
+ void setActive( bool active );
+ ////
// Derived classes are not supposed to override this function. The intention is to always use m_showWindow
// as the objectToggleField for this class. This way the visibility of a widget being part of a composite widget
// can be controlled from the project tree using check box toggles
caf::PdmFieldHandle* objectToggleField() final;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
- void initAfterRead() override;
void defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
+ static QImage internalCaptureSnapshot( QWidget* widget, int width, int height );
+
private:
friend class RimProject;
- void setAsMdiWindow( int mainWindowID );
+ void dockInWindow( int mainWindowID );
virtual void assignIdIfNecessary() = 0;
protected:
- caf::PdmField m_showWindow;
-
-private:
- caf::PdmChildField m_windowController;
+ caf::PdmChildField m_windowController;
- // Obsoleted field
- caf::PdmField> obsoleteField_windowGeometry;
+ caf::PdmField m_showWindow;
+ ads::CDockWidget* m_dockWidget;
+ caf::PdmField m_dockWindowId;
+ bool m_isActiveViewer;
};
diff --git a/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp b/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp
index 765237bb288..751331bf83c 100644
--- a/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicView.cpp
@@ -411,7 +411,7 @@ void RimSeismicView::onLoadDataAndUpdate()
synchronizeLocalAnnotationsFromGlobal();
onUpdateScaleTransform();
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
if ( m_surfaceCollection ) m_surfaceCollection->loadData( m_currentTimeStep );
diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCrossPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCrossPlotCollection.cpp
index 761bbfd9442..1875ad9a6b1 100644
--- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCrossPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCrossPlotCollection.cpp
@@ -116,7 +116,7 @@ void RimSummaryCrossPlotCollection::removePlot( RimSummaryPlot* plot )
RimSummaryPlot* RimSummaryCrossPlotCollection::createSummaryPlot()
{
RimSummaryPlot* plot = new RimSummaryCrossPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
plot->setDescription( QString( "Summary Cross Plot %1" ).arg( m_summaryCrossPlots.size() ) );
diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp
index 3661a91c94b..124c1ed9688 100644
--- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryMultiPlotCollection.cpp
@@ -207,6 +207,7 @@ RimSummaryMultiPlot* RimSummaryMultiPlotCollection::duplicatePlot( RimSummaryMul
if ( !plotToDuplicate ) return nullptr;
auto plotCopy = plotToDuplicate->copyObject();
+ plotCopy->resetDockWindowId();
addSummaryMultiPlot( plotCopy );
plotCopy->resolveReferencesRecursively();
diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp
index 0aee5f23fa1..bb70916832f 100644
--- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlot.cpp
@@ -192,7 +192,7 @@ RimSummaryPlot::~RimSummaryPlot()
{
m_isValid = false;
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
deletePlotCurvesAndPlotWidget();
@@ -503,7 +503,7 @@ void RimSummaryPlot::updatePlotTitle()
}
updateCurveNames();
- updateMdiWindowTitle();
+ updateWindowTitle();
if ( plotWidget() )
{
@@ -1784,7 +1784,7 @@ void RimSummaryPlot::onLoadDataAndUpdate()
updatePlotTitle();
auto plotWindow = firstAncestorOrThisOfType();
- if ( plotWindow == nullptr ) updateMdiWindowVisibility();
+ if ( plotWindow == nullptr ) updateDockWindowVisibility();
if ( m_summaryCurveCollection )
{
@@ -2516,7 +2516,7 @@ void RimSummaryPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
}
caf::PdmUiGroup* mainOptions = uiOrdering.addNewGroup( "General Plot Options" );
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
mainOptions->add( &m_showPlotTitle );
if ( m_showPlotTitle )
@@ -2534,7 +2534,7 @@ void RimSummaryPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
mainOptions->add( &m_normalizeCurveYValues );
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
RimPlotWindow::uiOrderingForLegendsAndFonts( uiConfigName, uiOrdering );
}
diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp
index 3c84c1c237c..ed12765443c 100644
--- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotCollection.cpp
@@ -56,7 +56,7 @@ RimSummaryPlotCollection::~RimSummaryPlotCollection()
RimSummaryPlot* RimSummaryPlotCollection::createSummaryPlotWithAutoTitle()
{
RimSummaryPlot* plot = new RimSummaryPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
plot->enableAutoPlotTitle( true );
@@ -71,7 +71,7 @@ RimSummaryPlot* RimSummaryPlotCollection::createSummaryPlotWithAutoTitle()
RimSummaryPlot* RimSummaryPlotCollection::createNamedSummaryPlot( const QString& name )
{
RimSummaryPlot* plot = new RimSummaryPlot();
- plot->setAsPlotMdiWindow();
+ plot->dockAsPlotWindow();
addPlot( plot );
diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp
index 9598262cebc..dd4216473f9 100644
--- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTable.cpp
@@ -121,7 +121,7 @@ RimSummaryTable::RimSummaryTable()
CAF_PDM_InitField( &m_endDate, "EndDate", QDateTime::currentDateTime(), "End Date" );
setLegendsVisible( true );
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
setShowWindow( true );
setDeletable( true );
}
@@ -131,7 +131,7 @@ RimSummaryTable::RimSummaryTable()
//--------------------------------------------------------------------------------------------------
RimSummaryTable::~RimSummaryTable()
{
- if ( isMdiWindow() ) removeMdiWindowFromMdiArea();
+ if ( isMainDockedWindow() ) removeWindowFromDock();
cleanupBeforeClose();
}
@@ -432,7 +432,7 @@ QList RimSummaryTable::calculateValueOptions( const caf:
//--------------------------------------------------------------------------------------------------
void RimSummaryTable::onLoadDataAndUpdate()
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
createTableData();
setExcludedRowsUiSelectionsFromTableData();
diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTableCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTableCollection.cpp
index 3c5c725ce7e..14a42f32a41 100644
--- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTableCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryTableCollection.cpp
@@ -104,7 +104,7 @@ RimSummaryTable* RimSummaryTableCollection::createDefaultSummaryTable()
{
RimSummaryTable* table = new RimSummaryTable();
table->setDefaultCaseAndCategoryAndVectorName();
- table->setAsPlotMdiWindow();
+ table->dockAsPlotWindow();
return table;
}
@@ -118,7 +118,7 @@ RimSummaryTable* RimSummaryTableCollection::createSummaryTableFromCategoryAndVec
{
RimSummaryTable* table = new RimSummaryTable();
table->setFromCaseAndCategoryAndVectorName( summaryCase, category, vectorName );
- table->setAsPlotMdiWindow();
+ table->dockAsPlotWindow();
return table;
}
diff --git a/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimCustomVfpPlot.cpp b/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimCustomVfpPlot.cpp
index c89de9f5df5..7100bc9a79d 100644
--- a/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimCustomVfpPlot.cpp
+++ b/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimCustomVfpPlot.cpp
@@ -163,7 +163,7 @@ RimCustomVfpPlot::RimCustomVfpPlot()
m_showWindow = true;
m_showPlotLegends = true;
- setAsPlotMdiWindow();
+ dockAsPlotWindow();
setDeletable( true );
}
@@ -173,7 +173,7 @@ RimCustomVfpPlot::RimCustomVfpPlot()
//--------------------------------------------------------------------------------------------------
RimCustomVfpPlot::~RimCustomVfpPlot()
{
- removeMdiWindowFromMdiArea();
+ removeWindowFromDock();
deleteViewWidget();
}
@@ -333,7 +333,7 @@ void RimCustomVfpPlot::updateLegend()
// Hide the legend when in multiplot mode, as the legend is handled by the multi plot grid layout
bool doShowLegend = false;
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
doShowLegend = m_showPlotLegends;
}
@@ -612,9 +612,9 @@ void generateCombinations( const std::vector>& vectors,
//--------------------------------------------------------------------------------------------------
void RimCustomVfpPlot::onLoadDataAndUpdate()
{
- if ( isMdiWindow() )
+ if ( isMainDockedWindow() )
{
- updateMdiWindowVisibility();
+ updateDockWindowVisibility();
}
else
{
@@ -1394,7 +1394,7 @@ void RimCustomVfpPlot::updatePlotTitle( const QString& plotTitle )
{
m_plotTitle = plotTitle;
- updateMdiWindowTitle();
+ updateWindowTitle();
if ( m_plotWidget )
{
diff --git a/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimVfpPlotCollection.cpp b/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimVfpPlotCollection.cpp
index 9e3b0a1d076..5e01e4facdb 100644
--- a/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimVfpPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModel/VerticalFlowPerformance/RimVfpPlotCollection.cpp
@@ -121,7 +121,7 @@ void RimVfpPlotCollection::onChildrenUpdated( caf::PdmChildArrayFieldHandle* chi
{
for ( auto plot : plots() )
{
- plot->updateMdiWindowVisibility();
+ plot->updateDockWindowVisibility();
}
}
diff --git a/ApplicationLibCode/ProjectDataModelCommands/RimcWellLogPlotCollection.cpp b/ApplicationLibCode/ProjectDataModelCommands/RimcWellLogPlotCollection.cpp
index 696bacd8adf..b6274eef516 100644
--- a/ApplicationLibCode/ProjectDataModelCommands/RimcWellLogPlotCollection.cpp
+++ b/ApplicationLibCode/ProjectDataModelCommands/RimcWellLogPlotCollection.cpp
@@ -76,7 +76,7 @@ RimWellLogPlot* RimcWellLogPlotCollection_newWellLogPlot::createWellLogPlot( Rim
RimEclipseCase* eclipseCase )
{
RimWellLogPlot* newWellLogPlot = new RimWellLogPlot;
- newWellLogPlot->setAsPlotMdiWindow();
+ newWellLogPlot->dockAsPlotWindow();
wellLogPlotCollection->addWellLogPlot( newWellLogPlot );
diff --git a/ApplicationLibCode/SocketInterface/RiaSocketServer.cpp b/ApplicationLibCode/SocketInterface/RiaSocketServer.cpp
index 35bf574b1aa..e59180c1663 100644
--- a/ApplicationLibCode/SocketInterface/RiaSocketServer.cpp
+++ b/ApplicationLibCode/SocketInterface/RiaSocketServer.cpp
@@ -38,7 +38,6 @@
#include "cafFactory.h"
#include
-#include
#include
@@ -149,22 +148,6 @@ RimEclipseCase* RiaSocketServer::findReservoir( int caseId )
{
return eclipseView->eclipseCase();
}
-
- // If the active mdi window is different from an Eclipse view, search through available mdi windows to find the
- // last activated Eclipse view. The sub windows are returned with the most recent activated window at the back.
- QList subWindows = RiuMainWindow::instance()->subWindowList( QMdiArea::ActivationHistoryOrder );
- for ( int i = subWindows.size() - 1; i > -1; i-- )
- {
- RiuViewer* viewer = subWindows[i]->widget()->findChild();
- if ( viewer )
- {
- RimEclipseView* riv = dynamic_cast( viewer->ownerReservoirView() );
- if ( riv )
- {
- return riv->eclipseCase();
- }
- }
- }
}
else
{
diff --git a/ApplicationLibCode/UserInterface/CMakeLists_files.cmake b/ApplicationLibCode/UserInterface/CMakeLists_files.cmake
index 4636d6c2633..d8389c9a0da 100644
--- a/ApplicationLibCode/UserInterface/CMakeLists_files.cmake
+++ b/ApplicationLibCode/UserInterface/CMakeLists_files.cmake
@@ -15,8 +15,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiuPlotMainWindow.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuMainWindow.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuMainWindowBase.cpp
- ${CMAKE_CURRENT_LIST_DIR}/RiuMdiArea.cpp
- ${CMAKE_CURRENT_LIST_DIR}/RiuMdiSubWindow.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuProcessMonitor.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuProjectPropertyView.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuPropertyViewTabWidget.cpp
@@ -93,7 +91,6 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RiuDepthQwtPlot.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuWellPathComponentPlotItem.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuDraggableOverlayFrame.cpp
- ${CMAKE_CURRENT_LIST_DIR}/RiuMdiMaximizeWindowGuard.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuMainWindowTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuComparisonViewMover.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuAbstractOverlayContentFrame.cpp
diff --git a/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.cpp b/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.cpp
index a883657e897..12cf7f8b4c7 100644
--- a/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.cpp
+++ b/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.cpp
@@ -37,9 +37,9 @@ QWidget* Riu3DMainWindowTools::mainWindowWidget()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void Riu3DMainWindowTools::setActiveViewer( QWidget* subWindow )
+void Riu3DMainWindowTools::setActiveViewer( QString viewerName )
{
- if ( RiuMainWindow::instance() ) RiuMainWindow::instance()->setActiveViewer( subWindow );
+ if ( RiuMainWindow::instance() ) RiuMainWindow::instance()->setActiveViewer( viewerName );
}
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.h b/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.h
index 3201a809d6f..2c4644aa5ad 100644
--- a/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.h
+++ b/ApplicationLibCode/UserInterface/Riu3DMainWindowTools.h
@@ -19,7 +19,8 @@
#pragma once
class QWidget;
-class QString;
+
+#include
namespace caf
{
@@ -31,7 +32,7 @@ class Riu3DMainWindowTools
{
public:
static QWidget* mainWindowWidget();
- static void setActiveViewer( QWidget* subWindow );
+ static void setActiveViewer( QString viewerName );
static void setExpanded( const caf::PdmUiItem* uiItem, bool expanded = true );
static void selectAsCurrentItem( const caf::PdmObject* object, bool allowActiveViewChange = true );
static void reportAndShowWarning( const QString& warningDialogHeader, const QString& warningtext );
diff --git a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp
index bf8bf5371f7..efe7b70f547 100644
--- a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp
+++ b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.cpp
@@ -18,6 +18,11 @@
#include "RiuDockWidgetTools.h"
+#include "RiaGuiApplication.h"
+
+#include "Rim3dView.h"
+#include "RimViewWindow.h"
+
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"
@@ -27,6 +32,8 @@
#include "cafAssert.h"
#include "cafPdmUiTreeView.h"
+#include
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -56,6 +63,14 @@ QString RiuDockWidgetTools::main3DWindowName()
return "dock3DWindow_mainWindow";
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+QString RiuDockWidgetTools::centralScreenName()
+{
+ return "dockWelcomeScreen";
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -334,6 +349,40 @@ QAction* RiuDockWidgetTools::toggleActionForWidget( const ads::CDockManager* doc
return nullptr;
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RiuDockWidgetTools::setDockLayout( RiuMainWindowBase* mainWindow, const QString& layoutName )
+{
+ if ( mainWindow == nullptr ) return;
+
+ QString activeViewerName;
+ if ( auto activeViewer = RiaGuiApplication::instance()->activeReservoirView() )
+ {
+ activeViewerName = activeViewer->dockWindowName();
+ }
+
+ if ( auto dm = mainWindow->dockManager() )
+ {
+ QByteArray state = RiuDockWidgetTools::defaultDockState( layoutName );
+ if ( dm->restoreState( state, RiuMainWindowBase::DOCKSTATE_VERSION ) )
+ {
+ for ( auto view : mainWindow->viewWindows() )
+ {
+ if ( view->showWindow() && view->dockWidget() )
+ {
+ dm->addDockWidget( ads::DockWidgetArea::CenterDockWidgetArea, view->dockWidget(), dm->centralWidget()->dockAreaWidget() );
+ }
+ }
+ }
+
+ if ( auto dw = dm->findDockWidget( activeViewerName ) )
+ {
+ dw->setAsCurrentTab();
+ }
+ }
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -472,6 +521,33 @@ void RiuDockWidgetTools::selectItemsInTreeView( const QString& dockWidgetName, c
}
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+QString RiuDockWidgetTools::uniqueIdForDockWidget()
+{
+ auto main3dWindow = RiuMainWindow::instance();
+ auto mainPlotWindow = RiuPlotMainWindow::instance();
+
+ QString strId;
+ do
+ {
+ strId = QUuid::createUuid().toString();
+ if ( main3dWindow && findDockWidget( main3dWindow->dockManager(), strId ) )
+ {
+ strId.clear();
+ continue;
+ }
+ if ( mainPlotWindow && findDockWidget( mainPlotWindow->dockManager(), strId ) )
+ {
+ strId.clear();
+ continue;
+ }
+ } while ( strId.isEmpty() );
+
+ return strId;
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -505,35 +581,37 @@ QByteArray RiuDockWidgetTools::defaultEclipseDockState()
// start paste
static const char stateData[] =
- { '\x00', '\x00', '\x06', '\xfe', '\x78', '\xda', '\x95', '\x55', '\xc1', '\x4e', '\xe3', '\x30', '\x10', '\xbd', '\xf3', '\x15',
- '\x56', '\xee', '\xd0', '\x3a', '\x49', '\x4b', '\x90', '\xda', '\xa2', '\xaa', '\x05', '\xb1', '\x87', '\xee', '\xb6', '\xa4',
- '\x2c', '\x47', '\xe4', '\x75', '\x66', '\x8b', '\xc1', '\xb1', '\xab', '\xb1', '\xd3', '\x05', '\xc4', '\xc7', '\xe3', '\xb4',
- '\xa8', '\xab', '\x82', '\x93', '\x34', '\xa7', '\xd8', '\xe3', '\xf7', '\x3c', '\xf3', '\x9e', '\x27', '\xf6', '\xe0', '\xf2',
- '\x25', '\x97', '\x64', '\x03', '\x68', '\x84', '\x56', '\xc3', '\x80', '\x9e', '\x75', '\x03', '\x02', '\x8a', '\xeb', '\x4c',
- '\xa8', '\xd5', '\x30', '\xb8', '\x5b', '\x5e', '\x9f', '\x26', '\xc1', '\xe5', '\x68', '\xb0', '\xb0', '\xe3', '\x6c', '\xc3',
- '\x14', '\x87', '\x6c', '\xaa', '\xf9', '\xb3', '\x5b', '\x4b', '\x5f', '\x8d', '\x85', '\x9c', '\xfc', '\xde', '\x13', '\x03',
- '\x72', '\x67', '\x00', '\xf7', '\xf3', '\x28', '\x20', '\x13', '\xad', '\x2c', '\x13', '\xca', '\x45', '\xb6', '\xcb', '\x13',
- '\x50', '\x16', '\x99', '\xbc', '\x17', '\xd9', '\x0a', '\xec', '\x30', '\xc8', '\xdc', '\x3e', '\xd1', '\xf4', '\x5e', '\xa8',
- '\x4c', '\xff', '\x7b', '\xc8', '\x1d', '\x6e', '\x37', '\x0c', '\x46', '\x83', '\x3d', '\x8f', '\x5c', '\x4b', '\xcd', '\xec',
- '\xb6', '\x90', '\xae', '\x8b', '\xa7', '\x6b', '\x29', '\xac', '\x75', '\xe1', '\x5f', '\x28', '\xdc', '\x5e', '\x6e', '\xa5',
- '\x4c', '\xf4', '\x5e', '\x26', '\x2a', '\x94', '\xdb', '\x31', '\xac', '\xc4', '\x9c', '\x1e', '\x60', '\xc6', '\x08', '\x8c',
- '\x2c', '\xd9', '\x1f', '\xb3', '\xab', '\xb2', '\x40', '\x04', '\xf5', '\x59', '\xd0', '\x1c', '\xf5', '\x13', '\x70', '\xbb',
- '\x44', '\x80', '\xc3', '\x9a', '\x76', '\x55', '\x93', '\x9f', '\x2c', '\x87', '\x5a', '\x24', '\x99', '\x48', '\x6d', '\x20',
- '\x2b', '\x0b', '\xee', '\x78', '\x58', '\x53', '\x66', '\x59', '\xaa', '\x0b', '\xe4', '\xd0', '\x92', '\x98', '\x72', '\x14',
- '\x6b', '\x6b', '\xea', '\x59', '\x9d', '\x52', '\xd9', '\x81', '\x3e', '\xfa', '\x5d', '\xdf', '\x1a', '\xd0', '\xbe', '\x5e',
- '\x65', '\xc2', '\x6a', '\x6c', '\x96', '\x58', '\x01', '\xf6', '\xa6', '\x4d', '\xc5', '\x1b', '\x98', '\xd1', '\x79', '\xbf',
- '\x4b', '\x7a', '\xf4', '\x82', '\x0c', '\x3a', '\xbb', '\xb9', '\xfb', '\x7e', '\x1e', '\xc9', '\x71', '\x87', '\x73', '\xcc',
- '\x21', '\xd7', '\x08', '\xf4', '\x75', '\x94', '\x6b', '\x23', '\xb6', '\xda', '\x62', '\x3d', '\x22', '\xbd', '\x84', '\x96',
- '\xae', '\x2e', '\x0a', '\xc1', '\x9f', '\xc7', '\x9c', '\x83', '\x31', '\x0d', '\x96', '\x56', '\x20', '\x6b', '\xfc', '\xa4',
- '\xfd', '\xe4', '\x9c', '\xc4', '\x51', '\xb7', '\x85', '\xa1', '\xff', '\xcd', '\x8a', '\xea', '\xcd', '\xba', '\x05', '\x53',
- '\x48', '\xfb', '\x43', '\xfd', '\xd5', '\x0d', '\x65', '\xfb', '\x81', '\x4d', '\x36', '\xf5', '\xbd', '\xe9', '\xe6', '\x52',
- '\xdb', '\xa3', '\xd2', '\x7d', '\x05', '\x36', '\xfd', '\x5a', '\xb0', '\xb6', '\x8f', '\x2d', '\x39', '\x33', '\xfd', '\x88',
- '\x66', '\x22', '\x90', '\x4b', '\xa8', '\x64', '\x52', '\x2f', '\xf3', '\x16', '\xe4', '\x1c', '\x30', '\x6f', '\x99', '\x6f',
- '\xbe', '\x69', '\xab', '\x2a', '\x05', '\x61', '\x6e', '\x84', '\xb1', '\x6d', '\x7c', '\x0f', '\xbf', '\xf8', '\x3e', '\x73',
- '\xdd', '\xc6', '\x56', '\xd0', '\xd4', '\x9b', '\x3e', '\x58', '\x93', '\x1e', '\xd4', '\x65', '\x2b', '\xcf', '\xb4', '\x6a',
- '\x71', '\x43', '\xc4', '\x09', '\x25', '\x94', '\xc6', '\x11', '\x89', '\x93', '\xc4', '\xdf', '\xd5', '\xdb', '\x48', '\xd2',
- '\x8b', '\x49', '\x1c', '\xf6', '\x6a', '\x10', '\x71', '\x14', '\x91', '\x90', '\x86', '\xa1', '\x17', '\xd2', '\xd9', '\xbf',
- '\x22', '\x6e', '\x5c', '\xf1', '\x7a', '\x8d', '\x4e', '\x3e', '\x00', '\xdb', '\xd5', '\x66', '\x08' };
+ { '\x00', '\x00', '\x07', '\x27', '\x78', '\xda', '\x95', '\x55', '\xc1', '\x72', '\xda', '\x30', '\x10', '\xbd', '\xf7', '\x2b',
+ '\x34', '\xbe', '\xa7', '\x60', '\x3b', '\xc5', '\xce', '\x0c', '\x90', '\x61', '\x9c', '\x66', '\xda', '\x03', '\x2d', '\x89',
+ '\x49', '\x38', '\x76', '\x54', '\x79', '\x4b', '\xd4', '\xc8', '\x5a', '\x46', '\x92', '\x69', '\xd3', '\xe9', '\xc7', '\x77',
+ '\x0d', '\x19', '\x3a', '\x10', '\xd9', '\xc6', '\x27', '\x5b', '\xd2', '\x7b', '\xd2', '\xdb', '\xa7', '\xdd', '\xd5', '\xf8',
+ '\xfa', '\x77', '\xa9', '\xd8', '\x16', '\x8c', '\x95', '\xa8', '\x27', '\x41', '\xf8', '\x7e', '\x18', '\x30', '\xd0', '\x02',
+ '\x0b', '\xa9', '\xd7', '\x93', '\xe0', '\x61', '\x79', '\x7b', '\x91', '\x06', '\xd7', '\xd3', '\xf1', '\x9d', '\x9b', '\x15',
+ '\x5b', '\xae', '\x05', '\x14', '\x37', '\x28', '\x9e', '\x69', '\x2d', '\x7f', '\xb1', '\x0e', '\x4a', '\xf6', '\x78', '\x20',
+ '\x06', '\xec', '\xc1', '\x82', '\x39', '\x8c', '\x2f', '\x03', '\x96', '\xa1', '\x76', '\x5c', '\x6a', '\x9a', '\xd9', '\x2d',
+ '\x67', '\xa0', '\x9d', '\xe1', '\x6a', '\x25', '\x8b', '\x35', '\xb8', '\x49', '\x50', '\xd0', '\x3e', '\x2b', '\x50', '\x02',
+ '\x4b', '\xc8', '\x85', '\x01', '\xd0', '\xc1', '\x74', '\x7c', '\x60', '\xb0', '\x5b', '\x85', '\xdc', '\xed', '\x24', '\x0c',
+ '\x69', '\x3e', '\xdf', '\x28', '\xe9', '\x1c', '\x4d', '\x7f', '\x35', '\x92', '\x76', '\xa1', '\x95', '\xfa', '\x88', '\xbf',
+ '\xf5', '\x11', '\x95', '\xa6', '\xbd', '\xa2', '\x46', '\xcc', '\xc5', '\x11', '\x66', '\x66', '\x80', '\xb3', '\x25', '\xff',
+ '\x4e', '\x82', '\x62', '\x5a', '\xa8', '\x8c', '\x01', '\xfd', '\x2a', '\x65', '\x61', '\xf0', '\x27', '\x08', '\xb7', '\x24',
+ '\x25', '\xdf', '\x4a', '\xd2', '\xb0', '\x92', '\xba', '\xc0', '\x5f', '\xc4', '\xd9', '\xeb', '\x65', '\x5f', '\x78', '\x09',
+ '\xad', '\x48', '\x96', '\x29', '\xb4', '\x50', '\xd4', '\x82', '\x07', '\x1e', '\xd6', '\x0d', '\x77', '\x3c', '\xc7', '\xca',
+ '\x08', '\xe8', '\x49', '\x24', '\x73', '\xe4', '\xc6', '\xd9', '\x76', '\xd6', '\xa0', '\x8e', '\xec', '\x28', '\xbe', '\xf0',
+ '\x6d', '\x7c', '\x1b', '\x30', '\xee', '\xe5', '\x63', '\x21', '\x1d', '\x9a', '\xee', '\x10', '\x1b', '\xc0', '\xde', '\x63',
+ '\x73', '\xf9', '\x07', '\xec', '\x74', '\x34', '\x4c', '\x59', '\x9c', '\x44', '\x6c', '\x3c', '\xd8', '\x8f', '\xe9', '\xfb',
+ '\x7a', '\x25', '\xe7', '\x5d', '\xce', '\x39', '\x97', '\xdc', '\x12', '\xe0', '\x71', '\x2e', '\x51', '\x02', '\xf1', '\xf5',
+ '\x0e', '\xe5', '\x09', '\xef', '\x04', '\xda', '\xd3', '\xc9', '\xbb', '\x4a', '\x8a', '\xe7', '\x99', '\x10', '\x60', '\x6d',
+ '\x87', '\x8d', '\x0d', '\xc8', '\x16', '\x0f', '\xc3', '\x28', '\x49', '\x58', '\x9c', '\x5e', '\xf5', '\x30', '\xf1', '\xbf',
+ '\x41', '\xf1', '\xb1', '\x41', '\xd1', '\x89', '\xee', '\x7b', '\xb0', '\x95', '\x72', '\x9f', '\xf5', '\x0f', '\xec', '\x90',
+ '\xed', '\x07', '\x76', '\xa4', '\x69', '\x06', '\x4a', '\xe5', '\xa0', '\xa8', '\x30', '\x48', '\xd5', '\x12', '\x51', '\x79',
+ '\xb9', '\xa1', '\xdf', '\xe2', '\x91', '\x57', '\xea', '\x42', '\xa1', '\x3b', '\x4b', '\xea', '\x29', '\xb0', '\xab', '\x14',
+ '\x61', '\xe3', '\x9e', '\x7a', '\x72', '\xee', '\x41', '\x2d', '\xc0', '\x94', '\x3d', '\x59', '\x8b', '\x6d', '\x5f', '\x6d',
+ '\x39', '\x48', '\xfb', '\x49', '\xda', '\x3e', '\x94', '\x39', '\x3e', '\x19', '\x9b', '\x49', '\x23', '\x14', '\x34', '\x1e',
+ '\xd6', '\xe0', '\xfb', '\x69', '\x8a', '\xcc', '\x29', '\x53', '\xf9', '\x1a', '\xba', '\xf2', '\xda', '\x07', '\xeb', '\x72',
+ '\xc2', '\x60', '\x5d', '\x06', '\x73', '\xd4', '\x3d', '\x3a', '\x4a', '\x1c', '\xa5', '\xec', '\xea', '\xf2', '\x03', '\x15',
+ '\x44', '\xea', '\x2f', '\x88', '\x7d', '\xdf', '\x49', '\xa8', '\xef', '\x0c', '\xa3', '\x16', '\x44', '\xdd', '\x95', '\xc2',
+ '\x51', '\x12', '\x7a', '\x21', '\x83', '\xc3', '\xa3', '\x43', '\xff', '\x0d', '\xcf', '\xdc', '\xf4', '\xdd', '\x3f', '\x7f',
+ '\xa4', '\x74', '\x6f' };
// end paste
@@ -550,34 +628,37 @@ QByteArray RiuDockWidgetTools::defaultGeoMechDockState()
// start paste
static const char stateData[] =
- { '\x00', '\x00', '\x06', '\x81', '\x78', '\xda', '\x95', '\x55', '\xc1', '\x52', '\xc2', '\x30', '\x10', '\xbd', '\xfb', '\x15',
- '\x99', '\xde', '\x95', '\x96', '\x16', '\xe1', '\x50', '\x70', '\x1c', '\xd0', '\xd1', '\x03', '\x5a', '\x29', '\xca', '\xd1',
- '\x89', '\xed', '\x8a', '\xd1', '\x34', '\x61', '\x92', '\x2d', '\x8a', '\xe3', '\xc7', '\x9b', '\x52', '\xa7', '\x33', '\x60',
- '\x68', '\xe9', '\xa9', '\xc9', '\xe6', '\xbd', '\xbc', '\xb7', '\x9b', '\x4d', '\x1a', '\x5e', '\x7c', '\x65', '\x9c', '\xac',
- '\x41', '\x69', '\x26', '\xc5', '\xd0', '\xf1', '\xce', '\x5c', '\x87', '\x80', '\x48', '\x64', '\xca', '\xc4', '\x72', '\xe8',
- '\x3c', '\xce', '\xaf', '\x4f', '\x07', '\xce', '\xc5', '\x28', '\x7c', '\xc0', '\xcb', '\x74', '\x4d', '\x45', '\x02', '\xe9',
- '\x44', '\x26', '\x1f', '\x66', '\x2d', '\xde', '\x68', '\x84', '\x8c', '\x3c', '\x55', '\x44', '\x87', '\x3c', '\x6a', '\x50',
- '\xd5', '\xdc', '\x77', '\xc8', '\x58', '\x0a', '\xa4', '\x4c', '\x98', '\xc8', '\x76', '\x79', '\x0c', '\x02', '\x15', '\xe5',
- '\x0b', '\x96', '\x2e', '\x01', '\x87', '\x4e', '\x6a', '\xf6', '\xf1', '\x27', '\x0b', '\x26', '\x52', '\xf9', '\xf9', '\x9c',
- '\x19', '\x5c', '\x39', '\x74', '\x46', '\x61', '\xc5', '\x23', '\xd7', '\x5c', '\x52', '\xdc', '\x1a', '\x71', '\x4d', '\x3c',
- '\x5e', '\x71', '\x86', '\x68', '\xc2', '\xf7', '\x8a', '\x99', '\xbd', '\xcc', '\x4a', '\x21', '\xf4', '\x53', '\x08', '\xe5',
- '\x02', '\x0b', '\xc9', '\x43', '\x98', '\xd3', '\x0a', '\xd3', '\x35', '\x98', '\x4b', '\x05', '\x94', '\xcc', '\xe9', '\x8b',
- '\x2e', '\x5d', '\xe6', '\x4a', '\x81', '\xf8', '\x33', '\x14', '\x29', '\xf9', '\x0e', '\x09', '\xce', '\x15', '\xc0', '\xae',
- '\xa7', '\xd2', '\x35', '\xb9', '\xa3', '\x19', '\xd4', '\x22', '\xc9', '\x98', '\x4b', '\x0d', '\x69', '\x61', '\xb8', '\x63',
- '\x61', '\x4d', '\x28', '\xd2', '\x58', '\xe6', '\x2a', '\x81', '\x96', '\xc4', '\x38', '\x51', '\x6c', '\x85', '\xba', '\x9e',
- '\xd5', '\x29', '\x32', '\xdb', '\xc9', '\xcf', '\xfb', '\x9f', '\xdf', '\x0a', '\x14', '\x6e', '\xae', '\x52', '\x86', '\x52',
- '\x35', '\xa7', '\x78', '\x00', '\x6c', '\x95', '\x8d', '\xd9', '\x37', '\xe8', '\x51', '\x3f', '\xf0', '\x49', '\xcf', '\xed',
- '\x93', '\xb0', '\x53', '\xce', '\xcd', '\xf7', '\xef', '\x48', '\x5a', '\x1f', '\xce', '\xbe', '\x79', '\x5b', '\xb7', '\x98',
- '\x16', '\xa1', '\xcb', '\x2d', '\xd6', '\x92', '\x80', '\x95', '\x60', '\xb5', '\x7e', '\x44', '\x67', '\xd5', '\x18', '\x9b',
- '\x81', '\xce', '\x39', '\xde', '\x8a', '\x57', '\xd9', '\x50', '\x51', '\x3b', '\xb0', '\xe9', '\x10', '\x7b', '\x56', '\xb9',
- '\x88', '\x4b', '\x3c', '\x4a', '\x6e', '\x1f', '\xd8', '\xd0', '\x69', '\x53', '\xf9', '\xa6', '\xf4', '\x98', '\xa9', '\x84',
- '\x43', '\x4b', '\x66', '\x0c', '\x4c', '\xdf', '\x30', '\xdd', '\x86', '\x32', '\x03', '\x1e', '\x81', '\xca', '\x0e', '\x0a',
- '\x79', '\x56', '\x56', '\xb4', '\xc6', '\x7a', '\xc6', '\xff', '\x1a', '\x76', '\xf7', '\x6a', '\x38', '\x05', '\xad', '\xe9',
- '\x12', '\x74', '\x43', '\x05', '\x6d', '\xb0', '\x86', '\x94', '\xcc', '\xad', '\x49', '\x0c', '\x6b', '\x2a', '\x45', '\x8b',
- '\x5b', '\xd3', '\xeb', '\x7a', '\xc4', '\xf3', '\x7a', '\x2e', '\x09', '\xfc', '\x81', '\xfd', '\xea', '\x6c', '\x23', '\x83',
- '\x20', '\x20', '\x81', '\x7b', '\x6e', '\x45', '\xd4', '\xf4', '\xe7', '\x04', '\x56', '\xf8', '\x76', '\x44', '\xbf', '\x58',
- '\x71', '\xd6', '\xca', '\x96', '\xf2', '\x81', '\xef', '\x93', '\xae', '\x67', '\xac', '\xbb', '\x56', '\x47', '\x9d', '\xea',
- '\x21', '\x37', '\xe3', '\x03', '\x3f', '\x90', '\xd1', '\xc9', '\x2f', '\xd6', '\xef', '\x3b', '\x86' };
+ { '\x00', '\x00', '\x07', '\x25', '\x78', '\xda', '\x95', '\x55', '\x4d', '\x6f', '\xdb', '\x30', '\x0c', '\xbd', '\xef', '\x57',
+ '\x08', '\xbe', '\x77', '\xf1', '\x47', '\x97', '\x78', '\x40', '\x92', '\x22', '\x70', '\x57', '\x6c', '\x87', '\x6c', '\x69',
+ '\x9d', '\x2e', '\xc7', '\x41', '\x93', '\xb9', '\x54', '\xab', '\x2c', '\x05', '\x12', '\x9d', '\xad', '\xc5', '\x7e', '\xfc',
+ '\xe8', '\xa4', '\xf0', '\x96', '\x54', '\x8e', '\xe3', '\x93', '\x2d', '\xf1', '\x3d', '\xf1', '\x91', '\x22', '\xa9', '\xf1',
+ '\xd5', '\xef', '\x52', '\xb1', '\x2d', '\x58', '\x27', '\x8d', '\x9e', '\x04', '\xd1', '\xdb', '\x30', '\x60', '\xa0', '\x85',
+ '\x29', '\xa4', '\x5e', '\x4f', '\x82', '\xfb', '\xe5', '\xcd', '\x45', '\x1a', '\x5c', '\x4d', '\xc7', '\xb7', '\x38', '\x2b',
+ '\xb6', '\x5c', '\x0b', '\x28', '\xae', '\x8d', '\x78', '\x24', '\x5b', '\xfe', '\xe4', '\x10', '\x4a', '\xf6', '\xb5', '\x21',
+ '\x06', '\xec', '\xde', '\x81', '\x6d', '\xd6', '\x97', '\x01', '\xcb', '\x8c', '\x46', '\x2e', '\x35', '\xed', '\xec', '\xcc',
+ '\x19', '\x68', '\xb4', '\x5c', '\xad', '\x64', '\xb1', '\x06', '\x9c', '\x04', '\x05', '\x9d', '\xb3', '\x02', '\x25', '\x4c',
+ '\x09', '\xb9', '\xb0', '\x00', '\x3a', '\x98', '\x8e', '\x1b', '\x06', '\xbb', '\x51', '\x86', '\xe3', '\x4e', '\x42', '\x48',
+ '\xfb', '\xf9', '\x46', '\x49', '\x44', '\xda', '\xfe', '\x62', '\x25', '\x9d', '\x42', '\x96', '\xda', '\xc5', '\x9f', '\xda',
+ '\x45', '\xa5', '\xe9', '\xac', '\xb8', '\x15', '\x73', '\x71', '\x80', '\x99', '\x59', '\xe0', '\x6c', '\xc9', '\xbf', '\x93',
+ '\xa0', '\x84', '\x0c', '\x95', '\xb5', '\xa0', '\x5f', '\xa4', '\x2c', '\xac', '\xf9', '\x09', '\x02', '\x97', '\xa4', '\xe4',
+ '\x5b', '\x49', '\x1a', '\x56', '\x52', '\x17', '\xe6', '\x17', '\x71', '\xf6', '\x7a', '\xd9', '\x67', '\x5e', '\xc2', '\x49',
+ '\x24', '\xcb', '\x94', '\x71', '\x50', '\xd4', '\x82', '\x07', '\x1e', '\xd6', '\x35', '\x47', '\x9e', '\x9b', '\xca', '\x0a',
+ '\xe8', '\x49', '\xa4', '\xe4', '\xc8', '\x0d', '\xba', '\xd3', '\xac', '\x41', '\x1d', '\xd9', '\x41', '\x7c', '\xd1', '\xeb',
+ '\xf8', '\x36', '\x60', '\xf1', '\xe9', '\x43', '\x21', '\xd1', '\xd8', '\xee', '\x10', '\x5b', '\xc0', '\x5e', '\xb7', '\xb9',
+ '\x7c', '\x06', '\x37', '\x1d', '\x86', '\x29', '\x4b', '\x46', '\x31', '\x1b', '\x0f', '\xf6', '\x6b', '\xfa', '\xbe', '\x5c',
+ '\xc9', '\x79', '\x97', '\x73', '\xce', '\x25', '\x9f', '\x08', '\xf0', '\xb0', '\x96', '\xa8', '\x80', '\xf8', '\x7a', '\x87',
+ '\xf2', '\x84', '\x77', '\x04', '\xed', '\x99', '\xc9', '\xdb', '\x4a', '\x8a', '\xc7', '\x99', '\x10', '\xe0', '\x5c', '\x47',
+ '\x1a', '\x5b', '\x90', '\x8d', '\xc3', '\xe8', '\x55', '\x0e', '\xa3', '\xe1', '\x28', '\x62', '\x61', '\x8f', '\x14', '\xfe',
+ '\x4b', '\x4f', '\x72', '\x98', '\x9e', '\xf8', '\x48', '\xf5', '\x1d', '\xb8', '\x4a', '\xe1', '\x27', '\xfd', '\xc3', '\x74',
+ '\x88', '\xf6', '\x03', '\x3b', '\x8a', '\x34', '\x03', '\xa5', '\x72', '\x50', '\xd4', '\x16', '\xa4', '\x6a', '\x69', '\x8c',
+ '\xea', '\x8c', '\xf7', '\x3f', '\xa9', '\x43', '\xaf', '\xd4', '\x85', '\x32', '\x78', '\x96', '\xd4', '\x63', '\x60', '\x57',
+ '\x23', '\xc2', '\x06', '\x1f', '\x5a', '\x39', '\x91', '\x97', '\x73', '\x07', '\x6a', '\x01', '\xb6', '\xec', '\xc9', '\x5a',
+ '\x6c', '\xb1', '\x27', '\x63', '\x6e', '\x1e', '\xac', '\xcb', '\xa4', '\x15', '\x0a', '\x7a', '\x46', '\x95', '\x83', '\x74',
+ '\x1f', '\xa5', '\xc3', '\x3e', '\x23', '\xe2', '\xb8', '\x44', '\xe6', '\x54', '\xa7', '\x7c', '\x0d', '\x5d', '\x55', '\xed',
+ '\x83', '\x75', '\xa8', '\xa3', '\x79', '\x52', '\x37', '\xc1', '\xdc', '\xe8', '\x1e', '\xf3', '\x24', '\x89', '\x53', '\xf6',
+ '\xfe', '\xf2', '\x1d', '\x4b', '\xd2', '\xd4', '\xdf', '\x10', '\xfb', '\xa9', '\x33', '\xa2', '\xa9', '\x13', '\xc6', '\x27',
+ '\x10', '\xf5', '\x4c', '\xda', '\xf5', '\x95', '\x0f', '\x32', '\x68', '\x9e', '\x1c', '\xfa', '\x6f', '\x79', '\xe4', '\xa6',
+ '\x6f', '\xfe', '\x02', '\x82', '\xdf', '\x73', '\xfc' };
// end paste
@@ -594,31 +675,31 @@ QByteArray RiuDockWidgetTools::defaultPlotDockState()
// start paste
static const char stateData[] =
- { '\x00', '\x00', '\x05', '\x83', '\x78', '\xda', '\xa5', '\x54', '\x5d', '\x6f', '\x82', '\x30', '\x14', '\x7d', '\xdf', '\xaf',
- '\x68', '\xfa', '\xee', '\x00', '\x75', '\x8e', '\x25', '\xa8', '\x31', '\x3a', '\xdf', '\xdc', '\x17', '\x38', '\x1f', '\x4d',
- '\x47', '\x6f', '\x58', '\x33', '\x68', '\x49', '\x5b', '\xdc', '\x5c', '\xf6', '\xe3', '\x57', '\x60', '\x61', '\x1f', '\x01',
- '\x44', '\xf7', '\x40', '\x68', '\xef', '\x3d', '\xa7', '\xe7', '\xdc', '\xf4', '\xa4', '\xde', '\xf4', '\x2d', '\x89', '\xd1',
- '\x0e', '\xa4', '\x62', '\x82', '\x8f', '\xb1', '\x73', '\x6e', '\x63', '\x04', '\x3c', '\x14', '\x94', '\xf1', '\x68', '\x8c',
- '\xd7', '\xc1', '\xb2', '\xe7', '\xe2', '\xe9', '\xc4', '\xbb', '\xd7', '\x33', '\xba', '\x23', '\x3c', '\x04', '\xba', '\x10',
- '\xe1', '\x8b', '\xe9', '\xf9', '\x7b', '\xa5', '\x21', '\x41', '\x8f', '\x15', '\x11', '\xa3', '\xb5', '\x02', '\x59', '\xed',
- '\x07', '\x18', '\xcd', '\x05', '\xd7', '\x84', '\x71', '\x53', '\x29', '\xda', '\x73', '\xe0', '\x5a', '\x92', '\x78', '\xc3',
- '\x68', '\x04', '\x7a', '\x8c', '\xa9', '\x39', '\xe7', '\x2e', '\x16', '\x7a', '\xc3', '\x38', '\x15', '\xaf', '\xdb', '\xc4',
- '\x20', '\xbf', '\xb7', '\x78', '\xe2', '\x55', '\x6c', '\xb4', '\x8c', '\x05', '\xd1', '\x85', '\x1d', '\xdb', '\xd4', '\xfd',
- '\x34', '\x66', '\x5a', '\x9b', '\xf2', '\xad', '\x64', '\xe6', '\x44', '\xd3', '\xc9', '\xe5', '\x3e', '\x72', '\xb9', '\x8c',
- '\xeb', '\x5c', '\xb8', '\x09', '\xd3', '\xab', '\x30', '\x7d', '\x83', '\x99', '\x49', '\x20', '\x28', '\x20', '\x4f', '\xaa',
- '\xf4', '\x9a', '\x49', '\x09', '\xfc', '\x87', '\x2d', '\x15', '\x48', '\x80', '\x6d', '\x6a', '\x56', '\x2b', '\xe3', '\xa2',
- '\x72', '\x55', '\xba', '\x47', '\x37', '\x24', '\x81', '\x03', '\x58', '\x34', '\x8f', '\x85', '\x02', '\x9a', '\x9b', '\xb6',
- '\x6a', '\x78', '\x01', '\x24', '\x69', '\x4c', '\x34', '\x9c', '\xc2', '\xf5', '\x43', '\xc9', '\xd2', '\x2e', '\xaa', '\x56',
- '\x3e', '\xe4', '\xaf', '\x51', '\x9d', '\xbf', '\xa3', '\x4a', '\x91', '\x82', '\xd4', '\xfb', '\x6b', '\xca', '\xb4', '\x90',
- '\x5d', '\xe6', '\x6d', '\x25', '\xd4', '\xca', '\xfb', '\xec', '\x1d', '\xd4', '\xc4', '\xb1', '\xed', '\x0b', '\x34', '\x18',
- '\x5d', '\x22', '\xcf', '\x2a', '\x0b', '\xe6', '\xff', '\x75', '\x4d', '\xed', '\x0e', '\x1b', '\x33', '\x62', '\x82', '\x41',
- '\xa2', '\x82', '\xd1', '\x70', '\x2f', '\x0d', '\xb4', '\x5a', '\x8f', '\x07', '\x12', '\x33', '\x68', '\x4f', '\xcc', '\x82',
- '\x68', '\xe2', '\x8b', '\x4c', '\x86', '\xd0', '\x31', '\x36', '\xed', '\x84', '\x03', '\xf7', '\x6f', '\xba', '\x19', '\x3d',
- '\x25', '\x37', '\x59', '\x92', '\x10', '\xb9', '\xbf', '\x2b', '\x48', '\x9c', '\x44', '\x20', '\xff', '\x99', '\x97', '\x07',
- '\x16', '\x3d', '\xeb', '\xa3', '\x43', '\x53', '\xcb', '\x3a', '\xd6', '\xc8', '\x0a', '\x94', '\x32', '\x13', '\xa8', '\x0e',
- '\xea', '\x4d', '\xd0', '\x96', '\xb0', '\xba', '\xb6', '\x8d', '\xfa', '\x6e', '\xfe', '\xb9', '\xb5', '\x79', '\x2d', '\x2b',
- '\x43', '\xdb', '\x41', '\xce', '\x68', '\x74', '\x85', '\x86', '\x6e', '\xbf', '\x16', '\x66', '\x55', '\x8f', '\x98', '\x59',
- '\x37', '\x3c', '\xa1', '\x93', '\xb3', '\x4f', '\x33', '\x96', '\xe9', '\xd8' };
+ { '\x00', '\x00', '\x05', '\x5e', '\x78', '\xda', '\xa5', '\x54', '\x51', '\x4f', '\xc2', '\x30', '\x10', '\x7e', '\xf7', '\x57',
+ '\x34', '\x7b', '\x47', '\xb6', '\x81', '\x80', '\xc9', '\x18', '\x21', '\x20', '\x6f', '\x28', '\x3a', '\x90', '\x47', '\x53',
+ '\xd7', '\xcb', '\x6c', '\xdc', '\xda', '\xa5', '\xed', '\x50', '\x8c', '\x3f', '\xde', '\xdb', '\x20', '\x4b', '\x20', '\x63',
+ '\x0c', '\x7c', '\x6a', '\x7b', '\xf7', '\x7d', '\x77', '\xdf', '\xb5', '\x5f', '\xea', '\x8d', '\xbe', '\x93', '\x98', '\x6c',
+ '\x40', '\x69', '\x2e', '\xc5', '\xd0', '\x72', '\x6e', '\x6d', '\x8b', '\x80', '\x08', '\x25', '\xe3', '\x22', '\x1a', '\x5a',
+ '\xab', '\xe5', '\xac', '\x35', '\xb0', '\x46', '\xbe', '\xf7', '\x6c', '\xc6', '\x6c', '\x43', '\x45', '\x08', '\x6c', '\x2a',
+ '\xc3', '\x4f', '\xcc', '\x05', '\x5b', '\x6d', '\x20', '\x21', '\xaf', '\x25', '\xd1', '\x22', '\x2b', '\x0d', '\xaa', '\x3c',
+ '\x77', '\x2d', '\x32', '\x91', '\xc2', '\x50', '\x2e', '\x30', '\x52', '\xa4', '\x27', '\x20', '\x8c', '\xa2', '\xf1', '\x9a',
+ '\xb3', '\x08', '\xcc', '\xd0', '\x62', '\x58', '\x67', '\x0d', '\x71', '\x28', '\x13', '\x08', '\x42', '\x05', '\x20', '\x2c',
+ '\xdf', '\x2b', '\x19', '\x64', '\x16', '\x4b', '\x6a', '\x0a', '\x09', '\x36', '\xc6', '\x83', '\x34', '\xe6', '\xc6', '\x60',
+ '\xf8', '\x49', '\x71', '\xac', '\x82', '\x99', '\xbc', '\xc5', '\x6f', '\xde', '\x22', '\x13', '\x58', '\xab', '\x73', '\x12',
+ '\xd3', '\x2a', '\x31', '\x2e', '\x62', '\xc6', '\x0a', '\x28', '\x59', '\xd2', '\x77', '\x9d', '\x53', '\xc8', '\x24', '\x53',
+ '\x0a', '\xc4', '\x5e', '\xca', '\x22', '\x96', '\x46', '\x2f', '\x51', '\xc7', '\x5b', '\x8a', '\xbb', '\x39', '\xaa', '\x58',
+ '\x73', '\xc1', '\xe4', '\x17', '\xb2', '\x76', '\x8a', '\xc9', '\x23', '\x4d', '\xe0', '\x0c', '\x96', '\x4c', '\x62', '\xa9',
+ '\x81', '\xe5', '\xa2', '\xdb', '\x15', '\xbc', '\x25', '\x24', '\x69', '\x4c', '\x0d', '\x5c', '\xc3', '\xc5', '\x3b', '\xe2',
+ '\x69', '\x93', '\xae', '\xed', '\x7c', '\xc8', '\x83', '\x51', '\x9d', '\xe3', '\x51', '\x95', '\x4c', '\x41', '\x99', '\xed',
+ '\x03', '\xe3', '\x46', '\xaa', '\x26', '\xf3', '\xd6', '\x12', '\x2a', '\xdb', '\x07', '\xfc', '\x07', '\xb4', '\xdf', '\xbb',
+ '\xef', '\x93', '\x8e', '\x63', '\x13', '\xaf', '\xbd', '\x3b', '\xe3', '\xba', '\x7f', '\xa5', '\x5a', '\x81', '\x87', '\xb6',
+ '\x40', '\x2f', '\xd0', '\xa8', '\x40', '\x55', '\x48', '\x3b', '\x82', '\x56', '\x4a', '\x39', '\x63', '\x8c', '\x4e', '\xbd',
+ '\x31', '\xa6', '\xd4', '\xd0', '\x40', '\x66', '\x2a', '\x84', '\x86', '\xee', '\xa8', '\x27', '\x9c', '\x79', '\x66', '\xcc',
+ '\x66', '\xec', '\x1a', '\x7b', '\x64', '\x49', '\x42', '\xd5', '\x76', '\x51', '\x90', '\x04', '\x8d', '\x40', '\xfd', '\xd3',
+ '\x16', '\x2f', '\x3c', '\xfa', '\x30', '\x17', '\x7b', '\xa3', '\x92', '\x75', '\xa9', '\x90', '\x39', '\x68', '\x8d', '\x13',
+ '\xe8', '\x06', '\xdd', '\x4f', '\x41', '\xeb', '\x3c', '\xe9', '\xf4', '\x88', '\x33', '\xb8', '\x23', '\xae', '\xed', '\x54',
+ '\xfa', '\x72', '\x17', '\xe9', '\xf4', '\x6d', '\xe2', '\xb8', '\xae', '\x43', '\xba', '\xdd', '\x7e', '\x25', '\xac', '\x5d',
+ '\xfe', '\x55', '\xb8', '\x3f', '\xf1', '\x3b', '\xfa', '\x37', '\x7f', '\xf8', '\x8b', '\xda', '\x8b' };
// end paste
@@ -635,33 +716,36 @@ QByteArray RiuDockWidgetTools::hideAllDocking3DState()
// start paste
static const char stateData[] =
- { '\x00', '\x00', '\x06', '\x51', '\x78', '\xda', '\x95', '\x95', '\x4d', '\x53', '\xc2', '\x30', '\x10', '\x86', '\xef', '\xfe',
- '\x8a', '\x4c', '\xef', '\x48', '\x01', '\x65', '\x3c', '\xf0', '\x31', '\x4c', '\x91', '\x19', '\x0f', '\x28', '\x5a', '\x90',
- '\xa3', '\x13', '\xdb', '\x15', '\xa2', '\x69', '\xc2', '\x24', '\x0b', '\x8a', '\xe3', '\x8f', '\x37', '\x6d', '\xb1', '\x23',
- '\x25', '\x6d', '\xe9', '\xa9', '\x69', '\xf2', '\xbe', '\xd9', '\x67', '\xb3', '\x9b', '\xb6', '\x37', '\xfc', '\x8a', '\x38',
- '\xd9', '\x81', '\xd2', '\x4c', '\x8a', '\xbe', '\xd3', '\xba', '\x74', '\x1d', '\x02', '\x22', '\x90', '\x21', '\x13', '\xab',
- '\xbe', '\xb3', '\x98', '\x4f', '\x1a', '\x37', '\xce', '\x70', '\xd0', '\x7b', '\xc4', '\x51', '\xb8', '\xa3', '\x22', '\x80',
- '\x70', '\x2c', '\x83', '\x0f', '\xb3', '\xe6', '\xef', '\x35', '\x42', '\x44', '\x9e', '\x33', '\xa3', '\x43', '\x16', '\x1a',
- '\x54', '\xf6', '\xde', '\x71', '\x88', '\x27', '\x05', '\x52', '\x26', '\xcc', '\x4c', '\xb2', '\xec', '\x81', '\x40', '\x45',
- '\xf9', '\x92', '\x85', '\x2b', '\xc0', '\xbe', '\x13', '\x9a', '\x7d', '\x3a', '\xe3', '\x25', '\x13', '\xa1', '\xfc', '\x7c',
- '\x89', '\x8c', '\x2e', '\x1d', '\x3a', '\x83', '\x5e', '\xe6', '\x23', '\x13', '\x2e', '\x29', '\x26', '\x20', '\xae', '\x99',
- '\xf7', '\x37', '\x9c', '\x21', '\x9a', '\xe9', '\x07', '\xc5', '\xcc', '\x5e', '\x66', '\x25', '\x0e', '\xf4', '\x13', '\x07',
- '\xda', '\x0a', '\x8c', '\x43', '\x16', '\x69', '\x1a', '\x99', '\xa6', '\x6d', '\x34', '\x23', '\x05', '\x94', '\xcc', '\xe9',
- '\xab', '\x4e', '\x29', '\xb7', '\x4a', '\x81', '\x38', '\x00', '\xf9', '\x81', '\x62', '\x1b', '\xd4', '\x73', '\x05', '\x70',
- '\xcc', '\x94', '\x52', '\x93', '\x7b', '\x1a', '\x41', '\xaa', '\x9c', '\x29', '\xf9', '\x0e', '\x01', '\xe6', '\x95', '\xc4',
- '\xe3', '\x52', '\x43', '\x18', '\x27', '\xdc', '\xb4', '\xb8', '\xc6', '\x14', '\xa9', '\x2f', '\xb7', '\x2a', '\x80', '\x9a',
- '\xc6', '\x02', '\xb0', '\x63', '\x57', '\x33', '\xce', '\xec', '\x28', '\xbf', '\x56', '\x2e', '\x3f', '\x43', '\xbd', '\x01',
- '\x85', '\xfb', '\xdb', '\x90', '\xa1', '\x54', '\xd5', '\x29', '\x16', '\x88', '\xad', '\x61', '\x7d', '\xf6', '\x0d', '\x7a',
- '\xe0', '\x92', '\x56', '\xa7', '\xd5', '\x25', '\xbd', '\x66', '\xfa', '\x6a', '\x9e', '\x87', '\x8a', '\xd4', '\xae', '\x4d',
- '\x9e', '\xdd', '\xd6', '\x2c', '\xa6', '\x43', '\xe8', '\x2a', '\xd1', '\x5a', '\xf8', '\xad', '\x86', '\x3f', '\x72', '\xf7',
- '\x3f', '\xf9', '\x19', '\x8d', '\x55', '\x02', '\xf6', '\x04', '\x7a', '\xcb', '\xf1', '\x4e', '\xbc', '\xc9', '\x8a', '\x03',
- '\xb5', '\x0b', '\xab', '\x6a', '\x78', '\x95', '\x0b', '\x37', '\x95', '\x6b', '\xa5', '\x3d', '\xa6', '\x02', '\x0e', '\x33',
- '\x2e', '\xf1', '\xac', '\x98', '\x79', '\x61', '\x45', '\xb7', '\x95', '\x84', '\xa8', '\x70', '\x3e', '\x01', '\x9f', '\x81',
- '\x8a', '\x6a', '\xba', '\x66', '\xbb', '\x0a', '\xc2', '\xd3', '\x53', '\x69', '\x9f', '\x76', '\x76', '\x00', '\x5a', '\x4f',
- '\xa5', '\x38', '\xa3', '\xb3', '\xa7', '\x46', '\x49', '\x57', '\xa0', '\xeb', '\x20', '\x16', '\xee', '\x5f', '\x7a', '\x19',
- '\x5c', '\xd2', '\xbe', '\xee', '\xba', '\xf6', '\xeb', '\x90', '\xcc', '\x24', '\xb7', '\xc5', '\x2e', '\x28', '\x69', '\xb9',
- '\x31', '\x6c', '\x70', '\x7d', '\x46', '\xf5', '\xad', '\xba', '\x52', '\xe0', '\x04', '\xd7', '\xce', '\xd3', '\xcc', '\x3e',
- '\xcc', '\x66', '\x5c', '\xf0', '\x43', '\x18', '\x5c', '\xfc', '\x02', '\x10', '\x78', '\x2c', '\xb5' };
+ { '\x00', '\x00', '\x07', '\x20', '\x78', '\xda', '\x95', '\x55', '\x4d', '\x4f', '\xe3', '\x30', '\x10', '\xbd', '\xef', '\xaf',
+ '\xb0', '\x72', '\x87', '\x86', '\xf2', '\xa1', '\xae', '\xd4', '\x16', '\x55', '\x01', '\x04', '\x87', '\x42', '\x21', '\x65',
+ '\x7b', '\x5c', '\x79', '\x9d', '\xd9', '\x62', '\x70', '\xec', '\xca', '\x9e', '\x94', '\x65', '\xc5', '\x8f', '\x67', '\x92',
+ '\x42', '\x57', '\xc9', '\xe6', '\xcb', '\xa7', '\x24', '\x9e', '\xf7', '\xc6', '\x6f', '\x9e', '\x67', '\x9c', '\xf1', '\xf9',
+ '\x9f', '\x54', '\xb1', '\x2d', '\x58', '\x27', '\x8d', '\x9e', '\x04', '\x47', '\x87', '\x61', '\xc0', '\x40', '\x0b', '\x93',
+ '\x48', '\xbd', '\x9e', '\x04', '\x8f', '\xcb', '\xab', '\x83', '\x51', '\x70', '\x3e', '\x1d', '\xdf', '\xe3', '\x2c', '\xd9',
+ '\x72', '\x2d', '\x20', '\xb9', '\x30', '\xe2', '\x85', '\x62', '\xf1', '\x9b', '\x43', '\x48', '\xd9', '\x8f', '\x3d', '\x31',
+ '\x60', '\x8f', '\x0e', '\xec', '\xfe', '\xfb', '\x24', '\x60', '\x91', '\xd1', '\xc8', '\xa5', '\xa6', '\x95', '\x22', '\x1c',
+ '\x81', '\x46', '\xcb', '\xd5', '\x4a', '\x26', '\x6b', '\xc0', '\x49', '\x90', '\x50', '\x9e', '\x15', '\x28', '\x61', '\x52',
+ '\x88', '\x85', '\x05', '\xd0', '\xc1', '\x74', '\xbc', '\x67', '\xb0', '\x2b', '\x65', '\x38', '\x16', '\x12', '\x42', '\x5a',
+ '\x8f', '\x37', '\x4a', '\x22', '\xd2', '\xf2', '\x9d', '\x95', '\x94', '\x85', '\x22', '\xf9', '\x16', '\xef', '\xf9', '\x16',
+ '\x99', '\xa6', '\x5c', '\xc3', '\x46', '\xcc', '\x41', '\x09', '\x33', '\xb3', '\xc0', '\xd9', '\x92', '\xff', '\x22', '\x41',
+ '\xc7', '\x14', '\xc8', '\xac', '\x05', '\xfd', '\x29', '\x85', '\x34', '\xc8', '\x0d', '\xba', '\x25', '\x29', '\xf9', '\x99',
+ '\x92', '\x86', '\x95', '\xd4', '\x89', '\x79', '\x25', '\xce', '\x4e', '\x2f', '\xbb', '\xe5', '\x29', '\xec', '\x90', '\x0b',
+ '\x6b', '\x9e', '\x41', '\x60', '\x15', '\xc9', '\x22', '\x65', '\x1c', '\x24', '\x79', '\xa9', '\x83', '\x1a', '\xd6', '\x05',
+ '\x47', '\x1e', '\x9b', '\xcc', '\x0a', '\xf0', '\x24', '\x36', '\x08', '\x2b', '\xb3', '\x06', '\x79', '\x65', '\xa5', '\xfa',
+ '\x8e', '\x2a', '\xf5', '\x91', '\xea', '\x0d', '\x58', '\x7c', '\xbb', '\x4c', '\x24', '\x1a', '\xdb', '\x5d', '\x62', '\x03',
+ '\xb8', '\x76', '\xdb', '\x58', '\xfe', '\x05', '\x37', '\x0d', '\xd9', '\xf7', '\xd1', '\x29', '\x1b', '\x0f', '\x76', '\x5f',
+ '\xf4', '\xfc', '\x3c', '\x90', '\x7e', '\x47', '\xd3', '\xe7', '\x88', '\x5b', '\xca', '\x2b', '\x77', '\x12', '\xb5', '\x0f',
+ '\x5f', '\x17', '\xa8', '\x9a', '\xe2', '\x2a', '\xd0', '\xaf', '\x82', '\xc2', '\x7e', '\x3e', '\xde', '\x67', '\x52', '\xbc',
+ '\xcc', '\x84', '\x00', '\xe7', '\x3a', '\x4c', '\x6c', '\x40', '\xb6', '\x38', '\x38', '\x0c', '\x4f', '\x46', '\x2c', '\xf4',
+ '\xb0', '\xf0', '\x9f', '\x3d', '\xc7', '\x65', '\x7b', '\x86', '\x15', '\xd5', '\x0f', '\xe0', '\x32', '\x85', '\x37', '\xfa',
+ '\xb7', '\xe9', '\x10', '\x5d', '\x0f', '\xec', '\x68', '\xd1', '\x08', '\x94', '\x8a', '\x41', '\xd1', '\x50', '\x90', '\xaa',
+ '\xa5', '\x31', '\xca', '\xa7', '\x51', '\xcf', '\xaa', '\x83', '\x08', '\xd2', '\x5d', '\x4b', '\x87', '\xbd', '\x84', '\x2e',
+ '\x94', '\x41', '\x9f', '\x21', '\x84', '\x0d', '\x3e', '\x79', '\x72', '\x1e', '\x40', '\x2d', '\xc0', '\xa6', '\x9e', '\xac',
+ '\xc5', '\xd6', '\x57', '\xdb', '\xdc', '\x3c', '\x59', '\x17', '\x49', '\x2b', '\x14', '\x78', '\x32', '\xeb', '\x1c', '\xeb',
+ '\x72', '\x7d', '\xf8', '\xff', '\xf5', '\x90', '\x37', '\xea', '\xdc', '\xe8', '\x1e', '\xd7', '\xc3', '\x9c', '\x90', '\x7c',
+ '\x0d', '\xce', '\xc7', '\x8f', '\xc6', '\xfc', '\xad', '\x37', '\x4a', '\xc8', '\x8a', '\x99', '\xa8', '\x9d', '\x88', '\x62',
+ '\x25', '\xbf', '\x72', '\xc2', '\x96', '\x78', '\x4b', '\x82', '\xc1', '\xfe', '\x6f', '\x43', '\xef', '\x0d', '\xff', '\xb7',
+ '\xe9', '\xb7', '\x0f', '\x67', '\x50', '\x73', '\xca' };
// end paste
@@ -678,29 +762,31 @@ QByteArray RiuDockWidgetTools::hideAllDockingPlotState()
// start paste
static const char stateData[] =
- { '\x00', '\x00', '\x04', '\xae', '\x78', '\xda', '\x9d', '\x54', '\xc1', '\x6e', '\x82', '\x40', '\x10', '\xbd', '\xf7', '\x2b',
- '\x36', '\x7b', '\xb7', '\x20', '\xa6', '\x8d', '\x07', '\xc4', '\x18', '\xad', '\x37', '\x5b', '\x1b', '\xb0', '\x1e', '\xcd',
- '\x96', '\x9d', '\x90', '\x4d', '\x61', '\x97', '\xec', '\x2e', '\xb6', '\x36', '\xfd', '\xf8', '\x0e', '\xa8', '\x58', '\x2d',
- '\x18', '\xf5', '\x04', '\x33', '\xf3', '\xde', '\xce', '\x1b', '\xde', '\xb0', '\xfe', '\xf0', '\x2b', '\x4b', '\xc9', '\x1a',
- '\xb4', '\x11', '\x4a', '\x0e', '\x68', '\xf7', '\xde', '\xa5', '\x04', '\x64', '\xac', '\xb8', '\x90', '\xc9', '\x80', '\x2e',
- '\xa2', '\x69', '\xa7', '\x4f', '\x87', '\x81', '\xff', '\x6a', '\x47', '\x7c', '\xcd', '\x64', '\x0c', '\x7c', '\xa2', '\xe2',
- '\x0f', '\xac', '\x85', '\x1b', '\x63', '\x21', '\x23', '\x6f', '\x35', '\x91', '\x92', '\x85', '\x01', '\x5d', '\xc7', '\x3d',
- '\x4a', '\xc6', '\x4a', '\x5a', '\x26', '\x24', '\x66', '\xaa', '\xf2', '\x18', '\xa4', '\xd5', '\x2c', '\x5d', '\x0a', '\x9e',
- '\x80', '\x1d', '\x50', '\x8e', '\xe7', '\xcc', '\x53', '\x65', '\x97', '\x42', '\x72', '\xf5', '\xb9', '\xca', '\x10', '\x79',
- '\x08', '\x69', '\xe0', '\xd7', '\x6c', '\x32', '\x4d', '\x15', '\xb3', '\x95', '\x1c', '\x17', '\xf3', '\x61', '\x9e', '\x0a',
- '\x6b', '\x31', '\xfd', '\xa2', '\x05', '\x9e', '\x88', '\x95', '\xb2', '\xdd', '\x4f', '\xd9', '\xae', '\x90', '\xb6', '\x6c',
- '\xdc', '\x86', '\xe9', '\xd4', '\x18', '\x0f', '\x31', '\x23', '\x0d', '\x8c', '\x44', '\xec', '\xdd', '\x6c', '\xb5', '\x16',
- '\x5a', '\x83', '\xdc', '\xc9', '\x0a', '\x63', '\x2d', '\x72', '\x6b', '\x22', '\x0d', '\xb0', '\xca', '\x51', '\xd3', '\x0c',
- '\x75', '\xd4', '\xba', '\xb6', '\xfa', '\xc9', '\x33', '\xcb', '\xe0', '\x30', '\x44', '\x23', '\x96', '\x8c', '\x53', '\x65',
- '\x80', '\x97', '\xc3', '\x3b', '\x0d', '\xbc', '\x08', '\xb2', '\x3c', '\x65', '\x16', '\x6e', '\xe1', '\x9e', '\x51', '\x78',
- '\xcc', '\x74', '\xca', '\x31', '\x8f', '\x86', '\xed', '\x9e', '\x0c', '\x3b', '\xd7', '\x2a', '\x07', '\x6d', '\x37', '\x4f',
- '\x5c', '\x58', '\xa5', '\x2f', '\x99', '\xf7', '\x2c', '\xa1', '\xb1', '\x7d', '\x28', '\xbe', '\xc1', '\x04', '\x2e', '\xe9',
- '\x7a', '\xfd', '\x1e', '\xf1', '\x9d', '\x6d', '\x88', '\xcf', '\x9d', '\x4d', '\xe7', '\xf5', '\xb5', '\xee', '\x08', '\x2e',
- '\x06', '\x4b', '\x2a', '\x46', '\x8b', '\x2b', '\x2d', '\xb4', '\xbd', '\x42', '\xf7', '\xaf', '\xc2', '\xeb', '\x36', '\xc6',
- '\x3b', '\xdd', '\x98', '\x22', '\xcb', '\x98', '\xde', '\xcc', '\xab', '\x6f', '\x21', '\x59', '\x02', '\xba', '\x49', '\xd3',
- '\x84', '\x59', '\x16', '\xaa', '\x42', '\xc7', '\x70', '\x8b', '\xe5', '\xff', '\x5b', '\x5c', '\x6b', '\xf5', '\x0c', '\x8c',
- '\x41', '\xa2', '\xb9', '\xc0', '\xe4', '\x36', '\xe8', '\x6d', '\xf6', '\xee', '\x01', '\xde', '\xc3', '\xa3', '\x4b', '\xdc',
- '\x46', '\x88', '\x53', '\xff', '\xef', '\xf8', '\xde', '\x72', '\xdb', '\x04', '\x77', '\xbf', '\xe8', '\x23', '\x9f', '\x33' };
+ { '\x00', '\x00', '\x05', '\x4d', '\x78', '\xda', '\xa5', '\x94', '\x4f', '\x73', '\x82', '\x30', '\x10', '\xc5', '\xef', '\xfd',
+ '\x14', '\x19', '\xee', '\x16', '\x50', '\x0f', '\x1e', '\x10', '\xc7', '\xc1', '\x7a', '\xb3', '\xb5', '\x05', '\xeb', '\xb1',
+ '\x93', '\x92', '\x1d', '\x9a', '\x29', '\x24', '\x4c', '\x12', '\x6c', '\xed', '\xf4', '\xc3', '\x77', '\x41', '\x65', '\xaa',
+ '\x45', '\xfc', '\xd3', '\x13', '\x24', '\xfb', '\x5e', '\xf6', '\xb7', '\x93', '\x37', '\xf1', '\x46', '\x9f', '\x59', '\x4a',
+ '\x56', '\xa0', '\x34', '\x97', '\x62', '\x68', '\xb9', '\xb7', '\x8e', '\x45', '\x40', '\xc4', '\x92', '\x71', '\x91', '\x0c',
+ '\xad', '\x45', '\x34', '\xed', '\x0c', '\xac', '\x91', '\xef', '\x3d', '\x9a', '\x31', '\x5b', '\x51', '\x11', '\x03', '\x9b',
+ '\xc8', '\xf8', '\x1d', '\x6b', '\xe1', '\x5a', '\x1b', '\xc8', '\xc8', '\x73', '\x6d', '\xb4', '\xc8', '\x42', '\x83', '\xaa',
+ '\xd7', '\x7d', '\x8b', '\x04', '\x52', '\x18', '\xca', '\x05', '\xee', '\x54', '\xe5', '\x00', '\x84', '\x51', '\x34', '\x5d',
+ '\x72', '\x96', '\x80', '\x19', '\x5a', '\x0c', '\xcf', '\x59', '\x42', '\x1a', '\xcb', '\x0c', '\xc2', '\x58', '\x01', '\x08',
+ '\xcb', '\xf7', '\x6a', '\x07', '\x99', '\xa6', '\x92', '\x9a', '\x0a', '\xc1', '\xc1', '\xfd', '\x30', '\x4f', '\xb9', '\x31',
+ '\xb8', '\xfd', '\xa0', '\x38', '\x9e', '\x82', '\x95', '\xb2', '\xc5', '\x77', '\xd9', '\xa2', '\x10', '\x78', '\x56', '\xef',
+ '\xa8', '\xa6', '\x53', '\x6b', '\xba', '\xa8', '\x19', '\x2b', '\xa0', '\x24', '\xa2', '\xaf', '\xba', '\xb4', '\x90', '\xa0',
+ '\x50', '\x0a', '\xc4', '\x16', '\x05', '\x19', '\x78', '\x6e', '\x74', '\x84', '\x24', '\x2f', '\x79', '\x2a', '\xcd', '\x0c',
+ '\x39', '\x96', '\x5c', '\x30', '\xf9', '\x81', '\xbe', '\x0d', '\x33', '\xb9', '\xa7', '\x19', '\x6c', '\xd4', '\x73', '\x54',
+ '\x34', '\x6a', '\x49', '\x90', '\x4a', '\x0d', '\xac', '\x1c', '\xd8', '\x6e', '\xf0', '\x45', '\x90', '\xe5', '\x29', '\x35',
+ '\x70', '\x8d', '\xb7', '\x85', '\x70', '\xdf', '\x69', '\x97', '\x63', '\xee', '\x0d', '\xeb', '\x1e', '\x0c', '\x3b', '\x57',
+ '\x32', '\x07', '\x65', '\xd6', '\x77', '\x8c', '\x1b', '\xa9', '\xce', '\x99', '\xb7', '\xd5', '\xd0', '\xd8', '\x3e', '\xe4',
+ '\x5f', '\xa0', '\x7d', '\x87', '\xb8', '\x8e', '\xdb', '\x25', '\x9e', '\xbd', '\x59', '\xe2', '\x77', '\x7b', '\x4d', '\xad',
+ '\x7c', '\xfb', '\xb9', '\xc0', '\x30', '\xd0', '\xa4', '\x52', '\x35', '\x90', '\x1d', '\x48', '\x77', '\x24', '\xce', '\x6f',
+ '\x92', '\x13', '\xc9', '\xe8', '\x9d', '\x48', '\x46', '\x91', '\x65', '\x54', '\xad', '\xe7', '\xd5', '\xcc', '\x82', '\x26',
+ '\xa0', '\x9a', '\x38', '\x26', '\xd4', '\xd0', '\x50', '\x16', '\x2a', '\x86', '\x2b', '\xae', '\x16', '\xab', '\x05', '\xbb',
+ '\x26', '\x12', '\x7f', '\xd1', '\xfe', '\x17', '\x85', '\x27', '\x9e', '\xbc', '\x99', '\x8b', '\xf3', '\xd0', '\xe8', '\xba',
+ '\x14', '\x64', '\x06', '\x5a', '\xe3', '\x04', '\xfa', '\x8c', '\xee', '\xc7', '\xa4', '\xad', '\x39', '\x6c', '\x49', '\xe2',
+ '\x4e', '\xd2', '\x75', '\xfa', '\x03', '\xd4', '\x35', '\x49', '\xec', '\xfa', '\x69', '\xc2', '\xff', '\x23', '\x8f', '\xa1',
+ '\x7f', '\xf3', '\x03', '\xbc', '\x34', '\xd5', '\x5b' };
// end paste
diff --git a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h
index a76be46ecc4..59b47268cae 100644
--- a/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h
+++ b/ApplicationLibCode/UserInterface/RiuDockWidgetTools.h
@@ -26,7 +26,7 @@
class QObject;
class QAction;
-class Rim3dView;
+class RiuMainWindowBase;
namespace ads
{
@@ -52,6 +52,8 @@ class RiuDockWidgetTools
static QString mainPlotWindowName();
static QString main3DWindowName();
+ static QString centralScreenName();
+
static QString mainWindowPropertyEditorName();
static QString mainWindowResultInfoName();
static QString mainWindowProcessMonitorName();
@@ -89,6 +91,8 @@ class RiuDockWidgetTools
static QString dockStateHideAllPlotWindowName();
static QString dockStateHideAll3DWindowName();
+ static void setDockLayout( RiuMainWindowBase* mainWindow, const QString& layoutName );
+
static QAction* toggleActionForWidget( const ads::CDockManager* dockManager, const QString& dockWidgetName );
static ads::CDockWidget* findDockWidget( const ads::CDockManager* dockManager, const QString& dockWidgetName );
@@ -104,6 +108,8 @@ class RiuDockWidgetTools
static std::vector selectedItemsInTreeView( const QString& dockWidgetName );
static void selectItemsInTreeView( const QString& dockWidgetName, const std::vector& items );
+ static QString uniqueIdForDockWidget();
+
private:
static QByteArray defaultEclipseDockState();
static QByteArray defaultGeoMechDockState();
diff --git a/ApplicationLibCode/UserInterface/RiuMainWindow.cpp b/ApplicationLibCode/UserInterface/RiuMainWindow.cpp
index e17e949922d..c792ce8effd 100644
--- a/ApplicationLibCode/UserInterface/RiuMainWindow.cpp
+++ b/ApplicationLibCode/UserInterface/RiuMainWindow.cpp
@@ -54,8 +54,6 @@
#include "RiuCellSelectionTool.h"
#include "RiuDepthQwtPlot.h"
#include "RiuDockWidgetTools.h"
-#include "RiuMdiArea.h"
-#include "RiuMdiSubWindow.h"
#include "RiuMenuBarBuildTools.h"
#include "RiuMessagePanel.h"
#include "RiuMohrsCirclePlot.h"
@@ -102,11 +100,11 @@
#include
#include
#include
-#include
#include
#include
#include
#include
+#include
#include
#include
#include
@@ -141,13 +139,7 @@ RiuMainWindow::RiuMainWindow()
{
setAttribute( Qt::WA_DeleteOnClose );
- m_mdiArea = new RiuMdiArea( this );
- connect( m_mdiArea, SIGNAL( subWindowActivated( QMdiSubWindow* ) ), SLOT( slotSubWindowActivated( QMdiSubWindow* ) ) );
-
- ads::CDockWidget* cWidget = RiuDockWidgetTools::createDockWidget( "3D Views", RiuDockWidgetTools::main3DWindowName(), this );
- cWidget->setWidget( m_mdiArea );
- dockManager()->setCentralWidget( cWidget );
-
+ setUpCentralDockWidget();
createActions();
createMenus();
createToolBars();
@@ -241,8 +233,6 @@ void RiuMainWindow::initializeGuiNewProjectLoaded()
setPdmRoot( RimProject::current() );
restoreTreeViewState();
- m_mdiArea->applyTiling();
-
slotRefreshFileActions();
slotRefreshUndoRedoActions();
slotRefreshViewActions();
@@ -261,16 +251,6 @@ void RiuMainWindow::initializeGuiNewProjectLoaded()
statusBar()->showMessage( "Ready ...", 5000 );
}
- QMdiSubWindow* activeSubWindow = m_mdiArea->activeSubWindow();
- if ( activeSubWindow )
- {
- auto w = findViewWindowFromSubWindow( activeSubWindow );
- if ( w && w->mdiWindowGeometry().isMaximized )
- {
- activeSubWindow->showMaximized();
- }
- }
-
// Sync selections with property editor.
// Go backwards as the most "important" tree view is first in the list
// and we want that to use the property editor in case multiple tree views are visible
@@ -343,7 +323,10 @@ void RiuMainWindow::cleanupGuiCaseClose()
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::cleanupGuiBeforeProjectClose()
{
- m_mdiArea->closeAllSubWindows();
+ for ( auto v : viewWindows() )
+ {
+ v->removeWindowFromDock();
+ }
setPdmRoot( nullptr );
@@ -639,7 +622,6 @@ void RiuMainWindow::createToolBars()
toolbar->setObjectName( toolbar->windowTitle() );
toolbar->addAction( cmdFeatureMgr->action( "RicShowPlotWindowFeature" ) );
toolbar->addAction( cmdFeatureMgr->action( "RicLinkVisibleViewsFeature" ) );
- toolbar->addAction( cmdFeatureMgr->action( "RicTileWindowsFeature" ) );
toolbar->addAction( cmdFeatureMgr->action( "RicShowGridCalculatorFeature" ) );
}
@@ -1001,7 +983,7 @@ void RiuMainWindow::slotRefreshViewActions()
{
QStringList commandIds;
- commandIds << "RicLinkVisibleViewsFeature" << "RicTileWindowsFeature" << "RicTogglePerspectiveViewFeature"
+ commandIds << "RicLinkVisibleViewsFeature" << "RicTogglePerspectiveViewFeature"
<< "RicViewZoomAllFeature" << "RicApplyUserDefinedCameraFeature" << "RicStoreUserDefinedCameraFeature";
caf::CmdFeatureManager::instance()->refreshEnabledState( commandIds );
@@ -1009,7 +991,6 @@ void RiuMainWindow::slotRefreshViewActions()
{
QStringList commandIds;
- commandIds << "RicTileWindowsFeature";
commandIds << "RicToggleMeasurementModeFeature";
commandIds << "RicTogglePolyMeasurementModeFeature";
@@ -1139,52 +1120,6 @@ void RiuMainWindow::slotInputMockModel()
app->createInputMockModel();
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-QMdiSubWindow* RiuMainWindow::findMdiSubWindow( QWidget* viewer )
-{
- QList subws = m_mdiArea->subWindowList();
- int i;
- for ( i = 0; i < subws.size(); ++i )
- {
- if ( subws[i]->widget() == viewer )
- {
- return subws[i];
- }
- }
-
- return nullptr;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RimViewWindow* RiuMainWindow::findViewWindowFromSubWindow( QMdiSubWindow* subWindow )
-{
- if ( subWindow )
- {
- std::vector allViewWindows = RimProject::current()->descendantsIncludingThisOfType();
-
- for ( RimViewWindow* viewWindow : allViewWindows )
- {
- if ( viewWindow->viewWidget() == subWindow->widget() )
- {
- return viewWindow;
- }
- }
- }
- return nullptr;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-QList RiuMainWindow::subWindowList( QMdiArea::WindowOrder order )
-{
- return m_mdiArea->subWindowList( order );
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1244,34 +1179,36 @@ RiuMessagePanel* RiuMainWindow::messagePanel()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RiuMainWindow::removeViewer( QWidget* viewer )
+void RiuMainWindow::onViewerRemoved()
{
- removeViewerFromMdiArea( m_mdiArea, viewer );
slotRefreshViewActions();
+ refreshAnimationActions();
+ refreshDrawStyleActions();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RiuMainWindow::initializeViewer( QMdiSubWindow* subWindow, QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry )
+void RiuMainWindow::initializeViewer( ads::CDockWidget* dockWidget, QWidget* viewer )
{
- QSize subWindowSize;
- QPoint subWindowPos( -1, -1 );
+ dockManager()->addDockWidget( ads::DockWidgetArea::CenterDockWidgetArea, dockWidget, dockManager()->centralWidget()->dockAreaWidget() );
- if ( windowsGeometry.isValid() )
- {
- subWindowPos = QPoint( windowsGeometry.x, windowsGeometry.y );
- subWindowSize = QSize( windowsGeometry.width, windowsGeometry.height );
- }
- else
+ slotRefreshViewActions();
+}
+
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+std::vector RiuMainWindow::viewWindows()
+{
+ std::vector views;
+
+ for ( auto v : RimProject::current()->allViews() )
{
- subWindowSize = QSize( 400, 400 );
+ views.push_back( v );
}
- initializeSubWindow( m_mdiArea, subWindow, subWindowPos, subWindowSize );
- subWindow->setWidget( viewer );
-
- slotRefreshViewActions();
+ return views;
}
//--------------------------------------------------------------------------------------------------
@@ -1317,11 +1254,40 @@ void RiuMainWindow::slotViewFullScreen( bool showFullScreen )
if ( showFullScreen )
{
m_lastDockState = dockManager()->saveState( DOCKSTATE_VERSION );
+
+ QString activeViewerName;
+ if ( auto activeViewer = RiaGuiApplication::instance()->activeReservoirView() )
+ {
+ activeViewerName = activeViewer->dockWindowName();
+ }
+
dockManager()->restoreState( RiuDockWidgetTools::hideAllDocking3DState(), DOCKSTATE_VERSION );
+
+ if ( !activeViewerName.isEmpty() )
+ {
+ if ( auto dw = dockManager()->findDockWidget( activeViewerName ) )
+ {
+ dockManager()->addDockWidget( ads::DockWidgetArea::CenterDockWidgetArea, dw, dockManager()->centralWidget()->dockAreaWidget() );
+ }
+ }
}
else
{
+ QString activeViewerName;
+ if ( auto activeViewer = RiaGuiApplication::instance()->activeReservoirView() )
+ {
+ activeViewerName = activeViewer->dockWindowName();
+ }
+
dockManager()->restoreState( m_lastDockState, DOCKSTATE_VERSION );
+
+ if ( !activeViewerName.isEmpty() )
+ {
+ if ( auto dw = dockManager()->findDockWidget( activeViewerName ) )
+ {
+ dw->setAsCurrentTab();
+ }
+ }
}
}
@@ -1380,30 +1346,6 @@ void RiuMainWindow::slotViewFromBelow()
}
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
-{
- if ( isBlockingSubWindowActivatedSignal() ) return;
-
- Rim3dView* previousActiveReservoirView = RiaApplication::instance()->activeReservoirView();
- Rim3dView* activatedView = dynamic_cast( findViewWindowFromSubWindow( subWindow ) );
-
- if ( !activatedView || ( previousActiveReservoirView == activatedView ) ) return;
-
- RiaApplication::instance()->setActiveReservoirView( activatedView );
-
- if ( !isBlockingViewSelectionOnSubWindowActivated() )
- {
- selectViewInProjectTreePreservingSubItemSelection( previousActiveReservoirView, activatedView );
- }
-
- slotRefreshViewActions();
- refreshAnimationActions();
- refreshDrawStyleActions();
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1482,15 +1424,6 @@ void RiuMainWindow::selectViewInProjectTreePreservingSubItemSelection( const Rim
}
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMainWindow::setActiveViewer( QWidget* viewer )
-{
- QMdiSubWindow* swin = findMdiSubWindow( viewer );
- if ( swin ) m_mdiArea->setActiveSubWindow( swin );
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1562,11 +1495,11 @@ void RiuMainWindow::selectedObjectsChanged()
if ( selectedReservoirView )
{
- // Set focus in MDI area to this window if it exists
- if ( selectedReservoirView->viewer() )
+ // Set focus in dock area to this window if it exists
+ if ( selectedReservoirView->viewer() && selectedReservoirView->viewer()->ownerViewWindow() )
{
setBlockViewSelectionOnSubWindowActivated( true );
- setActiveViewer( selectedReservoirView->viewer()->layoutWidget() );
+ setActiveViewer( selectedReservoirView->viewer()->ownerViewWindow()->dockWindowName() );
setBlockViewSelectionOnSubWindowActivated( false );
isActiveViewChanged = true;
@@ -1583,7 +1516,7 @@ void RiuMainWindow::selectedObjectsChanged()
slotRefreshViewActions();
// The only way to get to this code is by selection change initiated from the project tree view
- // As we are activating an MDI-window, the focus is given to this MDI-window
+ // As we are activating an view window, the focus might be given to this window
// Set focus back to the tree view to be able to continue keyboard tree view navigation
projectTree->treeView()->setFocus();
}
@@ -2093,14 +2026,6 @@ void RiuMainWindow::customMenuRequested( const QPoint& pos )
}
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-bool RiuMainWindow::isAnyMdiSubWindowVisible()
-{
- return !m_mdiArea->subWindowList().empty();
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -2125,14 +2050,6 @@ QStringList RiuMainWindow::defaultDockStateNames()
return retList;
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-QStringList RiuMainWindow::windowsMenuFeatureNames()
-{
- return { "RicTileWindowsFeature", "RicTileWindowsVerticallyFeature", "RicTileWindowsHorizontallyFeature" };
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/UserInterface/RiuMainWindow.h b/ApplicationLibCode/UserInterface/RiuMainWindow.h
index 1f7bc10012a..2d0ffd81d61 100644
--- a/ApplicationLibCode/UserInterface/RiuMainWindow.h
+++ b/ApplicationLibCode/UserInterface/RiuMainWindow.h
@@ -26,7 +26,6 @@
#include
#include
-#include
#include
#include
@@ -34,7 +33,6 @@
#include
class QActionGroup;
-class QMdiSubWindow;
class QToolButton;
class QComboBox;
class QTimer;
@@ -53,14 +51,11 @@ class RiuDepthQwtPlot;
class RiuRelativePermeabilityPlotPanel;
class RiuPvtPlotPanel;
class RiuMohrsCirclePlot;
-class RiuMdiArea;
class RiuSeismicHistogramPanel;
class RiuCellSelectionTool;
class RicGridCalculatorDialog;
-struct RimMdiWindowGeometry;
-
namespace caf
{
class PdmUiTreeView;
@@ -97,9 +92,10 @@ class RiuMainWindow : public RiuMainWindowBase
void cleanupGuiCaseClose();
void cleanupGuiBeforeProjectClose();
- void removeViewer( QWidget* viewer ) override;
- void initializeViewer( QMdiSubWindow* subWindow, QWidget* viewer, const RimMdiWindowGeometry& windowsGeometry ) override;
- void setActiveViewer( QWidget* subWindow ) override;
+ void onViewerRemoved() override;
+ void initializeViewer( ads::CDockWidget* dockWidget, QWidget* viewer ) override;
+
+ std::vector viewWindows() override;
void setResultInfo( const QString& info ) const;
@@ -115,11 +111,6 @@ class RiuMainWindow : public RiuMainWindowBase
void refreshDrawStyleActions();
- bool isAnyMdiSubWindowVisible();
- QMdiSubWindow* findMdiSubWindow( QWidget* viewer ) override;
- RimViewWindow* findViewWindowFromSubWindow( QMdiSubWindow* lhs );
- QList subWindowList( QMdiArea::WindowOrder order );
-
RiuResultQwtPlot* resultPlot();
RiuDepthQwtPlot* depthPlot();
RiuRelativePermeabilityPlotPanel* relativePermeabilityPlotPanel();
@@ -137,7 +128,6 @@ class RiuMainWindow : public RiuMainWindowBase
protected:
void closeEvent( QCloseEvent* event ) override;
QStringList defaultDockStateNames() override;
- QStringList windowsMenuFeatureNames() override;
void dragEnterEvent( QDragEnterEvent* event ) override;
void dropEvent( QDropEvent* event ) override;
@@ -204,8 +194,6 @@ class RiuMainWindow : public RiuMainWindowBase
// Menu and action slots
private slots:
- friend class RiuMdiSubWindow;
-
// Memory update slot
void updateMemoryUsage();
@@ -253,7 +241,6 @@ private slots:
// Windows slots
void slotBuildWindowActions();
- void slotSubWindowActivated( QMdiSubWindow* subWindow );
void selectedObjectsChanged();
void customMenuRequested( const QPoint& pos );
diff --git a/ApplicationLibCode/UserInterface/RiuMainWindowBase.cpp b/ApplicationLibCode/UserInterface/RiuMainWindowBase.cpp
index 4d00129ad43..4f027ec29e2 100644
--- a/ApplicationLibCode/UserInterface/RiuMainWindowBase.cpp
+++ b/ApplicationLibCode/UserInterface/RiuMainWindowBase.cpp
@@ -31,9 +31,9 @@
#include "RiuDockWidgetTools.h"
#include "RiuDragDrop.h"
#include "RiuGuiTheme.h"
+#include "RiuInterfaceToViewWindow.h"
#include "RiuMainWindowTools.h"
-#include "RiuMdiArea.h"
-#include "RiuMdiSubWindow.h"
+#include "RiuViewer.h"
#include "cafCmdFeatureManager.h"
#include "cafPdmObject.h"
@@ -47,11 +47,11 @@
#include
#include
#include
-#include
-#include
+#include
#include
#include
#include
+#include
#include
#include
#include
@@ -61,12 +61,10 @@
//--------------------------------------------------------------------------------------------------
RiuMainWindowBase::RiuMainWindowBase()
: m_allowActiveViewChangeFromSelection( true )
- , m_showFirstVisibleWindowMaximized( true )
, m_blockSubWindowActivation( false )
, m_blockSubWindowProjectTreeSelection( false )
, m_hasBeenVisible( false )
, m_windowMenu( nullptr )
- , m_mdiArea( nullptr )
{
ads::CDockManager::setAutoHideConfigFlags( ads::CDockManager::DefaultAutoHideConfig );
m_dockManager = new ads::CDockManager( this );
@@ -104,6 +102,7 @@ RiuMainWindowBase::~RiuMainWindowBase()
{
for ( auto v : m_projectTreeViews )
{
+ v->setPdmItem( nullptr );
delete v;
}
@@ -121,37 +120,35 @@ ads::CDockManager* RiuMainWindowBase::dockManager() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-RiuMdiArea* RiuMainWindowBase::mdiArea()
+QString RiuMainWindowBase::dockWidgetStateString() const
{
- return m_mdiArea;
+ return QString::fromLatin1( m_dockManager->saveState( DOCKSTATE_VERSION ).toBase64() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-QMdiSubWindow* RiuMainWindowBase::createViewWindow()
+bool RiuMainWindowBase::restoreDockWidgetState( QString dockStateString )
{
- RiuMdiSubWindow* subWin =
- new RiuMdiSubWindow( nullptr, Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint | Qt::WindowMaximizeButtonHint );
- subWin->setAttribute( Qt::WA_DeleteOnClose ); // Make sure the contained widget is destroyed when the MDI window
- // is closed
-
- return subWin;
+ QByteArray dockState = QByteArray::fromBase64( dockStateString.toLatin1() );
+ return m_dockManager->restoreState( dockState, DOCKSTATE_VERSION );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-RimMdiWindowGeometry RiuMainWindowBase::windowGeometryForViewer( QWidget* viewer )
+void RiuMainWindowBase::setActiveViewer( QString viewerName )
{
- RiuMdiSubWindow* mdiWindow = dynamic_cast( findMdiSubWindow( viewer ) );
- if ( mdiWindow )
+ for ( auto view : viewWindows() )
{
- return mdiWindow->windowGeometry();
+ auto dockName = view->dockWidget()->objectName();
+ if ( view->dockWidget() && view->dockWidget()->objectName() == viewerName )
+ {
+ view->setAsActiveViewer();
+ view->dockWidget()->setAsCurrentTab();
+ break;
+ }
}
-
- RimMdiWindowGeometry geo;
- return geo;
}
//--------------------------------------------------------------------------------------------------
@@ -314,14 +311,6 @@ void RiuMainWindowBase::toggleItemInSelection( const caf::PdmObject* object, boo
m_allowActiveViewChangeFromSelection = true;
}
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMainWindowBase::enableShowFirstVisibleMdiWindowMaximized( bool enable )
-{
- m_showFirstVisibleWindowMaximized = enable;
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -357,46 +346,11 @@ bool RiuMainWindowBase::isBlockingViewSelectionOnSubWindowActivated() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
-void RiuMainWindowBase::removeViewerFromMdiArea( RiuMdiArea* mdiArea, QWidget* viewer )
+void RiuMainWindowBase::removeViewerFromDockArea( QWidget* viewer )
{
- bool removedSubWindowWasActive = false;
- bool wasMaximized = true;
-
- if ( QMdiSubWindow* subWindowBeingClosed = findMdiSubWindow( viewer ) )
+ if ( auto dw = m_dockManager->findDockWidget( viewer->objectName() ) )
{
- wasMaximized = subWindowBeingClosed->isMaximized();
-
- if ( subWindowBeingClosed->isActiveWindow() )
- {
- // If we are removing the active window, we will need a new active window
- // Start by making the window inactive so Qt doesn't pick the active window itself
- mdiArea->setActiveSubWindow( nullptr );
- removedSubWindowWasActive = true;
- }
- mdiArea->removeSubWindow( subWindowBeingClosed );
-
- // These two lines had to be introduced after themes was used
- // Probably related to polish/unpolish of widgets in an MDI setting
- // https://github.com/OPM/ResInsight/issues/6676
- subWindowBeingClosed->hide();
- subWindowBeingClosed->deleteLater();
- }
-
- QList subWindowList = mdiArea->subWindowList( QMdiArea::ActivationHistoryOrder );
- if ( !subWindowList.empty() )
- {
- if ( removedSubWindowWasActive )
- {
- mdiArea->setActiveSubWindow( nullptr );
- // Make the last activated window the current activated one
- mdiArea->setActiveSubWindow( subWindowList.back() );
- }
- if ( wasMaximized && mdiArea->currentSubWindow() )
- {
- mdiArea->currentSubWindow()->showMaximized();
- }
-
- mdiArea->applyTiling();
+ dw->close();
}
}
@@ -430,47 +384,51 @@ void RiuMainWindowBase::slotDockWidgetToggleViewActionTriggered()
//--------------------------------------------------------------------------------------------------
///
+///
//--------------------------------------------------------------------------------------------------
-void RiuMainWindowBase::initializeSubWindow( RiuMdiArea* mdiArea, QMdiSubWindow* mdiSubWindow, const QPoint& subWindowPos, const QSize& subWindowSize )
+void RiuMainWindowBase::slotDockViewerVisibilityChanged( bool visible )
{
- bool initialStateMaximized = false;
- auto initialState3dWindow = RimProject::current()->subWindowsTileMode3DWindow();
- auto initialStatePlotWindow = RimProject::current()->subWindowsTileModePlotWindow();
-
- if ( m_showFirstVisibleWindowMaximized && mdiArea->subWindowList().empty() )
- {
- // Show first 3D view maximized
- initialStateMaximized = true;
- }
-
- if ( mdiArea->currentSubWindow() && mdiArea->currentSubWindow()->isMaximized() )
- {
- initialStateMaximized = true;
- }
-
- mdiArea->addSubWindow( mdiSubWindow );
+ if ( !visible ) return;
- if ( subWindowPos.x() > -1 )
+ if ( auto dockWidget = dynamic_cast( sender() ) )
{
- mdiSubWindow->move( subWindowPos );
+ for ( auto view : viewWindows() )
+ {
+ if ( view->dockWidget() == dockWidget )
+ {
+ view->setAsActiveViewer();
+ selectAsCurrentItem( view );
+ break;
+ }
+ }
}
- mdiSubWindow->resize( subWindowSize );
+}
- if ( initialStateMaximized )
- {
- mdiSubWindow->showMaximized();
- }
- else
+//--------------------------------------------------------------------------------------------------
+///
+///
+//--------------------------------------------------------------------------------------------------
+void RiuMainWindowBase::slotDockViewerClosed()
+{
+ if ( auto dockWidget = dynamic_cast( sender() ) )
{
- mdiSubWindow->showNormal();
-
- if ( !isBlockingSubWindowActivatedSignal() )
+ auto mainWidget = dockWidget->widget();
+ RimViewWindow* viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( mainWidget );
+ if ( !viewWindow )
{
- RimProject::current()->setSubWindowsTileMode3DWindow( initialState3dWindow );
- RimProject::current()->setSubWindowsTileModePlotWindow( initialStatePlotWindow );
+ RiuViewer* viewer = mainWidget->findChild();
+ if ( viewer )
+ {
+ viewWindow = viewer->ownerViewWindow();
+ }
}
- mdiArea->applyTiling();
+ if ( viewWindow )
+ {
+ viewWindow->setShowWindow( false );
+ viewWindow->removeWindowFromDock();
+ viewWindow->updateConnectedEditors();
+ }
}
}
@@ -531,6 +489,20 @@ void RiuMainWindowBase::createTreeViews( int numberOfTrees )
}
}
+//--------------------------------------------------------------------------------------------------
+///
+//--------------------------------------------------------------------------------------------------
+void RiuMainWindowBase::setUpCentralDockWidget()
+{
+ m_centralDockWidget = RiuDockWidgetTools::createDockWidget( "", RiuDockWidgetTools::centralScreenName(), this );
+ QLabel* label = new QLabel();
+ label->setAutoFillBackground( true );
+ label->setStyleSheet( "QLabel { background-color: darkgrey; }" );
+ m_centralDockWidget->setWidget( label );
+ m_centralDockWidget->setFeature( ads::CDockWidget::NoTab, true );
+ dockManager()->setCentralWidget( m_centralDockWidget );
+}
+
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -631,10 +603,7 @@ void RiuMainWindowBase::setDefaultDockLayout()
if ( action )
{
QString layoutName = action->text();
-
- QByteArray state = RiuDockWidgetTools::defaultDockState( layoutName );
-
- dockManager()->restoreState( state, DOCKSTATE_VERSION );
+ RiuDockWidgetTools::setDockLayout( this, layoutName );
}
}
@@ -647,7 +616,7 @@ void RiuMainWindowBase::setDockLayout()
if ( action )
{
QString layoutName = action->text();
- dockManager()->openPerspective( layoutName );
+ RiuDockWidgetTools::setDockLayout( this, layoutName );
}
}
@@ -734,6 +703,7 @@ void RiuMainWindowBase::addDefaultEntriesToWindowsMenu()
keys.sort();
for ( auto& key : keys )
{
+ if ( key == RiuDockWidgetTools::centralScreenName() ) continue;
auto dock = dockMap[key];
dockWindowsMenu->addAction( dock->toggleViewAction() );
}
@@ -773,24 +743,6 @@ void RiuMainWindowBase::addDefaultEntriesToWindowsMenu()
QAction* exportLayoutAction = m_windowMenu->addAction( "Export Layout to Clipboard" );
connect( exportLayoutAction, SIGNAL( triggered() ), this, SLOT( exportDockLayout() ) );
}
-
- m_windowMenu->addSeparator();
- QAction* cascadeWindowsAction = new QAction( "Cascade Windows", this );
- connect( cascadeWindowsAction, SIGNAL( triggered() ), m_mdiArea, SLOT( cascadeSubWindows() ) );
-
- QAction* closeAllSubWindowsAction = new QAction( "Close All Windows", this );
- connect( closeAllSubWindowsAction, SIGNAL( triggered() ), m_mdiArea, SLOT( closeAllSubWindows() ) );
-
- caf::CmdFeatureManager* cmdFeatureMgr = caf::CmdFeatureManager::instance();
-
- auto featureNames = windowsMenuFeatureNames();
- for ( const auto& name : featureNames )
- {
- m_windowMenu->addAction( cmdFeatureMgr->action( name ) );
- }
-
- m_windowMenu->addAction( cascadeWindowsAction );
- m_windowMenu->addAction( closeAllSubWindowsAction );
}
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/UserInterface/RiuMainWindowBase.h b/ApplicationLibCode/UserInterface/RiuMainWindowBase.h
index 6b94a3bb7ac..7fb34574149 100644
--- a/ApplicationLibCode/UserInterface/RiuMainWindowBase.h
+++ b/ApplicationLibCode/UserInterface/RiuMainWindowBase.h
@@ -20,6 +20,9 @@
#include
#include
+#include
+#include
+#include
#include "cafPdmUiDragDropInterface.h"
@@ -28,11 +31,6 @@
#include
#include
-class RiuMdiArea;
-struct RimMdiWindowGeometry;
-
-class RiuMdiArea;
-
namespace ads
{
class CDockManager;
@@ -49,10 +47,10 @@ class PdmUiPropertyView;
} // namespace caf
class QAction;
-class QMdiArea;
-class QMdiSubWindow;
class QUndoView;
+class RimViewWindow;
+
//==================================================================================================
///
//==================================================================================================
@@ -61,23 +59,22 @@ class RiuMainWindowBase : public QMainWindow
Q_OBJECT
public:
+ static const int DOCKSTATE_VERSION = 4;
+
RiuMainWindowBase();
~RiuMainWindowBase() override;
virtual QString mainWindowName() = 0;
- QMdiSubWindow* createViewWindow();
-
- virtual void removeViewer( QWidget* viewer ) = 0;
- virtual void initializeViewer( QMdiSubWindow* viewWindow, QWidget* viewWidget, const RimMdiWindowGeometry& windowsGeometry ) = 0;
- virtual void setActiveViewer( QWidget* subWindow ) = 0;
+ virtual void initializeViewer( ads::CDockWidget* dockWidget, QWidget* viewer ) {};
+ virtual void setActiveViewer( QString viewerName );
+ virtual void onViewerRemoved() = 0;
- virtual QMdiSubWindow* findMdiSubWindow( QWidget* viewer ) = 0;
+ virtual std::vector viewWindows() = 0;
- RimMdiWindowGeometry windowGeometryForViewer( QWidget* viewer );
- void loadWinGeoAndDockToolBarLayout();
- void saveWinGeoAndDockToolBarLayout();
- void showWindow();
+ void loadWinGeoAndDockToolBarLayout();
+ void saveWinGeoAndDockToolBarLayout();
+ void showWindow();
std::vector projectTreeViews();
caf::PdmUiTreeView* projectTreeView( int treeId );
@@ -88,8 +85,6 @@ class RiuMainWindowBase : public QMainWindow
void selectAsCurrentItem( const caf::PdmObject* object, bool allowActiveViewChange = true );
void toggleItemInSelection( const caf::PdmObject* object, bool allowActiveViewChange = true );
- void enableShowFirstVisibleMdiWindowMaximized( bool enable );
-
void setBlockSubWindowActivatedSignal( bool block );
bool isBlockingSubWindowActivatedSignal() const;
@@ -98,12 +93,14 @@ class RiuMainWindowBase : public QMainWindow
ads::CDockManager* dockManager() const;
- RiuMdiArea* mdiArea();
+ QString dockWidgetStateString() const;
+ bool restoreDockWidgetState( QString dockStateString );
protected:
void createTreeViews( int numberOfTrees );
- void removeViewerFromMdiArea( RiuMdiArea* mdiArea, QWidget* viewer );
- void initializeSubWindow( RiuMdiArea* mdiArea, QMdiSubWindow* mdiSubWindow, const QPoint& subWindowPos, const QSize& subWindowSize );
+ void setUpCentralDockWidget();
+
+ void removeViewerFromDockArea( QWidget* viewer );
void restoreTreeViewStates( QString treeStateString, QString treeIndexString );
@@ -115,12 +112,12 @@ class RiuMainWindowBase : public QMainWindow
virtual QStringList defaultDockStateNames() = 0;
- virtual QStringList windowsMenuFeatureNames() = 0;
-
void showEvent( QShowEvent* event ) override;
protected slots:
void slotDockWidgetToggleViewActionTriggered();
+ void slotDockViewerVisibilityChanged( bool visible );
+ void slotDockViewerClosed();
void slotRefreshHelpActions();
void slotRedo();
@@ -141,24 +138,23 @@ protected slots:
QAction* m_redoAction;
QUndoView* m_undoView;
- RiuMdiArea* m_mdiArea;
- QMenu* m_windowMenu;
-
- const int DOCKSTATE_VERSION = 3;
+ QMenu* m_windowMenu;
QByteArray m_lastDockState;
std::vector m_projectTreeViews;
std::vector> m_propertyViews;
+ QPointer m_centralDockWidget;
+
private:
QString registryFolderName();
std::vector> m_dragDropInterfaces;
- bool m_showFirstVisibleWindowMaximized;
- bool m_blockSubWindowActivation;
- bool m_blockSubWindowProjectTreeSelection;
- bool m_hasBeenVisible;
+
+ bool m_blockSubWindowActivation;
+ bool m_blockSubWindowProjectTreeSelection;
+ bool m_hasBeenVisible;
ads::CDockManager* m_dockManager;
};
diff --git a/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp b/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp
index a2316bc01ce..29128506a53 100644
--- a/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp
+++ b/ApplicationLibCode/UserInterface/RiuMainWindowTools.cpp
@@ -36,7 +36,6 @@
#include "cafPdmUiTreeView.h"
#include
-#include
#include
// 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();
- 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 );
- }
- }
-}
-
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
diff --git a/ApplicationLibCode/UserInterface/RiuMainWindowTools.h b/ApplicationLibCode/UserInterface/RiuMainWindowTools.h
index 6e4dcb5f3c4..36da50936b9 100644
--- a/ApplicationLibCode/UserInterface/RiuMainWindowTools.h
+++ b/ApplicationLibCode/UserInterface/RiuMainWindowTools.h
@@ -23,7 +23,6 @@ namespace caf
class PdmUiItem;
} // namespace caf
-class RiuMainWindowBase;
class QWidget;
//--------------------------------------------------------------------------------------------------
///
@@ -33,7 +32,5 @@ class RiuMainWindowTools
public:
static void collapseSiblings( const caf::PdmUiItem* uiItem );
- static void setWindowSizeOnWidgetsInMdiWindows( RiuMainWindowBase* mainWindow, int width, int height );
- static void setFixedWindowSizeFor3dViews( RiuMainWindowBase* mainWindow, int width, int height );
static void setDarkTitleBarWindows( QWidget* widget );
};
diff --git a/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp b/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp
index e923b826521..04d71e85666 100644
--- a/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp
+++ b/ApplicationLibCode/UserInterface/RiuMatrixPlotWidget.cpp
@@ -210,8 +210,8 @@ RimViewWindow* RiuMatrixPlotWidget::ownerViewWindow() const
//--------------------------------------------------------------------------------------------------
void RiuMatrixPlotWidget::contextMenuEvent( QContextMenuEvent* )
{
- // Added empty override to preventing menu for Mdi Area
- // I.e.: RiuContextMenuLauncher for RiuPlotMainWindow (mdi area)
+ // Added empty override to preventing menu for central area
+ // I.e.: RiuContextMenuLauncher for RiuPlotMainWindow
return;
}
diff --git a/ApplicationLibCode/UserInterface/RiuMdiArea.cpp b/ApplicationLibCode/UserInterface/RiuMdiArea.cpp
deleted file mode 100644
index ade46e5e57f..00000000000
--- a/ApplicationLibCode/UserInterface/RiuMdiArea.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2019- Equinor ASA
-//
-// ResInsight 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.
-//
-// ResInsight 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 at
-// for more details.
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-#include "RiuMdiArea.h"
-
-#include "RimProject.h"
-
-#include "RiuMainWindow.h"
-#include "RiuMdiSubWindow.h"
-#include "RiuPlotMainWindow.h"
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiuMdiArea::RiuMdiArea( QWidget* parent /*= nullptr*/ )
- : QMdiArea( parent )
-{
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiuMdiArea::~RiuMdiArea()
-{
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiaDefines::WindowTileMode RiuMdiArea::tileMode() const
-{
- auto proj = RimProject::current();
- if ( proj )
- {
- auto* mainWindow = dynamic_cast( window() );
- if ( mainWindow ) return proj->subWindowsTileMode3DWindow();
-
- auto* plotMainWindow = dynamic_cast( window() );
- if ( plotMainWindow ) return proj->subWindowsTileModePlotWindow();
- }
-
- return RiaDefines::WindowTileMode::UNDEFINED;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-std::list RiuMdiArea::subWindowListSortedByPosition()
-{
- // Tile Windows so the one with the leftmost left edge gets sorted first.
- std::list windowList;
- for ( QMdiSubWindow* subWindow : subWindowList( QMdiArea::CreationOrder ) )
- {
- windowList.push_back( subWindow );
- }
-
- // Sort of list so we first sort by window position but retain activation order
- // for windows with the same position
- windowList.sort(
- []( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
- {
- if ( lhs->frameGeometry().topLeft().rx() == rhs->frameGeometry().topLeft().rx() )
- {
- return lhs->frameGeometry().topLeft().ry() < rhs->frameGeometry().topLeft().ry();
- }
- return lhs->frameGeometry().topLeft().rx() < rhs->frameGeometry().topLeft().rx();
- } );
- return windowList;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-std::list RiuMdiArea::subWindowListSortedByVerticalPosition()
-{
- std::list windowList;
- for ( QMdiSubWindow* subWindow : subWindowList( QMdiArea::CreationOrder ) )
- {
- windowList.push_back( subWindow );
- }
-
- windowList.sort(
- []( QMdiSubWindow* lhs, QMdiSubWindow* rhs )
- {
- if ( lhs->frameGeometry().topLeft().ry() == rhs->frameGeometry().topLeft().ry() )
- {
- return lhs->frameGeometry().topLeft().rx() < rhs->frameGeometry().topLeft().rx();
- }
- return lhs->frameGeometry().topLeft().ry() < rhs->frameGeometry().topLeft().ry();
- } );
-
- return windowList;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiArea::tileWindowsHorizontally()
-{
- // Make sure that all windows are windowed and not maximized
- tileSubWindows();
-
- QPoint position( 0, 0 );
-
- for ( auto* window : subWindowListSortedByPosition() )
- {
- QRect rect( 0, 0, width() / static_cast( subWindowListSortedByPosition().size() ), height() );
-
- window->setGeometry( rect );
- window->move( position );
- position.setX( position.x() + window->width() );
- }
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiArea::tileWindowsVertically()
-{
- // Make sure that all windows are windowed and not maximized
- tileSubWindows();
-
- auto windowList = subWindowListSortedByVerticalPosition();
-
- QPoint position( 0, 0 );
- for ( auto* window : windowList )
- {
- QRect rect( 0, 0, width(), height() / static_cast( windowList.size() ) );
-
- window->setGeometry( rect );
- window->move( position );
- position.setY( position.y() + window->height() );
- }
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiArea::tileWindowsDefault()
-{
- tileSubWindows();
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiArea::resizeEvent( QResizeEvent* resizeEvent )
-{
- applyTiling();
-
- QMdiArea::resizeEvent( resizeEvent );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiArea::applyTiling()
-{
- for ( auto subWindow : subWindowList() )
- {
- auto riuWindow = dynamic_cast( subWindow );
- riuWindow->blockTilingChanges( true );
- }
-
- switch ( tileMode() )
- {
- case RiaDefines::WindowTileMode::UNDEFINED:
- break;
- case RiaDefines::WindowTileMode::DEFAULT:
- tileWindowsDefault();
- break;
- case RiaDefines::WindowTileMode::VERTICAL:
- tileWindowsVertically();
- break;
- case RiaDefines::WindowTileMode::HORIZONTAL:
- tileWindowsHorizontally();
- break;
- default:
- break;
- }
-
- for ( auto subWindow : subWindowList() )
- {
- auto riuWindow = dynamic_cast( subWindow );
- riuWindow->blockTilingChanges( false );
- }
-}
diff --git a/ApplicationLibCode/UserInterface/RiuMdiArea.h b/ApplicationLibCode/UserInterface/RiuMdiArea.h
deleted file mode 100644
index 45af29deb3e..00000000000
--- a/ApplicationLibCode/UserInterface/RiuMdiArea.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2019- Equinor ASA
-//
-// ResInsight 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.
-//
-// ResInsight 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 at
-// for more details.
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-#pragma once
-
-#include "RiaPlotDefines.h"
-
-#include
-#include
-
-class QMdiSubWindow;
-
-class RiuMdiArea : public QMdiArea
-{
- Q_OBJECT
-
-public:
- RiuMdiArea( QWidget* parent = nullptr );
- ~RiuMdiArea() override;
-
- RiaDefines::WindowTileMode tileMode() const;
- void applyTiling();
-
-private:
- void resizeEvent( QResizeEvent* resizeEvent ) override;
-
- std::list subWindowListSortedByPosition();
- std::list subWindowListSortedByVerticalPosition();
-
- void tileWindowsHorizontally();
- void tileWindowsVertically();
- void tileWindowsDefault();
-};
diff --git a/ApplicationLibCode/UserInterface/RiuMdiMaximizeWindowGuard.cpp b/ApplicationLibCode/UserInterface/RiuMdiMaximizeWindowGuard.cpp
deleted file mode 100644
index 1ccadc4c914..00000000000
--- a/ApplicationLibCode/UserInterface/RiuMdiMaximizeWindowGuard.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#include "RiuMdiMaximizeWindowGuard.h"
-
-#include "RiaGuiApplication.h"
-#include "RiuMainWindow.h"
-#include "RiuPlotMainWindow.h"
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiuMdiMaximizeWindowGuard::RiuMdiMaximizeWindowGuard()
-{
- {
- RiuMainWindow* mainWindow = RiaGuiApplication::instance()->mainWindow();
- if ( mainWindow )
- {
- mainWindow->enableShowFirstVisibleMdiWindowMaximized( false );
- }
- }
-
- {
- RiuPlotMainWindow* plotMainWindow = RiaGuiApplication::instance()->mainPlotWindow();
- if ( plotMainWindow )
- {
- plotMainWindow->enableShowFirstVisibleMdiWindowMaximized( false );
- }
- }
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiuMdiMaximizeWindowGuard::~RiuMdiMaximizeWindowGuard()
-{
- {
- RiuMainWindow* mainWindow = RiaGuiApplication::instance()->mainWindow();
- if ( mainWindow )
- {
- mainWindow->enableShowFirstVisibleMdiWindowMaximized( true );
- }
- }
-
- {
- RiuPlotMainWindow* plotMainWindow = RiaGuiApplication::instance()->mainPlotWindow();
- if ( plotMainWindow )
- {
- plotMainWindow->enableShowFirstVisibleMdiWindowMaximized( true );
- }
- }
-}
diff --git a/ApplicationLibCode/UserInterface/RiuMdiSubWindow.cpp b/ApplicationLibCode/UserInterface/RiuMdiSubWindow.cpp
deleted file mode 100644
index aeb563e00df..00000000000
--- a/ApplicationLibCode/UserInterface/RiuMdiSubWindow.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2016 Statoil ASA
-//
-// ResInsight 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.
-//
-// ResInsight 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 at
-// for more details.
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-#include "RiuMdiSubWindow.h"
-
-#include "RiaGuiApplication.h"
-#include "RiaPlotDefines.h"
-
-#include "Rim3dView.h"
-#include "RimProject.h"
-#include "RimSummaryPlot.h"
-#include "RimWellLogPlot.h"
-
-#include "RiuMainWindow.h"
-#include "RiuPlotMainWindow.h"
-#include "RiuViewer.h"
-
-#include
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiuMdiSubWindow::RiuMdiSubWindow( QWidget* parent /*= 0*/, Qt::WindowFlags flags /*= 0*/ )
- : QMdiSubWindow( parent, flags )
- , m_normalWindowGeometry( QRect() )
- , m_blockTilingChanges( false )
-{
- setWindowIcon( QIcon( ":/Window16x16.png" ) );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RiuMdiSubWindow::~RiuMdiSubWindow()
-{
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-RimMdiWindowGeometry RiuMdiSubWindow::windowGeometry() const
-{
- RimMdiWindowGeometry geo;
-
- int mainWinID = 0;
- if ( window() == RiaGuiApplication::instance()->mainPlotWindow() )
- {
- mainWinID = 1;
- }
-
- geo.mainWindowID = mainWinID;
- geo.isMaximized = isMaximized();
-
- // Save normal/non-maximized size and position so this can be restored
- QRect currentGeometry = frameGeometry();
- if ( isMaximized() && !m_normalWindowGeometry.isNull() )
- {
- currentGeometry = m_normalWindowGeometry;
- }
-
- geo.x = currentGeometry.topLeft().x();
- geo.y = currentGeometry.topLeft().y();
- geo.width = currentGeometry.width();
- geo.height = currentGeometry.height();
-
- return geo;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiSubWindow::blockTilingChanges( bool block )
-{
- m_blockTilingChanges = block;
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiSubWindow::closeEvent( QCloseEvent* event )
-{
- QWidget* mainWidget = widget();
-
- RimViewWindow* viewWindow = RiuInterfaceToViewWindow::viewWindowFromWidget( mainWidget );
- if ( !viewWindow )
- {
- RiuViewer* viewer = mainWidget->findChild();
- if ( viewer )
- {
- viewWindow = viewer->ownerViewWindow();
- }
- }
-
- if ( viewWindow )
- {
- viewWindow->setMdiWindowGeometry( windowGeometry() );
- viewWindow->handleMdiWindowClosed();
- event->accept();
- }
- else
- {
- QMdiSubWindow::closeEvent( event );
- }
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiSubWindow::resizeEvent( QResizeEvent* resizeEvent )
-{
- if ( !isMaximized() )
- {
- m_normalWindowGeometry = frameGeometry();
- }
-
- checkAndResetTilingState();
-
- QMdiSubWindow::resizeEvent( resizeEvent );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiSubWindow::moveEvent( QMoveEvent* moveEvent )
-{
- if ( !isMaximized() )
- {
- m_normalWindowGeometry = frameGeometry();
- }
-
- checkAndResetTilingState();
-
- QMdiSubWindow::moveEvent( moveEvent );
-}
-
-//--------------------------------------------------------------------------------------------------
-///
-//--------------------------------------------------------------------------------------------------
-void RiuMdiSubWindow::checkAndResetTilingState()
-{
- if ( m_blockTilingChanges ) return;
-
- if ( window() == RiaGuiApplication::instance()->mainWindow() &&
- !RiaGuiApplication::instance()->mainWindow()->isBlockingSubWindowActivatedSignal() )
- {
- RimProject::current()->setSubWindowsTileMode3DWindow( RiaDefines::WindowTileMode::UNDEFINED );
- }
- else if ( window() == RiaGuiApplication::instance()->mainPlotWindow() &&
- !RiaGuiApplication::instance()->mainPlotWindow()->isBlockingSubWindowActivatedSignal() )
- {
- RimProject::current()->setSubWindowsTileModePlotWindow( RiaDefines::WindowTileMode::UNDEFINED );
- }
-}
diff --git a/ApplicationLibCode/UserInterface/RiuMdiSubWindow.h b/ApplicationLibCode/UserInterface/RiuMdiSubWindow.h
deleted file mode 100644
index 4e697342696..00000000000
--- a/ApplicationLibCode/UserInterface/RiuMdiSubWindow.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////////
-//
-// Copyright (C) 2016 Statoil ASA
-//
-// ResInsight 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.
-//
-// ResInsight 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 at
-// for more details.
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-#pragma once
-
-#include "RimViewWindow.h"
-#include
-
-class RiuMdiSubWindow : public QMdiSubWindow
-{
- Q_OBJECT
-public:
- RiuMdiSubWindow( QWidget* parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags() );
-
- ~RiuMdiSubWindow() override;
-
- RimMdiWindowGeometry windowGeometry() const;
-
- void blockTilingChanges( bool block );
-
-private:
- void closeEvent( QCloseEvent* event ) override;
- void resizeEvent( QResizeEvent* resizeEvent ) override;
- void moveEvent( QMoveEvent* moveEvent ) override;
-
- void checkAndResetTilingState();
-
-private:
- QRect m_normalWindowGeometry;
- bool m_blockTilingChanges;
-};
diff --git a/ApplicationLibCode/UserInterface/RiuMultiPlotBook.cpp b/ApplicationLibCode/UserInterface/RiuMultiPlotBook.cpp
index ad6e367339c..b4c9bbc7e0b 100644
--- a/ApplicationLibCode/UserInterface/RiuMultiPlotBook.cpp
+++ b/ApplicationLibCode/UserInterface/RiuMultiPlotBook.cpp
@@ -44,7 +44,6 @@
#include
#include
#include
-#include