MCPcopy Create free account
hub / github.com/KDE/falkon / containsRemoveIcon

Method containsRemoveIcon

src/plugins/GreaseMonkey/settings/gm_settingslistwidget.cpp:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool GM_SettingsListWidget::containsRemoveIcon(const QPoint &pos) const
57{
58 QListWidgetItem* item = itemAt(pos);
59 if (!item) {
60 return false;
61 }
62
63 const QRect rect = visualItemRect(item);
64 const int removeIconPosition = rect.right() - m_delegate->padding() - 16;
65 const int center = rect.height() / 2 + rect.top();
66 const int removeIconYPos = center - (16 / 2);
67
68 QRect removeIconRect(removeIconPosition, removeIconYPos, 16, 16);
69
70 return removeIconRect.contains(pos);
71}
72
73bool GM_SettingsListWidget::containsUpdateIcon(const QPoint &pos) const
74{

Callers

nothing calls this directly

Calls 3

paddingMethod · 0.80
heightMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected