MCPcopy Create free account
hub / github.com/KDAB/GammaRay / paint

Method paint

ui/propertyeditor/propertyeditordelegate.cpp:151–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void PropertyEditorDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
152 const QModelIndex &index) const
153{
154 const QVariant value = index.data(Qt::EditRole);
155 if (value.canConvert<QMatrix4x4>()) {
156 paint(painter, option, index, value.value<QMatrix4x4>());
157 } else if (value.typeId() == QMetaType::QTransform) {
158 paint(painter, option, index, value.value<QTransform>());
159 } else if (value.canConvert<QVector2D>()) {
160 paint(painter, option, index, value.value<QVector2D>());
161 } else if (value.canConvert<QVector3D>()) {
162 paint(painter, option, index, value.value<QVector3D>());
163 } else if (value.canConvert<QVector4D>()) {
164 paint(painter, option, index, value.value<QVector4D>());
165 } else if (value.typeId() == QMetaType::QQuaternion) {
166 paint(painter, option, index, value.value<QQuaternion>());
167 } else {
168 QStyledItemDelegate::paint(painter, option, index);
169 }
170}
171
172QSize PropertyEditorDelegate::sizeHint(const QStyleOptionViewItem &option,
173 const QModelIndex &index) const

Callers

nothing calls this directly

Calls 6

pixelMetricMethod · 0.80
saveMethod · 0.80
translateMethod · 0.80
drawLineMethod · 0.80
dataMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected