ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvLayoutManager Class Reference

Layout manager for MainWindow. More...

#include <ecvLayoutManager.h>

Inheritance diagram for ecvLayoutManager:
[legend]
Collaboration diagram for ecvLayoutManager:
[legend]

Public Member Functions

 ecvLayoutManager (QMainWindow *mainWindow, ccPluginUIManager *pluginManager)
 Constructor. More...
 
virtual ~ecvLayoutManager ()
 Destructor. More...
 
void setupDefaultLayout ()
 Setup default layout for the main window. More...
 
void repositionUnifiedPluginToolbar ()
 Reposition the unified plugin toolbar to the end of the first row. More...
 
void hideAdditionalPluginToolbars ()
 
void saveGUILayout ()
 Save current GUI layout to settings. More...
 
void restoreGUILayout (bool forceDefault=false)
 Restore GUI layout from settings. More...
 
void saveCustomLayout ()
 Save current layout as custom layout. More...
 
void restoreDefaultLayout ()
 Restore the default layout. More...
 
bool restoreCustomLayout ()
 Restore previously saved custom layout. More...
 
void setAutoSaveEnabled (bool enabled)
 Set whether to auto-save layout on close. More...
 
bool isAutoSaveEnabled () const
 Get whether auto-save is enabled. More...
 
void registerRightSideToolBar (QToolBar *toolbar)
 Register a toolbar to be placed on the right side. More...
 
void registerLeftSideToolBar (QToolBar *toolbar)
 Register a toolbar to be placed on the left side. More...
 
void registerBottomDockWidget (QDockWidget *dockWidget)
 Register a dock widget to be placed at the bottom. More...
 
void registerRightSideDockWidget (QDockWidget *dockWidget)
 Register a dock widget to be placed on the right side. More...
 
void setToolbarIconSize (QToolBar *toolbar, int screenWidth)
 

Detailed Description

Layout manager for MainWindow.

This class handles all layout-related operations including:

  • Setting up default layout
  • Managing toolbar positions and sizes
  • Handling plugin toolbar unification
  • Saving and restoring layout state

Constructor & Destructor Documentation

◆ ecvLayoutManager()

ecvLayoutManager::ecvLayoutManager ( QMainWindow *  mainWindow,
ccPluginUIManager *  pluginManager 
)
explicit

Constructor.

◆ ~ecvLayoutManager()

ecvLayoutManager::~ecvLayoutManager ( )
virtual

Destructor.

Member Function Documentation

◆ hideAdditionalPluginToolbars()

void ecvLayoutManager::hideAdditionalPluginToolbars ( )

Hide additional plugin toolbars that have been merged into UnifiedPluginToolbar

References ccPluginUIManager::additionalPluginToolbars(), and ccPluginUIManager::isPythonPluginToolbar().

Referenced by restoreGUILayout(), and saveGUILayout().

◆ isAutoSaveEnabled()

bool ecvLayoutManager::isAutoSaveEnabled ( ) const
inline

Get whether auto-save is enabled.

◆ registerBottomDockWidget()

void ecvLayoutManager::registerBottomDockWidget ( QDockWidget *  dockWidget)

Register a dock widget to be placed at the bottom.

Referenced by MainWindow::MainWindow().

◆ registerLeftSideToolBar()

void ecvLayoutManager::registerLeftSideToolBar ( QToolBar *  toolbar)

Register a toolbar to be placed on the left side.

Referenced by MainWindow::MainWindow().

◆ registerRightSideDockWidget()

void ecvLayoutManager::registerRightSideDockWidget ( QDockWidget *  dockWidget)

Register a dock widget to be placed on the right side.

Referenced by MainWindow::MainWindow().

◆ registerRightSideToolBar()

void ecvLayoutManager::registerRightSideToolBar ( QToolBar *  toolbar)

Register a toolbar to be placed on the right side.

Referenced by MainWindow::initPlugins().

◆ repositionUnifiedPluginToolbar()

void ecvLayoutManager::repositionUnifiedPluginToolbar ( )

Reposition the unified plugin toolbar to the end of the first row.

References CVLog::Warning().

Referenced by restoreGUILayout().

◆ restoreCustomLayout()

bool ecvLayoutManager::restoreCustomLayout ( )

Restore previously saved custom layout.

Returns
true if custom layout exists and was restored, false otherwise

References ecvPS::CustomLayoutGeom(), ecvPS::CustomLayoutState(), CVLog::Error(), CVLog::PrintVerbose(), and CVLog::Warning().

◆ restoreDefaultLayout()

void ecvLayoutManager::restoreDefaultLayout ( )

◆ restoreGUILayout()

void ecvLayoutManager::restoreGUILayout ( bool  forceDefault = false)

Restore GUI layout from settings.

Parameters
forceDefaultIf true, ignore saved settings and use default layout

References hideAdditionalPluginToolbars(), ecvPS::MainWinGeom(), ecvPS::MainWinState(), CVLog::PrintVerbose(), repositionUnifiedPluginToolbar(), setToolbarIconSize(), and setupDefaultLayout().

◆ saveCustomLayout()

void ecvLayoutManager::saveCustomLayout ( )

Save current layout as custom layout.

References ecvPS::CustomLayoutGeom(), ecvPS::CustomLayoutState(), CVLog::Error(), and CVLog::PrintVerbose().

◆ saveGUILayout()

void ecvLayoutManager::saveGUILayout ( )

◆ setAutoSaveEnabled()

void ecvLayoutManager::setAutoSaveEnabled ( bool  enabled)
inline

Set whether to auto-save layout on close.

◆ setToolbarIconSize()

void ecvLayoutManager::setToolbarIconSize ( QToolBar *  toolbar,
int  screenWidth 
)

Set icon size and style for a toolbar based on screen resolution This is the unified method for setting toolbar icon size across all toolbars

Referenced by restoreGUILayout().

◆ setupDefaultLayout()

void ecvLayoutManager::setupDefaultLayout ( )

Setup default layout for the main window.

This includes toolbar positioning, dock widget layout, and window sizing based on screen resolution

References CVLog::PrintDebug(), and CVLog::PrintVerbose().

Referenced by restoreDefaultLayout(), and restoreGUILayout().


The documentation for this class was generated from the following files: