Wireshark  4.3.0
The Wireshark network protocol analyzer
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 
19 {
20  Q_OBJECT
21 
22 public:
23  explicit ProfileUrlLinkDelegate(QObject *parent = Q_NULLPTR);
24 
25  virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
26 };
27 
28 class ProfileTreeEditDelegate : public QItemDelegate
29 {
30  Q_OBJECT
31 public:
32  ProfileTreeEditDelegate(QWidget *parent = Q_NULLPTR);
33 
34  // QAbstractItemDelegate interface
35  virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
36 
37 private:
38  QWidget * editor_;
39  QModelIndex index_;
40 };
41 
42 class ProfileTreeView : public QTreeView
43 {
44  Q_OBJECT
45 public:
46  ProfileTreeView(QWidget *parent = nullptr);
47  ~ProfileTreeView();
48 
49  void selectRow(int row);
50  bool activeEdit();
51 
52 signals:
53  void itemUpdated();
54 
55  // QWidget interface
56 protected:
57  virtual void mouseDoubleClickEvent(QMouseEvent *event);
58 
59  // QAbstractItemView interface
60 protected slots:
61  virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
62  virtual void clicked(const QModelIndex &index);
63 
64 private:
65  ProfileTreeEditDelegate *delegate_;
66 
67 };
68 
69 #endif
Definition: profile_tree_view.h:29
Definition: profile_tree_view.h:43