+ case Qt::BackgroundRole:
+ if(index.data(NetworkModel::UserAwayRole).toBool()) {
+ QLinearGradient gradient(0, 0, 0, 18);
+ gradient.setColorAt(0.4, QApplication::palette().color(QPalette::Normal, QPalette::Base));
+ gradient.setColorAt(0.5, QApplication::palette().color(QPalette::Disabled, QPalette::Base));
+ gradient.setColorAt(0.6, QApplication::palette().color(QPalette::Normal, QPalette::Base));
+ return QBrush(gradient);
+ }
+ // else: fallthrough to default
+ default: