Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
pref_delegate.h
1 /* pref_delegate.h
2  * Delegates for editing prefereneces.
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10 
11 #ifndef PREF_DELEGATE_H
12 #define PREF_DELEGATE_H
13 
14 #include <config.h>
15 
16 #include <ui/qt/models/pref_models.h>
17 
18 #include <QStyledItemDelegate>
19 #include <QModelIndex>
20 
21 class AdvancedPrefDelegate : public QStyledItemDelegate
22 {
23  Q_OBJECT
24 
25 public:
26  AdvancedPrefDelegate(QObject *parent = 0);
27 
28  QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option,
29  const QModelIndex &index) const;
30  void setEditorData(QWidget *editor, const QModelIndex &index) const;
31  void setModelData(QWidget *editor, QAbstractItemModel *model,
32  const QModelIndex &index) const;
33 
34 private:
35  PrefsItem* indexToPref(const QModelIndex &index) const;
36 };
37 
38 #endif // PREF_DELEGATE_H
39 
40 /*
41  * Editor modelines
42  *
43  * Local Variables:
44  * c-basic-offset: 4
45  * tab-width: 8
46  * indent-tabs-mode: nil
47  * End:
48  *
49  * ex: set shiftwidth=4 tabstop=8 expandtab:
50  * :indentSize=4:tabSize=8:noTabs=true:
51  */
Definition: pref_delegate.h:21
Definition: pref_models.h:22
Definition: pcapng.c:148