- Timestamp:
- Dec 19, 2024 2:49:30 PM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 166429
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.cpp
r107352 r107386 27 27 28 28 /* Qt includes: */ 29 #include <Q HBoxLayout>29 #include <QGridLayout> 30 30 31 31 /* GUI includes: */ 32 #include "QIToolBar.h" 32 33 #include "UIChooser.h" 33 34 #include "UICommon.h" … … 48 49 : QWidget(pParent) 49 50 , m_pActionPool(pActionPool) 51 , m_pLayout(0) 50 52 , m_pMenu(0) 51 53 , m_pPane(0) 52 54 { 53 55 prepare(); 56 } 57 58 void UIGlobalToolsManagerWidget::addToolBar(QIToolBar *pToolBar) 59 { 60 AssertPtrReturnVoid(m_pLayout); 61 m_pLayout->addWidget(pToolBar, 0, 1); 54 62 } 55 63 … … 207 215 { 208 216 /* Create layout: */ 209 QHBoxLayout *pLayout = new QHBoxLayout(this);210 if ( pLayout)217 m_pLayout = new QGridLayout(this); 218 if (m_pLayout) 211 219 { 212 220 /* Configure layout: */ 213 pLayout->setContentsMargins(0, 0, 0, 0);221 m_pLayout->setContentsMargins(0, 0, 0, 0); 214 222 215 223 /* Create tool-menu: */ … … 218 226 { 219 227 /* Add into layout: */ 220 pLayout->addWidget(toolMenu());228 m_pLayout->addWidget(toolMenu(), 0, 0, 2, 1); 221 229 } 222 230 … … 229 237 230 238 /* Add into layout: */ 231 pLayout->addWidget(toolPane());239 m_pLayout->addWidget(toolPane(), 1, 1); 232 240 } 233 241 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.h
r107352 r107386 39 39 40 40 /* Forward declarations: */ 41 class QGridLayout; 42 class QIToolBar; 41 43 class UIActionPool; 42 44 class UIChooser; … … 70 72 /** Returns the action-pool reference. */ 71 73 UIActionPool *actionPool() const { return m_pActionPool; } 74 /** @} */ 75 76 /** @name Tool-bar stuff. 77 * @{ */ 78 /** Adds tool-bar into grid layout. */ 79 void addToolBar(QIToolBar *pToolBar); 72 80 /** @} */ 73 81 … … 164 172 UIActionPool *m_pActionPool; 165 173 174 /** Holds the grid-layout instance. */ 175 QGridLayout *m_pLayout; 176 166 177 /** Holds the Tools-menu instance. */ 167 178 UITools *m_pMenu; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerAdvancedWidget.cpp
r107385 r107386 361 361 pLayout->setContentsMargins(0, 0, 0, 0); 362 362 363 /* Create Global Tool Manager: */ 364 m_pGlobalToolManager = new UIGlobalToolsManagerWidget(this, actionPool()); 365 if (globalToolManager()) 366 { 367 /* Add into layout: */ 368 pLayout->addWidget(globalToolManager()); 369 } 370 363 371 /* Create Main toolbar: */ 364 372 m_pToolBar = new QIToolBar(this); … … 395 403 396 404 /* Add toolbar into layout: */ 397 pLayout->addWidget(m_pToolBar); 398 } 399 400 /* Create Global Tool Manager: */ 401 m_pGlobalToolManager = new UIGlobalToolsManagerWidget(this, actionPool()); 402 if (globalToolManager()) 403 { 404 /* Add into layout: */ 405 pLayout->addWidget(globalToolManager()); 405 m_pGlobalToolManager->addToolBar(m_pToolBar); 406 406 } 407 407 }
Note:
See TracChangeset
for help on using the changeset viewer.