MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / paint

Method paint

gui/qt/keypad/rectkey.cpp:37–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void RectKey::paint(QPainter &painter) const {
38 Key::paint(painter);
39 painter.setFont(mLabelFont);
40 painter.setPen(mTextColor);
41 painter.drawText(keyGeometry(), mLabelAlign, mLabelText);
42 if (!mSecondText.isEmpty()) {
43 painter.setPen(mSecondColor);
44 painter.setFont(mSecondFont);
45 painter.drawText(textGeometry(), mSecondAlign, mSecondText);
46 }
47 if (!mAlphaText.isEmpty()) {
48 painter.setPen(mAlphaColor);
49 painter.setFont(mAlphaFont);
50 painter.drawText(textGeometry(), mAlphaAlign, mAlphaText);
51 }
52}
53
54bool RectKey::isUnder(const QPainterPath &area) const {
55 return mKeyShape.intersects(area);

Callers

nothing calls this directly

Calls 1

setFontMethod · 0.45

Tested by

no test coverage detected