Changeset View
Changeset View
Standalone View
Standalone View
lib/redeyereduction/redeyereductiontool.cpp
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | |||||
159 | } | 159 | } | ||
160 | 160 | | |||
161 | void RedEyeReductionTool::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) | 161 | void RedEyeReductionTool::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) | ||
162 | { | 162 | { | ||
163 | // Just prevent the event from reaching the image view | 163 | // Just prevent the event from reaching the image view | ||
164 | event->accept(); | 164 | event->accept(); | ||
165 | } | 165 | } | ||
166 | 166 | | |||
167 | void RedEyeReductionTool::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) | ||||
168 | { | ||||
169 | if (event->buttons() != Qt::LeftButton) { | ||||
170 | event->ignore(); | ||||
171 | return; | ||||
172 | } | ||||
173 | event->accept(); | ||||
174 | d->mToolWidget->dialogButtonBox->accepted(); | ||||
175 | } | ||||
176 | | ||||
167 | void RedEyeReductionTool::keyPressEvent(QKeyEvent* event) | 177 | void RedEyeReductionTool::keyPressEvent(QKeyEvent* event) | ||
168 | { | 178 | { | ||
169 | QDialogButtonBox *buttons = d->mToolWidget->findChild<QDialogButtonBox *>(); | 179 | QDialogButtonBox *buttons = d->mToolWidget->findChild<QDialogButtonBox *>(); | ||
170 | switch (event->key()) { | 180 | switch (event->key()) { | ||
171 | case Qt::Key_Escape: | 181 | case Qt::Key_Escape: | ||
172 | event->accept(); | 182 | event->accept(); | ||
173 | buttons->rejected(); | 183 | buttons->rejected(); | ||
174 | break; | 184 | break; | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |