Emergency 2017 Dokumentation  v3.0.1
em5::editor::FireMaterialsModel Class Reference

Fire materials Qt model. More...

#include <FireMaterialsModel.h>

Public Types

enum  IndexType { INDEXTYPE_FIREMATERIAL = qsf::editor::BaseModel::IndexType::INDEXTYPE_EXTEND }
 
- Public Types inherited from qsf::editor::BaseModel
enum  IndexType {
  INDEXTYPE_UNDEFINED, INDEXTYPE_ENTITY, INDEXTYPE_COMPONENT, INDEXTYPE_PROPERTY,
  INDEXTYPE_LAYER, INDEXTYPE_EXTEND
}
 

Public Member Functions

 FireMaterialsModel (QObject *parent, FireSystem &fireSystem)
 Constructor. More...
 
virtual ~FireMaterialsModel ()
 Destructor. More...
 
void enableEditing (bool enabled)
 Enable/disable editing of all items in the model. More...
 
void refresh ()
 Let the model refresh the hold data from the data source. More...
 
virtual QModelIndex parent (const QModelIndex &child) const override
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
virtual bool hasChildren (const QModelIndex &parent=QModelIndex()) const override
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const override
 
- Public Member Functions inherited from qsf::editor::BaseModel
 BaseModel (QObject *parent)
 Constructor. More...
 
virtual ~BaseModel ()
 Destructor deletes the allocated memory. More...
 
IndexDatagetIndexDataByQModelIndex (const QModelIndex &qModelIndex) const
 
TreeItem< IndexData > * getTreeItemByQModelIndex (const QModelIndex &qModelIndex) const
 
IndexDatagetIndexDataByObjectPropertyIndex (const Object &object, uint32 propertyIndex) const
 
TreeItem< IndexData > * getTreeItemByObjectPropertyIndex (const Object &object, uint32 propertyIndex) const
 
IndexDatagetIndexDataByEntityId (uint64 entityId) const
 
TreeItem< IndexData > * getTreeItemByEntityId (uint64 entityId) const
 
IndexDatagetIndexDataByLayerId (uint64 layerId) const
 
TreeItem< IndexData > * getTreeItemByLayerId (uint64 layerId) const
 
IndexDatagetIndexDataByEntityComponentId (uint64 entityId, uint32 componentId) const
 
TreeItem< IndexData > * getTreeItemByEntityComponentId (uint64 entityId, uint32 componentId) const
 
ObjectgetObjectFromBaseModelIndex (const QModelIndex &qModelIndex) const
 Return the data from the given Qt model index. More...
 
const camp::Property * getPropertyFromObjectModelIndex (const QModelIndex &qModelIndex) const
 Return the CAMP property from the given Qt model index. More...
 
QModelIndex getIndexForTreeItem (TreeItem< IndexData > *treeItem) const
 Return the Qt model index for the given tree item. More...
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent) const override
 

Additional Inherited Members

- Protected Member Functions inherited from qsf::editor::BaseModel
TreeItem< IndexData > & getRootTreeItem () const
 
void removeTreeItem (TreeItem< IndexData > &parentTreeItem, int row)
 
TreeItem< IndexData > * insertTreeItem (TreeItem< IndexData > &parentTreeItem, int row)
 
void moveTreeItem (TreeItem< IndexData > &sourceParentItem, int sourceRow, TreeItem< IndexData > &destinationParentItem, int destinationRow)
 
bool isInsertingNewTreeItemPossible (TreeItem< IndexData > &parentTreeItem)
 
- Protected Attributes inherited from qsf::editor::BaseModel
TreeItem< IndexData > * mRootTreeItem
 Root tree item, always valid, we're responsible for destroying the instance in case we no longer need it. More...
 

Detailed Description

Fire materials Qt model.

Todo:
  • TODO(co) Implement me

Definition at line 44 of file FireMaterialsModel.h.

Member Enumeration Documentation

Enumerator
INDEXTYPE_FIREMATERIAL 

TODO(co) Editor: Revision: 5306 "qsf editor: add fire material type in base model": There's no EMERGENCY 5 fire material in QSF. That's an EMERGENCY 5 special thingy. Please try to keep this EMERGENCY 5 editor local.

Definition at line 59 of file FireMaterialsModel.h.

Constructor & Destructor Documentation

em5::editor::FireMaterialsModel::FireMaterialsModel ( QObject *  parent,
FireSystem fireSystem 
)

Constructor.

Parameters
[in]parentOptional parent, can be a null pointer, in case there's a parent it will take over the (memory) control of this model
virtual em5::editor::FireMaterialsModel::~FireMaterialsModel ( )
virtual

Destructor.

Member Function Documentation

virtual int em5::editor::FireMaterialsModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
overridevirtual

Reimplemented from qsf::editor::BaseModel.

virtual QVariant em5::editor::FireMaterialsModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
overridevirtual
void em5::editor::FireMaterialsModel::enableEditing ( bool  enabled)

Enable/disable editing of all items in the model.

virtual Qt::ItemFlags em5::editor::FireMaterialsModel::flags ( const QModelIndex &  index) const
overridevirtual
virtual bool em5::editor::FireMaterialsModel::hasChildren ( const QModelIndex &  parent = QModelIndex()) const
overridevirtual
virtual QVariant em5::editor::FireMaterialsModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
overridevirtual
virtual QModelIndex em5::editor::FireMaterialsModel::parent ( const QModelIndex &  child) const
overridevirtual

Reimplemented from qsf::editor::BaseModel.

void em5::editor::FireMaterialsModel::refresh ( )

Let the model refresh the hold data from the data source.

virtual int em5::editor::FireMaterialsModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
overridevirtual

Reimplemented from qsf::editor::BaseModel.

virtual bool em5::editor::FireMaterialsModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
overridevirtual

The documentation for this class was generated from the following file: