- Timestamp:
- Apr 22, 2019 11:57:15 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIFormEditorWidget.cpp
r78246 r78247 230 230 231 231 /** Returns flags for item with certain @a index. */ 232 Qt::ItemFlags flags(const QModelIndex &index) const;232 virtual Qt::ItemFlags flags(const QModelIndex &index) const /* override */; 233 233 234 234 /** Returns row count of certain @a parent. */ 235 int rowCount(const QModelIndex &parent = QModelIndex()) const; 236 235 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const /* override */; 237 236 /** Returns column count of certain @a parent. */ 238 int columnCount(const QModelIndex &parent = QModelIndex()) const;237 virtual int columnCount(const QModelIndex &parent = QModelIndex()) const /* override */; 239 238 240 239 /** Returns header data for @a iSection, @a enmOrientation and @a iRole specified. */ 241 QVariant headerData(int iSection, Qt::Orientation enmOrientation, int iRole) const;240 virtual QVariant headerData(int iSection, Qt::Orientation enmOrientation, int iRole) const /* override */; 242 241 243 242 /** Defines the @a iRole data for item with @a index as @a value. */ 244 bool setData(const QModelIndex &index, const QVariant &value, int iRole = Qt::EditRole);243 virtual bool setData(const QModelIndex &index, const QVariant &value, int iRole = Qt::EditRole) /* override */; 245 244 /** Returns the @a iRole data for item with @a index. */ 246 QVariant data(const QModelIndex &index, int iRole) const;245 virtual QVariant data(const QModelIndex &index, int iRole) const /* override */; 247 246 248 247 private: … … 256 255 /** Holds the Form Editor row list. */ 257 256 QList<UIFormEditorRow*> m_dataList; 257 }; 258 259 260 /** QSortFilterProxyModel subclass used as the Form Editor proxy-model. */ 261 class UIFormEditorProxyModel : public QSortFilterProxyModel 262 { 263 Q_OBJECT; 264 265 public: 266 267 /** Constructs the Form Editor proxy-model passing @a pParent to the base-class. */ 268 UIFormEditorProxyModel(QObject *pParent = 0); 269 270 protected: 271 272 /** Returns whether item in the row indicated by the given @a iSourceRow and @a srcParenIdx should be included in the model. */ 273 virtual bool filterAcceptsRow(int iSourceRow, const QModelIndex &srcParenIdx) const /* override */; 258 274 }; 259 275 … … 275 291 /** Returns the child item with @a iIndex. */ 276 292 virtual QITableViewRow *childItem(int iIndex) const /* override */; 277 };278 279 280 /** QSortFilterProxyModel subclass used as the Form Editor proxy-model. */281 class UIFormEditorProxyModel : public QSortFilterProxyModel282 {283 Q_OBJECT;284 285 public:286 287 /** Constructs the Form Editor proxy-model passing @a pParent to the base-class. */288 UIFormEditorProxyModel(QObject *pParent = 0);289 290 protected:291 292 /** Returns whether item in the row indicated by the given @a iSourceRow and @a srcParenIdx should be included in the model. */293 virtual bool filterAcceptsRow(int iSourceRow, const QModelIndex &srcParenIdx) const /* override */;294 293 }; 295 294 … … 780 779 781 780 /********************************************************************************************************************************* 782 * Class UIFormEditorView implementation. *783 *********************************************************************************************************************************/784 785 UIFormEditorView::UIFormEditorView(QWidget * /* pParent = 0 */)786 {787 }788 789 int UIFormEditorView::childCount() const790 {791 /* Redirect request to model: */792 AssertPtrReturn(model(), 0);793 return qobject_cast<UIFormEditorModel*>(model())->childCount();794 }795 796 QITableViewRow *UIFormEditorView::childItem(int iIndex) const797 {798 /* Redirect request to model: */799 AssertPtrReturn(model(), 0);800 return qobject_cast<UIFormEditorModel*>(model())->childItem(iIndex);801 }802 803 804 /*********************************************************************************************************************************805 781 * Class UIFormEditorProxyModel implementation. * 806 782 *********************************************************************************************************************************/ … … 824 800 } 825 801 return true; 802 } 803 804 805 /********************************************************************************************************************************* 806 * Class UIFormEditorView implementation. * 807 *********************************************************************************************************************************/ 808 809 UIFormEditorView::UIFormEditorView(QWidget * /* pParent = 0 */) 810 { 811 } 812 813 int UIFormEditorView::childCount() const 814 { 815 /* Redirect request to model: */ 816 AssertPtrReturn(model(), 0); 817 return qobject_cast<UIFormEditorModel*>(model())->childCount(); 818 } 819 820 QITableViewRow *UIFormEditorView::childItem(int iIndex) const 821 { 822 /* Redirect request to model: */ 823 AssertPtrReturn(model(), 0); 824 return qobject_cast<UIFormEditorModel*>(model())->childItem(iIndex); 826 825 } 827 826
Note:
See TracChangeset
for help on using the changeset viewer.