| 92 | } |
| 93 | |
| 94 | Qt::ItemFlags QmitkMAPAlgorithmModel::flags(const QModelIndex &index) const |
| 95 | { |
| 96 | Qt::ItemFlags flags = QAbstractItemModel::flags(index); |
| 97 | |
| 98 | if (index.row() < static_cast<int>(m_MetaProperties.size())) |
| 99 | { |
| 100 | map::algorithm::MetaPropertyInfo *pInfo = m_MetaProperties[index.row()]; |
| 101 | if (index.column() == 1) |
| 102 | { |
| 103 | if (index.data(Qt::EditRole).isValid() && pInfo->isWritable()) |
| 104 | { |
| 105 | flags |= Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable; |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | return flags; |
| 111 | } |
| 112 | |
| 113 | QVariant QmitkMAPAlgorithmModel::headerData(int section, Qt::Orientation orientation, int role) const |
| 114 | { |