9#include <QAbstractTableModel>
41 Qt::Orientation orientation,
42 int role = Qt::DisplayRole)
const override;
48 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
54 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
61 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
67 void setConflicts(
const std::vector<ConflictInfo>& newConflicts,
int base_id);
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Returns the horizontal header section names and vertical header section indices.
Definition conflictsmodel.cpp:8
int base_id_
Id of the mod for which the conflicts are displayed.
Definition conflictsmodel.h:73
ConflictsModel(QObject *parent=nullptr)
Constructor.
Definition conflictsmodel.cpp:6
void setConflicts(const std::vector< ConflictInfo > &newConflicts, int base_id)
Updates the data in this model with the new conflicts.
Definition conflictsmodel.cpp:71
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Used to access the data stored in this model.
Definition conflictsmodel.cpp:38
static constexpr int winner_col
Index of the winning mod column.
Definition conflictsmodel.h:29
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns to display.
Definition conflictsmodel.cpp:31
std::vector< ConflictInfo > conflicts_
For every conflict: File, winner name and winner id.
Definition conflictsmodel.h:71
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows to display.
Definition conflictsmodel.cpp:24
static constexpr int file_col
Index of the file path column.
Definition conflictsmodel.h:27
static constexpr int order_col
Index of the overwrite order column.
Definition conflictsmodel.h:31
Contains the ConflictInfo struct.