20#ifndef LIBREPCB_EDITOR_LENGTHDELEGATE_H
21#define LIBREPCB_EDITOR_LENGTHDELEGATE_H
59 const QLocale& locale) const override;
60 QWidget*
createEditor(QWidget* parent, const QStyleOptionViewItem& option,
61 const QModelIndex& index) const override;
62 void setEditorData(QWidget* editor, const QModelIndex& index) const override;
63 void setModelData(QWidget* editor, QAbstractItemModel* model,
64 const QModelIndex& index) const override;
66 const QModelIndex& index) const override;
The LengthUnit class represents a length unit (millimeters, inches,...) and provides some useful meth...
Definition lengthunit.h:60
Subclass of QStyledItemDelegate to display/edit librepcb::Length values.
Definition lengthdelegate.h:45
LengthUnit mUnit
Definition lengthdelegate.h:75
QString displayText(const QVariant &value, const QLocale &locale) const override
Definition lengthdelegate.cpp:60
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition lengthdelegate.cpp:99
void setUnit(const LengthUnit &unit) noexcept
Definition lengthdelegate.cpp:52
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Definition lengthdelegate.cpp:93
void editingFinished() noexcept
Definition lengthdelegate.cpp:110
~LengthDelegate() noexcept
Definition lengthdelegate.cpp:45
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition lengthdelegate.cpp:65
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Definition lengthdelegate.cpp:87
LengthDelegate(const LengthDelegate &other)=delete
Definition occmodel.cpp:76