| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
resolved_addresses_view.h
Go to the documentation of this file.
1
9
10#ifndef RESOLVED_ADDRESSES_VIEW_H
11#define RESOLVED_ADDRESSES_VIEW_H
12
13#include <ui/qt/models/resolved_addresses_models.h>
14
15#include <QTableView>
16#include <QMenu>
17
23 class ResolvedAddressesView : public QTableView
24{
25 Q_OBJECT
26
27 public:
31 typedef enum {
32 EXPORT_TEXT,
33 EXPORT_CSV,
34 EXPORT_JSON
35 } eResolvedAddressesExport;
36
41 ResolvedAddressesView(QWidget *parent = nullptr);
42
50 QMenu *createCopyMenu(bool selected = false, QWidget *parent = nullptr);
51
52 public slots:
57 void saveAs();
58
59 protected:
64 void contextMenuEvent(QContextMenuEvent *e) override;
65
66 private:
67 QAction *clip_action_;
68
73 AStringListListModel *dataModel() const;
74
80 void copyToClipboard(eResolvedAddressesExport format, bool selected);
81
82 private slots:
87 void clipboardAction();
88
95 void toTextStream(QTextStream &stream, eResolvedAddressesExport format, bool selected = false) const;
96};
97
98#endif // RESOLVED_ADDRESSES_VIEW_H
AStringListListModel
A table model backed by a list of string lists.
Definition astringlist_list_model.h:28
ResolvedAddressesView::saveAs
void saveAs()
Opens a file-save dialog and writes the full address table to a user-chosen file in the selected expo...
Definition resolved_addresses_view.cpp:132
ResolvedAddressesView::eResolvedAddressesExport
eResolvedAddressesExport
Output format used when exporting or copying resolved address data.
Definition resolved_addresses_view.h:31
ResolvedAddressesView::EXPORT_CSV
@ EXPORT_CSV
Definition resolved_addresses_view.h:33
ResolvedAddressesView::EXPORT_TEXT
@ EXPORT_TEXT
Definition resolved_addresses_view.h:32
ResolvedAddressesView::EXPORT_JSON
@ EXPORT_JSON
Definition resolved_addresses_view.h:34
ResolvedAddressesView::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *e) override
Presents a context menu with copy and save options at the cursor position.
Definition resolved_addresses_view.cpp:80
ResolvedAddressesView::createCopyMenu
QMenu * createCopyMenu(bool selected=false, QWidget *parent=nullptr)
Creates and returns a "Copy" submenu populated with format actions.
Definition resolved_addresses_view.cpp:53
ResolvedAddressesView::ResolvedAddressesView
ResolvedAddressesView(QWidget *parent=nullptr)
Constructs a ResolvedAddressesView.
Definition resolved_addresses_view.cpp:30
resolved_addresses_models.h
stream
Definition stream.c:41