Changeset 107338 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 17, 2024 10:11:13 AM (4 weeks ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.cpp
r107337 r107338 27 27 28 28 /* Qt includes: */ 29 // #include <QApplication>30 29 #include <QHBoxLayout> 31 // #include <QStyle>32 // #include <QToolButton>33 // #include <QVBoxLayout>34 30 35 31 /* GUI includes: */ 36 #include "UIActionPoolManager.h"37 32 #include "UIChooser.h" 38 33 #include "UICommon.h" 39 34 #include "UIExtraDataManager.h" 40 // #include "UILoggingDefs.h"35 #include "UIGlobalToolsManagerWidget.h" 41 36 #include "UIMachineManagerWidget.h" 42 // #include "UIMessageCenter.h"43 #include "UINotificationCenter.h"44 // #include "UISlidingAnimation.h"45 // #include "UITabBar.h"46 37 #include "UIToolPaneGlobal.h" 47 38 #include "UIToolPaneMachine.h" 48 39 #include "UITools.h" 49 // #include "UITranslationEventListener.h"50 // #include "UIVirtualBoxEventHandler.h"51 40 #include "UIVirtualBoxManagerAdvancedWidget.h" 52 #include "UIGlobalToolsManagerWidget.h" 53 // #include "UIVirtualMachineItemCloud.h" 54 // #include "UIVirtualMachineItemLocal.h" 55 #ifndef VBOX_WS_MAC 56 // # include "UIMenuBar.h" 57 #endif 41 42 /* Other VBox includes: */ 43 #include "iprt/assert.h" 58 44 59 45 … … 176 162 { 177 163 /* Update tools restrictions: */ 178 updateToolsMenu Global();164 updateToolsMenu(); 179 165 } 180 166 … … 238 224 } 239 225 } 240 241 /* Create notification-center: */242 UINotificationCenter::create(this);243 226 } 244 227 … … 291 274 } 292 275 293 void UIGlobalToolsManagerWidget::cleanupWidgets()294 {295 UINotificationCenter::destroy();296 }297 298 276 void UIGlobalToolsManagerWidget::cleanup() 299 277 { 300 278 /* Ask sub-dialogs to commit data: */ 301 279 sltHandleCommitData(); 302 303 /* Cleanup everything: */304 cleanupWidgets();305 280 } 306 281 … … 330 305 } 331 306 332 void UIGlobalToolsManagerWidget::updateToolsMenu Global()307 void UIGlobalToolsManagerWidget::updateToolsMenu() 333 308 { 334 309 /* Update global tools restrictions: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.h
r107337 r107338 143 143 /** Cleanups connections. */ 144 144 void cleanupConnections(); 145 /** Cleanups widgets. */146 void cleanupWidgets();147 145 /** Cleanups all. */ 148 146 void cleanup(); … … 162 160 UIToolPaneMachine *toolPaneMachine() const; 163 161 164 /** Updates Globaltools menu. */165 void updateToolsMenu Global();162 /** Updates tools menu. */ 163 void updateToolsMenu(); 166 164 /** @} */ 167 165 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineManagerWidget.cpp
r107335 r107338 29 29 #include <QHBoxLayout> 30 30 #include <QTimer> 31 #include <QVBoxLayout>32 31 33 32 /* GUI includes: */ … … 38 37 #include "UIExtraDataManager.h" 39 38 #include "UIGlobalSession.h" 40 #include "UILoggingDefs.h" 41 #include "UINotificationCenter.h" 39 #include "UIMachineManagerWidget.h" 42 40 #include "UIToolPaneGlobal.h" 43 41 #include "UIToolPaneMachine.h" … … 45 43 #include "UITranslationEventListener.h" 46 44 #include "UIVirtualBoxEventHandler.h" 47 #include "UIMachineManagerWidget.h"48 45 #include "UIVirtualMachineItemLocal.h" 49 46 … … 362 359 { 363 360 const QList<int> splitterSizes = m_pSplitter->sizes(); 364 LogRel2(("GUI: UIMachineManagerWidget: Saving splitter as: Size=%d,%d\n",365 splitterSizes.at(0), splitterSizes.at(1)));366 361 gEDataManager->setSelectorWindowSplitterHints(splitterSizes); 367 362 } … … 495 490 void UIMachineManagerWidget::prepareWidgets() 496 491 { 497 /* Create main-layout: */498 QHBoxLayout *pLayout Main= new QHBoxLayout(this);499 if (pLayout Main)492 /* Create layout: */ 493 QHBoxLayout *pLayout = new QHBoxLayout(this); 494 if (pLayout) 500 495 { 501 496 /* Configure layout: */ 502 pLayout Main->setSpacing(0);503 pLayout Main->setContentsMargins(0, 0, 0, 0);497 pLayout->setSpacing(0); 498 pLayout->setContentsMargins(0, 0, 0, 0); 504 499 505 500 /* Create splitter: */ … … 515 510 } 516 511 517 /* Create right widget: */518 QWidget *pWidgetRight = new QWidget;519 if ( pWidgetRight)512 /* Create Tools-pane: */ 513 m_pPaneTools = new UIToolPaneMachine(actionPool()); 514 if (m_pPaneTools) 520 515 { 521 /* Create right-layout: */ 522 QVBoxLayout *pLayoutRight = new QVBoxLayout(pWidgetRight); 523 if(pLayoutRight) 524 { 525 /* Configure layout: */ 526 pLayoutRight->setSpacing(0); 527 pLayoutRight->setContentsMargins(0, 0, 0, 0); 528 529 /* Create Tools-pane: */ 530 m_pPaneTools = new UIToolPaneMachine(actionPool()); 531 if (m_pPaneTools) 532 { 533 /// @todo make sure it's used properly 534 m_pPaneTools->setActive(true); 535 536 /* Add into layout: */ 537 pLayoutRight->addWidget(m_pPaneTools, 1); 538 } 539 } 516 /// @todo make sure it's used properly 517 m_pPaneTools->setActive(true); 540 518 541 519 /* Add into splitter: */ 542 m_pSplitter->addWidget( pWidgetRight);520 m_pSplitter->addWidget(m_pPaneTools); 543 521 } 544 522 … … 548 526 549 527 /* Add into layout: */ 550 pLayout Main->addWidget(m_pSplitter);528 pLayout->addWidget(m_pSplitter); 551 529 } 552 530 … … 554 532 m_pMenuTools = new UITools(this, UIToolClass_Machine, actionPool()); 555 533 } 556 557 /* Create notification-center: */558 UINotificationCenter::create(this);559 534 560 535 /* Bring the VM list to the focus: */ … … 616 591 sizes[1] = (int)(width() * .9 * (2.0 / 3)); 617 592 } 618 LogRel2(("GUI: UIMachineManagerWidget: Restoring splitter to: Size=%d,%d\n",619 sizes.at(0), sizes.at(1)));620 593 m_pSplitter->setSizes(sizes); 621 594 } … … 650 623 } 651 624 652 void UIMachineManagerWidget::cleanupWidgets()653 {654 UINotificationCenter::destroy();655 }656 657 625 void UIMachineManagerWidget::cleanup() 658 626 { 659 627 /* Ask sub-dialogs to commit data: */ 660 628 sltHandleCommitData(); 661 662 /* Cleanup everything: */663 cleanupWidgets();664 629 } 665 630 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineManagerWidget.h
r107335 r107338 276 276 /** Cleanups connections. */ 277 277 void cleanupConnections(); 278 /** Cleanups widgets. */279 void cleanupWidgets();280 278 /** Cleanups all. */ 281 279 void cleanup();
Note:
See TracChangeset
for help on using the changeset viewer.