| 394 | } |
| 395 | |
| 396 | Qt::ItemFlags AccountList::flags(const QModelIndex& index) const |
| 397 | { |
| 398 | if (index.row() < 0 || index.row() >= rowCount(index.parent()) || !index.isValid()) { |
| 399 | return Qt::NoItemFlags; |
| 400 | } |
| 401 | |
| 402 | return Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; |
| 403 | } |
| 404 | |
| 405 | bool AccountList::setData(const QModelIndex& idx, const QVariant& value, int role) |
| 406 | { |