javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/imageloaderimpl.cpp
changeset 80 d6dafc5d983f
parent 49 35baca0e7a2e
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/imageloaderimpl.cpp	Mon Oct 04 11:29:25 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/imageloaderimpl.cpp	Fri Oct 15 12:29:39 2010 +0300
@@ -16,8 +16,8 @@
 
 namespace Java { namespace GFX {
 
-ImageloaderImpl::ImageloaderImpl()
-: mBufferData(new bufferData), loadSizeWidth(-1), loadSizeHeight(-1)
+ImageloaderImpl::ImageloaderImpl(TImageType aType)
+: mBufferData(new bufferData), loadSizeWidth(-1), loadSizeHeight(-1), mResultImageType(aType)
 {
     GFX_LOG_FUNC_CALL();
     mBufferData->buffer = NULL;
@@ -100,7 +100,7 @@
         throwError(imgReader);
     }
     
-    Image* img = GraphicsFactory::createImage(image);
+    Image* img = GraphicsFactory::createImage(image, mResultImageType);
 
     // cleanup, release buffer
     resetData();
@@ -131,7 +131,7 @@
         throwError(imgReader);
     }
 
-    return GraphicsFactory::createImage(image);
+    return GraphicsFactory::createImage(image, mResultImageType);
 }
 
 void ImageloaderImpl::setLoadSize(int aWidth, int aHeight)
@@ -140,6 +140,13 @@
     loadSizeHeight = aHeight;
 }
 
+void ImageloaderImpl::setResultImageType(TImageType aType)
+    {
+    Q_ASSERT((aType == EImage) || (aType == EPixmap));
+    mResultImageType = aType;
+    }
+
+
 // Private
 void ImageloaderImpl::growBuffer(const int aNewSize)
 {