![]() |
Code Documentation 3.5
Social Network Visualizer
|
Table model that caches edge data for the current relation from Graph and writes back via the Graph API. More...
#include <widgets/edgetablemodel.h>


Classes | |
| struct | EdgeRow |
Public Member Functions | |
| EdgeTableModel (QObject *parent=nullptr) | |
| void | populate (Graph *graph) |
Rebuilds the internal cache from graph (current relation only). | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
Private Attributes | |
| Graph * | m_graph = nullptr |
| QList< EdgeRow > | m_rows |
| QStringList | m_attrKeys |
Static Private Attributes | |
| static constexpr int | FIXED_COLS = 6 |
| static constexpr int | COL_SOURCE = 0 |
| static constexpr int | COL_TARGET = 1 |
| static constexpr int | COL_RELATION = 2 |
| static constexpr int | COL_WEIGHT = 3 |
| static constexpr int | COL_LABEL = 4 |
| static constexpr int | COL_COLOR = 5 |
Table model that caches edge data for the current relation from Graph and writes back via the Graph API.
Fixed columns: Source, Target, Relation, Weight, Label, Color. Dynamic columns: one per custom attribute key reported by the graph.
|
explicit |
|
override |
|
override |
|
override |
|
override |
| void EdgeTableModel::populate | ( | Graph * | graph | ) |
Rebuilds the internal cache from graph (current relation only).
Rebuilds the internal row cache from the current relation of graph.
Calls beginResetModel() / endResetModel() so connected views repaint.
Only enabled edges belonging to the current relation are included. Custom attribute keys are taken from Graph::graphHasEdgeCustomAttributes().
|
override |
|
override |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
private |
|
private |
|
private |