summaryrefslogtreecommitdiff
path: root/libopie2
authoralwin <alwin>2004-04-16 07:39:26 (UTC)
committer alwin <alwin>2004-04-16 07:39:26 (UTC)
commit9692c199f1f8b4c334687081e0d75bfbf9375ad8 (patch) (side-by-side diff)
tree3ab64a3de58d5f266229d99d0eeae20a1d49f254 /libopie2
parent7c29eeaecc8301fb500851382b3d94092ae72719 (diff)
downloadopie-9692c199f1f8b4c334687081e0d75bfbf9375ad8.zip
opie-9692c199f1f8b4c334687081e0d75bfbf9375ad8.tar.gz
opie-9692c199f1f8b4c334687081e0d75bfbf9375ad8.tar.bz2
- displaying a busy makes no sense here. It results in double paintings
- method to set autoscale/autorotate at once
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiemm/oimagescrollview.cpp31
-rw-r--r--libopie2/opiemm/oimagescrollview.h13
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 @@
#include <qlayout.h>
-#include <qpe/qcopenvelope_qws.h>
@@ -112,10 +111,3 @@ void OImageScrollView::loadJpeg(bool interncall)
if (real_load) {
- {
- QCopEnvelope( "QPE/System", "busy()" );
- }
_original_data = iio.read() ? iio.image() : QImage();
- {
- QCopEnvelope env( "QPE/System", "notBusy(QString)" );
- env << "Image loaded";
- }
}
@@ -134,5 +126,2 @@ void OImageScrollView::setImage( const QString& path ) {
} else {
- {
- QCopEnvelope( "QPE/System", "busy()" );
- }
setImageIsJpeg(false);
@@ -141,6 +130,2 @@ void OImageScrollView::setImage( const QString& path ) {
_original_data.setAlphaBuffer(false);
- {
- QCopEnvelope env( "QPE/System", "notBusy(QString)" );
- env << "Image loaded";
- }
}
@@ -202,2 +187,8 @@ bool OImageScrollView::AutoRotate()const
+void OImageScrollView::setAutoScaleRotate(bool scale, bool rotate)
+{
+ m_states.setBit(AUTO_ROTATE,rotate);
+ setAutoScale(scale);
+}
+
void OImageScrollView::setAutoScale(bool how)
@@ -205,5 +196,2 @@ void OImageScrollView::setAutoScale(bool how)
m_states.setBit(AUTO_SCALE,how);
- if (!how) {
- setAutoRotate(false);
- }
_image_data = QImage();
@@ -360,5 +348,2 @@ void OImageScrollView::generateImage()
}
- {
- QCopEnvelope( "QPE/System", "busy()" );
- }
if (width()>height()&&_original_data.width()<_original_data.height() ||
@@ -410,6 +395,2 @@ void OImageScrollView::generateImage()
_image_data=QImage();
- {
- QCopEnvelope env( "QPE/System", "notBusy(QString)" );
- env << "Image generated";
- }
}
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:
/**
+ * set if the image should be scaled to the size of the viewport if larger(!)
+ * and/or rotate to best fit. You avoid double repainting when you want to switch
+ * booth values.
+ *
+ * if autoscaling is set when loading a jpeg image, it will use a feature of
+ * jpeg lib to load the image scaled to display size. If switch of later the
+ * image will reloaded.
+ *
+ * @param scale true - display image scaled down otherwise not
+ * @param rotate true - the image will rotate for best fit
+ */
+ virtual void setAutoScaleRotate(bool scale, bool rotate);
+ /**
* set if there should be displayed a small zoomer widget at the right bottom of