#4890 Window tiling

This commit is contained in:
Magne Sjaastad
2022-10-31 13:26:26 +01:00
committed by GitHub
parent 9b61ebcac2
commit bbd0c5c67e
18 changed files with 549 additions and 367 deletions

View File

@@ -1209,6 +1209,9 @@ void RiaGuiApplication::onProjectBeingOpened()
{
// When importing a project, do not maximize the first MDI window to be created
m_maximizeWindowGuard = std::make_unique<RiuMdiMaximizeWindowGuard>();
m_mainWindow->setBlockSubWindowActivatedSignal( true );
if ( mainPlotWindow() ) mainPlotWindow()->setBlockSubWindowActivatedSignal( true );
}
//--------------------------------------------------------------------------------------------------
@@ -1269,6 +1272,9 @@ void RiaGuiApplication::onProjectOpened()
processEvents();
m_mainWindow->setBlockSubWindowActivatedSignal( false );
if ( mainPlotWindow() ) mainPlotWindow()->setBlockSubWindowActivatedSignal( false );
// Make sure to process events before this function to avoid strange Qt crash
RiuPlotMainWindowTools::refreshToolbars();
}

View File

@@ -76,6 +76,17 @@ void caf::AppEnum<RiaDefines::Orientation>::setUp()
setDefault( RiaDefines::Orientation::VERTICAL );
}
template <>
void caf::AppEnum<RiaDefines::WindowTileMode>::setUp()
{
addItem( RiaDefines::WindowTileMode::DEFAULT, "DEFAULT", "Default" );
addItem( RiaDefines::WindowTileMode::VERTICAL, "VERTICAL", "Vertical" );
addItem( RiaDefines::WindowTileMode::HORIZONTAL, "HORIZONTAL", "Horizontal" );
addItem( RiaDefines::WindowTileMode::UNDEFINED, "UNDEFINED", "Undefined" );
setDefault( RiaDefines::WindowTileMode::UNDEFINED );
}
}; // namespace caf
//--------------------------------------------------------------------------------------------------

View File

@@ -73,6 +73,14 @@ enum class ObjectNamingMethod
TEMPLATE
};
enum class WindowTileMode
{
DEFAULT,
VERTICAL,
HORIZONTAL,
UNDEFINED,
};
// Defines relate to curve and plot template names
QString namingVariableCase();
QString namingVariableWell();