blob: 4e70e82848f94fe5e06cb323946f3869b7478416 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/** @file
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef UI_QT_WIDGETS_PACKET_LIST_HEADER_H_
#define UI_QT_WIDGETS_PACKET_LIST_HEADER_H_
#include <cfile.h>
#include <QHeaderView>
#include <QDrag>
#include <QMenu>
class QEvent;
class PacketListHeader : public QHeaderView
{
Q_OBJECT
public:
PacketListHeader(Qt::Orientation orientation, QWidget *parent = nullptr);
protected:
virtual void dropEvent(QDropEvent *event) override;
virtual void dragEnterEvent(QDragEnterEvent *event) override;
virtual void dragMoveEvent(QDragMoveEvent *event) override;
virtual void mouseMoveEvent(QMouseEvent *e) override;
virtual void mousePressEvent(QMouseEvent *e) override;
virtual void contextMenuEvent(QContextMenuEvent *event) override;
protected slots:
void columnVisibilityTriggered();
void setAlignment(QAction *);
void showColumnPrefs();
void doEditColumn();
void doResolveNames();
void resizeToContent();
void removeColumn();
void resizeToWidth();
signals:
void resetColumnWidth(int col);
void updatePackets(bool redraw);
void showColumnPreferences(QString pane_name);
void editColumn(int column);
void columnsChanged();
private:
int sectionIdx;
};
#endif
|