| 1178 | } |
| 1179 | |
| 1180 | void RemoteViewWidget::keyPressEvent(QKeyEvent *event) |
| 1181 | { |
| 1182 | if (m_interactionMode != NoInteraction |
| 1183 | && m_interactionMode != ViewInteraction |
| 1184 | && event->key() == Qt::Key_Control) { |
| 1185 | |
| 1186 | setCursor(Qt::OpenHandCursor); |
| 1187 | } |
| 1188 | switch (m_interactionMode) { |
| 1189 | case NoInteraction: |
| 1190 | case ViewInteraction: |
| 1191 | case ElementPicking: |
| 1192 | case Measuring: |
| 1193 | break; |
| 1194 | case InputRedirection: |
| 1195 | sendKeyEvent(event); |
| 1196 | break; |
| 1197 | case ColorPicking: |
| 1198 | if (event->matches(QKeySequence::Copy)) { |
| 1199 | QMimeData *data = new QMimeData(); |
| 1200 | data->setColorData(m_trailingColorLabel->pickedColor()); |
| 1201 | qApp->clipboard()->setMimeData(data); |
| 1202 | qApp->clipboard()->setText(m_trailingColorLabel->pickedColor().name()); |
| 1203 | } |
| 1204 | } |
| 1205 | QWidget::keyPressEvent(event); |
| 1206 | } |
| 1207 | |
| 1208 | void RemoteViewWidget::keyReleaseEvent(QKeyEvent *event) |
| 1209 | { |
nothing calls this directly
no test coverage detected