39 #include <QAbstractTableModel>
45 #include <QItemSelection>
55 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
56 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
57 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
58 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
62 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
63 bool setData(
const QModelIndex& ,
const QVariant& value,
int role)
override;
64 void setEnabled(
const QItemSelection& selection,
bool value);
65 void setEnabled(
const QModelIndexList& indexes,
bool value);
71 LinkPairMap::iterator item(
const QModelIndex& index);
72 LinkPairMap::const_iterator item(
const QModelIndex& index)
const
79 const std::vector<std::string> std_names;
80 QList<QString> q_names;
81 QList<int> visual_to_index;
int columnCount(const QModelIndex &parent=QModelIndex()) const override
bool setData(const QModelIndex &, const QVariant &value, int role) override
CollisionMatrixModel(LinkPairMap &pairs, const std::vector< std::string > &names, QObject *parent=nullptr)
void setEnabled(const QItemSelection &selection, bool value)
DisabledReason reason(const QModelIndex &index) const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Qt::ItemFlags flags(const QModelIndex &index) const override
void setFilterRegExp(const QString &filter)
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
DisabledReason
Reasons for disabling link pairs. Append "in collision" for understanding. NOT_DISABLED means the lin...
std::map< std::pair< std::string, std::string >, LinkPairData > LinkPairMap
LinkPairMap is an adjacency list structure containing links in string-based form. Used for disabled l...