75 template <
typename List>
76 static void moveListRows(List &list,
int sourceStart,
int sourceEnd,
int destinationRow)
78 for (
int i = 0; i <= sourceEnd - sourceStart; i++) {
79 if (destinationRow < sourceStart) {
81 list.move(sourceStart + i, destinationRow + i);
85 list.move(sourceStart, destinationRow - 1);
93 void onThemeChanged();
94 void colorRowsReset();
95 void colorRowsInserted(
const QModelIndex &parent,
int first,
int last);
96 void colorRowsRemoved(
const QModelIndex &parent,
int first,
int last);
97 void colorRowsMoved(
const QModelIndex &source,
int sourceStart,
int sourceEnd,
98 const QModelIndex &dest,
int destinationRow);
99 void colorDataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight,
100 const QVector<int> &roles);
104 static constexpr int user_color_ = -1;
106 static constexpr int theme_color_role_ = Qt::DecorationRole;
108 const int color_column_;
109 QVector<int> color_indexes_;
Manages a capture file and its associated state and operations.
Definition capture_file.h:27
QColor newGraphColor() const
The color for the row about to be appended to uat_model_.
Definition graph_dialog.cpp:37
static void moveListRows(List &list, int sourceStart, int sourceEnd, int destinationRow)
Apply a model rowsMoved signal to a list kept in model row order.
Definition graph_dialog.h:76
GraphDialog(QWidget &parent, CaptureFile &cf, int colorColumn)
Constructs the dialog and follows theme changes.
Definition graph_dialog.cpp:14
QPointer< UatModel > uat_model_
Definition graph_dialog.h:90
void setUatModel(UatModel *model)
Set the uat_model_ and start tracking the rows.
Definition graph_dialog.cpp:22
Table model for representing and managing User Accessible Tables (UAT).
Definition uat_model.h:28
WiresharkDialog(QWidget &parent, CaptureFile &capture_file)
Constructs a new WiresharkDialog object.
Definition wireshark_dialog.cpp:30