12#ifndef PREF_DELEGATE_H
13#define PREF_DELEGATE_H
19#include <QStyledItemDelegate>
42 QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
43 const QModelIndex &index)
const;
51 void setEditorData(QWidget *editor,
const QModelIndex &index)
const;
60 void setModelData(QWidget *editor, QAbstractItemModel *model,
61 const QModelIndex &index)
const;
70 PrefsItem *indexToPref(
const QModelIndex &index)
const;
Item delegate providing in-place editors for the Advanced Preferences table.
Definition pref_delegate.h:26
void setEditorData(QWidget *editor, const QModelIndex &index) const
Populate the editor with the current preference value.
Definition pref_delegate.cpp:58
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Create an editor widget appropriate for the preference at index.
Definition pref_delegate.cpp:27
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Write the editor's current value back to the model.
Definition pref_delegate.cpp:72
A single node in the PrefsModel tree.
Definition pref_models.h:136