VirtualBox

Changeset 107288 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Dec 11, 2024 1:34:50 PM (5 weeks ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10814: VBox Manager: No sliding animation for advanced VBox Manager widget as structure will be heavily changed.

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  
    8080    , m_pPaneToolsGlobal(0)
    8181    , m_pPaneToolsMachine(0)
    82     , m_pSlidingAnimation(0)
    8382    , m_pMenuToolsGlobal(0)
    8483    , m_pMenuToolsMachine(0)
     
    473472        && m_pStackedWidget->currentWidget() != m_pPaneToolsGlobal)
    474473    {
    475         /* Just start animation and return, do nothing else.. */
    476         m_pStackedWidget->setCurrentWidget(m_pPaneToolsGlobal); // rendering w/a
    477         m_pStackedWidget->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());
    480479    }
    481480
     
    486485        && m_pStackedWidget->currentWidget() != m_pPaneToolsMachine)
    487486    {
    488         /* Just start animation and return, do nothing else.. */
    489         m_pStackedWidget->setCurrentWidget(m_pPaneToolsMachine); // rendering w/a
    490         m_pStackedWidget->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());
    493492    }
    494493
     
    515514    m_enmSelectionType = enmSelectedItemType;
    516515    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     else
    532     {
    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();
    542516}
    543517
     
    763737                            /* Add into stack: */
    764738                            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);
    780739                        }
    781740
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerAdvancedWidget.h

    r107286 r107288  
    4646class UIActionPool;
    4747class UIChooser;
    48 class UISlidingAnimation;
    4948class UIToolPaneGlobal;
    5049class UIToolPaneMachine;
     
    312311        void sltHandleChooserPaneSelectionInvalidated() { recacheCurrentMachineItemInformation(true /* fDontRaiseErrorPane */); }
    313312
    314         /** Handles @a fForward sliding animation complete signal. */
    315         void sltHandleSlidingAnimationComplete(bool fForward);
    316 
    317313        /** Handles state change for cloud profile with certain @a strProviderShortName and @a strProfileName. */
    318314        void sltHandleCloudProfileStateChange(const QString &strProviderShortName,
     
    396392    /** Holds the Machine Tools-pane instance. */
    397393    UIToolPaneMachine  *m_pPaneToolsMachine;
    398     /** Holds the sliding-animation widget instance. */
    399     UISlidingAnimation *m_pSlidingAnimation;
    400394    /** Holds the Global Tools-menu instance. */
    401395    UITools            *m_pMenuToolsGlobal;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette