| 953 | } |
| 954 | |
| 955 | ProjectBaseItem* ProjectModel::itemFromIndex( const QModelIndex& index ) const |
| 956 | { |
| 957 | if( index.row() >= 0 && index.column() == 0 && index.model() == this ) { |
| 958 | auto* parent = static_cast<ProjectBaseItem*>( index.internalPointer() ); |
| 959 | if( parent ) { |
| 960 | return parent->child( index.row() ); |
| 961 | } |
| 962 | } |
| 963 | return nullptr; |
| 964 | } |
| 965 | |
| 966 | QVariant ProjectModel::data( const QModelIndex& index, int role ) const |
| 967 | { |