12 #ifndef COLORING_RULES_MODEL_H
13 #define COLORING_RULES_MODEL_H
24 #include <QAbstractTableModel>
25 #include <QSortFilterProxyModel>
51 ColoringRulesModel(QColor defaultForeground, QColor defaultBackground, QObject *parent);
54 enum ColoringRulesColumn {
61 void addColor(
bool disabled, QString filter, QColor foreground, QColor background);
62 bool importColors(QString filename, QString& err);
63 bool exportColors(QString filename, QString& err);
64 bool writeColors(QString& err);
66 Qt::ItemFlags flags(
const QModelIndex &index)
const;
67 QVariant data(
const QModelIndex &index,
int role)
const;
68 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole);
69 QVariant headerData(
int section, Qt::Orientation orientation,
70 int role = Qt::DisplayRole)
const;
71 QModelIndex index(
int row,
int column,
72 const QModelIndex & = QModelIndex())
const;
73 QModelIndex parent(
const QModelIndex &)
const;
76 Qt::DropActions supportedDropActions()
const;
77 QStringList mimeTypes()
const;
78 QMimeData* mimeData(
const QModelIndexList &indexes)
const;
79 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent);
81 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
82 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
84 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
85 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
86 bool copyRow(
int dst_row,
int src_row);
90 struct _GSList *createColorFilterList();
94 struct _GSList *conversation_colors_;
96 QColor defaultForeground_;
97 QColor defaultBackground_;
99 QList<int> dragDropRows_;
Definition: coloring_rules_model.h:28
Definition: coloring_rules_model.h:47
Definition: tree_model_helpers.h:23
Definition: color_filters.h:31