37 HEADER_CAN_DISPLAY_STRINGS = Qt::UserRole,
38 HEADER_CAN_DISPLAY_DETAILS,
44 QModelIndex index(
int row,
int column,
45 const QModelIndex & = QModelIndex())
const;
46 QModelIndex parent(
const QModelIndex &)
const;
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;
53 int columnCount(
const QModelIndex & = QModelIndex())
const;
54 QVariant data(
const QModelIndex &d_index,
int role)
const;
55 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
57 int appendPacket(frame_data *fdata);
58 frame_data *getRowFdata(QModelIndex idx)
const;
59 frame_data *getRowFdata(
int row)
const;
60 void ensureRowColorized(
int row);
61 int visibleIndexOf(
const frame_data *fdata)
const;
70 void resetColorized();
71 void toggleFrameMark(
const QModelIndexList &indeces);
72 void setDisplayedFrameMark(
bool set);
73 void toggleFrameIgnore(
const QModelIndexList &indeces);
74 void setDisplayedFrameIgnore(
bool set);
75 void toggleFrameRefTime(
const QModelIndex &rt_index);
76 void unsetAllFrameRefTime();
77 void addFrameComment(
const QModelIndexList &indices,
const QByteArray &comment);
78 void setFrameComment(
const QModelIndex &index,
const QByteArray &comment,
unsigned c_number);
79 void deleteFrameComments(
const QModelIndexList &indices);
80 void deleteAllFrameComments();
83 void packetAppended(
capture_file *cap_file, frame_data *fdata, qsizetype row);
86 void bgColorizationProgress(
int first,
int last);
89 void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder);
91 void flushVisibleRows();
92 void dissectIdle(
bool reset =
false);
96 QList<QString> col_names_;
97 QVector<PacketListRecord *> physical_rows_;
98 QVector<PacketListRecord *> visible_rows_;
99 QVector<PacketListRecord *> new_visible_rows_;
100 QVector<int> number_to_row_;
101 bool need_recreate_visible_rows_;
103 static int sort_column_;
104 static int sort_column_is_numeric_;
105 static int text_sort_column_;
106 static Qt::SortOrder sort_order_;
109 static double parseNumericColumn(
const QString &val,
bool *ok);
111 static bool stop_flag_;
113 static double exp_comps_;
114 static double comps_;
116 QElapsedTimer *idle_dissection_timer_;
117 int idle_dissection_row_;
119 bool isNumericColumn(
int column);