Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoCanvasBase.h
Show All 33 Lines | |||||
34 | class KoShapeManager; | 34 | class KoShapeManager; | ||
35 | class KoToolProxy; | 35 | class KoToolProxy; | ||
36 | class KoViewConverter; | 36 | class KoViewConverter; | ||
37 | class KoShapeController; | 37 | class KoShapeController; | ||
38 | class KoShapeBasedDocumentBase; | 38 | class KoShapeBasedDocumentBase; | ||
39 | class KoCanvasController; | 39 | class KoCanvasController; | ||
40 | class KoShape; | 40 | class KoShape; | ||
41 | class KoSnapGuide; | 41 | class KoSnapGuide; | ||
42 | class KoSelectedShapesProxy; | ||||
42 | 43 | | |||
43 | class QWidget; | 44 | class QWidget; | ||
44 | class QCursor; | 45 | class QCursor; | ||
45 | class QPointF; | 46 | class QPointF; | ||
46 | class QRectF; | 47 | class QRectF; | ||
47 | class QSizeF; | 48 | class QSizeF; | ||
48 | 49 | | |||
49 | #include <QObject> | 50 | #include <QObject> | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 70 | public: | |||
105 | * | 106 | * | ||
106 | * Note that the command history takes ownership of the command, it will delete | 107 | * Note that the command history takes ownership of the command, it will delete | ||
107 | * it when the undo limit is reached, or when deleting the command history itself. | 108 | * it when the undo limit is reached, or when deleting the command history itself. | ||
108 | * @param command the command to add | 109 | * @param command the command to add | ||
109 | */ | 110 | */ | ||
110 | virtual void addCommand(KUndo2Command *command) = 0; | 111 | virtual void addCommand(KUndo2Command *command) = 0; | ||
111 | 112 | | |||
112 | /** | 113 | /** | ||
113 | * return the current shapeManager | 114 | * Return the current shapeManager. WARNING: the shape manager can switch | ||
115 | * in time, e.g. when a layer is changed. Please don't keep any persistent | ||||
116 | * connections to it. Instead please use selectedShapesProxy(), | ||||
117 | * which is guaranteed to be the same throughout the life of the canvas. | ||||
118 | * | ||||
114 | * @return the current shapeManager | 119 | * @return the current shapeManager | ||
115 | */ | 120 | */ | ||
116 | virtual KoShapeManager *shapeManager() const = 0; | 121 | virtual KoShapeManager *shapeManager() const = 0; | ||
117 | 122 | | |||
118 | /** | 123 | /** | ||
124 | * @brief selectedShapesProxy() is a special interface for keeping a persistent connections | ||||
125 | * to selectionChanged() and selectionContentChanged() signals. While shapeManager() can change | ||||
126 | * throughout the life time of the cavas, selectedShapesProxy() is guaranteed to stay the same. | ||||
127 | * @return persistent KoSelectedShapesProxy object | ||||
128 | */ | ||||
129 | virtual KoSelectedShapesProxy *selectedShapesProxy() const = 0; | ||||
130 | | ||||
131 | /** | ||||
119 | * Tell the canvas to repaint the specified rectangle. The coordinates | 132 | * Tell the canvas to repaint the specified rectangle. The coordinates | ||
120 | * are document coordinates, not view coordinates. | 133 | * are document coordinates, not view coordinates. | ||
121 | */ | 134 | */ | ||
122 | virtual void updateCanvas(const QRectF &rc) = 0; | 135 | virtual void updateCanvas(const QRectF &rc) = 0; | ||
123 | 136 | | |||
124 | /** | 137 | /** | ||
125 | * Return the proxy to the active tool (determining which tool | 138 | * Return the proxy to the active tool (determining which tool | ||
126 | * is really, really active is hard when tablets are involved, | 139 | * is really, really active is hard when tablets are involved, | ||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |