Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoShapeController.cpp
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Line(s) | 167 | { | |||
---|---|---|---|---|---|
173 | return cmd; | 173 | return cmd; | ||
174 | } | 174 | } | ||
175 | 175 | | |||
176 | void KoShapeController::setShapeControllerBase(KoShapeBasedDocumentBase *shapeBasedDocument) | 176 | void KoShapeController::setShapeControllerBase(KoShapeBasedDocumentBase *shapeBasedDocument) | ||
177 | { | 177 | { | ||
178 | d->shapeBasedDocument = shapeBasedDocument; | 178 | d->shapeBasedDocument = shapeBasedDocument; | ||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | QRectF KoShapeController::documentRectInPixels() const | ||||
182 | { | ||||
183 | return d->shapeBasedDocument ? d->shapeBasedDocument->documentRectInPixels() : QRectF(0,0,1920,1080); | ||||
184 | } | ||||
185 | | ||||
186 | qreal KoShapeController::pixelsPerInch() const | ||||
187 | { | ||||
188 | return d->shapeBasedDocument ? d->shapeBasedDocument->pixelsPerInch() : 72.0; | ||||
189 | } | ||||
190 | | ||||
191 | QRectF KoShapeController::documentRect() const | ||||
192 | { | ||||
193 | return d->shapeBasedDocument ? d->shapeBasedDocument->documentRect() : documentRectInPixels(); | ||||
194 | } | ||||
195 | | ||||
181 | KoDocumentResourceManager *KoShapeController::resourceManager() const | 196 | KoDocumentResourceManager *KoShapeController::resourceManager() const | ||
182 | { | 197 | { | ||
183 | if (!d->shapeBasedDocument) | 198 | if (!d->shapeBasedDocument) | ||
184 | return 0; | 199 | return 0; | ||
185 | return d->shapeBasedDocument->resourceManager(); | 200 | return d->shapeBasedDocument->resourceManager(); | ||
186 | } | 201 | } | ||
187 | 202 | | |||
188 | KoShapeBasedDocumentBase *KoShapeController::documentBase() const | 203 | KoShapeBasedDocumentBase *KoShapeController::documentBase() const | ||
189 | { | 204 | { | ||
190 | return d->shapeBasedDocument; | 205 | return d->shapeBasedDocument; | ||
191 | } | 206 | } |