Show CPropertyInfoModel.h syntax highlighted
#ifndef __CPROPERTYINFOMODEL_H__
#define __CPROPERTYINFOMODEL_H__ 1
#include <osgIntrospectionToolKit/signalslib.hpp>
#include <QtCore/QAbstractItemModel>
#include <QtCore/QStringList>
#include <osgIntrospectionToolKit/STypeGraph.h>
#include <osgIntrospection/PropertyInfo>
namespace osgDesigner
{
class CPropertyInfoModel: public QAbstractItemModel
{
Q_OBJECT
public:
enum Column
{
eTypeColumn = 0,
eNameColumn,
eCanGet,
eCanSet,
eCanCount,
eCanAdd,
eCanInsert,
eCanRemove,
eNbColumn
};
CPropertyInfoModel();
virtual ~CPropertyInfoModel();
virtual QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
virtual QModelIndex parent(const QModelIndex& index) const;
virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
virtual Qt::ItemFlags flags(const QModelIndex& index ) const;
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole ) const;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
void type(const osgIntrospection::Type* type)
{ _type = type; _pil.clear(); _type->getAllProperties(_pil); emit reset();}
private:
inline int getIndexInfo(const QModelIndex& index) const
{ return (index.internalId()); }
const osgIntrospection::Type* _type;
osgIntrospection::PropertyInfoList _pil;
};
}
#endif // ** __CPROPERTYINFOMODEL_H__ ** //
See more files for this project here