Changeset View
Changeset View
Standalone View
Standalone View
lib/document/documentloadedimpl.cpp
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | |||||
98 | AbstractDocumentEditor* DocumentLoadedImpl::editor() | 98 | AbstractDocumentEditor* DocumentLoadedImpl::editor() | ||
99 | { | 99 | { | ||
100 | return this; | 100 | return this; | ||
101 | } | 101 | } | ||
102 | 102 | | |||
103 | void DocumentLoadedImpl::setImage(const QImage& image) | 103 | void DocumentLoadedImpl::setImage(const QImage& image) | ||
104 | { | 104 | { | ||
105 | setDocumentImage(image); | 105 | setDocumentImage(image); | ||
106 | imageRectUpdated(image.rect()); | 106 | emit imageRectUpdated(image.rect()); | ||
107 | } | 107 | } | ||
108 | 108 | | |||
109 | void DocumentLoadedImpl::applyTransformation(Orientation orientation) | 109 | void DocumentLoadedImpl::applyTransformation(Orientation orientation) | ||
110 | { | 110 | { | ||
111 | QImage image = document()->image(); | 111 | QImage image = document()->image(); | ||
112 | QMatrix matrix = ImageUtils::transformMatrix(orientation); | 112 | QMatrix matrix = ImageUtils::transformMatrix(orientation); | ||
113 | image = image.transformed(matrix); | 113 | image = image.transformed(matrix); | ||
114 | setDocumentImage(image); | 114 | setDocumentImage(image); | ||
115 | imageRectUpdated(image.rect()); | 115 | emit imageRectUpdated(image.rect()); | ||
116 | } | 116 | } | ||
117 | 117 | | |||
118 | QByteArray DocumentLoadedImpl::rawData() const | 118 | QByteArray DocumentLoadedImpl::rawData() const | ||
119 | { | 119 | { | ||
120 | return d->mRawData; | 120 | return d->mRawData; | ||
121 | } | 121 | } | ||
122 | 122 | | |||
123 | } // namespace | 123 | } // namespace |