Changeset 108154 in vbox for trunk/src/VBox
- Timestamp:
- Feb 11, 2025 11:49:39 AM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 167465
- 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 210 210 AssertPtrReturnVoid(model()); 211 211 model()->setCurrentGlobalItem(); 212 }213 214 void UIChooser::setGlobalItemHeightHint(int iHeight)215 {216 AssertPtrReturnVoid(model());217 model()->setGlobalItemHeightHint(iHeight);218 212 } 219 213 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
r108153 r108154 194 194 /** @} */ 195 195 196 public slots:197 198 /** @name Layout stuff.199 * @{ */200 /** Defines global item @a iHeight. */201 void setGlobalItemHeightHint(int iHeight);202 /** @} */203 204 196 private slots: 205 197 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r108153 r108154 76 76 , m_iScrollingTokenSize(30) 77 77 , m_fIsScrollingInProgress(false) 78 , m_iGlobalItemHeightHint(0)79 78 , m_pTimerCloudProfileUpdate(0) 80 79 { … … 1057 1056 /* Layout root content: */ 1058 1057 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();1066 1058 } 1067 1059 … … 1833 1825 updateTreeForMainRoot(); 1834 1826 1835 /* Apply current global item height hint: */1836 applyGlobalItemHeightHint();1837 1838 1827 /* Restore all selected items if requested: */ 1839 1828 if (fPreserveSelection) … … 2023 2012 return false; 2024 2013 } 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 250 250 /** Updates layout. */ 251 251 void updateLayout(); 252 253 /** Defines global item height @a iHint. */254 void setGlobalItemHeightHint(int iHint);255 252 /** @} */ 256 253 … … 429 426 /** Processes drag leave @a pEvent. */ 430 427 bool processDragLeaveEvent(QGraphicsSceneDragDropEvent *pEvent); 431 432 /** Applies the global item height hint. */433 void applyGlobalItemHeightHint();434 428 /** @} */ 435 429 … … 484 478 /** Holds whether drag scrolling is in progress. */ 485 479 bool m_fIsScrollingInProgress; 486 487 /** Holds the global item height hint. */488 int m_iGlobalItemHeightHint;489 480 /** @} */ 490 481
Note:
See TracChangeset
for help on using the changeset viewer.