Changeset View
Changeset View
Standalone View
Standalone View
effects/mouseclick/mouseclick.cpp
Context not available. | |||||
89 | 89 | | |||
---|---|---|---|---|---|
90 | void MouseClickEffect::prePaintScreen(ScreenPrePaintData& data, int time) | 90 | void MouseClickEffect::prePaintScreen(ScreenPrePaintData& data, int time) | ||
91 | { | 91 | { | ||
92 | foreach (MouseEvent* click, m_clicks) { | 92 | for (MouseEvent* click : qAsConst(m_clicks)) { | ||
93 | click->m_time += time; | 93 | click->m_time += time; | ||
94 | } | 94 | } | ||
95 | 95 | | |||
Context not available. | |||||
116 | effects->paintScreen(mask, region, data); | 116 | effects->paintScreen(mask, region, data); | ||
117 | 117 | | |||
118 | paintScreenSetup(mask, region, data); | 118 | paintScreenSetup(mask, region, data); | ||
119 | foreach (const MouseEvent* click, m_clicks) { | 119 | for (const MouseEvent* click : qAsConst(m_clicks)) { | ||
120 | for (int i = 0; i < m_ringCount; ++i) { | 120 | for (int i = 0; i < m_ringCount; ++i) { | ||
121 | float alpha = computeAlpha(click, i); | 121 | float alpha = computeAlpha(click, i); | ||
122 | float size = computeRadius(click, i); | 122 | float size = computeRadius(click, i); | ||
Context not available. | |||||
201 | if (m_clicks.size() > 0) { | 201 | if (m_clicks.size() > 0) { | ||
202 | QRegion dirtyRegion; | 202 | QRegion dirtyRegion; | ||
203 | const int radius = m_ringMaxSize + m_lineWidth; | 203 | const int radius = m_ringMaxSize + m_lineWidth; | ||
204 | foreach (MouseEvent* click, m_clicks) { | 204 | for (const MouseEvent* click : qAsConst(m_clicks)) { | ||
205 | dirtyRegion |= QRect(click->m_pos.x() - radius, click->m_pos.y() - radius, 2*radius, 2*radius); | 205 | dirtyRegion |= QRect(click->m_pos.x() - radius, click->m_pos.y() - radius, 2*radius, 2*radius); | ||
206 | if (click->m_frame) { | 206 | if (click->m_frame) { | ||
207 | // we grant the plasma style 32px padding for stuff like shadows... | 207 | // we grant the plasma style 32px padding for stuff like shadows... | ||
Context not available. |