10#ifndef WIRESHARK_PREFERENCE_H
11#define WIRESHARK_PREFERENCE_H
15#include <QStyleOptionViewItem>
43 virtual QWidget *
editor(QWidget *parent,
const QStyleOptionViewItem &option,
44 const QModelIndex &index);
52 virtual void setData(QWidget *
editor,
const QModelIndex &index);
61 const QModelIndex &index);
A single node in the PrefsModel tree.
Definition pref_models.h:136
Base class for preference editor delegates used in the preferences tree view.
Definition wireshark_preference.h:27
virtual QWidget * editor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index)
Creates and returns an editor widget for the preference at index.
Definition wireshark_preference.cpp:30
PrefsItem * prefsItem() const
Returns the PrefsItem associated with this preference editor.
Definition wireshark_preference.cpp:43
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index)
Writes the editor's current value back to the model.
Definition wireshark_preference.cpp:36
virtual void setData(QWidget *editor, const QModelIndex &index)
Populates the editor widget with the current preference value from the model at index.
Definition wireshark_preference.cpp:35
void setPrefsItem(PrefsItem *item)
Associates a PrefsItem with this preference editor.
Definition wireshark_preference.cpp:38