37 HEADER_CAN_DISPLAY_STRINGS = Qt::UserRole,
38 HEADER_CAN_DISPLAY_DETAILS,
44 QModelIndex index(
int row,
int column,
45 const QModelIndex & = QModelIndex())
const override;
46 QModelIndex parent(
const QModelIndex &)
const override;
47 int packetNumberToRow(
int packet_num)
const;
48 unsigned recreateVisibleRows();
49 inline void needRecreateVisibleRows() { need_recreate_visible_rows_ = !physical_rows_.isEmpty(); }
52 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
53 int columnCount(
const QModelIndex & = QModelIndex())
const override;
54 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
55 QVariant data(
const QModelIndex &d_index,
int role)
const override;
56 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
58 int appendPacket(frame_data *fdata);
59 frame_data *getRowFdata(QModelIndex idx)
const;
60 frame_data *getRowFdata(
int row)
const;
61 void ensureRowColorized(
int row);
62 int visibleIndexOf(
const frame_data *fdata)
const;
71 void resetColorized();
72 void toggleFrameMark(
const QModelIndexList &indeces);
73 void setDisplayedFrameMark(
bool set);
74 void toggleFrameIgnore(
const QModelIndexList &indeces);
75 void setDisplayedFrameIgnore(
bool set);
76 void toggleFrameRefTime(
const QModelIndex &rt_index);
77 void unsetAllFrameRefTime();
78 void addFrameComment(
const QModelIndexList &indices,
const QByteArray &comment);
79 void setFrameComment(
const QModelIndex &index,
const QByteArray &comment,
unsigned c_number);
80 void deleteFrameComments(
const QModelIndexList &indices);
81 void deleteAllFrameComments();
84 void packetAppended(
capture_file *cap_file, frame_data *fdata, qsizetype row);
87 void bgColorizationProgress(
int first,
int last);
90 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder)
override;
92 void flushVisibleRows();
93 void dissectIdle(
bool reset =
false);
97 QList<QString> col_names_;
98 QVector<PacketListRecord *> physical_rows_;
99 QVector<PacketListRecord *> visible_rows_;
100 QVector<PacketListRecord *> new_visible_rows_;
101 QVector<int> number_to_row_;
102 bool need_recreate_visible_rows_;
104 static int sort_column_;
105 static int sort_column_is_numeric_;
106 static int text_sort_column_;
107 static Qt::SortOrder sort_order_;
110 static double parseNumericColumn(
const QString &val,
bool *ok);
112 static bool stop_flag_;
114 static double exp_comps_;
115 static double comps_;
117 QElapsedTimer *idle_dissection_timer_;
118 int idle_dissection_row_;
120 bool isNumericColumn(
int column);