1 #include "MatrixGraphicsScene.h" 3 #include <QGraphicsSceneMouseEvent> 5 #include "MatrixSceneWidget.h" 8 MatrixGraphicsScene::MatrixGraphicsScene(MatrixSceneWidget *parent) :
QGraphicsScene(parent) {
11 MatrixGraphicsScene::~MatrixGraphicsScene() {
15 void MatrixGraphicsScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent) {
16 if ( selectedItems().count() < 2 ||
17 !qobject_cast<MatrixSceneWidget *>( parent() )->contextMenuEvent(contextMenuEvent) ) {
18 QGraphicsScene::contextMenuEvent(contextMenuEvent);
23 void MatrixGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) {
24 if (mouseEvent->button() == Qt::RightButton) {
29 QGraphicsScene::mousePressEvent(mouseEvent);
30 emit selectionChanged();
Namespace for ISIS/Bullet specific routines.