Code Search for Developers
 
 
  

CPropertyInfoModel.h from osgDesigner at Krugle


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

osgDesigner

osgDesigner is a graphical tool used to modify an OpenSceneGraph (OSG) scene using the osgIntrospection framework. OpenSceneGraph developpers will be able to extend osgDesigner at need using (editor | render | osgIntrospection wrapper) plugin system.

Project homepage: http://sourceforge.net/projects/osgdesigner
Programming language(s): C++,Shell Script
License: other

  CConfig.h
  CFileMenu.h
  CMainWindow.h
  CPropertiesModel.h
  CPropertiesView.h
  CPropertiesWidget.h
  CPropertyInfoModel.h
  CSceneGraphEditMenu.h
  CSceneGraphModel.h
  CSceneGraphView.h
  CSceneGraphWidget.h
  CTypeModel.h
  CTypeWidget.h
  CValueMimeData.h
  CValueModel.h
  CValueView.h
  Export.h
  FlagsConstructorDialog.h
  FlowLayout.h
  IEditorWidgetABC.h
  IListModel.h
  ITreeModel.h
  MACRO.h
  PluginManagerDialog.h
  SConfigManager.h
  SWorkSpace.h