VirtualBox

Changeset 108154 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 11, 2025 11:49:39 AM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167465
Message:

FE/Qt: bugref:10814: VBox Manager / Chooser pane: Cleanup stuff related to global item height hint.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp

    r108153 r108154  
    210210    AssertPtrReturnVoid(model());
    211211    model()->setCurrentGlobalItem();
    212 }
    213 
    214 void UIChooser::setGlobalItemHeightHint(int iHeight)
    215 {
    216     AssertPtrReturnVoid(model());
    217     model()->setGlobalItemHeightHint(iHeight);
    218212}
    219213
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h

    r108153 r108154  
    194194    /** @} */
    195195
    196 public slots:
    197 
    198     /** @name Layout stuff.
    199       * @{ */
    200         /** Defines global item @a iHeight. */
    201         void setGlobalItemHeightHint(int iHeight);
    202     /** @} */
    203 
    204196private slots:
    205197
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r108153 r108154  
    7676    , m_iScrollingTokenSize(30)
    7777    , m_fIsScrollingInProgress(false)
    78     , m_iGlobalItemHeightHint(0)
    7978    , m_pTimerCloudProfileUpdate(0)
    8079{
     
    10571056    /* Layout root content: */
    10581057    root()->updateLayout();
    1059 }
    1060 
    1061 void UIChooserModel::setGlobalItemHeightHint(int iHint)
    1062 {
    1063     /* Save and apply global item height hint: */
    1064     m_iGlobalItemHeightHint = iHint;
    1065     applyGlobalItemHeightHint();
    10661058}
    10671059
     
    18331825    updateTreeForMainRoot();
    18341826
    1835     /* Apply current global item height hint: */
    1836     applyGlobalItemHeightHint();
    1837 
    18381827    /* Restore all selected items if requested: */
    18391828    if (fPreserveSelection)
     
    20232012    return false;
    20242013}
    2025 
    2026 void UIChooserModel::applyGlobalItemHeightHint()
    2027 {
    2028     /* Make sure there is something to apply: */
    2029     if (m_iGlobalItemHeightHint == 0)
    2030         return;
    2031 
    2032     /* Walk thrugh all the items of navigation list: */
    2033     foreach (UIChooserItem *pItem, navigationItems())
    2034     {
    2035         /* And for each global item: */
    2036         if (pItem->type() == UIChooserNodeType_Global)
    2037         {
    2038             /* Apply the height hint we have: */
    2039             UIChooserItemGlobal *pGlobalItem = pItem->toGlobalItem();
    2040             if (pGlobalItem)
    2041                 pGlobalItem->setHeightHint(m_iGlobalItemHeightHint);
    2042         }
    2043     }
    2044 }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h

    r108153 r108154  
    250250        /** Updates layout. */
    251251        void updateLayout();
    252 
    253         /** Defines global item height @a iHint. */
    254         void setGlobalItemHeightHint(int iHint);
    255252    /** @} */
    256253
     
    429426        /** Processes drag leave @a pEvent. */
    430427        bool processDragLeaveEvent(QGraphicsSceneDragDropEvent *pEvent);
    431 
    432         /** Applies the global item height hint. */
    433         void applyGlobalItemHeightHint();
    434428    /** @} */
    435429
     
    484478        /** Holds whether drag scrolling is in progress. */
    485479        bool             m_fIsScrollingInProgress;
    486 
    487         /** Holds the global item height hint. */
    488         int  m_iGlobalItemHeightHint;
    489480    /** @} */
    490481
Note: See TracChangeset for help on using the changeset viewer.

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