- Timestamp:
- Oct 20, 2020 2:37:58 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r84625 r86652 145 145 /* Relayout model: */ 146 146 model()->updateLayout(); 147 } 148 149 int UIChooserItemGroup::scrollingValue() const 150 { 151 return m_pScrollArea->scrollingValue(); 152 } 153 154 void UIChooserItemGroup::setScrollingValue(int iValue) 155 { 156 m_pScrollArea->setScrollingValue(iValue); 147 157 } 148 158 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h
r84625 r86652 96 96 /** @name Navigation stuff. 97 97 * @{ */ 98 /** Returns scrolling location value in pixels. */ 99 int scrollingValue() const; 100 /** Defines scrolling location @a iValue in pixels. */ 101 void setScrollingValue(int iValue); 98 102 /** Performs scrolling by @a iDelta pixels. */ 99 103 void scrollBy(int iDelta); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r86651 r86652 1658 1658 void UIChooserModel::buildTreeForMainRoot(bool fPreserveSelection /* = false */) 1659 1659 { 1660 /* Remember scrolling location: */ 1661 const int iScrollLocation = m_pRoot ? m_pRoot->toGroupItem()->scrollingValue() : 0; 1662 1660 1663 /* Remember all selected items if requested: */ 1661 1664 QStringList selectedItemDefinitions; … … 1692 1695 makeSureAtLeastOneItemSelected(); 1693 1696 } 1697 1698 /* Restore scrolling location: */ 1699 m_pRoot->toGroupItem()->setScrollingValue(iScrollLocation); 1694 1700 1695 1701 /* Repeat search if search widget is visible: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsScrollArea.cpp
r82968 r86652 114 114 } 115 115 116 int UIGraphicsScrollArea::scrollingValue() const 117 { 118 return m_pScrollBar->value(); 119 } 120 121 void UIGraphicsScrollArea::setScrollingValue(int iValue) 122 { 123 iValue = qMax(iValue, 0); 124 iValue = qMin(iValue, m_pScrollBar->maximum()); 125 m_pScrollBar->setValue(iValue); 126 } 127 116 128 void UIGraphicsScrollArea::scrollBy(int iDelta) 117 129 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsScrollArea.h
r82968 r86652 50 50 QIGraphicsWidget *viewport() const; 51 51 52 /** Returns scrolling location value in pixels. */ 53 int scrollingValue() const; 54 /** Defines scrolling location @a iValue in pixels. */ 55 void setScrollingValue(int iValue); 52 56 /** Performs scrolling by @a iDelta pixels. */ 53 57 void scrollBy(int iDelta);
Note:
See TracChangeset
for help on using the changeset viewer.