Changeset 77922 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 27, 2019 2:38:22 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.h
r77847 r77922 186 186 /** Makes sure item is visible. */ 187 187 virtual void makeSureItsVisible(); 188 /** Makes sure passed @a pItem is visible within the current root item.189 * @note Please keep in mind that any group item can be a root, but there190 * is just one model root item at the same time, accessible via model's191 * root() getter, and this API can be called for current root item only,192 * because this is root item who performs actual scrolling, while193 * @a pItem itself can be on any level of embedding. */194 virtual void makeSureItemIsVisible(UIChooserItem *pItem) { Q_UNUSED(pItem); }195 188 196 189 /** Returns pixmap item representation. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r77847 r77922 140 140 } 141 141 142 /* static */143 QString UIChooserItemGroup::className()144 {145 return "UIChooserItemGroup";146 }147 148 142 void UIChooserItemGroup::makeSureItemIsVisible(UIChooserItem *pItem) 149 143 { … … 157 151 const QRectF itemRectInGroup = QRectF(positionInGroup, pItem->size()); 158 152 m_pScrollArea->makeSureRectIsVisible(itemRectInGroup); 153 } 154 155 /* static */ 156 QString UIChooserItemGroup::className() 157 { 158 return "UIChooserItemGroup"; 159 159 } 160 160 … … 262 262 /* Make sure item visible: */ 263 263 if (model()->root()) 264 model()->root()-> makeSureItemIsVisible(this);264 model()->root()->toGroupItem() ->makeSureItemIsVisible(this); 265 265 266 266 /* Assign name-editor text: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h
r77847 r77922 90 90 /** @name Navigation stuff. 91 91 * @{ */ 92 /** Makes sure passed @a pItem is visible within the current root item. 93 * @note Please keep in mind that any group item can be a root, but there 94 * is just one model root item at the same time, accessible via model's 95 * root() getter, and this API can be called for current root item only, 96 * because this is root item who performs actual scrolling, while 97 * @a pItem itself can be on any level of embedding. */ 98 void makeSureItemIsVisible(UIChooserItem *pItem) /* override */; 99 92 100 /** Class-name used for drag&drop mime-data format. */ 93 101 static QString className(); 94 /** Makes sure passed child @a pItem is visible. */95 virtual void makeSureItemIsVisible(UIChooserItem *pItem) /* override */;96 102 /** @} */ 97 103 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r77919 r77922 414 414 if (view() && view()->window() && root()) 415 415 if (view()->window()->isVisible() && pItem) 416 root()-> makeSureItemIsVisible(pItem);416 root()->toGroupItem()->makeSureItemIsVisible(pItem); 417 417 } 418 418
Note:
See TracChangeset
for help on using the changeset viewer.