-rw-r--r-- | libopie2/opiemm/oimagescrollview.cpp | 31 | ||||
-rw-r--r-- | libopie2/opiemm/oimagescrollview.h | 13 |
2 files changed, 19 insertions, 25 deletions
diff --git a/libopie2/opiemm/oimagescrollview.cpp b/libopie2/opiemm/oimagescrollview.cpp index 30a8fba..61b2062 100644 --- a/libopie2/opiemm/oimagescrollview.cpp +++ b/libopie2/opiemm/oimagescrollview.cpp | |||
@@ -9,3 +9,2 @@ | |||
9 | #include <qlayout.h> | 9 | #include <qlayout.h> |
10 | #include <qpe/qcopenvelope_qws.h> | ||
11 | 10 | ||
@@ -112,10 +111,3 @@ void OImageScrollView::loadJpeg(bool interncall) | |||
112 | if (real_load) { | 111 | if (real_load) { |
113 | { | ||
114 | QCopEnvelope( "QPE/System", "busy()" ); | ||
115 | } | ||
116 | _original_data = iio.read() ? iio.image() : QImage(); | 112 | _original_data = iio.read() ? iio.image() : QImage(); |
117 | { | ||
118 | QCopEnvelope env( "QPE/System", "notBusy(QString)" ); | ||
119 | env << "Image loaded"; | ||
120 | } | ||
121 | } | 113 | } |
@@ -134,5 +126,2 @@ void OImageScrollView::setImage( const QString& path ) { | |||
134 | } else { | 126 | } else { |
135 | { | ||
136 | QCopEnvelope( "QPE/System", "busy()" ); | ||
137 | } | ||
138 | setImageIsJpeg(false); | 127 | setImageIsJpeg(false); |
@@ -141,6 +130,2 @@ void OImageScrollView::setImage( const QString& path ) { | |||
141 | _original_data.setAlphaBuffer(false); | 130 | _original_data.setAlphaBuffer(false); |
142 | { | ||
143 | QCopEnvelope env( "QPE/System", "notBusy(QString)" ); | ||
144 | env << "Image loaded"; | ||
145 | } | ||
146 | } | 131 | } |
@@ -202,2 +187,8 @@ bool OImageScrollView::AutoRotate()const | |||
202 | 187 | ||
188 | void OImageScrollView::setAutoScaleRotate(bool scale, bool rotate) | ||
189 | { | ||
190 | m_states.setBit(AUTO_ROTATE,rotate); | ||
191 | setAutoScale(scale); | ||
192 | } | ||
193 | |||
203 | void OImageScrollView::setAutoScale(bool how) | 194 | void OImageScrollView::setAutoScale(bool how) |
@@ -205,5 +196,2 @@ void OImageScrollView::setAutoScale(bool how) | |||
205 | m_states.setBit(AUTO_SCALE,how); | 196 | m_states.setBit(AUTO_SCALE,how); |
206 | if (!how) { | ||
207 | setAutoRotate(false); | ||
208 | } | ||
209 | _image_data = QImage(); | 197 | _image_data = QImage(); |
@@ -360,5 +348,2 @@ void OImageScrollView::generateImage() | |||
360 | } | 348 | } |
361 | { | ||
362 | QCopEnvelope( "QPE/System", "busy()" ); | ||
363 | } | ||
364 | if (width()>height()&&_original_data.width()<_original_data.height() || | 349 | if (width()>height()&&_original_data.width()<_original_data.height() || |
@@ -410,6 +395,2 @@ void OImageScrollView::generateImage() | |||
410 | _image_data=QImage(); | 395 | _image_data=QImage(); |
411 | { | ||
412 | QCopEnvelope env( "QPE/System", "notBusy(QString)" ); | ||
413 | env << "Image generated"; | ||
414 | } | ||
415 | } | 396 | } |
diff --git a/libopie2/opiemm/oimagescrollview.h b/libopie2/opiemm/oimagescrollview.h index 94fddb6..01a2d56 100644 --- a/libopie2/opiemm/oimagescrollview.h +++ b/libopie2/opiemm/oimagescrollview.h | |||
@@ -90,2 +90,15 @@ public: | |||
90 | /** | 90 | /** |
91 | * set if the image should be scaled to the size of the viewport if larger(!) | ||
92 | * and/or rotate to best fit. You avoid double repainting when you want to switch | ||
93 | * booth values. | ||
94 | * | ||
95 | * if autoscaling is set when loading a jpeg image, it will use a feature of | ||
96 | * jpeg lib to load the image scaled to display size. If switch of later the | ||
97 | * image will reloaded. | ||
98 | * | ||
99 | * @param scale true - display image scaled down otherwise not | ||
100 | * @param rotate true - the image will rotate for best fit | ||
101 | */ | ||
102 | virtual void setAutoScaleRotate(bool scale, bool rotate); | ||
103 | /** | ||
91 | * set if there should be displayed a small zoomer widget at the right bottom of | 104 | * set if there should be displayed a small zoomer widget at the right bottom of |