-QVariant NickViewFilter::data(const QModelIndex &index, int role) const {
- if(role == Qt::ForegroundRole)
- return foreground(index);
- else
- return QSortFilterProxyModel::data(index, role);
-}
-
-QVariant NickViewFilter::foreground(const QModelIndex &index) const {
- UiSettings s("QtUi/Colors");
- QVariant onlineStatusFG = s.value("onlineStatusFG", QVariant(QColor(Qt::black)));
- QVariant awayStatusFG = s.value("awayStatusFG", QVariant(QColor(Qt::gray)));
+bool NickViewFilter::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const {
+ // root node, networkindexes, the bufferindex of the buffer this filter is active for and it's childs are accepted
+ if(!source_parent.isValid())
+ return true;