mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-03 03:36:10 +00:00
CPoiMapModel: Make use of in-class initializers where applicable
This commit is contained in:
parent
51ba13f988
commit
a9292c1b29
@ -4,11 +4,9 @@
|
|||||||
#include <Core/Scene/CSceneIterator.h>
|
#include <Core/Scene/CSceneIterator.h>
|
||||||
#include <Core/ScriptExtra/CPointOfInterestExtra.h>
|
#include <Core/ScriptExtra/CPointOfInterestExtra.h>
|
||||||
|
|
||||||
CPoiMapModel::CPoiMapModel(CWorldEditor *pEditor, QObject *pParent /*= 0*/)
|
CPoiMapModel::CPoiMapModel(CWorldEditor *pEditor, QObject *pParent)
|
||||||
: QAbstractListModel(pParent)
|
: QAbstractListModel(pParent)
|
||||||
, mpEditor(pEditor)
|
, mpEditor(pEditor)
|
||||||
, mpArea(nullptr)
|
|
||||||
, mpPoiToWorld(nullptr)
|
|
||||||
{
|
{
|
||||||
connect(pEditor, SIGNAL(MapChanged(CWorld*,CGameArea*)), this, SLOT(OnMapChange(CWorld*,CGameArea*)));
|
connect(pEditor, SIGNAL(MapChanged(CWorld*,CGameArea*)), this, SLOT(OnMapChange(CWorld*,CGameArea*)));
|
||||||
}
|
}
|
||||||
|
@ -16,16 +16,17 @@ class CPoiMapModel : public QAbstractListModel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
CWorldEditor *mpEditor;
|
CWorldEditor *mpEditor;
|
||||||
CGameArea *mpArea;
|
CGameArea *mpArea = nullptr;
|
||||||
TResPtr<CPoiToWorld> mpPoiToWorld;
|
TResPtr<CPoiToWorld> mpPoiToWorld;
|
||||||
|
|
||||||
QMap<CScriptNode*, QList<CModelNode*>*> mModelMap;
|
QMap<CScriptNode*, QList<CModelNode*>*> mModelMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CPoiMapModel(CWorldEditor *pEditor, QObject *pParent = 0);
|
explicit CPoiMapModel(CWorldEditor *pEditor, QObject *pParent = nullptr);
|
||||||
QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const;
|
|
||||||
int rowCount(const QModelIndex& rkParent) const;
|
QVariant headerData(int Section, Qt::Orientation Orientation, int Role) const override;
|
||||||
QVariant data(const QModelIndex& rkIndex, int Role) const;
|
int rowCount(const QModelIndex& rkParent) const override;
|
||||||
|
QVariant data(const QModelIndex& rkIndex, int Role) const override;
|
||||||
|
|
||||||
void AddPOI(CScriptNode *pPOI);
|
void AddPOI(CScriptNode *pPOI);
|
||||||
void AddMapping(const QModelIndex& rkIndex, CModelNode *pNode);
|
void AddMapping(const QModelIndex& rkIndex, CModelNode *pNode);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user