Changeset 107288 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 11, 2024 1:34:50 PM (5 weeks ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerAdvancedWidget.cpp
r107286 r107288 80 80 , m_pPaneToolsGlobal(0) 81 81 , m_pPaneToolsMachine(0) 82 , m_pSlidingAnimation(0)83 82 , m_pMenuToolsGlobal(0) 84 83 , m_pMenuToolsMachine(0) … … 473 472 && m_pStackedWidget->currentWidget() != m_pPaneToolsGlobal) 474 473 { 475 /* Just start animation and return, do nothing else.. */476 m_p StackedWidget->setCurrentWidget(m_pPaneToolsGlobal); // rendering w/a477 m_p StackedWidget->setCurrentWidget(m_pSlidingAnimation);478 m_pSlidingAnimation->animate(false /* forward? */);479 return;474 m_pStackedWidget->setCurrentWidget(m_pPaneToolsGlobal); 475 m_pPaneToolsMachine->setActive(false); 476 m_pPaneToolsGlobal->setActive(true); 477 /* Handle current tool type change: */ 478 handleCurrentToolTypeChange(m_pMenuToolsGlobal->toolsType()); 480 479 } 481 480 … … 486 485 && m_pStackedWidget->currentWidget() != m_pPaneToolsMachine) 487 486 { 488 /* Just start animation and return, do nothing else.. */489 m_p StackedWidget->setCurrentWidget(m_pPaneToolsMachine); // rendering w/a490 m_p StackedWidget->setCurrentWidget(m_pSlidingAnimation);491 m_pSlidingAnimation->animate(true /* forward? */);492 return;487 m_pStackedWidget->setCurrentWidget(m_pPaneToolsMachine); 488 m_pPaneToolsGlobal->setActive(false); 489 m_pPaneToolsMachine->setActive(true); 490 /* Handle current tool type change: */ 491 handleCurrentToolTypeChange(m_pMenuToolsMachine->toolsType()); 493 492 } 494 493 … … 515 514 m_enmSelectionType = enmSelectedItemType; 516 515 m_fSelectedMachineItemAccessible = fCurrentItemIsOk; 517 }518 519 void UIVirtualBoxManagerAdvancedWidget::sltHandleSlidingAnimationComplete(bool fForward)520 {521 /* First switch the panes: */522 if (fForward)523 {524 /* Switch stacked widget to machine tool pane: */525 m_pStackedWidget->setCurrentWidget(m_pPaneToolsMachine);526 m_pPaneToolsGlobal->setActive(false);527 m_pPaneToolsMachine->setActive(true);528 /* Handle current tool type change: */529 handleCurrentToolTypeChange(m_pMenuToolsMachine->toolsType());530 }531 else532 {533 /* Switch stacked widget to global tool pane: */534 m_pStackedWidget->setCurrentWidget(m_pPaneToolsGlobal);535 m_pPaneToolsMachine->setActive(false);536 m_pPaneToolsGlobal->setActive(true);537 /* Handle current tool type change: */538 handleCurrentToolTypeChange(m_pMenuToolsGlobal->toolsType());539 }540 /* Then handle current item change (again!): */541 sltHandleChooserPaneIndexChange();542 516 } 543 517 … … 763 737 /* Add into stack: */ 764 738 m_pStackedWidget->addWidget(m_pPaneToolsMachine); 765 }766 767 /* Create sliding-widget: */768 // Reverse initial animation direction if group or machine selected!769 const bool fReverse = !m_pPaneChooser->isGlobalItemSelected();770 m_pSlidingAnimation = new UISlidingAnimation(Qt::Vertical, fReverse);771 if (m_pSlidingAnimation)772 {773 /* Add first/second widgets into sliding animation: */774 m_pSlidingAnimation->setWidgets(m_pPaneToolsGlobal, m_pPaneToolsMachine);775 connect(m_pSlidingAnimation, &UISlidingAnimation::sigAnimationComplete,776 this, &UIVirtualBoxManagerAdvancedWidget::sltHandleSlidingAnimationComplete);777 778 /* Add into stack: */779 m_pStackedWidget->addWidget(m_pSlidingAnimation);780 739 } 781 740 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerAdvancedWidget.h
r107286 r107288 46 46 class UIActionPool; 47 47 class UIChooser; 48 class UISlidingAnimation;49 48 class UIToolPaneGlobal; 50 49 class UIToolPaneMachine; … … 312 311 void sltHandleChooserPaneSelectionInvalidated() { recacheCurrentMachineItemInformation(true /* fDontRaiseErrorPane */); } 313 312 314 /** Handles @a fForward sliding animation complete signal. */315 void sltHandleSlidingAnimationComplete(bool fForward);316 317 313 /** Handles state change for cloud profile with certain @a strProviderShortName and @a strProfileName. */ 318 314 void sltHandleCloudProfileStateChange(const QString &strProviderShortName, … … 396 392 /** Holds the Machine Tools-pane instance. */ 397 393 UIToolPaneMachine *m_pPaneToolsMachine; 398 /** Holds the sliding-animation widget instance. */399 UISlidingAnimation *m_pSlidingAnimation;400 394 /** Holds the Global Tools-menu instance. */ 401 395 UITools *m_pMenuToolsGlobal;
Note:
See TracChangeset
for help on using the changeset viewer.