Changeset View
Changeset View
Standalone View
Standalone View
examples/Gantt/project/projectmodel.h
Show All 22 Lines | |||||
23 | #include <QAbstractItemModel> | 23 | #include <QAbstractItemModel> | ||
24 | 24 | | |||
25 | class ProjectModel : public QAbstractItemModel { | 25 | class ProjectModel : public QAbstractItemModel { | ||
26 | Q_OBJECT | 26 | Q_OBJECT | ||
27 | public: | 27 | public: | ||
28 | explicit ProjectModel( QObject* parent = nullptr ); | 28 | explicit ProjectModel( QObject* parent = nullptr ); | ||
29 | virtual ~ProjectModel(); | 29 | virtual ~ProjectModel(); | ||
30 | 30 | | |||
31 | /*reimp*/ int rowCount( const QModelIndex& idx ) const Q_DECL_OVERRIDE; | 31 | /*reimp*/ int rowCount( const QModelIndex& idx ) const override; | ||
32 | /*reimp*/ int columnCount( const QModelIndex& idx ) const Q_DECL_OVERRIDE; | 32 | /*reimp*/ int columnCount( const QModelIndex& idx ) const override; | ||
33 | 33 | | |||
34 | /*reimp*/ QModelIndex index( int row, int col, const QModelIndex& parent = QModelIndex() ) const Q_DECL_OVERRIDE; | 34 | /*reimp*/ QModelIndex index( int row, int col, const QModelIndex& parent = QModelIndex() ) const override; | ||
35 | /*reimp*/ QModelIndex parent( const QModelIndex& idx ) const Q_DECL_OVERRIDE; | 35 | /*reimp*/ QModelIndex parent( const QModelIndex& idx ) const override; | ||
36 | 36 | | |||
37 | /*reimp*/QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; | 37 | /*reimp*/QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override; | ||
38 | /*reimp*/ QVariant data( const QModelIndex& idx, int role = Qt::DisplayRole ) const Q_DECL_OVERRIDE; | 38 | /*reimp*/ QVariant data( const QModelIndex& idx, int role = Qt::DisplayRole ) const override; | ||
39 | /*reimp*/ bool setData( const QModelIndex& idx, const QVariant& value, | 39 | /*reimp*/ bool setData( const QModelIndex& idx, const QVariant& value, | ||
40 | int role = Qt::DisplayRole ) Q_DECL_OVERRIDE; | 40 | int role = Qt::DisplayRole ) override; | ||
41 | 41 | | |||
42 | /*reimp*/ bool insertRows( int row, int count, const QModelIndex& parent = QModelIndex() ) Q_DECL_OVERRIDE; | 42 | /*reimp*/ bool insertRows( int row, int count, const QModelIndex& parent = QModelIndex() ) override; | ||
43 | 43 | | |||
44 | /*reimp*/ Qt::ItemFlags flags( const QModelIndex& ) const Q_DECL_OVERRIDE; | 44 | /*reimp*/ Qt::ItemFlags flags( const QModelIndex& ) const override; | ||
45 | 45 | | |||
46 | bool load( const QString& filename ); | 46 | bool load( const QString& filename ); | ||
47 | bool save( const QString& filename ); | 47 | bool save( const QString& filename ); | ||
48 | 48 | | |||
49 | private: | 49 | private: | ||
50 | class Node; | 50 | class Node; | ||
51 | 51 | | |||
52 | Node* m_root; | 52 | Node* m_root; | ||
53 | }; | 53 | }; | ||
54 | 54 | | |||
55 | #endif /* PROJECTMODEL_H */ | 55 | #endif /* PROJECTMODEL_H */ | ||
56 | 56 | |