MCPcopy Create free account
hub / github.com/KDE/kdevelop / updateItemWidgets

Function updateItemWidgets

kdevplatform/shell/loadedpluginsdialog.cpp:200–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 }
199
200 void updateItemWidgets(const QList<QWidget*>& widgets, const QStyleOptionViewItem& option,
201 const QPersistentModelIndex& index) const override
202 {
203 Q_UNUSED(index);
204 if (widgets.isEmpty()) {
205 return;
206 }
207
208 auto *aboutPushButton = static_cast<QPushButton*>(widgets[0]);
209 QSize aboutPushButtonSizeHint = aboutPushButton->sizeHint();
210 aboutPushButton->resize(aboutPushButtonSizeHint);
211 aboutPushButton->move(dependantLayoutValue(option.rect.width() - MARGIN - aboutPushButtonSizeHint.width(), aboutPushButtonSizeHint.width(), option.rect.width()), option.rect.height() / 2 - aboutPushButtonSizeHint.height() / 2);
212 }
213
214 int dependantLayoutValue(int value, int width, int totalWidth) const
215 {

Callers

nothing calls this directly

Calls 4

dependantLayoutValueFunction · 0.85
isEmptyMethod · 0.45
sizeHintMethod · 0.45
moveMethod · 0.45

Tested by

no test coverage detected