MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / paintEvent

Method paintEvent

src/WizSearchWidget.cpp:110–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void WizSearchEdit::paintEvent(QPaintEvent* event)
111{
112 QLineEdit::paintEvent(event);
113
114 QPainter pt(this);
115 QSize szIcon = m_searchIcon.size();
116 WizScaleIconSizeForRetina(szIcon);
117 QRect rcIcon(QPoint(4, (height() - szIcon.height()) / 2 + 1),
118 szIcon);
119 pt.drawPixmap(rcIcon, m_searchIcon);
120
121 if (!text().isEmpty())
122 {
123 szIcon = m_deleteIcon.size();
124 WizScaleIconSizeForRetina(szIcon);
125 rcIcon = QRect(QPoint(width() - szIcon.width() - 4, (height() - szIcon.height()) / 2),
126 szIcon);
127 pt.drawPixmap(rcIcon, m_deleteIcon);
128 }
129}
130
131void WizSearchEdit::mousePressEvent(QMouseEvent* event)
132{

Callers

nothing calls this directly

Calls 6

sizeMethod · 0.80
heightMethod · 0.80
isEmptyMethod · 0.80
widthMethod · 0.80
QRectClass · 0.50

Tested by

no test coverage detected