| 133 | }; |
| 134 | |
| 135 | Qt::ItemFlags flags(const QModelIndex &index) const override |
| 136 | { |
| 137 | if(!index.isValid()) |
| 138 | return 0; |
| 139 | |
| 140 | Qt::ItemFlags ret = QAbstractItemModel::flags(index); |
| 141 | |
| 142 | if(index.column() == Column_Value) |
| 143 | { |
| 144 | SDObject *o = obj(index); |
| 145 | SDObject *value = o->FindChild("value"); |
| 146 | |
| 147 | if(value) |
| 148 | { |
| 149 | ret |= Qt::ItemIsEditable; |
| 150 | if(value->type.basetype == SDBasic::Boolean) |
| 151 | ret |= Qt::ItemIsUserCheckable; |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | return ret; |
| 156 | } |
| 157 | |
| 158 | int columnCount(const QModelIndex &parent = QModelIndex()) const override { return Column_Count; } |
| 159 | QVariant headerData(int section, Qt::Orientation orientation, int role) const override |
no test coverage detected