rocs/VisualEditor
GraphScene.cpp
Go to the documentation of this file.
274 sceneRect.adjust(-200, -200, 200, 200); // increase whiteboard in each direction around data elements
337 QMenu * GraphScene::createContextMenu(const QPointF &scenePosition, const QPointF &screenPosition)
377 AlignAction *alignDataStructureBottom = new AlignAction(i18nc("@action:inmenu align elements at bottom", "Bottom"), AlignAction::Bottom, this);
378 AlignAction *alignDataStructureCenter = new AlignAction(i18nc("@action:inmenu align elements at center", "Center"), AlignAction::HCenter, this);
379 AlignAction *alignDataStructureTop = new AlignAction(i18nc("@action:inmenu align elements at top", "Top"), AlignAction::Top, this);
380 AlignAction *alignDataStructureLeft = new AlignAction(i18nc("@action:inmenu align elements left", "Left"), AlignAction::Left, this);
381 AlignAction *alignDataStructureRight = new AlignAction(i18nc("@action:inmenu align elements right", "Right"), AlignAction::Right, this);
382 AlignAction *alignDataStructureCircle = new AlignAction(i18nc("@action:inmenu align elements as a circle", "Circle"), AlignAction::Circle, this);
383 AlignAction *alignDataStructureTree = new AlignAction(i18nc("@action:inmenu align elements such that crossing edges are minimized", "Minimize Crossing Edges"), AlignAction::MinCutTree, this);
396 PropertiesDialogAction *dataStructurePropertiesAction = new PropertiesDialogAction(i18nc("@action:inmenu", "Properties"), contextDataStructure, this);
410 menuSelectedAlign->addAction(new AlignAction(i18nc("@action:inmenu align elements at bottom", "Bottom"), AlignAction::Bottom, this));
411 menuSelectedAlign->addAction(new AlignAction(i18nc("@action:inmenu align elements at center", "Center"), AlignAction::HCenter, this));
412 menuSelectedAlign->addAction(new AlignAction(i18nc("@action:inmenu align elements at top", "Top"), AlignAction::Top, this));
413 menuSelectedAlign->addAction(new AlignAction(i18nc("@action:inmenu align elements left", "Left"), AlignAction::Left, this));
414 menuSelectedAlign->addAction(new AlignAction(i18nc("@action:inmenu align elements right", "Right"), AlignAction::Right, this));
415 menuSelectedAlign->addAction(new AlignAction(i18nc("@action:inmenu align elements as a circle", "Circle"), AlignAction::Circle, this));
416 menuSelectedAlign->addAction(new AlignAction(i18nc("@action:inmenu align elements such that crossing edges are minimized", "Minimize Crossing Edges"), AlignAction::MinCutTree, this));
419 menuDataStructureAssignValues->addAction(new AssignValueAction(i18nc("@action:inmenu Value", "Enumerate"), this, AssignValueAction::Enumerate, contextDataStructure, 0));
420 menuDataStructureAssignValues->addAction(new AssignValueAction(i18nc("@action:inmenu Value", "Random Integers"), this, AssignValueAction::RandomInteger, contextDataStructure, 0));
421 menuDataStructureAssignValues->addAction(new AssignValueAction(i18nc("@action:inmenu Value", "Random Reals"), this, AssignValueAction::RandomReal, contextDataStructure, 0));
424 menuSelectedAssignValues->addAction(new AssignValueAction(i18nc("@action:inmenu Value", "Enumerate"), this, AssignValueAction::Enumerate, 0));
425 menuSelectedAssignValues->addAction(new AssignValueAction(i18nc("@action:inmenu Value", "Random Integers"), this, AssignValueAction::RandomInteger, 0));
426 menuSelectedAssignValues->addAction(new AssignValueAction(i18nc("@action:inmenu Value", "Random Reals"), this, AssignValueAction::RandomReal, 0));
431 addDataAction->setCheckable(false); // it doesn't make sense to have a checkbox in the right click menu
433 DeleteAction *deleteDataStructureAction = new DeleteAction(i18nc("@action:inmenu", "Delete"), this, contextDataStructure, 0);
434 DeleteAction *deleteSelectedAction = new DeleteAction(i18nc("@action:inmenu", "Delete"), this, 0);
435 DeleteAction *deleteItemAction = new DeleteAction(i18nc("@action:inmenu", "Delete"), this, contextData, 0);
454 PropertiesDialogAction *dataPropertiesAction = new PropertiesDialogAction(i18nc("@action:inmenu", "Properties"), contextData, this);
459 PropertiesDialogAction *pointerPropertiesAction = new PropertiesDialogAction(i18nc("@action:inmenu", "Properties"), contextPointer, this);
void clear()
QGraphicsItem * itemAt(const QPointF &position) const
QList< QGraphicsItem * > selectedItems() const
Definition: AlignAction.h:34
void setRight(qreal x)
void setChecked(bool)
Definition: AlignAction.h:34
QRectF sceneRect() const
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: GraphScene.cpp:228
QPoint screenPos() const
qreal top() const
Definition: AssignValueAction.h:29
QPointF scenePos() const
void setPosition(QPointF screenPosition)
Definition: PropertiesDialogAction.cpp:209
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: GraphScene.cpp:194
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
qreal left() const
void adjust(qreal dx1, qreal dy1, qreal dx2, qreal dy2)
void createItems()
Create graphic items for all elements on this document.
Definition: GraphScene.cpp:108
void update(const QRectF &rect)
void setLeft(qreal x)
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: GraphScene.cpp:179
the base class for custom actions. This class provides the basic functionality for all custom actions...
Definition: AbstractAction.h:36
virtual void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
qreal bottom() const
void keyReleased(QKeyEvent *key)
Definition: AlignAction.h:34
void ignore()
void installEventFilter(QObject *filterObj)
Definition: AlignAction.h:34
Definition: AlignAction.h:34
Definition: AlignAction.h:34
Definition: AlignAction.h:29
QList< QGraphicsView * > views() const
Qt::MouseButton button() const
The 'Add Node' Action This action holds the 'Add Node' icon and tooltips, and when it's executed...
Definition: AddDataAction.h:33
rect
void accept()
qreal right() const
void wheelEvent(QGraphicsSceneWheelEvent *wheelEvent)
Definition: GraphScene.cpp:157
Qt::Orientation orientation() const
void sceneRectChanged(const QRectF &rect)
void setBottom(qreal y)
QGraphicsItem * propertyListItem() const
Definition: PointerItem.cpp:247
void setTop(qreal y)
Definition: DataItem.h:38
void update(qreal x, qreal y, qreal w, qreal h)
void keyPressed(QKeyEvent *key)
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
void zoomFactorChanged(qreal zoomFactor)
void resized()
Definition: AlignAction.h:34
Definition: ZoomAction.h:35
void setDisabled(bool disable)
Definition: DeleteAction.h:31
QPointF scenePos() const
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: GraphScene.cpp:184
void addItem(QGraphicsItem *item)
int delta() const
void changed(const QList< QRectF > ®ion)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void connectGraphSignals(DataStructurePtr g)
Definition: GraphScene.cpp:125
void removeEventFilter(QObject *obj)
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
Definition: GraphScene.cpp:211
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.