20#ifndef LIBREPCB_EDITOR_COMBOBOXDELEGATE_H
21#define LIBREPCB_EDITOR_COMBOBOXDELEGATE_H
52 struct Items final :
public QVector<Item> {
58 QObject* parent =
nullptr) noexcept;
63 QWidget*
createEditor(QWidget* parent, const QStyleOptionViewItem& option,
64 const QModelIndex& index) const override;
65 void setEditorData(QWidget* editor, const QModelIndex& index) const override;
66 void setModelData(QWidget* editor, QAbstractItemModel* model,
67 const QModelIndex& index) const override;
69 const QModelIndex& index) const override;
Subclass of QStyledItemDelegate which uses QComboBox as item editor.
Definition comboboxdelegate.h:42
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition comboboxdelegate.cpp:102
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition comboboxdelegate.cpp:92
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition comboboxdelegate.cpp:63
bool mEditable
Definition comboboxdelegate.h:75
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Definition comboboxdelegate.cpp:80
Definition occmodel.cpp:76
Definition comboboxdelegate.h:47
QString text
Definition comboboxdelegate.h:48
QVariant data
Definition comboboxdelegate.h:50
QIcon icon
Definition comboboxdelegate.h:49
Definition comboboxdelegate.h:52
void sort() noexcept
Definition comboboxdelegate.cpp:39