Changeset 105001 in vbox
- Timestamp:
- Jun 24, 2024 2:57:42 PM (9 months ago)
- svn:sync-xref-src-repo-rev:
- 163619
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
r105000 r105001 447 447 ~UIPortForwardingModel(); 448 448 449 /** Returns the number of children. */450 int childCount() const;451 /** Returns the child item with @a iIndex. */452 QITableViewRow *childItem(int iIndex) const;453 454 449 /** Returns the list of port forwarding rules. */ 455 450 UIPortForwardingDataList rules() const; … … 506 501 /** Constructs Port Forwarding table-view. */ 507 502 UIPortForwardingView() {} 508 509 protected:510 511 /** Returns the number of children. */512 virtual int childCount() const RT_OVERRIDE;513 /** Returns the child item with @a iIndex. */514 virtual QITableViewRow *childItem(int iIndex) const RT_OVERRIDE;515 503 }; 516 504 … … 537 525 qDeleteAll(m_dataList); 538 526 m_dataList.clear(); 539 }540 541 int UIPortForwardingModel::childCount() const542 {543 /* Return row count: */544 return rowCount();545 }546 547 QITableViewRow *UIPortForwardingModel::childItem(int iIndex) const548 {549 /* Make sure index within the bounds: */550 AssertReturn(iIndex >= 0 && iIndex < m_dataList.size(), 0);551 /* Return corresponding row: */552 return m_dataList[iIndex];553 527 } 554 528 … … 793 767 794 768 /********************************************************************************************************************************* 795 * Class UIPortForwardingView implementation. *796 *********************************************************************************************************************************/797 798 int UIPortForwardingView::childCount() const799 {800 /* Redirect request to table model: */801 return qobject_cast<UIPortForwardingModel*>(model())->childCount();802 }803 804 QITableViewRow *UIPortForwardingView::childItem(int iIndex) const805 {806 /* Redirect request to table model: */807 return qobject_cast<UIPortForwardingModel*>(model())->childItem(iIndex);808 }809 810 811 /*********************************************************************************************************************************812 769 * Class UIPortForwardingTable implementation. * 813 770 *********************************************************************************************************************************/
Note:
See TracChangeset
for help on using the changeset viewer.