CResourceDelegate: Make use of override

This commit is contained in:
Lioncash 2020-07-03 12:32:36 -04:00
parent eb76ac9039
commit dd91aded21
1 changed files with 10 additions and 11 deletions

View File

@ -6,26 +6,25 @@
class CResourceBrowserDelegate : public CCustomDelegate class CResourceBrowserDelegate : public CCustomDelegate
{ {
public: public:
static const int skIconSize = 32; static constexpr int skIconSize = 32;
private: private:
bool mDisplayAssetIDs; bool mDisplayAssetIDs = false;
public: public:
CResourceBrowserDelegate(QObject *pParent = 0) explicit CResourceBrowserDelegate(QObject *pParent = nullptr)
: CCustomDelegate(pParent) : CCustomDelegate(pParent)
, mDisplayAssetIDs(false)
{} {}
QSize sizeHint(const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const; QSize sizeHint(const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const override;
void paint(QPainter *pPainter, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const; void paint(QPainter* pPainter, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const override;
QWidget* createEditor(QWidget *pParent, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const; QWidget* createEditor(QWidget* pParent, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const override;
void setEditorData(QWidget *pEditor, const QModelIndex& rkIndex) const; void setEditorData(QWidget* pEditor, const QModelIndex& rkIndex) const override;
void setModelData(QWidget *pEditor, QAbstractItemModel *pModel, const QModelIndex& rkIndex) const; void setModelData(QWidget* pEditor, QAbstractItemModel* pModel, const QModelIndex& rkIndex) const override;
void updateEditorGeometry(QWidget *pEditor, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const; void updateEditorGeometry(QWidget* pEditor, const QStyleOptionViewItem& rkOption, const QModelIndex& rkIndex) const override;
inline void SetDisplayAssetIDs(bool Display) { mDisplayAssetIDs = Display; } void SetDisplayAssetIDs(bool Display) { mDisplayAssetIDs = Display; }
protected: protected:
class CResourceEntry* GetIndexEntry(const QModelIndex& rkIndex) const; class CResourceEntry* GetIndexEntry(const QModelIndex& rkIndex) const;