MCPcopy Create free account
hub / github.com/Robotips/uConfig / updateEditorGeometry

Method updateEditorGeometry

src/kicad/itemmodel/componentpindelegate.cpp:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void ComponentPinDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
102{
103 switch (index.column())
104 {
105 case ComponentPinsItemModel::PinElecType:
106 case ComponentPinsItemModel::PinStyle:
107 {
108 QRect rect = option.rect;
109 if (rect.width() < 150)
110 rect.setWidth(150);
111 editor->setGeometry(rect);
112 break;
113 }
114 default:
115 QItemDelegate::updateEditorGeometry(editor, option, index);
116 }
117}
118
119void ComponentPinDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
120{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected