Changeset View
Changeset View
Standalone View
Standalone View
lib/hud/hudbutton.cpp
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Line(s) | 180 | { | |||
---|---|---|---|---|---|
182 | update(); | 182 | update(); | ||
183 | } | 183 | } | ||
184 | 184 | | |||
185 | void HudButton::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) | 185 | void HudButton::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) | ||
186 | { | 186 | { | ||
187 | d->mIsDown = false; | 187 | d->mIsDown = false; | ||
188 | update(); | 188 | update(); | ||
189 | if (boundingRect().contains(event->pos())) { | 189 | if (boundingRect().contains(event->pos())) { | ||
190 | clicked(); | 190 | emit clicked(); | ||
191 | } | 191 | } | ||
192 | } | 192 | } | ||
193 | 193 | | |||
194 | void HudButton::setDefaultAction(QAction* action) | 194 | void HudButton::setDefaultAction(QAction* action) | ||
195 | { | 195 | { | ||
196 | if (action != d->mAction) { | 196 | if (action != d->mAction) { | ||
197 | d->mAction = action; | 197 | d->mAction = action; | ||
198 | if (!actions().contains(action)) { | 198 | if (!actions().contains(action)) { | ||
Show All 17 Lines |