11 #ifndef COLORING_RULES_MODEL_H 12 #define COLORING_RULES_MODEL_H 19 #include <ui/qt/models/tree_model_helpers.h> 23 #include <QAbstractTableModel> 24 #include <QSortFilterProxyModel> 47 ColoringRulesModel(QColor defaultForeground, QColor defaultBackground, QObject *parent);
50 enum ColoringRulesColumn {
57 void addColor(
bool disabled, QString filter, QColor foreground, QColor background);
58 bool importColors(QString filename, QString& err);
59 bool exportColors(QString filename, QString& err);
60 bool writeColors(QString& err);
62 Qt::ItemFlags flags(
const QModelIndex &index)
const;
63 QVariant data(
const QModelIndex &index,
int role)
const;
64 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole);
65 QVariant headerData(
int section, Qt::Orientation orientation,
66 int role = Qt::DisplayRole)
const;
67 QModelIndex index(
int row,
int column,
68 const QModelIndex & = QModelIndex())
const;
69 QModelIndex parent(
const QModelIndex &)
const;
72 Qt::DropActions supportedDropActions()
const;
73 QStringList mimeTypes()
const;
74 QMimeData* mimeData(
const QModelIndexList &indexes)
const;
75 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent);
77 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
78 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
80 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
81 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex());
82 bool copyRow(
int dst_row,
int src_row);
86 struct _GSList *createColorFilterList();
90 struct _GSList *conversation_colors_;
92 QColor defaultForeground_;
93 QColor defaultBackground_;
95 QList<int> dragDropRows_;
98 #endif // COLORING_RULES_MODEL_H
Definition: coloring_rules_model.h:26
Definition: tree_model_helpers.h:22
Definition: color_filters.h:29
Definition: coloring_rules_model.h:42