| 262 | } |
| 263 | |
| 264 | bool |
| 265 | MonitorDataModel::setHeaderData( |
| 266 | int section, |
| 267 | Qt::Orientation /* orientation */, |
| 268 | const QVariant& value, |
| 269 | int role |
| 270 | ) |
| 271 | { |
| 272 | switch( role) { |
| 273 | case Qt::DisplayRole: |
| 274 | this->root_->setData( section, value); |
| 275 | // this->getNode( index)->setColor( section, QColor(255,255,255)); |
| 276 | break; |
| 277 | |
| 278 | case Qt::BackgroundRole: |
| 279 | this->root_->setColor( section, value); |
| 280 | break; |
| 281 | |
| 282 | default: return false; |
| 283 | } |
| 284 | |
| 285 | emit |
| 286 | dataChanged( QModelIndex(), QModelIndex()); |
| 287 | return true; |
| 288 | } |
| 289 | |
| 290 | bool |
| 291 | MonitorDataModel::insertRows( |