![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Layout manager for MainWindow. More...
#include <ecvLayoutManager.h>


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) |
Layout manager for MainWindow.
This class handles all layout-related operations including:
Definition at line 34 of file ecvLayoutManager.h.
|
explicit |
Constructor.
Definition at line 25 of file ecvLayoutManager.cpp.
|
virtual |
Destructor.
Definition at line 35 of file ecvLayoutManager.cpp.
| void ecvLayoutManager::hideAdditionalPluginToolbars | ( | ) |
Hide additional plugin toolbars that have been merged into UnifiedPluginToolbar
Definition at line 176 of file ecvLayoutManager.cpp.
References ccPluginUIManager::additionalPluginToolbars(), and ccPluginUIManager::isPythonPluginToolbar().
Referenced by restoreGUILayout(), and saveGUILayout().
|
inline |
Get whether auto-save is enabled.
Definition at line 82 of file ecvLayoutManager.h.
| void ecvLayoutManager::registerBottomDockWidget | ( | QDockWidget * | dockWidget | ) |
Register a dock widget to be placed at the bottom.
Definition at line 602 of file ecvLayoutManager.cpp.
Referenced by MainWindow::MainWindow().
| void ecvLayoutManager::registerLeftSideToolBar | ( | QToolBar * | toolbar | ) |
Register a toolbar to be placed on the left side.
Definition at line 596 of file ecvLayoutManager.cpp.
Referenced by MainWindow::MainWindow().
| void ecvLayoutManager::registerRightSideDockWidget | ( | QDockWidget * | dockWidget | ) |
Register a dock widget to be placed on the right side.
Definition at line 608 of file ecvLayoutManager.cpp.
Referenced by MainWindow::MainWindow().
| void ecvLayoutManager::registerRightSideToolBar | ( | QToolBar * | toolbar | ) |
Register a toolbar to be placed on the right side.
Definition at line 590 of file ecvLayoutManager.cpp.
Referenced by MainWindow::initPlugins().
| void ecvLayoutManager::repositionUnifiedPluginToolbar | ( | ) |
Reposition the unified plugin toolbar to the end of the first row.
Definition at line 201 of file ecvLayoutManager.cpp.
References CVLog::Warning().
Referenced by restoreGUILayout().
| bool ecvLayoutManager::restoreCustomLayout | ( | ) |
Restore previously saved custom layout.
Definition at line 646 of file ecvLayoutManager.cpp.
References ecvPS::CustomLayoutGeom(), ecvPS::CustomLayoutState(), CVLog::Error(), CVLog::PrintVerbose(), and CVLog::Warning().
| void ecvLayoutManager::restoreDefaultLayout | ( | ) |
Restore the default layout.
Definition at line 627 of file ecvLayoutManager.cpp.
References CVLog::Error(), ecvPS::MainWinGeom(), ecvPS::MainWinState(), CVLog::PrintVerbose(), saveGUILayout(), and setupDefaultLayout().
| void ecvLayoutManager::restoreGUILayout | ( | bool | forceDefault = false | ) |
Restore GUI layout from settings.
| forceDefault | If true, ignore saved settings and use default layout |
Definition at line 540 of file ecvLayoutManager.cpp.
References hideAdditionalPluginToolbars(), ecvPS::MainWinGeom(), ecvPS::MainWinState(), CVLog::PrintVerbose(), repositionUnifiedPluginToolbar(), setToolbarIconSize(), and setupDefaultLayout().
| void ecvLayoutManager::saveCustomLayout | ( | ) |
Save current layout as custom layout.
Definition at line 614 of file ecvLayoutManager.cpp.
References ecvPS::CustomLayoutGeom(), ecvPS::CustomLayoutState(), CVLog::Error(), and CVLog::PrintVerbose().
| void ecvLayoutManager::saveGUILayout | ( | ) |
Save current GUI layout to settings.
Definition at line 514 of file ecvLayoutManager.cpp.
References hideAdditionalPluginToolbars(), ecvPS::MainWinGeom(), ecvPS::MainWinState(), and CVLog::PrintVerbose().
Referenced by restoreDefaultLayout(), and MainWindow::saveGUIElementsPos().
|
inline |
Set whether to auto-save layout on close.
Definition at line 79 of file ecvLayoutManager.h.
| 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
Definition at line 117 of file ecvLayoutManager.cpp.
Referenced by restoreGUILayout().
| void ecvLayoutManager::setupDefaultLayout | ( | ) |
Setup default layout for the main window.
This includes toolbar positioning, dock widget layout, and window sizing based on screen resolution
Definition at line 496 of file ecvLayoutManager.cpp.
References CVLog::PrintDebug(), and CVLog::PrintVerbose().
Referenced by restoreDefaultLayout(), and restoreGUILayout().