Changeset 64266 in vbox
- Timestamp:
- Oct 13, 2016 4:57:28 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111279
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r64265 r64266 306 306 UIHotKeyTableModel(QObject *pParent, UIActionPoolType type); 307 307 308 /** Returns the number of children. */ 309 int childCount() const; 310 /** Returns the child item with @a iIndex. */ 311 QITableViewRow *childItem(int iIndex); 312 308 313 /* API: Loading/saving stuff: */ 309 314 void load(const UIShortcutCache &shortcuts); … … 355 360 UIHotKeyTable(QWidget *pParent, UIHotKeyTableModel *pModel, const QString &strObjectName); 356 361 362 protected: 363 364 /** Returns the number of children. */ 365 virtual int childCount() const /* override */; 366 /** Returns the child item with @a iIndex. */ 367 virtual QITableViewRow *childItem(int iIndex) const /* override */; 368 357 369 private slots: 358 370 … … 375 387 , m_type(type) 376 388 { 389 } 390 391 int UIHotKeyTableModel::childCount() const 392 { 393 /* Return row count: */ 394 return rowCount(); 395 } 396 397 QITableViewRow *UIHotKeyTableModel::childItem(int iIndex) 398 { 399 /* Make sure index within the bounds: */ 400 AssertReturn(iIndex >= 0 && iIndex < m_filteredShortcuts.size(), 0); 401 /* Return corresponding filtered row: */ 402 return &m_filteredShortcuts[iIndex]; 377 403 } 378 404 … … 699 725 } 700 726 727 int UIHotKeyTable::childCount() const 728 { 729 /* Redirect request to table model: */ 730 return qobject_cast<UIHotKeyTableModel*>(model())->childCount(); 731 } 732 733 QITableViewRow *UIHotKeyTable::childItem(int iIndex) const 734 { 735 /* Redirect request to table model: */ 736 return qobject_cast<UIHotKeyTableModel*>(model())->childItem(iIndex); 737 } 738 701 739 void UIHotKeyTable::sltHandleShortcutsLoaded() 702 740 {
Note:
See TracChangeset
for help on using the changeset viewer.