aboutsummaryrefslogtreecommitdiffstats
path: root/src/threadlistmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/threadlistmodel.h')
-rw-r--r--src/threadlistmodel.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/threadlistmodel.h b/src/threadlistmodel.h
index eb1a7ff..01fd241 100644
--- a/src/threadlistmodel.h
+++ b/src/threadlistmodel.h
@@ -19,6 +19,7 @@
#pragma once
#include <QAbstractTableModel>
+#include <QColor>
#include <QVector>
#include "types.h"
@@ -29,11 +30,14 @@ class ThreadListModel : public QAbstractTableModel
{
Q_OBJECT
public:
+ /// Subject stretches to fill the view, so it must come last: anything
+ /// after it is pushed out of sight. Tags leads, being the column that
+ /// changes when the user acts on a thread.
enum Column {
- DateColumn = 0,
+ TagsColumn = 0,
+ DateColumn,
AuthorsColumn,
SubjectColumn,
- TagsColumn,
ColumnCount,
};
@@ -44,6 +48,13 @@ public:
ThreadIdRole = Qt::UserRole + 1,
};
+ /// Row fill for a thread tagged `deleted`, and for one tagged `spam`.
+ /// Muted rather than saturated: a bulk delete paints every selected row,
+ /// and a wall of pure red is harder to read than the list it replaces.
+ /// Exposed so a test names the same colour the model uses.
+ static QColor deletedColour();
+ static QColor spamColour();
+
explicit ThreadListModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = {}) const override;