20#ifndef RGRAPHICSSCENE_H
21#define RGRAPHICSSCENE_H
70 QList<RGraphicsView*> getGraphicsViews()
const;
80 virtual void regenerate(
bool undone =
false,
bool invisible =
false);
81 virtual void regenerate(QSet<RObject::Id>& affectedEntities,
bool updateViews);
82 virtual void updateSelectionStatus(QSet<RObject::Id>& affectedEntities,
bool updateViews);
83 virtual void regenerateViews(
bool force=
false);
85 virtual void repaintViews();
86 virtual void setCursor(
const QCursor& cursor);
90 void handleKeyPressEvent(QKeyEvent& event);
91 void handleKeyReleaseEvent(QKeyEvent& event);
95 void handleMouseDoubleClickEvent(
RMouseEvent& event);
98 void handleSwipeGestureEvent(QSwipeGesture& gesture);
99 void handlePanGestureEvent(QPanGesture& gesture);
100 void handlePinchGestureEvent(QPinchGesture& gesture);
102 virtual void registerView(
RGraphicsView* view,
bool regen=
true);
105 virtual void beginPreview();
106 virtual void endPreview();
107 virtual void clearPreview();
108 virtual bool isPreviewEmpty();
134 RRefPoint getHighlightedReferencePoint();
142 virtual void highlightReferencePoint(
const RRefPoint& position);
144 virtual void selectReferencePoints(
const RBox& box,
bool add);
149 int countReferencePoints()
const;
155 return referencePoints;
158 bool hasSelectedReferencePoints()
const;
174 virtual void exportReferencePoints();
QDebug operator<<(QDebug dbg, const RBox &b)
Stream operator for QDebug.
Definition RBox.cpp:640
Q_DECLARE_METATYPE(RMath *)
Represents a box e.g.
Definition RBox.h:46
Interface for interaction between a graphics document and a user.
Definition RDocumentInterface.h:97
Base class for all entity classes.
Definition REntity.h:63
Abstract base class for exporters.
Definition RExporter.h:78
virtual void unexportEntity(RObject::Id entityId)
This is called for entities for which an export was requested but which cannot be instantiated becaus...
Definition RExporter.cpp:916
virtual void exportCurrentEntity(bool preview=false, bool forceSelected=false)
The default implementation calls the REntity::exportEntity() function of the entity.
Definition RExporter.cpp:881
Definition RGraphicsSceneDrawable.h:37
Abstract base class for all graphics scenes.
Definition RGraphicsScene.h:64
QMap< RObject::Id, QList< RRefPoint > > referencePoints
Internal map of reference points for every selected entity in the scene.
Definition RGraphicsScene.h:189
RDocumentInterface & documentInterface
Definition RGraphicsScene.h:177
virtual void regenerateViews(QSet< RObject::Id > &affectedEntities)
virtual void addPathToPreview(RObject::Id entityId, RPainterPath &pp)
Definition RGraphicsScene.h:119
bool getNoColorMode() const
Definition RGraphicsScene.h:130
RRefPoint highlightedReferencePoint
Definition RGraphicsScene.h:183
virtual void addToPreview(RObject::Id entityId, QList< RGraphicsSceneDrawable > &drawables)
Definition RGraphicsScene.h:110
QMap< RObject::Id, QList< RRefPoint > > & getReferencePoints()
Definition RGraphicsScene.h:154
virtual void highlightEntity(REntity &entity)=0
Highlights the given entity.
bool colorMode
Definition RGraphicsScene.h:181
bool previewIsEmpty
Definition RGraphicsScene.h:182
void beginNoColorMode()
Definition RGraphicsScene.h:124
virtual bool exportDocumentSettings()
Override for performance reasons, we don't need settings to be exported for graphics scenes.
Definition RGraphicsScene.h:78
QList< RGraphicsView * > views
Definition RGraphicsScene.h:178
virtual void dump()
Definition RGraphicsScene.h:164
virtual void addToPreview(RObject::Id entityId, RGraphicsSceneDrawable &drawable)
Definition RGraphicsScene.h:114
virtual void regenerate(QSet< RObject::Id > &affectedEntities, bool updateViews)
void endNoColorMode()
Definition RGraphicsScene.h:127
bool deleting
Definition RGraphicsScene.h:192
bool exportToPreview
Definition RGraphicsScene.h:179
Graphics view.
Definition RGraphicsView.h:67
A mouse event for a graphics scene.
Definition RMouseEvent.h:42
int Id
Definition RObject.h:69
Extended painter path with a z-level and a pen.
Definition RPainterPath.h:48
Represents a reference point of an entity.
Definition RRefPoint.h:18
A tablet event for a graphics scene.
Definition RTabletEvent.h:43
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RTerminateEvent.h:34
A mouse wheel event for a graphics scene.
Definition RWheelEvent.h:41
#define QCADCORE_EXPORT
Definition core_global.h:10
void getDocumentInterface()
Returns the current RDocumentInterface or undefined.
Definition simple.js:69