Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
profile_tree_view.h
Go to the documentation of this file.
1
10#ifndef PROFILE_TREEVIEW_H
11#define PROFILE_TREEVIEW_H
12
14
15#include <QTreeView>
16#include <QItemDelegate>
17
18class ProfileTreeEditDelegate : public QItemDelegate
19{
20 Q_OBJECT
21public:
22 ProfileTreeEditDelegate(QWidget *parent = Q_NULLPTR);
23
24 // QAbstractItemDelegate interface
25 QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
26 virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
27
28private:
29 QWidget * editor_;
30 QModelIndex index_;
31};
32
33class ProfileTreeView : public QTreeView
34{
35 Q_OBJECT
36public:
37 ProfileTreeView(QWidget *parent = nullptr);
39
40 void selectRow(int row);
41 bool activeEdit();
42
43signals:
44 void itemUpdated();
45
46 // QWidget interface
47protected:
48 virtual void showEvent(QShowEvent *);
49 virtual void mouseDoubleClickEvent(QMouseEvent *event);
50
51 // QAbstractItemView interface
52protected slots:
53 virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
54
55private:
56 ProfileTreeEditDelegate *delegate_;
57
58};
59
60#endif
Definition profile_tree_view.h:19
Definition profile_tree_view.h:34