MCPcopy Create free account
hub / github.com/KDE/labplot / sceneEvent

Method sceneEvent

src/backend/worksheet/WorksheetElement.cpp:896–907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

894}
895
896bool WorksheetElementPrivate::sceneEvent(QEvent* event) {
897 // don't allow to move the element with the mouse or with the cursor keys if it's locked
898 // or if its not movable (ItemIsMovable blocks mouse moves only, we also need to block key press events),
899 // react on all other events
900 if ((lock && (event->type() == QEvent::GraphicsSceneMouseMove || event->type() == QEvent::KeyPress))
901 || (!flags().testFlag(QGraphicsItem::ItemIsMovable) && event->type() == QEvent::KeyPress)) {
902 event->ignore();
903 return true;
904 }
905
906 return QGraphicsItem::sceneEvent(event);
907}
908
909void WorksheetElementPrivate::keyPressEvent(QKeyEvent* event) {
910 const bool keyVertical = event->key() == Qt::Key_Up || event->key() == Qt::Key_Down;

Callers

nothing calls this directly

Calls 2

flagsFunction · 0.85
typeMethod · 0.45

Tested by

no test coverage detected