| 174 | } |
| 175 | |
| 176 | Qt::ItemFlags MacroStepTableModel::flags(const QModelIndex &index) const |
| 177 | { |
| 178 | if (!index.isValid()) |
| 179 | return Qt::NoItemFlags; |
| 180 | |
| 181 | if (index.column() == 0) { |
| 182 | return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable; |
| 183 | } |
| 184 | else if (index.column() == 1 && MacroStep::MessageHasString(macro->getSteps()[index.row()].message)) { |
| 185 | // The second column is only editable if the macro has a string associated with it |
| 186 | return Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable; |
| 187 | } |
| 188 | else { |
| 189 | return Qt::ItemIsEnabled; |
| 190 | } |
| 191 | } |
| 192 |
nothing calls this directly
no outgoing calls
no test coverage detected