Wireshark 4.7.4
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet_list_header.h
Go to the documentation of this file.
1
9
10#ifndef UI_QT_WIDGETS_PACKET_LIST_HEADER_H_
11#define UI_QT_WIDGETS_PACKET_LIST_HEADER_H_
12
13#include <epan/cfile.h>
14
15#include <QDrag>
16#include <QMenu>
17
19
20class QEvent;
21
26{
27 Q_OBJECT
28
29public:
35 PacketListHeader(Qt::Orientation orientation, QWidget *parent = nullptr);
36
41 void showContextMenuAt(QContextMenuEvent *event);
42
48 void forwardMousePressEvent(QMouseEvent *event);
49 void forwardMouseMoveEvent(QMouseEvent *event);
50 void forwardMouseReleaseEvent(QMouseEvent *event);
51
52protected:
57 virtual void dropEvent(QDropEvent *event) override;
58
63 virtual void dragEnterEvent(QDragEnterEvent *event) override;
64
69 virtual void dragMoveEvent(QDragMoveEvent *event) override;
70
75 virtual void mouseMoveEvent(QMouseEvent *e) override;
76
81 virtual void mousePressEvent(QMouseEvent *e) override;
82
87 virtual void contextMenuEvent(QContextMenuEvent *event) override;
88
89protected slots:
94
99 void setAlignment(QAction *action);
100
105 void setDisplayFormat(QAction *action);
106
110 void showColumnPrefs();
111
115 void doEditColumn();
116
120 void resizeToContent();
121
125 void removeColumn();
126
130 void resizeToWidth();
131
132 // Freezes all columns up to and including the context-menu column.
133 void doFreezeColumnsToHere();
134
135 // Clears the frozen-column boundary.
136 void doUnfreezeColumns();
137
138signals:
143 void resetColumnWidth(int col);
144
149 void updatePackets(bool redraw);
150
155 void showColumnPreferences(QString pane_name);
156
161 void editColumn(int column);
162
167
173 void freezeColumnsToHere(int logicalIndex);
174
175 // Signal emitted to clear the frozen-column boundary.
176 void unfreezeColumns();
177
178public:
184 void setFrozenColumnCount(int frozen_column_count);
185
186private:
187 int sectionIdx;
188 int frozen_column_count_;
189};
190
191#endif
AdaptiveHeaderView(Qt::Orientation orientation, QWidget *parent=nullptr)
Constructs an AdaptiveHeaderView.
Definition adaptive_header_view.cpp:19
virtual void mousePressEvent(QMouseEvent *e) override
Handles mouse press events.
Definition packet_list_header.cpp:118
void setDisplayFormat(QAction *action)
Sets the display format for a column.
Definition packet_list_header.cpp:348
void editColumn(int column)
Signal emitted to edit a specific column.
virtual void contextMenuEvent(QContextMenuEvent *event) override
Handles context menu events.
Definition packet_list_header.cpp:175
virtual void dragMoveEvent(QDragMoveEvent *event) override
Handles drag move events.
Definition packet_list_header.cpp:64
void resizeToWidth()
Prompts to resize the column to a specific width.
Definition packet_list_header.cpp:400
void setFrozenColumnCount(int frozen_column_count)
Updates the checked/enabled state of the "freeze columns" menu item the next time the context menu op...
Definition packet_list_header.cpp:439
void updatePackets(bool redraw)
Signal emitted to update the packet list.
void freezeColumnsToHere(int logicalIndex)
Signal emitted to freeze the leftmost columns up to and including logicalIndex.
void resetColumnWidth(int col)
Signal emitted to reset a column's width.
void showColumnPreferences(QString pane_name)
Signal emitted to show column preferences.
void setAlignment(QAction *action)
Sets the alignment of a column.
Definition packet_list_header.cpp:311
void removeColumn()
Removes the selected column.
Definition packet_list_header.cpp:381
void showColumnPrefs()
Shows the column preferences dialog.
Definition packet_list_header.cpp:329
void columnsChanged()
Signal emitted when the columns configuration has changed.
virtual void dragEnterEvent(QDragEnterEvent *event) override
Handles drag enter events.
Definition packet_list_header.cpp:45
PacketListHeader(Qt::Orientation orientation, QWidget *parent=nullptr)
Constructs a PacketListHeader.
Definition packet_list_header.cpp:34
void resizeToContent()
Resizes the column to fit its contents.
Definition packet_list_header.cpp:365
virtual void mouseMoveEvent(QMouseEvent *e) override
Handles mouse move events.
Definition packet_list_header.cpp:131
virtual void dropEvent(QDropEvent *event) override
Handles drop events.
Definition packet_list_header.cpp:83
void showContextMenuAt(QContextMenuEvent *event)
Public entry point used by PacketList to forward a context menu request that originated on the pinned...
Definition packet_list_header.cpp:155
void columnVisibilityTriggered()
Slot triggered to toggle column visibility.
Definition packet_list_header.cpp:284
void forwardMousePressEvent(QMouseEvent *event)
Public entry points used by PacketList to forward mouse events (used for interactive column resize) t...
Definition packet_list_header.cpp:160
void doEditColumn()
Initiates editing of the selected column.
Definition packet_list_header.cpp:334