CSkeletonHierarchyModel: Make use of in-class initializers where applicable

This commit is contained in:
Lioncash 2020-06-28 05:53:52 -04:00
parent c96ed14062
commit ff8033584a
2 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,8 @@
#include "CSkeletonHierarchyModel.h"
#include "Editor/UICommon.h"
CSkeletonHierarchyModel::CSkeletonHierarchyModel(QObject *pParent /*= 0*/)
CSkeletonHierarchyModel::CSkeletonHierarchyModel(QObject *pParent)
: QAbstractItemModel(pParent)
, mpSkeleton(nullptr)
{
}

View File

@ -6,15 +6,16 @@
class CSkeletonHierarchyModel : public QAbstractItemModel
{
CSkeleton *mpSkeleton;
CSkeleton *mpSkeleton = nullptr;
public:
explicit CSkeletonHierarchyModel(QObject *pParent = 0);
QModelIndex index(int Row, int Column, const QModelIndex& rkParent) const;
QModelIndex parent(const QModelIndex& rkChild) const;
int rowCount(const QModelIndex& rkParent) const;
int columnCount(const QModelIndex& rkParent) const;
QVariant data(const QModelIndex& rkIndex, int Role) const;
explicit CSkeletonHierarchyModel(QObject *pParent = nullptr);
QModelIndex index(int Row, int Column, const QModelIndex& rkParent) const override;
QModelIndex parent(const QModelIndex& rkChild) const override;
int rowCount(const QModelIndex& rkParent) const override;
int columnCount(const QModelIndex& rkParent) const override;
QVariant data(const QModelIndex& rkIndex, int Role) const override;
CBone* BoneForIndex(const QModelIndex& rkIndex) const;
QModelIndex IndexForBone(CBone *pBone) const;