21 #include <QGraphicsView> 65 QString
title()
const;
80 bool event(QEvent *)
override;
127 void zoom(
const qreal zoom_factor);
133 void paste(
const QPointF & = QPointF(), QClipboard::Mode = QClipboard::Clipboard);
void editConductorColor(Conductor *)
void dragEnterEvent(QDragEnterEvent *) override
void focusInEvent(QFocusEvent *) override
void handleElementDrop(QDropEvent *)
void setEventInterface(DVEventInterface *event_interface)
DiagramView::setEventInterface Set an event interface to diagram view. If diagram view already have a...
void zoom(const qreal zoom_factor)
DiagramView::zoom Zomm the view. A zoom_factor > 1 zoom in. A zoom_factor < 1 zoom out...
QETDiagramEditor * diagramEditor() const
void scrollOnMovement(QKeyEvent *)
virtual bool switchToVisualisationModeIfNeeded(QInputEvent *e)
void mousePressEvent(QMouseEvent *) override
void findElementRequired(const ElementsLocation &)
Signal emitted when users wish to locate an element from the diagram within elements collection...
void modeChanged()
Signal emitted after the selection mode changed.
void selectionChanged()
Signal emitted after the selection changed.
void contextMenuEvent(QContextMenuEvent *) override
DiagramView::contextMenuEvent.
void handleTextDrop(QDropEvent *)
DiagramView::handleTextDrop handle the drop of text.
DiagramView(Diagram *diagram, QWidget *=nullptr)
void paintEvent(QPaintEvent *event) override
DiagramView::paintEvent Reimplemented from QGraphicsView.
void editSelection()
DiagramView::editSelection Edit the selected item if he can be edited and if only one item is selecte...
void adjustSceneRect()
DiagramView::adjustSceneRect Calcul and set the area of the scene visualized by this view...
void keyPressEvent(QKeyEvent *) override
DiagramView::keyPressEvent Handles "key press" events. Reimplemented here to switch to visualisation ...
void mouseDoubleClickEvent(QMouseEvent *) override
DiagramView::mouseDoubleClickEvent.
void keyReleaseEvent(QKeyEvent *) override
The DVEventInterface class This class is the main interface for manage event of a Diagram View...
void titleChanged(DiagramView *, const QString &)
Signal emitted after the diagram title changed.
void editSelectedConductorColor()
DiagramView::editSelectedConductorColor Edit the color of the selected conductor; does nothing if mul...
bool gestureEvent(QGestureEvent *event)
DiagramView::gestureEvent Use the pinch of the trackpad for zoom.
void wheelEvent(QWheelEvent *) override
void handleTitleBlockDrop(QDropEvent *)
DiagramView::handleTitleBlockDrop Handle the dropEvent that contain data of a titleblock.
void mouseMoveEvent(QMouseEvent *) override
DiagramView::mouseMoveEvent Manage the event move mouse.
void dropEvent(QDropEvent *) override
bool event(QEvent *) override
DiagramView::event Manage the event on this diagram view. -At first activation (QEvent::WindowActivat...
void showDiagram(Diagram *)
Signal emmitted when diagram must be show.
QList< QAction * > m_separators
QList< QAction * > contextMenuActions() const
DiagramView::contextMenuActions.
virtual bool isCtrlShifting(QInputEvent *)
bool mustIntegrateTitleBlockTemplate(const TitleBlockTemplateLocation &) const
virtual bool switchToSelectionModeIfNeeded(QInputEvent *e)
bool gestures() const
DiagramView::gestures.
void freeRubberBandChanged(QPolygonF polygon)
QRectF viewedSceneRect() const
void setVisualisationMode()
void editElementRequired(const ElementsLocation &)
Signal emitted when users wish to edit an element from the diagram.
DVEventInterface * m_event_interface
bool m_free_rubberbanding
void mouseReleaseEvent(QMouseEvent *) override
DiagramView::mouseReleaseEvent Manage event release click mouse.
void dragMoveEvent(QDragMoveEvent *) override
void editDiagramProperties()
DiagramView::editDiagramProperties Edit the properties of the viewed digram.
virtual bool selectedItemHasFocus()
QPolygonF m_free_rubberband
void paste(const QPointF &=QPointF(), QClipboard::Mode=QClipboard::Clipboard)
DiagramView::paste Import the element stored in the clipboard to the diagram.