3 * Delegates for editing prefereneces.
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef PREF_DELEGATE_H
13 #define PREF_DELEGATE_H
17 #include <ui/qt/models/pref_models.h>
19 #include <QStyledItemDelegate>
20 #include <QModelIndex>
22 class AdvancedPrefDelegate
: public QStyledItemDelegate
25 AdvancedPrefDelegate(QObject
*parent
= 0);
27 QWidget
*createEditor(QWidget
*parent
, const QStyleOptionViewItem
&option
,
28 const QModelIndex
&index
) const;
29 void setEditorData(QWidget
*editor
, const QModelIndex
&index
) const;
30 void setModelData(QWidget
*editor
, QAbstractItemModel
*model
,
31 const QModelIndex
&index
) const;
34 PrefsItem
* indexToPref(const QModelIndex
&index
) const;
37 #endif // PREF_DELEGATE_H