Changeset 64794 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Dec 6, 2016 5:02:35 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r64750 r64794 556 556 src/settings/machine/UIMachineSettingsStorage.cpp \ 557 557 src/settings/machine/UIMachineSettingsUSB.cpp \ 558 src/widgets/UIApplianceEditorWidget.cpp \559 558 src/widgets/UIHotKeyEditor.cpp \ 560 559 src/widgets/UIMiniToolBar.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r64756 r64794 44 44 45 45 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */ 46 47 /* Forward declarations: */48 class UIApplianceView;49 46 50 47 … … 214 211 /** Holds whether item was modified. */ 215 212 bool m_fModified; 216 };217 218 219 /** QITreeView subclass used as Storage-view. */220 class UIApplianceView : public QITreeView221 {222 Q_OBJECT;223 224 public:225 226 /** Constructs storage-view passing @a pParent to the base-class. */227 UIApplianceView(QWidget *pParent = 0) : QITreeView(pParent) {}228 229 protected:230 231 /** Returns the number of children. */232 virtual int childCount() const /* override */;233 /** Returns the child item with @a iIndex. */234 virtual QITreeViewItem *childItem(int iIndex) const /* override */;235 213 }; 236 214 … … 1318 1296 1319 1297 /********************************************************************************************************************************* 1320 * Class UIApplianceView implementation. *1321 *********************************************************************************************************************************/1322 1323 int UIApplianceView::childCount() const1324 {1325 UIApplianceSortProxyModel *pSortProxyModel = qobject_cast<UIApplianceSortProxyModel*>(model());1326 AssertPtrReturn(pSortProxyModel, 0);1327 UIApplianceModel *pModel = qobject_cast<UIApplianceModel*>(pSortProxyModel->sourceModel());1328 AssertPtrReturn(pModel, 0);1329 return pModel->rowCount(pModel->root());1330 }1331 1332 QITreeViewItem *UIApplianceView::childItem(int iIndex) const1333 {1334 UIApplianceSortProxyModel *pSortProxyModel = qobject_cast<UIApplianceSortProxyModel*>(model());1335 AssertPtrReturn(pSortProxyModel, 0);1336 UIApplianceModel *pModel = qobject_cast<UIApplianceModel*>(pSortProxyModel->sourceModel());1337 AssertPtrReturn(pModel, 0);1338 return (UIApplianceModelItem*)pModel->index(iIndex, 0, pModel->root()).internalPointer();1339 }1340 1341 1342 /*********************************************************************************************************************************1343 1298 * Class UIApplianceEditorWidget implementation. * 1344 1299 *********************************************************************************************************************************/ … … 1374 1329 1375 1330 /* Create tree-view: */ 1376 m_pTreeViewSettings = new UIApplianceView;1331 m_pTreeViewSettings = new QITreeView; 1377 1332 { 1378 1333 /* Configure tree-view: */
Note:
See TracChangeset
for help on using the changeset viewer.