| 50 | } |
| 51 | |
| 52 | Qt::ItemFlags CWakeOnLanModel::flags(const QModelIndex &index) const |
| 53 | { |
| 54 | if(!index.isValid()) |
| 55 | return Qt::NoItemFlags; |
| 56 | int r = index.row(); |
| 57 | int c = index.column(); |
| 58 | if(r >= m_Data.size() || c >= (int)ColumeValue::End) |
| 59 | return Qt::NoItemFlags; |
| 60 | Qt::ItemFlags f = QAbstractTableModel::flags(index); |
| 61 | if(1 == c || 2 == c) { |
| 62 | return Qt::ItemIsEditable | f; |
| 63 | } |
| 64 | return f; |
| 65 | } |
| 66 | |
| 67 | QVariant CWakeOnLanModel::data(const QModelIndex &index, int role) const |
| 68 | { |