Merge heads.
--- a/commonutilities/bwins/glximagedecoderwrapperu.def Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/bwins/glximagedecoderwrapperu.def Wed Jun 23 17:18:45 2010 +0100
@@ -6,9 +6,9 @@
??_EGlxImageDecoderWrapper@@UAE@I@Z @ 5 NONAME ; GlxImageDecoderWrapper::~GlxImageDecoderWrapper(unsigned int)
?tr@GlxImageDecoderWrapper@@SA?AVQString@@PBD0@Z @ 6 NONAME ; class QString GlxImageDecoderWrapper::tr(char const *, char const *)
?qt_metacast@GlxImageDecoderWrapper@@UAEPAXPBD@Z @ 7 NONAME ; void * GlxImageDecoderWrapper::qt_metacast(char const *)
- ?decodeImage@GlxImageDecoderWrapper@@QAEXVQString@@@Z @ 8 NONAME ; void GlxImageDecoderWrapper::decodeImage(class QString)
- ?getStaticMetaObject@GlxImageDecoderWrapper@@SAABUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const & GlxImageDecoderWrapper::getStaticMetaObject(void)
- ??1GlxImageDecoderWrapper@@UAE@XZ @ 10 NONAME ; GlxImageDecoderWrapper::~GlxImageDecoderWrapper(void)
+ ?getStaticMetaObject@GlxImageDecoderWrapper@@SAABUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const & GlxImageDecoderWrapper::getStaticMetaObject(void)
+ ??1GlxImageDecoderWrapper@@UAE@XZ @ 9 NONAME ; GlxImageDecoderWrapper::~GlxImageDecoderWrapper(void)
+ ?decodeImage@GlxImageDecoderWrapper@@QAE?AVQSizeF@@VQString@@@Z @ 10 NONAME ; class QSizeF GlxImageDecoderWrapper::decodeImage(class QString)
?pixmapDecoded@GlxImageDecoderWrapper@@IAEXXZ @ 11 NONAME ; void GlxImageDecoderWrapper::pixmapDecoded(void)
?staticMetaObject@GlxImageDecoderWrapper@@2UQMetaObject@@B @ 12 NONAME ; struct QMetaObject const GlxImageDecoderWrapper::staticMetaObject
?getPixmap@GlxImageDecoderWrapper@@QAE?AVQPixmap@@XZ @ 13 NONAME ; class QPixmap GlxImageDecoderWrapper::getPixmap(void)
--- a/commonutilities/common/bwins/glxcommonu.def Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/common/bwins/glxcommonu.def Wed Jun 23 17:18:45 2010 +0100
@@ -44,4 +44,5 @@
?ThumbnailCleanupCommandLC@TGlxCommandFactory@@SAPAVCMPXMedia@@XZ @ 43 NONAME ; class CMPXMedia * TGlxCommandFactory::ThumbnailCleanupCommandLC(void)
?CreatePreviewFilterL@TGlxFilterFactory@@SAPAVCMPXMedia@@XZ @ 44 NONAME ; class CMPXMedia * TGlxFilterFactory::CreatePreviewFilterL(void)
?CreateCameraAlbumExclusionFilterL@TGlxFilterFactory@@SAPAVCMPXMedia@@XZ @ 45 NONAME ; class CMPXMedia * TGlxFilterFactory::CreateCameraAlbumExclusionFilterL(void)
+ ?NewL@CGlxTNMonitor@@SAPAV1@PAVMGlxTNObserver@@@Z @ 46 NONAME ; class CGlxTNMonitor * CGlxTNMonitor::NewL(class MGlxTNObserver *)
--- a/commonutilities/common/eabi/glxcommonu.def Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/common/eabi/glxcommonu.def Wed Jun 23 17:18:45 2010 +0100
@@ -45,4 +45,7 @@
_ZN18TGlxCommandFactory28RemoveFromContainerCommandLCERK18CMPXCollectionPath @ 44 NONAME
_ZN21CGlxResourceUtilities20GetResourceFilenameLER4TBufILi256EE @ 45 NONAME
_ZN21CGlxResourceUtilities20GetResourceFilenameLER4TBufILi256EER3RFs @ 46 NONAME
+ _ZN13CGlxTNMonitor4NewLEP14MGlxTNObserver @ 47 NONAME
+ _ZTI13CGlxTNMonitor @ 48 NONAME
+ _ZTV13CGlxTNMonitor @ 49 NONAME
--- a/commonutilities/common/group/bld.inf Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/common/group/bld.inf Wed Jun 23 17:18:45 2010 +0100
@@ -46,9 +46,8 @@
// for emulator
../cenrep/200009EE_orientation_portrait_landscape.txt /epoc32/release/winscw/udeb/z/private/10202be9/200009EE.txt
//slideshow settings cenrep initialisation file
- ../cenrep/20007194.txt /epoc32/data/z/private/10202be9/20007194.txt
- ../cenrep/20007194.txt /epoc32/release/winscw/udeb/z/private/10202be9/20007194.txt
- ../cenrep/20007194.txt /epoc32/release/winscw/urel/z/private/10202be9/20007194.txt
+ ../cenrep/20007194.txt z:/private/10202be9/20007194.txt
+
#endif
@@ -58,6 +57,8 @@
../../../conf/slideshowsettings.confml CONFML_EXPORT_PATH(slideshowsettings.confml,customsw)
../../../conf/slideshowsettings_20007194.crml CRML_EXPORT_PATH(slideshowsettings_20007194.crml,customsw)
+../../../data/photos.docml z:/resource/hb/splashml/photos.docml
+../../../data/photos.splashml z:/resource/hb/splashml/photos.splashml
PRJ_MMPFILES
glxcommon.mmp
--- a/commonutilities/common/group/glxcommon.mmp Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/common/group/glxcommon.mmp Wed Jun 23 17:18:45 2010 +0100
@@ -48,6 +48,7 @@
SOURCE glxresourceutilities.cpp
SOURCE glxsettingsmodel.cpp
SOURCE glxsingletonstore.cpp
+SOURCE glxtnmonitor.cpp
LIBRARY bafl.lib
LIBRARY centralrepository.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/commonutilities/common/inc/glxtnmonitor.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,99 @@
+/*
+* ============================================================================
+* Name : glxscreensavermonitor.h
+* Part of : GLX / Collection Data Source Framework
+* Description :
+* Version :%version: 1 %
+* Copyright © 2006-2007 Nokia. All rights reserved.
+* This material, including documentation and any related computer
+* programs, is protected by copyright controlled by Nokia. All
+* rights are reserved. Copying, including reproducing, storing,
+* adapting or translating, any or all of this material requires the
+* prior written consent of Nokia. This material also contains
+* confidential information which may not be disclosed to others
+* without the prior written consent of Nokia.
+* ============================================================================
+*/
+
+#ifndef PLUGINSCREENSAVERMONITORAO_H_
+#define PLUGINSCREENSAVERMONITORAO_H_
+
+#include <e32base.h>
+#include <e32property.h>
+
+class MGlxTNObserver
+{
+public :
+ /*
+ * Constructor
+ */
+ MGlxTNObserver() {}
+ /*
+ * Call back to get the number is left to create.
+ */
+ virtual void updateTNCount(int & count) = 0;
+ /*
+ * Destructor
+ */
+ virtual ~MGlxTNObserver() {}
+};
+
+
+/**
+* Class for monitoring harvester pause.
+*/
+class CGlxTNMonitor: public CActive
+{
+ public:
+ /** Construction */
+ IMPORT_C static CGlxTNMonitor* NewL( MGlxTNObserver *observer );
+
+ /**
+ * Destructor - virtual and class not intended
+ * for derivation, so not exported.
+ */
+ virtual ~CGlxTNMonitor();
+
+ protected:
+
+ /**
+ * RunL
+ * From CActive.
+ */
+ virtual void RunL();
+
+ /**
+ * DoCancel
+ * From CActive.
+ */
+ virtual void DoCancel();
+
+ /**
+ * RunError. Error handler in case RunL() leaves.
+ * From CActive.
+ * @param aError Leave code from RunL.
+ * @return Error code. KErrNone if error was handled.
+ */
+ virtual TInt RunError( TInt aError );
+
+ private:
+ /**
+ * constructor
+ */
+ CGlxTNMonitor( MGlxTNObserver *observer );
+
+ /**
+ * 2nd phase construction.
+ */
+ void ConstructL();
+
+ private:
+ RProperty iScreenSaverProperty;
+// TTime iStartTime;
+// TTime iStopTime;
+ MGlxTNObserver *iObserver;
+};
+
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/commonutilities/common/src/glxtnmonitor.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,105 @@
+/*
+* ============================================================================
+* Name : glxscreensavermonitor.cpp
+* Part of : GLX / Collection Data Source Framework
+* Description :
+* Version : %version: 1 %
+*
+* Copyright © 2006-2007 Nokia. All rights reserved.
+* This material, including documentation and any related computer
+* programs, is protected by copyright controlled by Nokia. All
+* rights are reserved. Copying, including reproducing, storing,
+* adapting or translating, any or all of this material requires the
+* prior written consent of Nokia. This material also contains
+* confidential information which may not be disclosed to others
+* without the prior written consent of Nokia.
+* ============================================================================
+*/
+
+#include "glxtnmonitor.h"
+#include <glxlog.h>
+
+//#include <ScreenSaverInternalPSKeys.h>
+#include <e32debug.h>
+
+const TUid KTAGDPSNotification = { 0x2001FD51 };
+//const TInt KForceBackgroundGeneration = 0x00000010;
+const TInt KItemsleft = 0x00000008;
+
+CGlxTNMonitor::CGlxTNMonitor( MGlxTNObserver *observer )
+: CActive( CActive::EPriorityHigh ),
+ iObserver( observer )
+{
+}
+
+// ---------------------------------------------------------------------------
+// ~CGlxPauseMonitor.
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CGlxTNMonitor::~CGlxTNMonitor()
+{
+ Cancel();
+ iScreenSaverProperty.Close();
+}
+
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CGlxTNMonitor* CGlxTNMonitor::NewL( MGlxTNObserver *observer )
+{
+ //GLX_LOG_ENTRY_EXIT("CGlxTNMonitor::NewL");
+ CGlxTNMonitor* self = new (ELeave) CGlxTNMonitor( observer );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+}
+
+// ---------------------------------------------------------------------------
+// ConstructL.
+// Second-phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CGlxTNMonitor::ConstructL()
+{
+ iScreenSaverProperty.Attach( KTAGDPSNotification, KItemsleft );
+ CActiveScheduler::Add( this );
+ RunL();
+}
+
+void CGlxTNMonitor::RunL()
+{
+ GLX_LOG_ENTRY_EXIT("CGlxTNMonitor::RunL");
+ // resubscribe before processing new value to prevent missing updates
+ iScreenSaverProperty.Subscribe( iStatus );
+ SetActive();
+ //User::WaitForRequest(iStatus);
+ TInt intValue;
+ TInt err = iScreenSaverProperty.Get( intValue ) ;
+ if ( err != KErrNotFound ){
+ iObserver->updateTNCount( intValue );
+ }
+}
+
+// ---------------------------------------------------------------------------
+// DoCancel
+// ---------------------------------------------------------------------------
+//
+void CGlxTNMonitor::DoCancel()
+{
+ iScreenSaverProperty.Cancel();
+}
+
+// ---------------------------------------------------------------------------
+// RunError
+// ---------------------------------------------------------------------------
+//
+TInt CGlxTNMonitor::RunError( TInt )
+{
+ GLX_LOG_ENTRY_EXIT("CGlxTNMonitor::RunError");
+ return KErrNone;
+}
+
+
--- a/commonutilities/imagedecoderwrapper/inc/glximagedecoder.h Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/imagedecoderwrapper/inc/glximagedecoder.h Wed Jun 23 17:18:45 2010 +0100
@@ -25,13 +25,13 @@
class GlxImageDecoderWrapper;
class CImageDecoder;
class CFbsBitmap;
-
+const TReal KTargetSize = 1000000;
class CGlxImageDecoder : public CActive
{
public:
static CGlxImageDecoder* NewL(GlxImageDecoderWrapper* decoderWrapper);
~CGlxImageDecoder();
- void DecodeImageL(QString aSourceFileName);
+ QSizeF DecodeImageL(QString aSourceFileName);
QPixmap GetPixmap();
void ResetDecoder();
public:
--- a/commonutilities/imagedecoderwrapper/inc/glximagedecoderwrapper.h Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/imagedecoderwrapper/inc/glximagedecoderwrapper.h Wed Jun 23 17:18:45 2010 +0100
@@ -35,7 +35,7 @@
*/
GlxImageDecoderWrapper();
~GlxImageDecoderWrapper();
- void decodeImage(QString sourcePath);
+ QSizeF decodeImage(QString sourcePath);
QPixmap getPixmap();
void resetDecoder();
void decodedImageAvailable();
--- a/commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -21,6 +21,7 @@
#include <bitmaptransforms.h>
#include <imageconversion.h>
#include <IclExtJpegApi.h> // For CExtJpegDecoder
+#include <e32math.h>
// ---------------------------------------------------------------------------
@@ -78,7 +79,7 @@
// ---------------------------------------------------------------------------
// DoDecodeImageL
// ---------------------------------------------------------------------------
-void CGlxImageDecoder::DecodeImageL(QString aSourceFileName)
+QSizeF CGlxImageDecoder::DecodeImageL(QString aSourceFileName)
{
//convert the argument to Symbian Format
TPtrC16 sourceFileName(reinterpret_cast<const TUint16*>(aSourceFileName.utf16()));
@@ -88,20 +89,33 @@
delete iImageDecoder;
iImageDecoder = NULL;
}
- /*TRAPD( err, iImageDecoder = CExtJpegDecoder::FileNewL(
- CExtJpegDecoder::EHwImplementation, iFs, sourceFileName, CImageDecoder::EOptionNone ) );
+ TRAPD( err, iImageDecoder = CExtJpegDecoder::FileNewL(
+ CExtJpegDecoder::EHwImplementation, iFs, sourceFileName, CImageDecoder::EOptionAutoRotate ) );
if ( KErrNone != err )
{
TRAP(err,iImageDecoder = CExtJpegDecoder::FileNewL(
- CExtJpegDecoder::ESwImplementation, iFs, sourceFileName, CImageDecoder::EOptionNone ) );
+ CExtJpegDecoder::ESwImplementation, iFs, sourceFileName, CImageDecoder::EOptionAutoRotate ) );
if ( KErrNone != err )
{
// Not a JPEG - use standard decoder
- iImageDecoder = CImageDecoder::FileNewL( iFs, sourceFileName, CImageDecoder::EOptionNone );
+ iImageDecoder = CImageDecoder::FileNewL( iFs, sourceFileName, CImageDecoder::EOptionAutoRotate );
}
- }*/
- iImageDecoder = CImageDecoder::FileNewL( iFs, sourceFileName, CImageDecoder::EOptionNone );
+ }
TSize imageSize = iImageDecoder->FrameInfo().iOverallSizeInPixels;
+ //limit size to 1MP
+ TSize decodeSize = imageSize;
+ TReal pixelsInImage = imageSize.iWidth*imageSize.iHeight;
+ if(pixelsInImage > KTargetSize)
+ {
+ TReal compressionFactor = 1;
+ TInt err = Math::Sqrt(compressionFactor, (KTargetSize/pixelsInImage) );
+ if(err != KErrNone)
+ {
+ compressionFactor = .1;
+ }
+
+ decodeSize = TSize(imageSize.iWidth * compressionFactor, imageSize.iHeight * compressionFactor);
+ }
//clear the existing Bitmap
if(iBitmap)
{
@@ -112,10 +126,11 @@
if(!iBitmap)
{
iBitmap = new (ELeave) CFbsBitmap();
- iBitmap->Create( imageSize,EColor64K);
+ iBitmap->Create( decodeSize,EColor64K);
iImageDecoder->Convert( &iStatus, *iBitmap );
SetActive();
}
+ return QSizeF(decodeSize.iWidth,decodeSize.iHeight) ;
}
// ---------------------------------------------------------------------------
// RunL
@@ -126,10 +141,10 @@
if( iStatus == KErrNone )
{
iDecoderWrapper->decodedImageAvailable();
- delete iImageDecoder;
- iImageDecoder = NULL;
- iFs.Close();
}
+ delete iImageDecoder;
+ iImageDecoder = NULL;
+ iFs.Close();
}
// ---------------------------------------------------------------------------
--- a/commonutilities/imagedecoderwrapper/src/glximagedecoderwrapper.cpp Tue May 18 12:19:10 2010 +0100
+++ b/commonutilities/imagedecoderwrapper/src/glximagedecoderwrapper.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -43,9 +43,9 @@
// decodeImage.
// ---------------------------------------------------------------------------
//
-void GlxImageDecoderWrapper::decodeImage(QString sourcePath)
+QSizeF GlxImageDecoderWrapper::decodeImage(QString sourcePath)
{
- imageDecoder->DecodeImageL(sourcePath);
+ return imageDecoder->DecodeImageL(sourcePath);
}
QPixmap GlxImageDecoderWrapper::getPixmap()
Binary file data/Image1.jpg has changed
Binary file data/Image10.jpg has changed
Binary file data/Image2.jpg has changed
Binary file data/Image3.jpg has changed
Binary file data/Image4.jpg has changed
Binary file data/Image5.jpg has changed
Binary file data/Image6.jpg has changed
Binary file data/Image7.jpg has changed
Binary file data/Image8.jpg has changed
Binary file data/Image9.jpg has changed
--- a/data/fullscreen.docml Tue May 18 12:19:10 2010 +0100
+++ b/data/fullscreen.docml Wed Jun 23 17:18:45 2010 +0100
@@ -3,9 +3,9 @@
<widget name="mGlxFullscreenView" type="HbView">
<widget name="mcontent" role="HbView:widget" type="HbWidget">
<widget name="mCoverFlow" type="HbWidget">
- <enums name="alignment" value="AlignLeft|AlignTop|AlignLeading"/>
- <enums name="scrollDirections" value="Horizontal"/>
<real name="z" value="5"/>
+ <string name="alignment" value="AlignLeft|AlignTop|AlignLeading"/>
+ <string name="scrollDirections" value="Horizontal"/>
<bool name="frictionEnabled" value="TRUE"/>
</widget>
<widget name="mImageStrip" type="HbGridView">
@@ -20,11 +20,18 @@
<integer name="rowCount" value="1"/>
</widget>
<widget name="toolBar" type="HbToolBar">
- <enums name="layoutDirection" value="LeftToRight"/>
+ <enums name="layoutDirection" value="RightToLeft"/>
<real name="z" value="7"/>
<sizehint height="60.44776un" type="PREFERRED" width="9.40299un"/>
<enums name="orientation" value="Vertical"/>
+ <real name="opacity" value="0.5"/>
</widget>
+ <widget name="glxZoomWidget" type="HbWidget">
+ <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <enums name="scrollDirections" value="Horizontal|Vertical"/>
+ <bool name="frictionEnabled" value="TRUE"/>
+ </widget>
+
<string name="toolTipText" value=""/>
<bool name="visible" value="TRUE"/>
<layout type="anchor">
@@ -38,12 +45,20 @@
<anchoritem dst="mImageStrip" dstEdge="BOTTOM" spacing="var(hb-param-margin-view-bottom)" src="" srcEdge="BOTTOM"/>
<anchoritem dst="toolBar" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="toolBar" dstEdge="TOP" spacing="17.46269un" src="" srcEdge="TOP"/>
- </layout>
+ <anchoritem dst="glxZoomWidget" dstEdge="LEFT" spacing="var(hb-param-margin-view-left)" src="" srcEdge="LEFT"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="TOP" spacing="var(hb-param-margin-view-top)" src="" srcEdge="TOP"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="RIGHT" spacing="var(hb-param-margin-view-right)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="BOTTOM" spacing="var(hb-param-margin-view-bottom)" src="" srcEdge="BOTTOM"/>
+ </layout>
</widget>
<string name="title" value="Photos"/>
<bool name="contentFullScreen" value="TRUE"/>
+ <enums name="titleBarFlags" value="TitleBarHidden|TitleBarTransparent"/>
</widget>
<section name="portrait">
+ <widget name="toolBar" type="HbToolBar">
+ <sizehint height="58.50746un" type="PREFERRED" width="9.40299un"/>
+ </widget>
<widget name="mImageStrip" type="HbGridView">
<integer name="columnCount" value="4"/>
<integer name="rowCount" value="1"/>
@@ -60,17 +75,21 @@
<anchoritem dst="mImageStrip" dstEdge="BOTTOM" spacing="var(hb-param-margin-view-bottom)" src="" srcEdge="BOTTOM"/>
<anchoritem dst="toolBar" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="toolBar" dstEdge="TOP" spacing="18.13433un" src="" srcEdge="TOP"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="LEFT" spacing="var(hb-param-margin-view-left)" src="" srcEdge="LEFT"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="TOP" spacing="var(hb-param-margin-view-top)" src="" srcEdge="TOP"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="RIGHT" spacing="var(hb-param-margin-view-right)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="BOTTOM" spacing="var(hb-param-margin-view-bottom)" src="" srcEdge="BOTTOM"/>
</layout>
</widget>
- <widget name="toolBar" type="HbToolBar">
- <sizehint height="58.50746un" type="PREFERRED" width="9.40299un"/>
- </widget>
</section>
<section name="landscape">
<widget name="mGlxFullscreenView" type="HbView">
<real name="z" value="0"/>
<string name="HbVkbHost" value=""/>
</widget>
+ <widget name="toolBar" type="HbToolBar">
+ <sizehint height="46.71642un" type="PREFERRED" width="9.4427un"/>
+ </widget>
<widget name="mImageStrip" type="HbGridView">
<integer name="columnCount" value="6"/>
<integer name="rowCount" value="1"/>
@@ -89,13 +108,14 @@
<anchoritem dst="toolBar" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
<anchoritem dst="toolBar" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
<anchoritem dst="toolBar" dstEdge="RIGHT" spacing="0un" src="mImageStrip" srcEdge="LEFT"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="LEFT" spacing="var(hb-param-margin-view-left)" src="" srcEdge="LEFT"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="TOP" spacing="var(hb-param-margin-view-top)" src="" srcEdge="TOP"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="RIGHT" spacing="var(hb-param-margin-view-right)" src="" srcEdge="RIGHT"/>
+ <anchoritem dst="glxZoomWidget" dstEdge="BOTTOM" spacing="var(hb-param-margin-view-bottom)" src="" srcEdge="BOTTOM"/>
</layout>
</widget>
- <widget name="toolBar" type="HbToolBar">
- <sizehint height="46.71642un" type="PREFERRED" width="9.4427un"/>
- </widget>
</section>
- <metadata activeUIState="portrait" display="NHD portrait" unit="un">
+ <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
<uistate name="portrait" sections="#common portrait"/>
<uistate name="landscape" sections="#common landscape"/>
--- a/data/opacity_activate.fxml Tue May 18 12:19:10 2010 +0100
+++ b/data/opacity_activate.fxml Wed Jun 23 17:18:45 2010 +0100
@@ -1,14 +1,12 @@
-<layers>
-<visual>
-
-<param name="opacity" type="anim">
-<duration>2.0</duration>
-<style>linear</style>
-<keyframe at="0.0">0</keyframe>
-<keyframe at="0.5">0.75</keyframe>
-<keyframe at="1.0">1.0</keyframe>
-</param>
-
-</visual>
+<?xml version="1.0" encoding="UTF-8"?>
+<layers >
+ <visual>
+ <param name="opacity" type="anim">
+ <style>linear</style>
+ <duration>1.0</duration>
+ <keyframe at="0.0">0.0</keyframe>
+ <keyframe at="1.0">1.0</keyframe>
+ </param>
+ </visual>
</layers>
--- a/data/opacity_deactivate.fxml Tue May 18 12:19:10 2010 +0100
+++ b/data/opacity_deactivate.fxml Wed Jun 23 17:18:45 2010 +0100
@@ -1,13 +1,12 @@
-<layers>
-<visual>
-<param name="opacity" type="anim">
-<duration>2.0</duration>
-<style>linear</style>
-<keyframe at="0.0">1.0</keyframe>
-<keyframe at="0.5">0.25</keyframe>
-<keyframe at="1.0">0</keyframe>
-</param>
-
-</visual>
+<?xml version="1.0" encoding="UTF-8"?>
+<layers >
+ <visual>
+ <param name="opacity" type="anim">
+ <style>linear</style>
+ <duration>1.0</duration>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.0</keyframe>
+ </param>
+ </visual>
</layers>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/photos.docml Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="1.1">
+ <object name="action" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <bool name="enabled" value="FALSE"/>
+ <icon iconName="qtg_mono_photos" name="icon"/>
+ <string name="text"/>
+ <bool name="visible" value="TRUE"/>
+ </object>
+ <object name="action_1" type="HbAction">
+ <bool name="checkable" value="TRUE"/>
+ <bool name="enabled" value="TRUE"/>
+ <icon iconName="qtg_mono_photo_albums" name="icon"/>
+ <string name="text"/>
+ </object>
+ <object name="action_2" type="HbAction">
+ <icon iconName="qtg_mono_camera" name="icon"/>
+ <string name="text"/>
+ </object>
+ <object name="action_3" type="HbAction">
+ <icon iconName="qtg_small_ovi" name="icon"/>
+ <string name="text"/>
+ </object>
+ <widget name="mainView" type="HbView">
+ <widget name="content" role="HbView:widget" type="HbWidget">
+ <layout type="anchor"/>
+ </widget>
+ <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
+ <ref object="action" role="HbWidget:addAction"/>
+ <ref object="action_1" role="HbWidget:addAction"/>
+ <ref object="action_2" role="HbWidget:addAction"/>
+ <ref object="action_3" role="HbWidget:addAction"/>
+ </widget>
+ <string locid="txt_photos_title_photos" name="title" value="Photos"/>
+ </widget>
+ <section name="portrait"/>
+ <section name="landscape">
+ <widget name="content" role="HbView:widget" type="HbWidget">
+ <widget name="pushButton" type="HbPushButton">
+ <icon iconName="qtg_mono_back" name="icon"/>
+ <real name="z" value="1"/>
+ <sizehint type="PREFERRED" width="10.59702un"/>
+ <string name="text"/>
+ <sizehint height="5.5un" type="MINIMUM" width="5un"/>
+ </widget>
+ <layout type="anchor">
+ <anchoritem dst="pushButton" dstEdge="TOP" spacing="0.14925un" src="" srcEdge="TOP"/>
+ <anchoritem dst="pushButton" dstEdge="RIGHT" spacing="-0.14925un" src="" srcEdge="RIGHT"/>
+ </layout>
+ </widget>
+ <widget name="mainView" type="HbView">
+ <enums name="titleBarFlags" value="TitleBarHidden"/>
+ </widget>
+ <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
+ <bool name="visible" value="FALSE"/>
+ </widget>
+ </section>
+ <metadata activeUIState="landscape" display="NHD-3.2-inch_landscape" unit="un">
+ <uistate name="Common ui state" sections="#common"/>
+ <uistate name="portrait" sections="#common portrait"/>
+ <uistate name="landscape" sections="#common landscape"/>
+ </metadata>
+</hbdocument>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/photos.splashml Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,8 @@
+<hbsplash version="1">
+ <docml>photos.docml</docml>
+ <widget>mainView</widget>
+ <appuid>0x20000A14</appuid>
+ <tsappname>photos</tsappname>
+ <use-section when="portrait">portrait</use-section>
+ <use-section when="landscape">landscape</use-section>
+ </hbsplash>
--- a/data/slideshow.docml Tue May 18 12:19:10 2010 +0100
+++ b/data/slideshow.docml Wed Jun 23 17:18:45 2010 +0100
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
+<hbdocument version="1.0">
<widget name="mglxslideshow" type="HbView">
<widget name="content" role="HbView:widget" type="HbWidget">
<widget name="mslideshowwidget" type="HbWidget">
- <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
- <enums name="scrollDirections" value="Horizontal"/>
<real name="z" value="14"/>
<sizehint height="95.52239un" type="PREFERRED" width="53.73134un"/>
+ <string name="alignment" value="AlignVCenter|AlignHCenter"/>
+ <string name="scrollDirections" value="Horizontal"/>
</widget>
<widget name="mContinueButton" type="HbPushButton">
<real name="z" value="10"/>
@@ -29,6 +29,7 @@
<string name="title" value="Photos"/>
<bool name="contentFullScreen" value="TRUE"/>
<real name="z" value="10"/>
+ <enums name="titleBarFlags" value="TitleBarHidden|TitleBarTransparent"/>
</widget>
<metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
<uistate name="Common ui state" sections="#common"/>
--- a/data/transitionrotate0.fxml Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<layers>
- <visual>
- <param name="rotation_angle" type="anim">
- <duration>0.5</duration>
- <keyframe at="0.0">0</keyframe>
- <keyframe at="1.0">90</keyframe>
- </param>
-
- <param name="rotation_origin_x" ref="visual.width">0.5</param>
- <param name="rotation_origin_y" ref="visual.height">0.5</param>
- <param name="rotation_axis_z">1</param>
-
- </visual>
-</layers>
--- a/data/transitionrotate180.fxml Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<layers>
- <visual>
- <param name="rotation_angle" type="anim">
- <duration>0.5</duration>
- <keyframe at="0.0">180</keyframe>
- <keyframe at="1.0">270</keyframe>
- </param>
-
- <param name="rotation_origin_x" ref="visual.width">0.5</param>
- <param name="rotation_origin_y" ref="visual.height">0.5</param>
- <param name="rotation_axis_z">1</param>
-
- </visual>
-</layers>
--- a/data/transitionrotate270.fxml Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<layers>
- <visual>
- <param name="rotation_angle" type="anim">
- <duration>0.5</duration>
- <keyframe at="0.0">-90</keyframe>
- <keyframe at="1.0">0</keyframe>
- </param>
-
- <param name="rotation_origin_x" ref="visual.width">0.5</param>
- <param name="rotation_origin_y" ref="visual.height">0.5</param>
- <param name="rotation_axis_z">1</param>
-
- </visual>
-</layers>
--- a/data/transitionrotate90.fxml Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-<layers>
- <visual>
- <param name="rotation_angle" type="anim">
- <duration>0.5</duration>
- <keyframe at="0.0">90</keyframe>
- <keyframe at="1.0">180</keyframe>
- </param>
-
- <param name="rotation_origin_x" ref="visual.width">0.5</param>
- <param name="rotation_origin_y" ref="visual.height">0.5</param>
- <param name="rotation_axis_z">1</param>
-
- </visual>
-</layers>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/zoomin.fxml Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.nokia.com/FXML/10.1">
+ <comment>Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 </comment>
+ <visual src="Item">
+ <param name="scale_y" type="anim">
+ <style>linear</style>
+ <duration>0.6</duration>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.1</keyframe>
+ </param>
+ <param name="scale_origin_x" ref="visual.width">0.5</param>
+ <param name="scale_origin_y" ref="visual.height">0.5</param>
+ <param name="scale_x" type="anim">
+ <style>linear</style>
+ <duration>0.6</duration>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.1</keyframe>
+ </param>
+ <param name="opacity" type="anim">
+ <style>linear</style>
+ <duration>0.6</duration>
+ <keyframe at="0.0">1.0</keyframe>
+ <keyframe at="1.0">0.0</keyframe>
+ </param>
+ </visual>
+</layers>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data/zoomout.fxml Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://www.nokia.com/FXML/10.1">
+ <comment>Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 </comment>
+ <visual src="Item">
+ <param name="scale_x" type="anim">
+ <style>linear</style>
+ <duration>0.6</duration>
+ <keyframe at="0.0">0.1</keyframe>
+ <keyframe at="1.0">1.0</keyframe>
+ </param>
+ <param name="scale_origin_x" ref="visual.width">0.5</param>
+ <param name="scale_origin_y" ref="visual.height">0.5</param>
+ <param name="scale_y" type="anim">
+ <style>linear</style>
+ <duration>0.6</duration>
+ <keyframe at="0.0">0.1</keyframe>
+ <keyframe at="1.0">1.0</keyframe>
+ </param>
+ <param name="opacity" type="anim">
+ <style>linear</style>
+ <duration>0.6</duration>
+ <keyframe at="0.0">0.0</keyframe>
+ <keyframe at="1.0">1.0</keyframe>
+ </param>
+ </visual>
+</layers>
\ No newline at end of file
--- a/engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -102,26 +102,40 @@
// ----------------------------------------------------------------------------
//
EXPORT_C void CGlxCollectionPluginBase::OpenL(const CMPXCollectionPath& aPath,
- const TArray<TMPXAttribute>& /*aAttrs*/,
+ const TArray<TMPXAttribute>& aAttrs,
CMPXFilter* aFilter)
{
TRACER("void CGlxCollectionPluginBase::OpenL()");
iPath = CMPXCollectionPath::NewL(aPath);
- if(aFilter)
+ // When a collection is opened for browsing,
+ // there are two queries executed with similar filter.
+ // First query to open the collection from list / cloud view.
+ // Second one from grid view construction. To improve the grid opening
+ // performance, the first query will be completed with empty Id list.
+ TBool openRequest = EFalse;
+ for (TInt index = 0; index < aAttrs.Count(); index++)
{
- if(aFilter->IsSupported(KGlxFilterGeneralNavigationalStateOnly))
+ const TMPXAttribute attr = aAttrs[index];
+
+ if (attr == KGlxFilterGeneralNavigationalStateOnly)
{
- RArray<TMPXItemId> mpxIds;
- CleanupClosePushL(mpxIds);
- iPath->AppendL(mpxIds.Array());
- iObs->HandleOpen(iPath, KErrNone);
- CleanupStack::PopAndDestroy(&mpxIds);
- delete iPath;
- iPath = NULL;
- return;
+ openRequest = ETrue;
}
}
+ if ((aFilter && aFilter->IsSupported(
+ KGlxFilterGeneralNavigationalStateOnly)) || openRequest)
+ {
+ RArray<TMPXItemId> mpxIds;
+ CleanupClosePushL(mpxIds);
+ iPath->AppendL(mpxIds.Array());
+ iObs->HandleOpen(iPath, KErrNone);
+ CleanupStack::PopAndDestroy(&mpxIds);
+ delete iPath;
+ iPath = NULL;
+ return;
+ }
+
TGlxMediaId targetId(aPath.Id());
if (aPath.Levels() == KGlxCollectionRootLevel)
{
@@ -218,7 +232,7 @@
if(aSpecs->IsSupported(KMPXMediaGeneralSize))
{
- tnFileInfo->iFileSize = aSpecs->ValueTObjectL<TInt>(KMPXMediaGeneralSize);
+ tnFileInfo->iFileSize = aSpecs->ValueTObjectL<TUint>(KMPXMediaGeneralSize);
countInfo++;
}
if(aSpecs->IsSupported(KGlxMediaGeneralLastModifiedDate))
--- a/engine/collectionframework/datasource/manager/src/glxdatasource.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/manager/src/glxdatasource.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: Implementation of the Data Source Class.
*
*/
--- a/engine/collectionframework/datasource/manager/src/glxdatasourcetask.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/manager/src/glxdatasourcetask.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: Data Source Task Class.
*
*/
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/group/glxdatasourcemde.mmp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/group/glxdatasourcemde.mmp Wed Jun 23 17:18:45 2010 +0100
@@ -94,4 +94,6 @@
LIBRARY platformenv.lib
LIBRARY flogger.lib
LIBRARY imageconversion.lib
+LIBRARY harvesterclient.lib
+
// End of File
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h Wed Jun 23 17:18:45 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: The data source mds class
*
*/
@@ -29,10 +29,18 @@
#define _C_GLXDATASOURCEMDS_H_
// INCLUDES
+#include <e32base.h>
+#include <w32std.h>
+#include <e32property.h>
+
#include <e32cmn.h>
#include <f32file.h>
#include <mdesession.h>
+
+#include <harvesterclient.h>
+#include <harvestereventenum.h>
+
#include <mglxtnstorage.h>
#include <mpxcollectionmessagedefs.h>
@@ -44,16 +52,104 @@
#include "mthumbnailfetchrequestobserver.h"
#endif
-
#include "glxdatasource.h"
// FORWARD DECLARATIONS
class CGlxRequest;
-
#ifndef USE_S60_TNM
class CGlxtnThumbnailCreator;
class CGlxtnThumbnailDatabase;
#endif
+class CGlxDataSourceMde ;
+
+const TUid KHarvesterPSShutdown = { 0x200009F5 } ;
+const TInt KMdSShutdown = 0x00000002; // values 1 = shutdown, 0 = restart, normal state
+
+static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
+static _LIT_SECURITY_POLICY_C1(KPowerMgmtPolicy,ECapabilityPowerMgmt);
+
+/**
+ * PSCW Listener Observer interface for signaling that MDS has Shutdown/restarted
+ */
+class MGlxMDSShutdownObserver
+ {
+public:
+
+ virtual void ShutdownNotification(TInt aShutdownState) = 0;
+ };
+
+/**
+ * Active object for observing P&S keys
+ *
+ * @since S60 v5.0
+ */
+class CGlxMDSShutdownObserver: public CActive
+ {
+public:
+
+ /**
+ * Two-phased constructor.
+ *
+ * @since S60 v5.0
+ * @return Instance of CGlxMDSShutdownObserver.
+ */
+ static CGlxMDSShutdownObserver* NewL( MGlxMDSShutdownObserver& aObserver, const TUid& aKeyCategory,
+ const TInt aPropertyKey, TBool aDefineKey);
+
+ /**
+ * Destructor
+ *
+ * @since S60 v5.0
+ */
+ virtual ~CGlxMDSShutdownObserver();
+
+protected:
+
+ /**
+ * Handles an active object's request completion event.
+ *
+ * @since S60 v5.0
+ */
+ void RunL();
+
+ /**
+ * Implements cancellation of an outstanding request.
+ *
+ * @since S60 v5.0
+ */
+ void DoCancel();
+
+private:
+
+ /**
+ * C++ default constructor
+ *
+ * @since S60 v5.0
+ * @return Instance of CGlxMDSShutdownObserver.
+ */
+ CGlxMDSShutdownObserver( MGlxMDSShutdownObserver& aObserver, const TUid& aKeyCategory,
+ const TInt iPropertyKey, TBool aDefineKey);
+
+ /**
+ * Symbian 2nd phase constructor can leave.
+ *
+ * @since S60 v5.0
+ */
+ void ConstructL();
+
+private:
+
+ // not own
+ MGlxMDSShutdownObserver& iObserver;
+
+ const TUid& iKeyCategory;
+ RProperty iProperty;
+ TInt iPropertyKey;
+
+ TBool iDefineKey;
+};
+
+
// CONSTANTS
@@ -68,10 +164,12 @@
*/
class CGlxDataSourceMde : public CGlxDataSource,
public MMdESessionObserver,
+ public MGlxMDSShutdownObserver,
public MMdEObjectObserver,
public MMdEObjectPresentObserver,
public MMdERelationObserver,
- public MMdERelationPresentObserver
+ public MMdERelationPresentObserver,
+ public MHarvesterEventObserver
#ifdef USE_S60_TNM
, public MThumbnailManagerObserver
#else
@@ -90,11 +188,19 @@
public:
// from CGlxDataSource
- CGlxDataSourceTask* CreateTaskL(CGlxRequest* aRequest, MGlxDataSourceRequestObserver& aObserver);
+ CGlxDataSourceTask* CreateTaskL(CGlxRequest* aRequest,
+ MGlxDataSourceRequestObserver& aObserver);
+public:
+ // from MHarvesterEventObserver
+ void HarvestingUpdated(
+ HarvesterEventObserverType aHEObserverType,
+ HarvesterEventState aHarvesterEventState,
+ TInt aItemsLeft );
#ifdef USE_S60_TNM
public:
- void FetchThumbnailL(CGlxRequest* aRequest, MThumbnailFetchRequestObserver& aObserver);
+ void FetchThumbnailL(CGlxRequest* aRequest,
+ MThumbnailFetchRequestObserver& aObserver);
TInt CancelFetchThumbnail();
#else
private:
@@ -161,13 +267,15 @@
#endif
private:
- void BackgroundThumbnailMessageL(const TGlxMediaId& aId, const TSize& aSize, TInt aError);
+ void BackgroundThumbnailMessageL(const TGlxMediaId& aId, const TSize& aSize,
+ TInt aError);
void DoSessionInitL();
void AddMdEObserversL();
- void ProcessUpdateArray(const RArray<TItemId>& aArray, TMPXChangeEventType aType, TBool aIsObject);
+ void ProcessUpdateArray(const RArray<TItemId>& aArray, TMPXChangeEventType aType,
+ TBool aIsObject);
void ProcessItemUpdateL();
@@ -180,8 +288,19 @@
void TaskCompletedL();
void TaskStartedL();
+
+#ifdef USE_S60_TNM
+ /*
+ * This function doesnt add up any value, added to reduce compiler warnings
+ */
+ void ThumbnailReadyL( TInt aError, MThumbnailData& aThumbnail,
+ TThumbnailRequestId aId, TBool aQuality );
+#endif
+
+public:
-public:
+ void CreateSession();
+
inline CMdESession& Session() const;
#ifndef USE_S60_TNM
@@ -236,6 +355,9 @@
TBool SameMonth(const TTime& aOldDate, const TTime& aNewDate);
TBool ContainerIsLeft(CMdEObjectDef& aObjectDef);
+
+ // from MGlxMDSShutdownObserver
+ void ShutdownNotification(TInt aShutdownState);
private:
#ifdef USE_S60_TNM
@@ -247,10 +369,7 @@
TBool iTnRequestInProgress;
TInt iTnHandle;
TGlxMediaId iMediaId;
-#ifdef _DEBUG
- TTime iStartTime;
- TTime iStopTime;
-#endif
+
#else
CGlxtnThumbnailCreator* iThumbnailCreator;
CGlxtnThumbnailDatabase* iThumbnailDatabase;
@@ -279,6 +398,8 @@
RArray<TTime> iMonthArray;
RArray<TGlxMediaId> iMonthList;
+ RArray<TItemId> iAddedItems;
+
TTime iFirstMonth;
TTime iLastMonth;
@@ -296,6 +417,16 @@
RArray<TUpdateData> iUpdateData;
TBool iPauseUpdate;
TInt iDeletedCount;
+
+ RHarvesterClient iHC;
+ TBool iHarvestingOngoing;
+
+ CGlxMDSShutdownObserver* iMDSShutdownObserver;
+
+#ifdef _DEBUG
+ TTime iStartTime;
+ TTime iStopTime;
+#endif
};
#include "glxdatasourcemds.inl"
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl Wed Jun 23 17:18:45 2010 +0100
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description: Inline methods for the data source MDS class
*
*/
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h Wed Jun 23 17:18:45 2010 +0100
@@ -67,7 +67,8 @@
* CGlxDataSourceTaskMde class
* Base class for mde tasks: provides task generic functionality.
*/
-NONSHARABLE_CLASS(CGlxDataSourceTaskMde) : public CGlxDataSourceTask, public MMdEQueryObserver
+NONSHARABLE_CLASS(CGlxDataSourceTaskMde) : public CGlxDataSourceTask,
+ public MMdEQueryObserver
{
public:
/**
@@ -76,8 +77,8 @@
* @param aObserver observer to be informed when task has completed.
* @param aDataSource data source to be used by this object.
*/
- CGlxDataSourceTaskMde(CGlxRequest* aRequest, MGlxDataSourceRequestObserver& aObserver,
- CGlxDataSource* aDataSource);
+ CGlxDataSourceTaskMde(CGlxRequest* aRequest, MGlxDataSourceRequestObserver&
+ aObserver, CGlxDataSource* aDataSource);
/**
* Destructor.
@@ -142,7 +143,8 @@
*/
CGlxDataSourceMde* DataSource();
- void AddMonthFilterL(const TGlxMediaId& aContainerId, TGlxFilterProperties& aFilterProperties);
+ void AddMonthFilterL(const TGlxMediaId& aContainerId,
+ TGlxFilterProperties& aFilterProperties);
void AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties);
@@ -154,11 +156,14 @@
* EFalse if the container is on the right side of the relation
*
*/
- void SetQueryConditionsL(CMdEQuery& aQuery, const TGlxFilterProperties& aFilterProperties, const TGlxMediaId aContainerId, CMdEObjectDef& aObjectDef);
+ void SetQueryConditionsL(CMdEQuery& aQuery, const TGlxFilterProperties& aFilterProperties,
+ const TGlxMediaId aContainerId, CMdEObjectDef& aObjectDef);
- void SetQueryFilterConditionsL(CMdELogicCondition& aLogicCondition, CMdEObjectDef& aObjectDef, const TGlxFilterProperties& aFilterProperties);
+ void SetQueryFilterConditionsL(CMdELogicCondition& aLogicCondition, CMdEObjectDef& aObjectDef,
+ const TGlxFilterProperties& aFilterProperties);
- void SetSortOrderL(CMdEQuery& aQuery, CMdEObjectDef& aObjectDef, const TGlxFilterProperties& aFilterProperties);
+ void SetSortOrderL(CMdEQuery& aQuery, CMdEObjectDef& aObjectDef,
+ const TGlxFilterProperties& aFilterProperties);
/**
* Returns the maximum number of items that a query should find.
@@ -171,7 +176,8 @@
*/
void RemoveQuery();
- void DoQueryL(CMdEObjectDef& aObjectDef, TBool aIsContent, TGlxQueryType aQueryType, TQueryResultMode aResultMode, const TGlxMediaId& aContainerId);
+ void DoQueryL(CMdEObjectDef& aObjectDef, TBool aIsContent, TGlxQueryType aQueryType,
+ TQueryResultMode aResultMode, const TGlxMediaId& aContainerId);
/**
* Adds queries for images and or videos to the query queue. The queries will return objects
@@ -181,7 +187,8 @@
* image or video queries are required if iItemType is not set to EGlxFilterImage or
* EGlxFitlerVideo a query for images will be queued first followed by a query for videos.
*/
- void QueueImageVideoObjectQueriesL(const RArray<TGlxMediaId>& aObjectIds, const TGlxFilterProperties& aFilterProperties);
+ void QueueImageVideoObjectQueriesL(const RArray<TGlxMediaId>& aObjectIds,
+ const TGlxFilterProperties& aFilterProperties);
/**
* Adds a query for tag objects that have ids specified by aObjectIds
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsattribute.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsattribute.h Wed Jun 23 17:18:45 2010 +0100
@@ -64,7 +64,8 @@
* @param aObserver observer to be informed when task has completed.
* @param aDataSource data source to be used by this object.
*/
- CGlxDataSourceTaskMdeAttributeMde(CGlxGetRequest* aRequest, MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource);
+ CGlxDataSourceTaskMdeAttributeMde(CGlxGetRequest* aRequest,
+ MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource);
/**
* Destructor.
@@ -94,9 +95,11 @@
void AddCollectionAttributesL(CMPXMedia* aEntry);
- void AddContainerAttributesL(CMPXMedia* aEntry, CMdEObject* aContainer, CGlxDataSource::TContainerType aType);
+ void AddContainerAttributesL(CMPXMedia* aEntry, CMdEObject* aContainer,
+ CGlxDataSource::TContainerType aType);
- void AddItemAttributesL(CMPXMedia* aEntry, CMdEObject* aItem, CGlxDataSource::TItemType aType);
+ void AddItemAttributesL(CMPXMedia* aEntry, CMdEObject* aItem,
+ CGlxDataSource::TItemType aType);
/**
* Add location information to a media object from MDS.
@@ -127,8 +130,10 @@
* of the object being queried is provided by the aObjectDef parameter
*
*/
- void QueueObjectQueryL(CMdEObjectDef& aObjectDef, TBool aIsContent, TGlxQueryType aQueryType, TQueryResultMode aResultMode,
- const TGlxMediaId& aContainerId, TMPXAttribute aAttribute, CMPXMedia* aEntry,
+ void QueueObjectQueryL(CMdEObjectDef& aObjectDef, TBool aIsContent,
+ TGlxQueryType aQueryType, TQueryResultMode aResultMode,
+ const TGlxMediaId& aContainerId,
+ TMPXAttribute aAttribute, CMPXMedia* aEntry,
const TGlxFilterProperties& aFilterProperties);
@@ -156,10 +161,11 @@
* Attributes associated with outstanding queries
*/
RArray< TGlxQueryAttribute > iQueryAttributes;
+
#ifdef _DEBUG
- TTime iStartTime;
- TTime iStopTime;
-#endif
+ TTime iStartTime;
+ TTime iStopTime;
+#endif
};
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdscommand.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdscommand.h Wed Jun 23 17:18:45 2010 +0100
@@ -64,7 +64,8 @@
* @param aObserver observer to be informed when task has completed.
* @param aDataSource data source to be used by this object.
*/
- CGlxDataSourceTaskMdeCommand(CGlxCommandRequest* aRequest, MGlxDataSourceRequestObserver& aObserver,
+ CGlxDataSourceTaskMdeCommand(CGlxCommandRequest* aRequest,
+ MGlxDataSourceRequestObserver& aObserver,
CGlxDataSource* aDataSource);
/**
@@ -88,12 +89,14 @@
/**
* See @ref MGlxCommandParserCallback::AddToContainerL
*/
- void AddToContainerL(const RArray<TGlxMediaId>& aSourceIds, const RArray<TGlxMediaId>& aTargetContainers);
+ void AddToContainerL(const RArray<TGlxMediaId>& aSourceIds,
+ const RArray<TGlxMediaId>& aTargetContainers);
/**
* See @ref MGlxCommandParserCallback::AddToContainerL
*/
- void AddToContainerL(const TDesC& aSourceUri, const RArray<TGlxMediaId>& aTargetContainers);
+ void AddToContainerL(const TDesC& aSourceUri,
+ const RArray<TGlxMediaId>& aTargetContainers);
/**
* See @ref MGlxCommandParserCallback::CopyL
@@ -108,7 +111,8 @@
/**
* See @ref MGlxCommandParserCallback::RemoveFromContainerL
*/
- void RemoveFromContainerL(const RArray<TGlxMediaId>& aItemIds, const TGlxMediaId& aContainerId);
+ void RemoveFromContainerL(const RArray<TGlxMediaId>& aItemIds,
+ const TGlxMediaId& aContainerId);
/**
* See @ref MGlxCommandParserCallback::DeleteL
@@ -123,12 +127,14 @@
/**
* See @ref MGlxCommandParserCallback::SetDescriptionL
*/
- void SetDescriptionL(const RArray<TGlxMediaId>& aItemIds, const TDesC& aDescription);
+ void SetDescriptionL(const RArray<TGlxMediaId>& aItemIds,
+ const TDesC& aDescription);
/**
* See @ref MGlxCommandParserCallback::SetCaptureLocationL
*/
- void SetCaptureLocationL(const RArray<TGlxMediaId>& aItemIds, const TCoordinate& aCoordinate);
+ void SetCaptureLocationL(const RArray<TGlxMediaId>& aItemIds,
+ const TCoordinate& aCoordinate);
/**
* See @ref MGlxCommandParserCallback::ThumbnailCleanupL
@@ -165,7 +171,8 @@
* @param aDrive destination drive.
* @param aFileOperation file operation to perform (either a copy or a move)
*/
- void FileOperationL(const TArray<TGlxMediaId>& aSourceIds, const TDesC& aDrive, TFileOperation aFileOperation);
+ void FileOperationL(const TArray<TGlxMediaId>& aSourceIds,
+ const TDesC& aDrive, TFileOperation aFileOperation);
/**
* Gets the container id for a given media id.
@@ -282,6 +289,18 @@
*/
TInt SearchStringL(TInt aResourceId);
+
+ /**
+ * Timer callback to stop scheduler wait
+ * @param aPtr Pointer to object that started the timer
+ * @return 0 to signal that further callbacks are unnecessary, 1 otherwise
+ */
+ static TInt SchedulerStopCallback(TAny* aPtr);
+
+ /**
+ * Starts the scheduler wait timer. When complete, Scheduler is stopped
+ */
+ void SchedulerStopComplete();
private:
/**
@@ -325,6 +344,16 @@
*
*/
CGlxStringCache* iStringCache;
+
+ /**
+ * Timer that checks if scheduler wait needs to be cancelled
+ */
+ CPeriodic* iTimer;
+
+ /**
+ * Active scheduler wait object. (Owned)
+ */
+ CActiveSchedulerWait* iSchedulerWait;
};
#endif //_C_GLXDATASOURCETASKMDSCOMMAND_H_
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.h Wed Jun 23 17:18:45 2010 +0100
@@ -47,7 +47,8 @@
* CGlxDataSourceTaskMdeIdList class
* Task to handle id list requests.
*/
-NONSHARABLE_CLASS(CGlxDataSourceTaskMdeIdList) : public CGlxDataSourceTaskMde, public MGlxtnThumbnailCreatorClient
+NONSHARABLE_CLASS(CGlxDataSourceTaskMdeIdList) : public CGlxDataSourceTaskMde,
+ public MGlxtnThumbnailCreatorClient
{
public:
@@ -57,7 +58,8 @@
* @param aObserver observer to be informed when task has completed.
* @param aDataSource data source to be used by this object.
*/
- CGlxDataSourceTaskMdeIdList(CGlxIdListRequest* aRequest, MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource);
+ CGlxDataSourceTaskMdeIdList(CGlxIdListRequest* aRequest,
+ MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource);
/**
* Destructor.
@@ -118,11 +120,17 @@
private:
void DoHandleListQueryCompletedL();
- void DoMonthListCreationL(CMdEQuery& aQuery, const TGlxFilterProperties& aFilterProperties);
+ void DoMonthListCreationL(CMdEQuery& aQuery, const TGlxFilterProperties&
+ aFilterProperties);
void DoPostFilterComplete(const RArray<TGlxMediaId>& aIdArray, TInt aErrorCode);
- void PostFilterL(const RArray<TGlxMediaId>& aFilteredList, const TGlxFilterProperties& aFilterProperties);
+ void PostFilterL(const RArray<TGlxMediaId>& aFilteredList,
+ const TGlxFilterProperties& aFilterProperties);
+#ifdef _DEBUG
+ TTime iStartTime;
+ TTime iStopTime;
+#endif
};
#endif // GLXDATASOURCETASKMDSIDLIST_H_
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsthumbnail.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsthumbnail.h Wed Jun 23 17:18:45 2010 +0100
@@ -77,7 +77,7 @@
#ifdef USE_S60_TNM
private: //MThumbnailFetchRequestObserver
- void ThumbnailFetchComplete(TInt aError);
+ void ThumbnailFetchComplete(TInt aError, TBool aQuality);
void FetchFileInfoL();
#endif
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/mthumbnailfetchrequestobserver.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/mthumbnailfetchrequestobserver.h Wed Jun 23 17:18:45 2010 +0100
@@ -28,7 +28,7 @@
class MThumbnailFetchRequestObserver
{
public:
- virtual void ThumbnailFetchComplete(TInt aError) = 0;
+ virtual void ThumbnailFetchComplete(TInt aError, TBool aQuality) = 0;
virtual void FetchFileInfoL() = 0;
};
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -20,6 +20,7 @@
// INCLUDE FILES
#include "glxdatasourcemds.h"
+#include <e32base.h>
#include <fbs.h>
#include <glxbackgroundtnmessagedefs.h>
#include <glxcollectionmessagedefs.h>
@@ -48,14 +49,14 @@
#include "glxdatasourcetaskmdsidlist.h"
#include "glxdatasourcetaskmdsthumbnail.h"
-#ifndef USE_S60_TNM
+#ifdef USE_S60_TNM
+const TInt KMaxGridThumbnailWidth = 200;
+#else
const TInt KGlxThumbnailCleanupAfterDeletions = 200;
_LIT(KGlxMdeDataSourceThumbnailDatabase, "glxmdstn");
#endif
-const TInt KMaxGridThumbnailWidth = 200;
-
_LIT(KObjectDefLocation, "Location");
_LIT(KObjectDefNameAlbum, "Album");
_LIT(KObjectDefNameImage, "Image");
@@ -77,6 +78,8 @@
#undef __USING_INTELLIGENT_UPDATE_FILTERING
+const TInt KHarvestUpdateChunkSize = 1000;
+
// ---------------------------------------------------------------------------
// MPXChangeEventType
// Helper method
@@ -101,6 +104,110 @@
return type;
}
+
+// ---------------------------------------------------------------------------
+// CGlxMDSShutdownObserver::NewL()
+// ---------------------------------------------------------------------------
+//
+CGlxMDSShutdownObserver* CGlxMDSShutdownObserver::NewL( MGlxMDSShutdownObserver& aObserver,
+ const TUid& aKeyCategory,
+ const TInt aPropertyKey,
+ TBool aDefineKey)
+ {
+ TRACER("CGlxMDSShutdownObserver* CGlxMDSShutdownObserver::NewL");
+ CGlxMDSShutdownObserver* self = new( ELeave )CGlxMDSShutdownObserver( aObserver,
+ aKeyCategory,
+ aPropertyKey,
+ aDefineKey);
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CGlxMDSShutdownObserver::CGlxMDSShutdownObserver()
+// ---------------------------------------------------------------------------
+//
+CGlxMDSShutdownObserver::CGlxMDSShutdownObserver( MGlxMDSShutdownObserver& aObserver,
+ const TUid& aKeyCategory,
+ const TInt aPropertyKey,
+ TBool aDefineKey)
+ : CActive( CActive::EPriorityStandard ), iObserver( aObserver ),
+ iKeyCategory( aKeyCategory ), iPropertyKey(aPropertyKey), iDefineKey( aDefineKey )
+ {
+ TRACER("CGlxMDSShutdownObserver::CGlxMDSShutdownObserver()");
+ CActiveScheduler::Add( this );
+ }
+
+// ---------------------------------------------------------------------------
+// CGlxMDSShutdownObserver::ConstructL()
+// ---------------------------------------------------------------------------
+//
+void CGlxMDSShutdownObserver::ConstructL()
+ {
+ TRACER("void CGlxMDSShutdownObserver::ConstructL()");
+ // define P&S property types
+ if (iDefineKey)
+ {
+ RProperty::Define(iKeyCategory,iPropertyKey,
+ RProperty::EInt,KAllowAllPolicy,KPowerMgmtPolicy);
+ }
+
+ // attach to the property
+ TInt err = iProperty.Attach(iKeyCategory,iPropertyKey,EOwnerThread);
+ User::LeaveIfError(err);
+
+ // wait for the previously attached property to be updated
+ iProperty.Subscribe(iStatus);
+ SetActive();
+ }
+
+// ---------------------------------------------------------------------------
+// CGlxMDSShutdownObserver::~CGlxMDSShutdownObserver()
+// ---------------------------------------------------------------------------
+//
+CGlxMDSShutdownObserver::~CGlxMDSShutdownObserver()
+ {
+ TRACER("CGlxMDSShutdownObserver::~CGlxMDSShutdownObserver()");
+ Cancel();
+ iProperty.Close();
+ }
+
+// ---------------------------------------------------------------------------
+// CGlxMDSShutdownObserver::RunL()
+// ---------------------------------------------------------------------------
+//
+void CGlxMDSShutdownObserver::RunL()
+ {
+ TRACER("void CGlxMDSShutdownObserver::RunL()");
+
+ // resubscribe before processing new value to prevent missing updates
+ iProperty.Subscribe(iStatus);
+ SetActive();
+
+ // retrieve the value
+ TInt value = 0;
+ TInt err = iProperty.Get(value);
+ GLX_DEBUG2("CGlxMDSShutdownObserver::RunL(): iProperty.Get(value); returns %d", err);
+
+ User::LeaveIfError(err);
+
+ iObserver.ShutdownNotification(value);
+ }
+
+// ---------------------------------------------------------------------------
+// CGlxMDSShutdownObserver::DoCancel()
+// ---------------------------------------------------------------------------
+//
+void CGlxMDSShutdownObserver::DoCancel()
+ {
+ TRACER("void CGlxMDSShutdownObserver::DoCancel()");
+ iProperty.Cancel();
+ }
+
+
+
// ============================ MEMBER FUNCTIONS ==============================
// ---------------------------------------------------------------------------
@@ -143,14 +250,17 @@
}
delete iThumbnailDatabase;
#endif
-
iFs.Close();
+ iHC.Close();
RFbsSession::Disconnect();
iMonthArray.Close();
iMonthList.Close();
iUpdateData.Close();
+ iAddedItems.Reset();
+ iAddedItems.Close();
delete iUpdateCallback;
delete iCreateSessionCallback;
+ delete iMDSShutdownObserver ;
}
// ---------------------------------------------------------------------------
@@ -159,7 +269,7 @@
//
CGlxDataSourceMde::CGlxDataSourceMde()
{
- TRACER("CGlxDataSourceMde::CGlxDataSourceMde()")
+ TRACER("CGlxDataSourceMde::CGlxDataSourceMde()");
//No Implementation
}
@@ -169,7 +279,7 @@
//
void CGlxDataSourceMde::ConstructL()
{
- TRACER("CGlxDataSourceMde::ConstructL()")
+ TRACER("CGlxDataSourceMde::ConstructL()");
iDataSourceReady = EFalse;
User::LeaveIfError(iFs.Connect());
@@ -179,20 +289,27 @@
#ifdef USE_S60_TNM
iTnEngine = CThumbnailManager::NewL( *this);
- iTnEngine->SetFlagsL(CThumbnailManager::EAllowAnySize);
- iTnEngine->SetDisplayModeL( EColor64K );
+ iTnEngine->SetDisplayModeL( EColor16M );
iTnRequestInProgress = EFalse;
#else
iThumbnailCreator = CGlxtnThumbnailCreator::InstanceL();
iThumbnailDatabase = CGlxtnThumbnailDatabase::NewL(
KGlxMdeDataSourceThumbnailDatabase, this);
#endif
-
+
iCreateSessionCallback = new ( ELeave )
CAsyncCallBack( TCallBack( CreateSession, this ), CActive::EPriorityHigh );
+
+ iMDSShutdownObserver = CGlxMDSShutdownObserver::NewL( *this, KHarvesterPSShutdown, KMdSShutdown, EFalse );
+
iUpdateCallback = new ( ELeave )
CAsyncCallBack( TCallBack( ProcessItemUpdate, this ), CActive::EPriorityLow );
iUpdateData.Reserve(100); // ignore if it fails
+
+ User::LeaveIfError(iHC.Connect());
+ iHC.AddHarvesterEventObserver(*this, EHEObserverTypePlaceholder, KHarvestUpdateChunkSize);
+
+ iHarvestingOngoing = EFalse;
}
// ----------------------------------------------------------------------------
@@ -202,20 +319,22 @@
//
void CGlxDataSourceMde::HandleSessionOpened( CMdESession& aSession, TInt aError )
{
- TRACER("CGlxDataSourceMde::HandleSessionOpened(CMdESession& aSession, TInt aError)")
+ TRACER("CGlxDataSourceMde::HandleSessionOpened(CMdESession& aSession, TInt aError)");
if( KErrNone != aError )
{
HandleSessionError(aSession, aError);
}
TRAPD(err, DoSessionInitL());
- if( KErrNone != err )
+ if (KErrNone == err)
+ {
+ iSessionOpen = ETrue;
+ iDataSourceReady = ETrue;
+ TryStartTask(ETrue);
+ }
+ else
{
HandleSessionError(aSession, err);
}
-
- iSessionOpen = ETrue;
- iDataSourceReady = ETrue;
- TryStartTask(ETrue);
}
// ----------------------------------------------------------------------------
@@ -223,28 +342,37 @@
// CMPXCollectionMdEPlugin::HandleSessionError
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt /*aError*/ )
+void CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt aError )
{
- TRACER("CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt /*aError*/)")
- delete iSession;
- iSession = NULL;
+ TRACER("CGlxDataSourceMde::HandleSessionError(CMdESession& /*aSession*/, TInt aError)")
+ GLX_DEBUG2("void CGlxDataSourceMde::HandleSessionError() aError(%d)", aError);
+
iDataSourceReady = EFalse;
iSessionOpen = EFalse;
- iCreateSessionCallback->CallBack();
+
+ // We wait till MDS restarts before starting the session if the current session is locked.
+ // that is handled separately by the MDS Shutdown PUB SUB Framework.
+ // for everything else we use the generic method and continue.
+ if ( (KErrLocked != aError) && ( KErrServerTerminated != aError) )
+ {
+ iCreateSessionCallback->CallBack();
+ }
}
-
// ---------------------------------------------------------------------------
// CreateTaskL
// ---------------------------------------------------------------------------
//
-CGlxDataSourceTask* CGlxDataSourceMde::CreateTaskL(CGlxRequest* aRequest, MGlxDataSourceRequestObserver& aObserver)
+CGlxDataSourceTask* CGlxDataSourceMde::CreateTaskL(CGlxRequest* aRequest,
+ MGlxDataSourceRequestObserver& aObserver)
{
- TRACER("CGlxDataSourceTask* CGlxDataSourceMde::CreateTaskL(CGlxRequest* aRequest, MGlxDataSourceRequestObserver& aObserver)")
+ TRACER("CGlxDataSourceTask* CGlxDataSourceMde::CreateTaskL(CGlxRequest* aRequest,MGlxDataSourceRequestObserver& aObserver)") ;
if(dynamic_cast<CGlxCommandRequest*>(aRequest))
{
CleanupStack::PushL(aRequest);
- CGlxDataSourceTaskMdeCommand* task = new (ELeave) CGlxDataSourceTaskMdeCommand(static_cast<CGlxCommandRequest*>(aRequest), aObserver, this);
+ CGlxDataSourceTaskMdeCommand* task = new (ELeave)
+ CGlxDataSourceTaskMdeCommand(static_cast<CGlxCommandRequest*>(aRequest),
+ aObserver, this);
CleanupStack::Pop(aRequest); // now owned by task
CleanupStack::PushL(task);
task->ConstructL();
@@ -253,17 +381,10 @@
}
else if (dynamic_cast< CGlxGetRequest *>(aRequest))
{
- GLX_LOG_INFO("==> CGlxDataSourceMde::CreateTaskL - CGlxDataSourceTaskMdeAttributeMde+");
-#ifdef _DEBUG
- _LIT( KFormatTimeStamp, "[%H:%T:%S.%*C5]");
- TTime time;
- time.HomeTime(); // Get home time
- TBuf<32> timeStampBuf;
- time.FormatL(timeStampBuf, KFormatTimeStamp);
- RDebug::Print(_L("%S"), &timeStampBuf);
-#endif
CleanupStack::PushL(aRequest);
- CGlxDataSourceTaskMdeAttributeMde* task = new (ELeave) CGlxDataSourceTaskMdeAttributeMde(static_cast<CGlxGetRequest*>(aRequest), aObserver, this);
+ CGlxDataSourceTaskMdeAttributeMde* task = new (ELeave)
+ CGlxDataSourceTaskMdeAttributeMde(static_cast<CGlxGetRequest*>(aRequest),
+ aObserver, this);
CleanupStack::Pop(aRequest); // now owned by task
CleanupStack::PushL(task);
task->ConstructL();
@@ -273,7 +394,9 @@
else if (dynamic_cast< CGlxIdListRequest *>(aRequest))
{
CleanupStack::PushL(aRequest);
- CGlxDataSourceTaskMdeIdList* task = new (ELeave) CGlxDataSourceTaskMdeIdList(static_cast<CGlxIdListRequest*>(aRequest), aObserver, this);
+ CGlxDataSourceTaskMdeIdList* task = new (ELeave)
+ CGlxDataSourceTaskMdeIdList(static_cast<CGlxIdListRequest*>(aRequest),
+ aObserver, this);
CleanupStack::Pop(aRequest); // now owned by task
CleanupStack::PushL(task);
task->ConstructL();
@@ -282,17 +405,10 @@
}
else if (dynamic_cast< CGlxThumbnailRequest *>(aRequest))
{
- GLX_LOG_INFO("==> CGlxDataSourceMde::CreateTaskL - CGlxDataSourceTaskMdeThumbnail+");
-#ifdef _DEBUG
- _LIT( KFormatTimeStamp, "[%H:%T:%S.%*C5]");
- TTime time;
- time.HomeTime(); // Get home time
- TBuf<32> timeStampBuf;
- time.FormatL(timeStampBuf, KFormatTimeStamp);
- RDebug::Print(_L("%S"), &timeStampBuf);
-#endif
CleanupStack::PushL(aRequest);
- CGlxDataSourceTaskMdeThumbnail* task = new (ELeave) CGlxDataSourceTaskMdeThumbnail(static_cast<CGlxThumbnailRequest*>(aRequest), aObserver, this);
+ CGlxDataSourceTaskMdeThumbnail* task = new (ELeave)
+ CGlxDataSourceTaskMdeThumbnail(static_cast<CGlxThumbnailRequest*>(aRequest),
+ aObserver, this);
CleanupStack::Pop(aRequest); // now owned by task
CleanupStack::PushL(task);
task->ConstructL();
@@ -311,9 +427,10 @@
// ThumbnailAvailable
// ---------------------------------------------------------------------------
//
-void CGlxDataSourceMde::ThumbnailAvailable(const TGlxMediaId& /*aId*/, const TSize& /*aSize*/)
+void CGlxDataSourceMde::ThumbnailAvailable(const TGlxMediaId&
+ /*aId*/, const TSize& /*aSize*/)
{
- TRACER("CGlxDataSourceMde::ThumbnailAvailable(const TGlxMediaId& /*aId*/, const TSize& /*aSize*/)")
+ TRACER("CGlxDataSourceMde::ThumbnailAvailable(const TGlxMediaId& /*aId*/, const TSize& /*aSize*/)");
//No implementation
}
@@ -323,7 +440,7 @@
//
void CGlxDataSourceMde::BackgroundThumbnailError(const TGlxMediaId& aId, TInt aError)
{
- TRACER("CGlxDataSourceMde::BackgroundThumbnailError(const TGlxMediaId& aId, TInt aError)")
+ TRACER("CGlxDataSourceMde::BackgroundThumbnailError(const TGlxMediaId& aId, TInt aError)");
TSize size(0, 0);
TRAP_IGNORE(BackgroundThumbnailMessageL(aId, size, aError));
}
@@ -333,9 +450,10 @@
// BackgroundThumbnailMessageL
// ---------------------------------------------------------------------------
//
-void CGlxDataSourceMde::BackgroundThumbnailMessageL(const TGlxMediaId& aId, const TSize& aSize, TInt aError)
+void CGlxDataSourceMde::BackgroundThumbnailMessageL(const TGlxMediaId& aId,
+ const TSize& aSize, TInt aError)
{
- TRACER("CGlxDataSourceMde::BackgroundThumbnailMessageL(const TGlxMediaId& aId, const TSize& aSize, TInt aError)")
+ TRACER("CGlxDataSourceMde::BackgroundThumbnailMessageL(const TGlxMediaId& aId, const TSize& aSize, TInt aError)");
CMPXMessage* message = CMPXMessage::NewL();
CleanupStack::PushL(message);
message->SetTObjectValueL(KMPXMessageGeneralId, KGlxMessageIdBackgroundThumbnail);
@@ -352,7 +470,7 @@
//
void CGlxDataSourceMde::DoSessionInitL()
{
- TRACER("CGlxDataSourceMde::DoSessionInitL()")
+ TRACER("CGlxDataSourceMde::DoSessionInitL()");
/// @todo check schema version number
iNameSpaceDef = &iSession->GetDefaultNamespaceDefL();
@@ -396,12 +514,23 @@
//
void CGlxDataSourceMde::AddMdEObserversL()
{
- TRACER("CGlxDataSourceMde::AddMdEObserversL()")
+ TRACER("CGlxDataSourceMde::AddMdEObserversL()");
iSession->AddRelationObserverL(*this);
iSession->AddRelationPresentObserverL(*this);
- iSession->AddObjectObserverL(*this);
- iSession->AddObjectPresentObserverL(*this);
+ //when setting observing conditions,
+ //add filters for all images, videos, Albums & Tags
+ CMdELogicCondition* addCondition = CMdELogicCondition::NewLC( ELogicConditionOperatorOr );
+ addCondition->AddObjectConditionL( *iImageDef );
+ addCondition->AddObjectConditionL( *iAlbumDef );
+ addCondition->AddObjectConditionL( *iTagDef );
+
+ iSession->AddObjectObserverL(*this, addCondition );
+ iSession->AddObjectPresentObserverL(*this );
+
+ // This addCondition should only be popped.
+ // As the ownership is transferred, the same will be destroyed by MdS.
+ CleanupStack::Pop( addCondition );
}
// ---------------------------------------------------------------------------
@@ -413,13 +542,47 @@
TObserverNotificationType aType,
const RArray<TItemId>& aObjectIdArray)
{
- TRACER("CGlxDataSourceMde::HandleObjectNotification()")
+ TRACER("CGlxDataSourceMde::HandleObjectNotification()");
+ GLX_LOG_INFO3("CGlxDataSourceMde::HandleObjectNotification() aType=%d, aObjectIdArray.Count()=%d, iHarvestingOngoing=%d",
+ aType, aObjectIdArray.Count(),
+ iHarvestingOngoing);
+ if (ENotifyAdd == aType)
+ {
+ for ( TInt i = 0; i < aObjectIdArray.Count(); i++ )
+ {
+ iAddedItems.Append(aObjectIdArray[i]);
+ }
+ GLX_LOG_INFO1("ENotifyAdd - iAddedItems.Count()=%d", iAddedItems.Count());
+ }
+
+ if (ENotifyModify == aType)
+ {
+ for ( TInt i = 0; i < aObjectIdArray.Count(); i++ )
+ {
+ if (iAddedItems.Find(aObjectIdArray[i]) != KErrNotFound)
+ {
+ if (!iHarvestingOngoing)
+ {
+ GLX_LOG_INFO("ENotifyModify - Harvesting Completed - "
+ "Reset iAddedItems array");
+ iAddedItems.Reset();
+ break;
+ }
+ GLX_LOG_INFO("ENotifyModify - Id found in iAddedItems array, DO NOT PROCESS");
+ return;
+ }
+ }
+ }
+
+ GLX_LOG_INFO("ProcessUpdateArray");
ProcessUpdateArray(aObjectIdArray, MPXChangeEventType(aType), ETrue);
#ifndef USE_S60_TNM
if(MPXChangeEventType(aType) == EMPXItemDeleted )
{
TInt count = aObjectIdArray.Count();
iDeletedCount += count;
+ GLX_LOG_INFO2("EMPXItemDeleted - aObjectIdArray.Count()=%d, iDeletedCount=%d",
+ count, iDeletedCount);
if(iDeletedCount > KGlxThumbnailCleanupAfterDeletions)
{
TRAPD(err, ThumbnailCreator().CleanupThumbnailsL(iThumbnailDatabase));
@@ -429,10 +592,15 @@
}
}
}
+
+ if(MPXChangeEventType(aType) == EMPXItemModified )
+ {
+ GLX_LOG_INFO("EMPXItemModified");
+ TRAP_IGNORE(ThumbnailCreator().CleanupThumbnailsL(iThumbnailDatabase));
+ }
#endif
}
-
// ---------------------------------------------------------------------------
// CGlxDataSourceMde::HandleObjectPresentNotification
// ---------------------------------------------------------------------------
@@ -441,7 +609,7 @@
void CGlxDataSourceMde::HandleObjectPresentNotification(CMdESession& /*aSession*/,
TBool aPresent, const RArray<TItemId>& aObjectIdArray)
{
- TRACER("CGlxDataSourceMde::HandleObjectPresentNotification()")
+ TRACER("CGlxDataSourceMde::HandleObjectPresentNotification()");
if (aPresent)
{
ProcessUpdateArray(aObjectIdArray, EMPXItemInserted, ETrue);
@@ -461,7 +629,7 @@
TObserverNotificationType aType,
const RArray<TItemId>& aRelationIdArray)
{
- TRACER("CGlxDataSourceMde::HandleRelationNotification()")
+ TRACER("CGlxDataSourceMde::HandleRelationNotification()");
ProcessUpdateArray(aRelationIdArray, MPXChangeEventType(aType), EFalse);
}
@@ -473,7 +641,7 @@
void CGlxDataSourceMde::HandleRelationPresentNotification(CMdESession& /*aSession*/,
TBool aPresent, const RArray<TItemId>& aRelationIdArray)
{
- TRACER("CGlxDataSourceMde::HandleRelationPresentNotification()")
+ TRACER("CGlxDataSourceMde::HandleRelationPresentNotification()");
if (aPresent)
{
ProcessUpdateArray(aRelationIdArray, EMPXItemInserted, EFalse);
@@ -488,9 +656,10 @@
// ProcessUpdateArray
// ---------------------------------------------------------------------------
//
-void CGlxDataSourceMde::ProcessUpdateArray(const RArray<TItemId>& aArray, TMPXChangeEventType aType, TBool aIsObject)
+void CGlxDataSourceMde::ProcessUpdateArray(const RArray<TItemId>& aArray,
+ TMPXChangeEventType aType, TBool aIsObject)
{
- TRACER("CGlxDataSourceMde::ProcessUpdateArray(const RArray<TItemId>& aArray, TMPXChangeEventType aType, TBool aIsObject)")
+ TRACER("CGlxDataSourceMde::ProcessUpdateArray(const RArray<TItemId>& aArray,TMPXChangeEventType aType, TBool aIsObject)");
// only need one message so process first item
TUpdateData update;
update.iId = aArray[0];
@@ -510,12 +679,22 @@
}
// ---------------------------------------------------------------------------
-// MPXChangeEventType
+// CreateSession
+// ---------------------------------------------------------------------------
+//
+void CGlxDataSourceMde::CreateSession()
+ {
+ TRACER("CGlxDataSourceMde::CreateSession()")
+ TRAP_IGNORE(CreateSessionL());
+ }
+
+// ---------------------------------------------------------------------------
+// CreateSession
// ---------------------------------------------------------------------------
//
TInt CGlxDataSourceMde::CreateSession(TAny* aPtr)
{
- TRACER("CGlxDataSourceMde::CreateSession(TAny* aPtr)")
+ TRACER("CGlxDataSourceMde::CreateSession(TAny* aPtr)");
CGlxDataSourceMde* self
= reinterpret_cast<CGlxDataSourceMde*>( aPtr );
TRAP_IGNORE(self->CreateSessionL());
@@ -528,7 +707,9 @@
//
void CGlxDataSourceMde::CreateSessionL()
{
- TRACER("CGlxDataSourceMde::CreateSessionL()")
+ TRACER("CGlxDataSourceMde::CreateSessionL()");
+ delete iSession;
+ iSession = NULL;
iSession = CMdESession::NewL( *this );
}
@@ -539,7 +720,7 @@
//
TInt CGlxDataSourceMde::ProcessItemUpdate(TAny* aPtr)
{
- TRACER("CGlxDataSourceMde::ProcessItemUpdate(TAny* aPtr)")
+ TRACER("CGlxDataSourceMde::ProcessItemUpdate(TAny* aPtr)");
CGlxDataSourceMde* self
= reinterpret_cast<CGlxDataSourceMde*>( aPtr );
TRAP_IGNORE(self->ProcessItemUpdateL());
@@ -552,8 +733,7 @@
//
void CGlxDataSourceMde::ProcessItemUpdateL()
{
- TRACER("CGlxDataSourceMde::ProcessItemUpdateL()")
- //__ASSERT_DEBUG(iUpdateData.Count(), Panic(EGlxPanicIllegalState));
+ TRACER("CGlxDataSourceMde::ProcessItemUpdateL()");
if ( !iUpdateData.Count() || iPauseUpdate )
{
return;
@@ -561,7 +741,8 @@
CMPXMessage* message = CMPXMessage::NewL();
CleanupStack::PushL(message);
message->SetTObjectValueL<TInt>(KMPXMessageGeneralId, KMPXMessageIdItemChanged);
- message->SetTObjectValueL<TMPXChangeEventType>(KMPXMessageChangeEventType, iUpdateData[0].iType);
+ message->SetTObjectValueL<TMPXChangeEventType>(KMPXMessageChangeEventType,
+ iUpdateData[0].iType);
TMPXGeneralCategory category = EMPXNoCategory;
TMPXItemId id = iUpdateData[0].iId;
@@ -589,7 +770,8 @@
__ASSERT_DEBUG(rightObject, Panic(EGlxPanicIllegalState));
TContainerType rightContainer = ContainerType(rightObject);
delete rightObject;
- __ASSERT_DEBUG(( EContainerTypeAlbum != rightContainer), Panic(EGlxPanicIllegalState));
+ __ASSERT_DEBUG(( EContainerTypeAlbum != rightContainer),
+ Panic(EGlxPanicIllegalState));
if( EContainerTypeTag == rightContainer )
{
id = leftId;
@@ -607,8 +789,10 @@
containerId = leftId;
containerCategory = EMPXAlbum;
}
- message->SetTObjectValueL<TMPXGeneralCategory>(KGlxCollectionMessageContainerCategory, containerCategory);
- message->SetTObjectValueL<TMPXItemId>(KGlxCollectionMessageContainerId, containerId);
+ message->SetTObjectValueL<TMPXGeneralCategory>(KGlxCollectionMessageContainerCategory,
+ containerCategory);
+ message->SetTObjectValueL<TMPXItemId>(KGlxCollectionMessageContainerId,
+ containerId);
}
else
{
@@ -647,7 +831,8 @@
}
}
#endif // __USING_INTELLIGENT_UPDATE_FILTERING
- message->SetTObjectValueL<TMPXGeneralCategory>(KMPXMessageMediaGeneralCategory, category);
+ message->SetTObjectValueL<TMPXGeneralCategory>(KMPXMessageMediaGeneralCategory,
+ category);
message->SetTObjectValueL<TMPXItemId>(KMPXMessageMediaGeneralId, id);
BroadcastMessage(*message);
CleanupStack::PopAndDestroy(message);
@@ -660,7 +845,7 @@
//
CGlxDataSource::TContainerType CGlxDataSourceMde::ContainerType(CMdEObject* aObject)
{
- TRACER("CGlxDataSourceMde::ContainerType(CMdEObject* aObject)")
+ TRACER("CGlxDataSourceMde::ContainerType(CMdEObject* aObject)");
TContainerType containerType = EContainerTypeNotAContainer;
if( 0 == aObject->Def().Compare(*iAlbumDef) )
@@ -684,9 +869,10 @@
// ContainerType
// ---------------------------------------------------------------------------
//
-CGlxDataSource::TContainerType CGlxDataSourceMde::ContainerType(CMdEObjectDef* aObjectDef)
+CGlxDataSource::TContainerType CGlxDataSourceMde::ContainerType(CMdEObjectDef*
+ aObjectDef)
{
- TRACER("CGlxDataSourceMde::ContainerType(CMdEObjectDef* aObjectDef)")
+ TRACER("CGlxDataSourceMde::ContainerType()");
TContainerType containerType = EContainerTypeNotAContainer;
if( 0 == aObjectDef->Compare(*iAlbumDef) )
@@ -711,7 +897,7 @@
//
CGlxDataSource::TItemType CGlxDataSourceMde::ItemType(CMdEObject* aObject)
{
- TRACER("CGlxDataSourceMde::ItemType(CMdEObject* aObject)")
+ TRACER("CGlxDataSourceMde::ItemType(CMdEObject* aObject)");
TItemType itemType = EItemTypeNotAnItem;
if( 0 == aObject->Def().Compare(*iImageDef) )
@@ -732,7 +918,7 @@
//
void CGlxDataSourceMde::PrepareMonthsL()
{
- TRACER("CGlxDataSourceMde::PrepareMonthsL()")
+ TRACER("CGlxDataSourceMde::PrepareMonthsL()");
TTime month(0);
iFirstMonth = month;
}
@@ -743,7 +929,7 @@
//
const TGlxMediaId CGlxDataSourceMde::GetMonthIdL(const TTime& aMonth)
{
- TRACER("CGlxDataSourceMde::GetMonthIdL(const TTime& aMonth)")
+ TRACER("CGlxDataSourceMde::GetMonthIdL()");
TTime monthStart = iFirstMonth + aMonth.MonthsFrom(iFirstMonth);
const TTimeIntervalMonths KGlxOneMonth = 1;
const TTimeIntervalMicroSeconds KGlxOneMicrosecond = 1;
@@ -775,7 +961,8 @@
month = iSession->NewObjectLC(*iMonthDef, title);
// A title property def of type text is required.
- CMdEPropertyDef& titlePropertyDef = iObjectDef->GetPropertyDefL(KPropertyDefNameTitle);
+ CMdEPropertyDef& titlePropertyDef = iObjectDef->GetPropertyDefL(
+ KPropertyDefNameTitle);
if (titlePropertyDef.PropertyType() != EPropertyText)
{
User::Leave(KErrCorrupt);
@@ -784,7 +971,8 @@
month->AddTextPropertyL (titlePropertyDef, title);
// A size property is required.
- CMdEPropertyDef& sizePropertyDef = iObjectDef->GetPropertyDefL(KPropertyDefNameSize);
+ CMdEPropertyDef& sizePropertyDef = iObjectDef->GetPropertyDefL(
+ KPropertyDefNameSize);
if (sizePropertyDef.PropertyType() != EPropertyUint32)
{
User::Leave(KErrCorrupt);
@@ -793,7 +981,8 @@
// A creation date property is required.
- CMdEPropertyDef& creationDateDef = iObjectDef->GetPropertyDefL(KPropertyDefNameCreationDate);
+ CMdEPropertyDef& creationDateDef = iObjectDef->GetPropertyDefL(
+ KPropertyDefNameCreationDate);
if (creationDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
@@ -801,7 +990,8 @@
month->AddTimePropertyL(creationDateDef, monthStart);
// A last modified date property is required.
- CMdEPropertyDef& lmDateDef = iObjectDef->GetPropertyDefL(KPropertyDefNameLastModifiedDate);
+ CMdEPropertyDef& lmDateDef = iObjectDef->GetPropertyDefL(
+ KPropertyDefNameLastModifiedDate);
if (lmDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
@@ -865,8 +1055,14 @@
}
#ifdef USE_S60_TNM
-void CGlxDataSourceMde::FetchThumbnailL(CGlxRequest* aRequest, MThumbnailFetchRequestObserver& aObserver)
+void CGlxDataSourceMde::FetchThumbnailL(CGlxRequest* aRequest,
+ MThumbnailFetchRequestObserver& aObserver)
{
+ TRACER("CGlxDataSourceMde::FetchThumbnailL()");
+#ifdef _DEBUG
+ iStartTime.HomeTime(); // Get home time
+#endif
+
iTnFetchObserver = &aObserver;
CGlxThumbnailRequest* request = static_cast<CGlxThumbnailRequest*>(aRequest);
@@ -877,64 +1073,114 @@
iTnHandle = tnReq.iBitmapHandle;
iMediaId = tnReq.iId;
- if (tnReq.iSizeClass.iWidth < KMaxGridThumbnailWidth)
- {
- iTnEngine->SetFlagsL(CThumbnailManager::ECropToAspectRatio);
+ if (tnReq.iSizeClass.iWidth < KMaxGridThumbnailWidth)
+ {
+ iTnEngine->SetFlagsL(CThumbnailManager::ECropToAspectRatio);
iTnEngine->SetThumbnailSizeL(EGridThumbnailSize);
- GLX_LOG_INFO("CGlxDataSourceMde::FetchThumbnailL() - Fetch TN attrib - EGridThumbnailSize");
- }
+ GLX_LOG_INFO("CGlxDataSourceMde::FetchThumbnailL() - Fetch TN attrib -"
+ " EGridThumbnailSize");
+ }
else
- {
- iTnEngine->SetFlagsL(CThumbnailManager::EDefaultFlags);
- iTnEngine->SetThumbnailSizeL(EFullScreenThumbnailSize);
- GLX_LOG_INFO("CGlxDataSourceMde::FetchThumbnailL() - Fetch TN attrib - EFullScreenThumbnailSize");
- }
- CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC(request->ThumbnailInfo()->FilePath(), 0);
-#ifdef _DEBUG
- iStartTime.UniversalTime();
-#endif
+ {
+ iTnEngine->SetFlagsL(CThumbnailManager::EDefaultFlags);
+ iTnEngine->SetThumbnailSizeL(EFullScreenThumbnailSize);
+ GLX_LOG_INFO("CGlxDataSourceMde::FetchThumbnailL() - Fetch TN attrib - "
+ "EFullScreenThumbnailSize");
+ }
+
+ if (tnReq.iPriorityMode == TGlxThumbnailRequest::EPrioritizeQuality)
+ {
+ iTnEngine->SetQualityPreferenceL(CThumbnailManager::EOptimizeForQuality);
+ GLX_LOG_INFO("CGlxDataSourceMde::FetchThumbnailL() - Fetch TN attrib -"
+ " EOptimizeForQuality");
+ }
+ else
+ {
+ iTnEngine->SetQualityPreferenceL(CThumbnailManager::EOptimizeForQualityWithPreview);
+ GLX_LOG_INFO("CGlxDataSourceMde::FetchThumbnailL() - Fetch TN attrib -"
+ " EOptimizeForQualityWithPreview");
+ }
+
+ CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC(
+ request->ThumbnailInfo()->FilePath(), 0);
iTnThumbnailCbId = iTnEngine->GetThumbnailL(*source);
+ CleanupStack::PopAndDestroy(source);
+
iTnRequestInProgress = ETrue;
- CleanupStack::PopAndDestroy();
}
TInt CGlxDataSourceMde::CancelFetchThumbnail()
{
+ TRACER("CGlxDataSourceMde::CancelFetchThumbnail");
TInt ret = KErrNone;
if (iTnRequestInProgress)
{
ret = iTnEngine->CancelRequest(iTnThumbnailCbId);
+ iTnRequestInProgress = EFalse;
+ iTnFetchObserver->ThumbnailFetchComplete(KErrCancel,EFalse);
}
return ret;
}
-void CGlxDataSourceMde::ThumbnailPreviewReady(MThumbnailData& /*aThumbnail*/,
- TThumbnailRequestId /*aId*/)
+// Called when preview thumbnail is created
+void CGlxDataSourceMde::ThumbnailPreviewReady(MThumbnailData& aThumbnail,
+ TThumbnailRequestId aId)
{
+ TRACER("CGlxDataSourceMde::ThumbnailPreviewReady()");
+
+ TInt error = KErrNotSupported;
+ if ( aThumbnail.Bitmap() )
+ {
+ GLX_DEBUG1("CGlxDataSourceMde::ThumbnailPreviewReady preview aval");
+ error = KErrNone;
+ }
+ //This function is called number of times as a callback ,
+ //hence not trapping the leaving function which costs time and memory.
+ //Ignoring this for code scanner warnings - Leaving functions called in non-leaving functions.
+ ThumbnailReadyL(error, aThumbnail, aId, EFalse);
}
// Called when real thumbnail is created
void CGlxDataSourceMde::ThumbnailReady(TInt aError,
MThumbnailData& aThumbnail, TThumbnailRequestId aId)
{
- if (iTnThumbnailCbId == aId)
- {
- iTnRequestInProgress = EFalse;
+ TRACER("CGlxDataSourceMde::ThumbnailReady");
+ GLX_DEBUG2("GlxDataSourceMde::ThumbnailReady aError=%d", aError);
+ //This function is called number of times as a callback ,
+ //hence not trapping the leaving function which costs time and memory.
+ //Ignoring this for code scanner warnings - Leaving functions called in non-leaving functions.
+ ThumbnailReadyL(aError,aThumbnail, aId, ETrue);
+ }
+
+// ---------------------------------------------------------------------------
+// ThumbnailReadyL
+// ---------------------------------------------------------------------------
+//
+void CGlxDataSourceMde::ThumbnailReadyL(TInt aError,
+ MThumbnailData& aThumbnail, TThumbnailRequestId aId, TBool aQuality)
+ {
+ TRACER("CGlxDataSourceMde::ThumbnailReadyL()");
+ GLX_DEBUG3("CGlxDataSourceMde::ThumbnailReadyL aError=%d, aQuality=%d",
+ aError, aQuality);
#ifdef _DEBUG
- iStopTime.UniversalTime();
- GLX_LOG_INFO1("==> S60 TNMan fetch took <%d> us", (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
+ iStopTime.HomeTime(); // Get home time
+ GLX_DEBUG2("=>CGlxDataSourceMde::ThumbnailReadyL - TN Fetch took <%d> us",
+ (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
#endif
- if (aError == KErrNone && iTnHandle)
- {
- if (iTnHandle == KGlxMessageIdBackgroundThumbnail)
- {
- BackgroundThumbnailMessageL(iMediaId, TSize(), aError);
- }
- else
- {
+
+ if (iTnThumbnailCbId == aId)
+ {
+ if (aError == KErrNone && iTnHandle)
+ {
+ if (iTnHandle == KGlxMessageIdBackgroundThumbnail)
+ {
+ BackgroundThumbnailMessageL(iMediaId, TSize(), aError);
+ }
+ else
+ {
delete iTnThumbnail;
iTnThumbnail = NULL;
- iTnThumbnail = aThumbnail.DetachBitmap();
+ iTnThumbnail = aThumbnail.DetachBitmap();
delete iThumbnail;
iThumbnail = NULL;
@@ -948,15 +1194,75 @@
CleanupStack::PushL(context);
context->BitBlt( TPoint(), iTnThumbnail);
CleanupStack::PopAndDestroy(context);
- CleanupStack::PopAndDestroy(device);
- }
- }
+ CleanupStack::PopAndDestroy(device);
+ }
+ }
+ }
+
+ if (iTnFetchObserver && iTnRequestInProgress)
+ {
+ iTnFetchObserver->ThumbnailFetchComplete(aError, aQuality);
+ iTnHandle = KErrNone;
+ iTnRequestInProgress = EFalse;
+ }
+ }
+#endif
- if (iTnFetchObserver)
- {
- iTnFetchObserver->ThumbnailFetchComplete(aError);
- iTnHandle = KErrNone;
- }
- }
- }
-#endif
+// ---------------------------------------------------------------------------
+// CGlxDataSourceMde
+// HarvestingUpdated
+// ---------------------------------------------------------------------------
+//
+void CGlxDataSourceMde::HarvestingUpdated(
+ HarvesterEventObserverType /*aHEObserverType*/,
+ HarvesterEventState aHarvesterEventState,
+ TInt /*aItemsLeft*/)
+ {
+ TRACER("void CGlxDataSourceMde::HarvestingUpdated()");
+ GLX_LOG_INFO1("CGlxDataSourceMde::HarvestingUpdated() aHarvesterEventState=%d",
+ aHarvesterEventState);
+
+ switch(aHarvesterEventState)
+ {
+ case EHEStateStarted:
+ GLX_LOG_INFO("CGlxDataSourceMde::HarvestingUpdated() - EHEStateStarted");
+ case EHEStateResumed:
+ case EHEStateHarvesting:
+ {
+ iHarvestingOngoing = ETrue;
+ }
+ break;
+ case EHEStatePaused:
+ case EHEStateFinished:
+ {
+ iHarvestingOngoing = EFalse;
+ GLX_LOG_INFO("CGlxDataSourceMde::HarvestingUpdated() - EHEStateFinished");
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// ShutdownNotification
+// ---------------------------------------------------------------------------
+//
+void CGlxDataSourceMde::ShutdownNotification(TInt aShutdownState)
+ {
+ TRACER("void CGlxDataSourceMde::ShutdownNotification(TInt aShutdownState)")
+ GLX_DEBUG2("CGlxDataSourceMde::ShutdownNotification(aShutdownState=%d)",
+ aShutdownState);
+
+ if (!iDataSourceReady && 0 == aShutdownState)
+ {
+ GLX_DEBUG1("Photos MdS ShutdownNotification - MdS Server restarted!");
+ CreateSession();
+ }
+
+ if (iDataSourceReady && 1 == aShutdownState)
+ {
+ GLX_DEBUG1("Photos MdS ShutdownNotification - MdS Server Shutdown!");
+ HandleSessionError(*iSession, KErrServerTerminated);
+ }
+ }
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemdsproxy.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemdsproxy.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -22,7 +22,7 @@
* @internal reviewed 11/07/2007 by M Byrne
*/
-#include <implementationproxy.h>
+#include <ecom/implementationproxy.h>
#include "glxdatasourcemds.h"
#include "glxdatasourcemds.hrh"
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -69,8 +69,6 @@
_LIT(KPropertyDefNameCreationDate, "CreationDate");
_LIT(KPropertyDefNameLastModifiedDate, "LastModifiedDate");
_LIT(KPropertyDefNameTitle, "Title");
-//Code commented cout below, so commenting the below line to remove BAD warning
-//_LIT(KPropertyDefNameDRM, "DRM");
_LIT(KPropertyDefNameFrameCount, "FrameCount");
_LIT(KPropertyDefNameOrigin, "Origin");
@@ -82,7 +80,7 @@
MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource)
: CGlxDataSourceTask(aRequest, aObserver, aDataSource)
{
- TRACER("CGlxDataSourceTaskMde::CGlxDataSourceTaskMde()")
+ TRACER("CGlxDataSourceTaskMde::CGlxDataSourceTaskMde()");
// No implementation required
}
@@ -92,7 +90,7 @@
//
CGlxDataSourceTaskMde::~CGlxDataSourceTaskMde()
{
- TRACER("CGlxDataSourceTaskMde::~CGlxDataSourceTaskMde()")
+ TRACER("CGlxDataSourceTaskMde::~CGlxDataSourceTaskMde()");
DestroyQueries();
}
@@ -102,7 +100,7 @@
//
void CGlxDataSourceTaskMde::ConstructL()
{
- TRACER("CGlxDataSourceTaskMde::ConstructL()")
+ TRACER("CGlxDataSourceTaskMde::ConstructL()");
CreateResponseL();
#ifdef USE_S60_TNM
DataSource()->CancelFetchThumbnail();
@@ -117,9 +115,9 @@
//
void CGlxDataSourceTaskMde::CancelRequest()
{
- TRACER("CGlxDataSourceTaskMde::CancelRequest()")
- DestroyQueries();
+ TRACER("CGlxDataSourceTaskMde::CancelRequest()");
iCancelled = ETrue;
+ DestroyQueries();
}
// ----------------------------------------------------------------------------
@@ -130,7 +128,7 @@
TInt /*aFirstNewItemIndex*/,
TInt /*aNewItemCount*/ )
{
- TRACER("CGlxDataSourceTaskMde::HandleQueryNewResults()")
+ TRACER("CGlxDataSourceTaskMde::HandleQueryNewResults()");
// Not used.
}
@@ -144,7 +142,7 @@
TInt /*aNewRelationItemCount*/,
TInt /*aNewEventItemCount*/)
{
- TRACER("CGlxDataSourceTaskMde::HandleQueryNewResults()")
+ TRACER("CGlxDataSourceTaskMde::HandleQueryNewResults()");
// Not used.
}
@@ -155,7 +153,7 @@
//
void CGlxDataSourceTaskMde::HandleQueryCompleted(CMdEQuery& aQuery, TInt aError)
{
- TRACER("CGlxDataSourceTaskMde::HandleQueryCompleted()")
+ TRACER("CGlxDataSourceTaskMde::HandleQueryCompleted()");
__ASSERT_ALWAYS(&aQuery == iQueries[0], Panic(EGlxPanicQueryLogicError));
TInt err = aError;
@@ -164,7 +162,7 @@
TRAP(err, HandleQueryCompletedL(aQuery));
}
- if (err != KErrNone)
+ if (err != KErrNone && !iCancelled)
{
HandleRequestComplete(err);
}
@@ -176,7 +174,7 @@
//
CGlxDataSourceMde* CGlxDataSourceTaskMde::DataSource()
{
- TRACER("CGlxDataSourceTaskMde::DataSource()")
+ TRACER("CGlxDataSourceTaskMde::DataSource()");
return static_cast<CGlxDataSourceMde*>(iDataSource);
}
@@ -184,9 +182,10 @@
// CGlxDataSourceTaskMde::AddMonthFilterL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMde::AddMonthFilterL(const TGlxMediaId& aContainerId, TGlxFilterProperties& aFilterProperties)
+void CGlxDataSourceTaskMde::AddMonthFilterL(const TGlxMediaId& aContainerId,
+ TGlxFilterProperties& aFilterProperties)
{
- TRACER("CGlxDataSourceTaskMde::AddMonthFilterL(const TGlxMediaId& aContainerId, TGlxFilterProperties& aFilterProperties)")
+ TRACER("CGlxDataSourceTaskMde::AddMonthFilterL(const TGlxMediaId& aContainerId, TGlxFilterProperties& aFilterProperties)");
CMdEObject* month = DataSource()->Session().GetObjectL(aContainerId.Value());
if( !month )
{
@@ -204,16 +203,19 @@
// CGlxDataSourceTaskMde::AddMonthFilterL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMde::AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties)
+void CGlxDataSourceTaskMde::AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties&
+ aFilterProperties)
{
- TRACER("CGlxDataSourceTaskMde::AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties)")
- CMdEPropertyDef& creationDateDef = DataSource()->ObjectDef().GetPropertyDefL(KPropertyDefNameCreationDate);
+ TRACER("CGlxDataSourceTaskMde::AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties)");
+ CMdEPropertyDef& creationDateDef = DataSource()->ObjectDef().GetPropertyDefL(
+ KPropertyDefNameCreationDate);
if (creationDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
}
- CMdEPropertyDef& lmDateDef = DataSource()->ObjectDef().GetPropertyDefL(KPropertyDefNameLastModifiedDate);
+ CMdEPropertyDef& lmDateDef = DataSource()->ObjectDef().GetPropertyDefL(
+ KPropertyDefNameLastModifiedDate);
if (lmDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
@@ -240,15 +242,21 @@
// CGlxDataSourceTaskMde::SetQueryConditionsL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMde::SetQueryConditionsL(CMdEQuery& aQuery, const TGlxFilterProperties& aFilterProperties, const TGlxMediaId aContainerId, CMdEObjectDef& aObjectDef)
+void CGlxDataSourceTaskMde::SetQueryConditionsL(CMdEQuery& aQuery,
+ const TGlxFilterProperties& aFilterProperties, const TGlxMediaId aContainerId,
+ CMdEObjectDef& aObjectDef)
{
- TRACER("CGlxDataSourceTaskMde::SetQueryConditionsL()")
+ TRACER("CGlxDataSourceTaskMde::SetQueryConditionsL()");
CMdELogicCondition& rootCondition = aQuery.Conditions();
CMdEObjectDef* objectDef = &aObjectDef;
SetQueryFilterConditionsL(rootCondition, *objectDef, aFilterProperties);
- SetSortOrderL(aQuery, aObjectDef, aFilterProperties);
+
+ if (aQuery.ResultMode() != EQueryResultModeCount)
+ {
+ SetSortOrderL(aQuery, aObjectDef, aFilterProperties);
+ }
if( KGlxCollectionRootId != aContainerId.Value() )
{
@@ -257,12 +265,14 @@
objectDef = &DataSource()->ObjectDef();
if( DataSource()->ContainerIsLeft(aObjectDef) )
{
- relationCondition = &rootCondition.AddRelationConditionL(DataSource()->ContainsDef(), ERelationConditionSideRight);
+ relationCondition = &rootCondition.AddRelationConditionL(
+ DataSource()->ContainsDef(), ERelationConditionSideRight);
containerCondition = &relationCondition->LeftL();
}
else
{
- relationCondition = &rootCondition.AddRelationConditionL(DataSource()->ContainsDef(), ERelationConditionSideLeft);
+ relationCondition = &rootCondition.AddRelationConditionL(
+ DataSource()->ContainsDef(), ERelationConditionSideLeft);
containerCondition = &relationCondition->RightL();
}
containerCondition->AddObjectConditionL(aContainerId.Value());
@@ -278,7 +288,7 @@
aLogicCondition, CMdEObjectDef& aObjectDef,
const TGlxFilterProperties& aFilterProperties)
{
- TRACER("CGlxDataSourceTaskMde::SetQueryFilterConditionsL()")
+ TRACER("CGlxDataSourceTaskMde::SetQueryFilterConditionsL()");
if( aFilterProperties.iUri )
{
@@ -298,9 +308,12 @@
}
}
- if( ( aFilterProperties.iMinCount > 0 ) && ( CGlxDataSource::EContainerTypeNotAContainer != DataSource()->ContainerType(&aObjectDef) ) )
+ if( ( aFilterProperties.iMinCount > 0 ) && (
+ CGlxDataSource::EContainerTypeNotAContainer != DataSource()->ContainerType(
+ &aObjectDef) ) )
{
- TMdEUintRange range(aFilterProperties.iMinCount,aFilterProperties.iMinCount,EMdERangeTypeGreaterOrEqual);
+ TMdEUintRange range(aFilterProperties.iMinCount,
+ aFilterProperties.iMinCount,EMdERangeTypeGreaterOrEqual);
aLogicCondition.AddObjectConditionL(range);
}
@@ -310,12 +323,15 @@
if( DataSource()->ContainerIsLeft(aObjectDef) )
{
CMdERelationCondition& relationCondition =
- aLogicCondition.AddRelationConditionL(DataSource()->ContainsDef(), ERelationConditionSideLeft);
- relationCondition.RightL().AddObjectConditionL(aFilterProperties.iContainsItem.Value());
+ aLogicCondition.AddRelationConditionL(
+ DataSource()->ContainsDef(), ERelationConditionSideLeft);
+ relationCondition.RightL().AddObjectConditionL(
+ aFilterProperties.iContainsItem.Value());
}
else
{
- CMdERelationCondition& relationCondition = aLogicCondition.AddRelationConditionL(DataSource()->ContainsDef(), ERelationConditionSideRight);
+ CMdERelationCondition& relationCondition = aLogicCondition.AddRelationConditionL(
+ DataSource()->ContainsDef(), ERelationConditionSideRight);
relationCondition.LeftL().AddObjectConditionL(aFilterProperties.iContainsItem.Value());
}
}
@@ -326,30 +342,39 @@
if( EGlxFilterOriginDownload == aFilterProperties.iOrigin )
{
// The download collection shows all but captured items
- aLogicCondition.AddPropertyConditionL(originProperty, TMdEUintNotEqual(MdeConstants::Object::ECamera));
+ aLogicCondition.AddPropertyConditionL(originProperty, TMdEUintNotEqual(
+ MdeConstants::Object::ECamera));
}
else if(EGlxFilterOriginCamera == aFilterProperties.iOrigin )
{
// The camera collection Shows the captured Items
- aLogicCondition.AddPropertyConditionL(originProperty, TMdEUintEqual(MdeConstants::Object::ECamera));
+ aLogicCondition.AddPropertyConditionL(originProperty, TMdEUintEqual(
+ MdeConstants::Object::ECamera));
}
+ else if(EGlxFilterOriginAll == aFilterProperties.iOrigin )
+ {
+ // The Months Collection Populates All the Items, filter
+ // it for Images and Videos only
+ CMdELogicCondition& logicCondition =
+ aLogicCondition.AddLogicConditionL(ELogicConditionOperatorOr);
+ logicCondition.AddObjectConditionL( DataSource()->ImageDef() );
+ }
}
if( aFilterProperties.iExcludeAnimation )
{
- //__ASSERT_DEBUG((EGlxFilterImage == aFilterProperties.iItemType), Panic(EGlxPanicIllegalArgument));
// Exclude any image with a frame count > 1
const TInt excludeAllImagesAboveOrEqualToThisFrameCount = 2;
- CMdEPropertyDef& frameCountProperty = DataSource()->ImageDef().GetPropertyDefL(KPropertyDefNameFrameCount);
- aLogicCondition.AddPropertyConditionL(frameCountProperty, TMdEIntLess(excludeAllImagesAboveOrEqualToThisFrameCount));
+ CMdEPropertyDef& frameCountProperty = DataSource()->ImageDef().GetPropertyDefL(
+ KPropertyDefNameFrameCount);
+ aLogicCondition.AddPropertyConditionL(frameCountProperty, TMdEIntLess(
+ excludeAllImagesAboveOrEqualToThisFrameCount));
}
if( aFilterProperties.iNoDRM )
{
- __ASSERT_DEBUG((EGlxFilterImage == aFilterProperties.iItemType), Panic(EGlxPanicIllegalArgument));
- // Exclude any image which is DRM protected
- //CMdEPropertyDef& drmProperty = DataSource()->ImageDef().GetPropertyDefL(KPropertyDefNameDRM);
- //aLogicCondition.AddPropertyConditionL(drmProperty, EFalse);
+ __ASSERT_DEBUG((EGlxFilterImage == aFilterProperties.iItemType), Panic(
+ EGlxPanicIllegalArgument));
}
if( aFilterProperties.iPath ) // If this is set. Then we need to filter on the Ids it supplies
@@ -373,19 +398,22 @@
if( !aFilterProperties.iIncludeCameraAlbum )
{
- CMdEObjectCondition& objectCondition = aLogicCondition.AddObjectConditionL(DataSource()->CameraAlbumId().Value());
+ CMdEObjectCondition& objectCondition = aLogicCondition.AddObjectConditionL(
+ DataSource()->CameraAlbumId().Value());
objectCondition.SetNegate(ETrue);
}
if( TTime(0) != aFilterProperties.iStartDate )
{
- CMdEPropertyDef& creationDateDef = aObjectDef.GetPropertyDefL(KPropertyDefNameCreationDate);
+ CMdEPropertyDef& creationDateDef = aObjectDef.GetPropertyDefL(
+ KPropertyDefNameCreationDate);
if (creationDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
}
- aLogicCondition.AddPropertyConditionL(creationDateDef, TMdETimeBetween(aFilterProperties.iStartDate, aFilterProperties.iEndDate));
+ aLogicCondition.AddPropertyConditionL(creationDateDef, TMdETimeBetween(
+ aFilterProperties.iStartDate, aFilterProperties.iEndDate));
}
}
@@ -396,13 +424,14 @@
void CGlxDataSourceTaskMde::SetSortOrderL(CMdEQuery& aQuery, CMdEObjectDef& aObjectDef,
const TGlxFilterProperties& aFilterProperties)
{
- TRACER("CGlxDataSourceTaskMde::SetSortOrderL()")
+ TRACER("CGlxDataSourceTaskMde::SetSortOrderL()");
switch(aFilterProperties.iSortOrder)
{
case EGlxFilterSortOrderAlphabetical:
{
CMdEPropertyDef& titleProperty = aObjectDef.GetPropertyDefL(KPropertyDefNameTitle);
- TMdEOrderRule orderRule(titleProperty, aFilterProperties.iSortDirection == EGlxFilterSortDirectionAscending);
+ TMdEOrderRule orderRule(titleProperty, aFilterProperties.iSortDirection ==
+ EGlxFilterSortDirectionAscending);
orderRule.SetType(EOrderRuleTypeProperty);
orderRule.SetCaseSensitive(EFalse);
aQuery.AppendOrderRuleL(orderRule);
@@ -410,27 +439,35 @@
}
case EGlxFilterSortOrderItemCount:
{
- TMdEOrderRule orderRule(EOrderRuleTypeUsageCount, aFilterProperties.iSortDirection == EGlxFilterSortDirectionAscending);
+ //Order rule is needed for tags popularity
+ TMdEOrderRule orderRule(EOrderRuleTypeUsageCount, aFilterProperties.iSortDirection ==
+ EGlxFilterSortDirectionAscending);
aQuery.AppendOrderRuleL(orderRule);
break;
}
case EGlxFilterSortOrderCaptureDate:
{
- CMdEPropertyDef& creationDateProperty = aObjectDef.GetPropertyDefL(KPropertyDefNameCreationDate);
- TMdEOrderRule orderRule(creationDateProperty, aFilterProperties.iSortDirection == EGlxFilterSortDirectionAscending);
+ CMdEPropertyDef& creationDateProperty = aObjectDef.GetPropertyDefL(
+ KPropertyDefNameCreationDate);
+ TMdEOrderRule orderRule(creationDateProperty, aFilterProperties.iSortDirection ==
+ EGlxFilterSortDirectionAscending);
orderRule.SetType(EOrderRuleTypeProperty);
aQuery.AppendOrderRuleL(orderRule);
- TMdEOrderRule orderRule2(EOrderRuleTypeItemID, aFilterProperties.iSortDirection == EGlxFilterSortDirectionAscending);
+ TMdEOrderRule orderRule2(EOrderRuleTypeItemID, aFilterProperties.iSortDirection ==
+ EGlxFilterSortDirectionAscending);
aQuery.AppendOrderRuleL(orderRule2);
break;
}
case EGlxFilterSortOrderModifiedDate:
{
- CMdEPropertyDef& modifiedDateProperty = aObjectDef.GetPropertyDefL(KPropertyDefNameLastModifiedDate);
- TMdEOrderRule orderRule(modifiedDateProperty, aFilterProperties.iSortDirection == EGlxFilterSortDirectionAscending);
+ CMdEPropertyDef& modifiedDateProperty = aObjectDef.GetPropertyDefL(
+ KPropertyDefNameLastModifiedDate);
+ TMdEOrderRule orderRule(modifiedDateProperty, aFilterProperties.iSortDirection ==
+ EGlxFilterSortDirectionAscending);
orderRule.SetType(EOrderRuleTypeProperty);
aQuery.AppendOrderRuleL(orderRule);
- TMdEOrderRule orderRule2(EOrderRuleTypeItemID, aFilterProperties.iSortDirection == EGlxFilterSortDirectionAscending);
+ TMdEOrderRule orderRule2(EOrderRuleTypeItemID, aFilterProperties.iSortDirection ==
+ EGlxFilterSortDirectionAscending);
aQuery.AppendOrderRuleL(orderRule2);
break;
}
@@ -445,14 +482,16 @@
// CGlxDataSourceTaskMde::MaxQueryResultsCount
// ----------------------------------------------------------------------------
//
-TInt CGlxDataSourceTaskMde::MaxQueryResultsCount(const TGlxFilterProperties& aFilterProperties) const
+TInt CGlxDataSourceTaskMde::MaxQueryResultsCount(const TGlxFilterProperties&
+ aFilterProperties) const
{
- TRACER("CGlxDataSourceTaskMde::MaxQueryResultsCount()")
+ TRACER("CGlxDataSourceTaskMde::MaxQueryResultsCount()");
TInt ret = KMdEQueryDefaultMaxCount;
- if (aFilterProperties.iLastCaptureDate)
+ if (aFilterProperties.iLastCaptureDate || aFilterProperties.iMaxCount == 1)
{
ret = 1;
}
+ GLX_DEBUG2("CGlxDataSourceTaskMde::MaxQueryResultsCount ret=%d", ret);
return ret;
}
@@ -462,7 +501,7 @@
//
void CGlxDataSourceTaskMde::RemoveQuery()
{
- TRACER("CGlxDataSourceTaskMde::RemoveQuery()")
+ TRACER("CGlxDataSourceTaskMde::RemoveQuery()");
CMdEQuery* query = iQueries[0];
iQueryTypes.Remove(0);
iQueries.Remove(0);
@@ -478,7 +517,7 @@
TBool aIsContent, TGlxQueryType aQueryType, TQueryResultMode aResultMode,
const TGlxMediaId& aContainerId)
{
- TRACER("CGlxDataSourceTaskMde::DoQueryL()")
+ TRACER("CGlxDataSourceTaskMde::DoQueryL()");
CMdEObjectDef* queryBaseObject = &aObjectDef;
if( aIsContent )
@@ -503,11 +542,12 @@
}
}
- CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(), *queryBaseObject, this);
+ CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(),
+ *queryBaseObject, this);
CleanupStack::PushL(query);
+ query->SetResultMode(aResultMode);
SetQueryConditionsL(*query, iFilterProperties, aContainerId, aObjectDef);
- query->SetResultMode(aResultMode);
CleanupStack::Pop(query);
@@ -523,7 +563,7 @@
void CGlxDataSourceTaskMde::QueueImageVideoObjectQueriesL(const RArray<TGlxMediaId>& aObjectIds,
const TGlxFilterProperties& aFilterProperties)
{
- TRACER("CGlxDataSourceTaskMde::QueueImageVideoObjectQueriesL()")
+ TRACER("CGlxDataSourceTaskMde::QueueImageVideoObjectQueriesL()");
if (aFilterProperties.iItemType == EGlxFilterImage)
{
// Only perform the image query
@@ -548,7 +588,7 @@
//
void CGlxDataSourceTaskMde::QueueTagObjectQueryL(const RArray<TGlxMediaId>& aObjectIds)
{
- TRACER("CGlxDataSourceTaskMde::QueueTagObjectQueryL()")
+ TRACER("CGlxDataSourceTaskMde::QueueTagObjectQueryL()");
QueueObjectQueryL(DataSource()->TagDef(), aObjectIds, EImageVideoQuery);
}
@@ -558,14 +598,14 @@
//
void CGlxDataSourceTaskMde::QueueAlbumObjectQueryL(const RArray<TGlxMediaId>& aObjectIds)
{
- TRACER("CGlxDataSourceTaskMde::QueueAlbumObjectQueryL()")
+ TRACER("CGlxDataSourceTaskMde::QueueAlbumObjectQueryL()");
QueueObjectQueryL(DataSource()->AlbumDef(), aObjectIds, EImageVideoQuery);
}
void CGlxDataSourceTaskMde::QueueMonthObjectQueryL(const RArray<TGlxMediaId>& aObjectIds)
{
- TRACER("CGlxDataSourceTaskMde::QueueMonthObjectQueryL()")
+ TRACER("CGlxDataSourceTaskMde::QueueMonthObjectQueryL()");
QueueObjectQueryL(DataSource()->MonthDef(), aObjectIds, EImageVideoQuery);
}
@@ -576,14 +616,15 @@
void CGlxDataSourceTaskMde::QueueObjectQueryL(CMdEObjectDef& aObjectDef,
const RArray<TGlxMediaId>& aObjectIds, const TGlxQueryType& aQueryType)
{
- TRACER("CGlxDataSourceTaskMde::QueueObjectQueryL()")
- CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(), aObjectDef, this);
+ TRACER("CGlxDataSourceTaskMde::QueueObjectQueryL()");
+ CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(),
+ aObjectDef, this);
CleanupStack::PushL(query);
CMdELogicCondition& lc = query->Conditions();
NGlxDataSourceMdsUtility::AddObjectConditionL(lc,aObjectIds);
- query->SetResultMode(EQueryResultModeObjectWithFreetexts);
+ query->SetResultMode(EQueryResultModeItem);
CleanupStack::Pop(query);
AppendQueryL(query, aQueryType);
@@ -596,7 +637,7 @@
//
void CGlxDataSourceTaskMde::AppendQueryL(CMdEQuery* aQuery, const TGlxQueryType& aQueryType)
{
- TRACER("CGlxDataSourceTaskMde::AppendQueryL()")
+ TRACER("CGlxDataSourceTaskMde::AppendQueryL()");
CleanupStack::PushL(aQuery);
TInt err = iQueryTypes.Append(aQueryType);
@@ -618,7 +659,7 @@
//
void CGlxDataSourceTaskMde::ExecuteQueryL()
{
- TRACER("CGlxDataSourceTaskMde::ExecuteQueryL()")
+ TRACER("CGlxDataSourceTaskMde::ExecuteQueryL()");
__ASSERT_DEBUG(iQueries.Count(), Panic(EGlxPanicQueryLogicError));
iQueries[0]->FindL();
}
@@ -629,9 +670,22 @@
//
void CGlxDataSourceTaskMde::HandleQueryCompletedL(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMde::HandleQueryCompletedL()")
+ TRACER("CGlxDataSourceTaskMde::HandleQueryCompletedL()");
DoHandleQueryCompletedL(aQuery);
- RemoveQuery();
+
+ // Both the function calls should be executed if any
+ // request is not cancelled before completion.
+ // All the pending Queries are already destroyed in CancelRequest.
+ // Hence we do not have to call RemoveQuery here. That will lead to
+ // User 130 crash.
+ // DoNextQuery tries to get iQueries.Count(). Since iQueries is destroyed
+ // in CancelRequest
+ if (iCancelled)
+ {
+ GLX_LOG_INFO("***Query already Removed. Hence Return***");
+ return;
+ }
+ RemoveQuery();
DoNextQueryL();
}
@@ -641,7 +695,7 @@
//
void CGlxDataSourceTaskMde::DestroyQueries()
{
- TRACER("CGlxDataSourceTaskMde::DestroyQueries()")
+ TRACER("CGlxDataSourceTaskMde::DestroyQueries()");
for (TInt i = 0; i < iQueries.Count(); i++)
{
// Ensure that there are not any running queries
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -57,7 +57,7 @@
#include <mpxmediadrmdefs.h>
#include <mpxmediageneraldefs.h>
#include <imageconversion.h>
-
+#include <caf/content.h>
#include "glxdatasourcemds.h"
#include "glxdatasourcemds.hrh"
#include "glxdatasourcemdsutility.h"
@@ -83,7 +83,9 @@
// Constructor
// ----------------------------------------------------------------------------
//
-CGlxDataSourceTaskMdeAttributeMde::CGlxDataSourceTaskMdeAttributeMde(CGlxGetRequest* aRequest, MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource)
+CGlxDataSourceTaskMdeAttributeMde::CGlxDataSourceTaskMdeAttributeMde(
+ CGlxGetRequest* aRequest,MGlxDataSourceRequestObserver& aObserver,
+ CGlxDataSource* aDataSource)
: CGlxDataSourceTaskMde(aRequest, aObserver, aDataSource)
{
TRACER("CGlxDataSourceTaskMdeAttribute::CGlxDataSourceTaskMdeAttribute()")
@@ -108,16 +110,14 @@
void CGlxDataSourceTaskMdeAttributeMde::ExecuteRequestL()
{
TRACER("CGlxDataSourceTaskMdeAttribute::ExecuteRequestL()")
- GLX_LOG_ENTRY_EXIT("CGlxDataSourceTaskMdeAttribute::ExecuteRequestL");
+#ifdef _DEBUG
+ iStartTime.HomeTime();
+#endif
CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);
__ASSERT_DEBUG(request->MediaIds().Count() > 0, User::Invariant());
-
- GLX_LOG_INFO("==> CGlxDataSourceTaskMdeAttributeMde::ExecuteRequestL");
-#ifdef _DEBUG
- iStartTime.HomeTime(); // Get home time
-#endif
+
if (request->MediaIds().Count() > 1)
{
iMediaArray = CMPXMediaArray::NewL();
@@ -130,26 +130,8 @@
}
else
{
-
- /* __ASSERT_DEBUG(dynamic_cast<CGlxGetRequest*>(iRequest), Panic(EGlxPanicLogicError));
- CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);
-
- QueueImageVideoObjectQueriesL(request->MediaIds(), iFilterProperties);
- QueueAlbumObjectQueryL(request->MediaIds());
- QueueTagObjectQueryL(request->MediaIds());
- QueueMonthObjectQueryL(request->MediaIds());
-
- if (LocationAttributeRequested())
- {
- QueueLocaitonQueryL();
- }
-
- */
-
__ASSERT_DEBUG(dynamic_cast<CGlxGetRequest*>(iRequest), Panic(EGlxPanicLogicError));
CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);
-// Not used anywhere, commenting out this line to avoid BAD warning
-// const RArray<TItemId>& mediaIds = reinterpret_cast<const RArray<TItemId>&>(request->MediaIds());
switch(iFilterProperties.iItemType)
{
@@ -211,6 +193,11 @@
Panic(EGlxPanicLogicError);
break;
}
+#ifdef _DEBUG
+ iStopTime.HomeTime();
+ GLX_DEBUG2("CGlxDataSourceTaskMdeAttributeMde:DoHandleQueryCompletedL() took %d us",
+ (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
+#endif
}
// ----------------------------------------------------------------------------
@@ -292,7 +279,8 @@
{
if ( request->Attributes()[i] == KMPXMediaGeneralId )
{
- aEntry->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, (TMPXItemId)request->CollectionPluginUid().iUid);
+ aEntry->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, (
+ TMPXItemId)request->CollectionPluginUid().iUid);
}
else if ( request->Attributes()[i] == KMPXMediaGeneralType )
{
@@ -323,12 +311,14 @@
{
case KGlxCollectionPluginCameraImplementationUid:
{
-#if 0 /// @todo AB camera album
+#if 0 /// AB camera album
container = DataSource()->CameraAlbumId();
objectDef = &DataSource()->AlbumDef();
#endif
filterProperties.iItemType = EGlxFilterImage;
- QueueObjectQueryL(*objectDef, isContent, EAttributeQuery, EQueryResultModeCount, container, request->Attributes()[i], aEntry, filterProperties);
+ QueueObjectQueryL(*objectDef, isContent, EAttributeQuery,
+ EQueryResultModeCount, container,
+ request->Attributes()[i], aEntry, filterProperties);
break;
}
default:
@@ -350,12 +340,14 @@
{
case KGlxCollectionPluginCameraImplementationUid:
{
-#if 0 /// @todo AB camera album
+#if 0 /// AB camera album
container = DataSource()->CameraAlbumId();
objectDef = &DataSource()->AlbumDef();
#endif
filterProperties.iItemType = EGlxFilterVideo;
- QueueObjectQueryL(*objectDef, isContent, EAttributeQuery, EQueryResultModeCount, container, request->Attributes()[i], aEntry, filterProperties);
+ QueueObjectQueryL(*objectDef, isContent, EAttributeQuery,
+ EQueryResultModeCount, container,
+ request->Attributes()[i],aEntry, filterProperties);
break;
}
default:
@@ -366,7 +358,8 @@
}
- else if ( ( request->Attributes()[i] == KMPXMediaGeneralCount ) || ( request->Attributes()[i] == KGlxMediaCollectionInternalUsageCount ) )
+ else if ( ( request->Attributes()[i] == KMPXMediaGeneralCount ) ||
+ ( request->Attributes()[i] == KGlxMediaCollectionInternalUsageCount ) )
{
TGlxMediaId container = TGlxMediaId(KGlxCollectionRootId);
CMdEObjectDef* objectDef = &DataSource()->ObjectDef();
@@ -395,39 +388,51 @@
}
case KGlxCollectionPluginMonthsImplementationUid:
{
- filterProperties.iOrigin = EGlxFilterOriginCamera;
+ filterProperties.iOrigin = EGlxFilterOriginAll;
break;
}
- /* case KGlxCollectionPluginDownloadsImplementationUid:
- {
- filterProperties.iOrigin = EGlxFilterOriginDownload;
- break;
- }*/
default:
{
// default gallery query returns all objects as per filter
break;
}
}
- QueueObjectQueryL(*objectDef, isContent, EAttributeQuery, EQueryResultModeCount, container, request->Attributes()[i], aEntry, filterProperties);
+ QueueObjectQueryL(*objectDef, isContent, EAttributeQuery,
+ EQueryResultModeCount, container, request->Attributes()[i],
+ aEntry, filterProperties);
}
else if ( request->Attributes()[i] == KMPXMediaColDetailSpaceId )
{
- aEntry->SetTObjectValueL(KMPXMediaColDetailSpaceId, KGlxDataSourceMdeImplementationUid);
+ aEntry->SetTObjectValueL(KMPXMediaColDetailSpaceId,
+ KGlxDataSourceMdeImplementationUid);
}
else if ( request->Attributes()[i] == KGlxMediaCollectionInternalStartDate )
{
+ GLX_DEBUG1("CGlxDataSourceTaskMdeAttributeMde::AddCollectionAttributesL - KGlxMediaCollectionInternalStartDate");
TGlxMediaId container = TGlxMediaId(KGlxCollectionRootId);
TGlxFilterProperties filterProperties = iFilterProperties;
filterProperties.iSortOrder = EGlxFilterSortOrderCaptureDate;
filterProperties.iSortDirection = EGlxFilterSortDirectionAscending;
- filterProperties.iOrigin = EGlxFilterOriginCamera;
+ filterProperties.iOrigin = EGlxFilterOriginAll;
+ filterProperties.iMaxCount = 1 ;
- QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery, EQueryResultModeObjectWithFreetexts,container, KGlxMediaCollectionInternalStartDate, aEntry, filterProperties);
+ QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
+ EQueryResultModeItem, container,
+ KGlxMediaCollectionInternalStartDate, aEntry, filterProperties);
}
else if ( request->Attributes()[i] == KGlxMediaCollectionInternalEndDate )
{
- // not necessary to be requested, returned when StartDate requested
+ GLX_DEBUG1("CGlxDataSourceTaskMdeAttributeMde::AddCollectionAttributesL - KGlxMediaCollectionInternalEndDate");
+ TGlxMediaId container = TGlxMediaId(KGlxCollectionRootId);
+ TGlxFilterProperties filterProperties = iFilterProperties;
+ filterProperties.iSortOrder = EGlxFilterSortOrderCaptureDate;
+ filterProperties.iSortDirection = EGlxFilterSortDirectionDescending;
+ filterProperties.iOrigin = EGlxFilterOriginAll;
+ filterProperties.iMaxCount = 1 ;
+
+ QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
+ EQueryResultModeItem, container,
+ KGlxMediaCollectionInternalEndDate, aEntry, filterProperties);
}
else if ( request->Attributes()[i] == KGlxMediaGeneralSlideshowableContent )
{
@@ -456,7 +461,8 @@
// CGlxDataSourceTaskMdeAttribute::AddContainerAttributesL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeAttributeMde::AddContainerAttributesL(CMPXMedia* aEntry, CMdEObject* aContainer, CGlxDataSource::TContainerType aType)
+void CGlxDataSourceTaskMdeAttributeMde::AddContainerAttributesL(CMPXMedia* aEntry,
+ CMdEObject* aContainer, CGlxDataSource::TContainerType aType)
{
TRACER("CGlxDataSourceTaskMdeAttribute::AddContainerAttributesL()")
__ASSERT_DEBUG(aEntry, Panic(EGlxPanicLogicError));
@@ -464,12 +470,13 @@
__ASSERT_DEBUG(dynamic_cast<CGlxGetRequest*>(iRequest), Panic(EGlxPanicLogicError));
CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);
- /// @todo check property defs are valid and type is correct
+ /// check property defs are valid and type is correct
for ( TInt i = 0; i < request->Attributes().Count(); i++ )
{
if ( request->Attributes()[i] == KMPXMediaGeneralId )
{
- aEntry->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, (TMPXItemId)aContainer->Id());
+ aEntry->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId,
+ (TMPXItemId)aContainer->Id());
}
else if ( request->Attributes()[i] == KMPXMediaGeneralType )
{
@@ -501,7 +508,8 @@
else if ( request->Attributes()[i] == KMPXMediaGeneralTitle )
{
CMdEProperty* title;
- CMdEPropertyDef& titleProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameTitle);
+ CMdEPropertyDef& titleProperty = aContainer->Def().GetPropertyDefL(
+ KPropertyDefNameTitle);
TInt titleIndex = aContainer->Property(titleProperty, title);
if(titleIndex == KErrNotFound)
{
@@ -510,22 +518,26 @@
}
else
{
- aEntry->SetTextValueL(KMPXMediaGeneralTitle, static_cast<CMdETextProperty*>(title)->Value());
+ aEntry->SetTextValueL(KMPXMediaGeneralTitle, static_cast<CMdETextProperty*>
+ (title)->Value());
}
switch (aType)
{
case CGlxDataSource::EContainerTypeAlbum:
{
CMdEProperty* albumType;
- CMdEPropertyDef& albumTypeProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameAlbumType);
+ CMdEPropertyDef& albumTypeProperty =
+ aContainer->Def().GetPropertyDefL( KPropertyDefNameAlbumType);
TInt albumTypeIndex = aContainer->Property(albumTypeProperty, albumType);
if( KErrNotFound != albumTypeIndex )
{
- TUint16 albumTypeValue = static_cast<CMdEUint16Property*>(albumType)->Value();
+ TUint16 albumTypeValue =
+ static_cast<CMdEUint16Property*>(albumType)->Value();
if ( albumTypeValue != MdeConstants::Album::EAlbumUser )
{
request->AppendCpiAttributeL(KMPXMediaGeneralTitle);
- aEntry->SetTObjectValueL(KGlxMediaCollectionInternalSystemItemType, albumTypeValue);
+ aEntry->SetTObjectValueL(KGlxMediaCollectionInternalSystemItemType,
+ albumTypeValue);
}
}
break;
@@ -538,14 +550,16 @@
{
request->AppendCpiAttributeL(KMPXMediaGeneralTitle);
CMdEProperty* time;
- CMdEPropertyDef& timeProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameCreationDate);
+ CMdEPropertyDef& timeProperty = aContainer->Def().GetPropertyDefL(
+ KPropertyDefNameCreationDate);
TInt timeIndex = aContainer->Property(timeProperty, time);
if( KErrNotFound == timeIndex )
{
User::Leave(KErrCorrupt);
}
- aEntry->SetTObjectValueL(KGlxMediaCollectionInternalStartDate, static_cast<CMdETimeProperty*>(time)->Value());
+ aEntry->SetTObjectValueL(KGlxMediaCollectionInternalStartDate,
+ static_cast<CMdETimeProperty*>(time)->Value());
break;
}
}
@@ -553,21 +567,24 @@
else if ( request->Attributes()[i] == KMPXMediaGeneralDate )
{
CMdEProperty* time;
- CMdEPropertyDef& timeProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameCreationDate);
+ CMdEPropertyDef& timeProperty = aContainer->Def().GetPropertyDefL(
+ KPropertyDefNameCreationDate);
TInt timeIndex = aContainer->Property(timeProperty, time);
if( KErrNotFound == timeIndex )
{
User::Leave(KErrCorrupt);
}
- aEntry->SetTObjectValueL(KMPXMediaGeneralDate, static_cast<CMdETimeProperty*>(time)->Value());
+ aEntry->SetTObjectValueL(KMPXMediaGeneralDate,
+ static_cast<CMdETimeProperty*>(time)->Value());
}
else if ( request->Attributes()[i] == KMPXMediaGeneralSize )
{
CMdEProperty* size;
- CMdEPropertyDef& sizeProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameSize);
+ CMdEPropertyDef& sizeProperty = aContainer->Def().GetPropertyDefL(
+ KPropertyDefNameSize);
TInt sizeIndex = aContainer->Property(sizeProperty, size);
- TInt sizeValue;
+ TUint sizeValue;
if(sizeIndex == KErrNotFound)
{
sizeValue = 0;
@@ -586,7 +603,8 @@
else if ( request->Attributes()[i] == KMPXMediaGeneralMimeType )
{
CMdEProperty* mimeType;
- CMdEPropertyDef& mimeTypeProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameItemType);
+ CMdEPropertyDef& mimeTypeProperty = aContainer->Def().GetPropertyDefL(
+ KPropertyDefNameItemType);
TInt mimeTypeIndex = aContainer->Property(mimeTypeProperty, mimeType);
if( KErrNotFound == mimeTypeIndex)
{
@@ -594,10 +612,12 @@
}
else
{
- aEntry->SetTextValueL(KMPXMediaGeneralMimeType, static_cast<CMdETextProperty*>(mimeType)->Value());
+ aEntry->SetTextValueL(KMPXMediaGeneralMimeType,
+ static_cast<CMdETextProperty*>(mimeType)->Value());
}
}
- else if ( ( request->Attributes()[i] == KMPXMediaGeneralCount ) || ( request->Attributes()[i] == KGlxMediaCollectionInternalUsageCount ) )
+ else if ( ( request->Attributes()[i] == KMPXMediaGeneralCount ) ||
+ ( request->Attributes()[i] == KGlxMediaCollectionInternalUsageCount ) )
{
switch (aType)
{
@@ -610,10 +630,12 @@
}
case CGlxDataSource::EContainerTypeMonth:
{
- iFilterProperties.iOrigin = EGlxFilterOriginCamera;
+ iFilterProperties.iOrigin = EGlxFilterOriginAll;
TGlxFilterProperties filterProperties = iFilterProperties;
AddMonthFilterL(aContainer, filterProperties);
- QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery, EQueryResultModeCount, TGlxMediaId(KGlxCollectionRootId), request->Attributes()[i], aEntry, filterProperties);
+ QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
+ EQueryResultModeCount, TGlxMediaId(KGlxCollectionRootId),
+ request->Attributes()[i], aEntry, filterProperties);
break;
}
}
@@ -626,13 +648,16 @@
case CGlxDataSource::EContainerTypeAlbum:
{
CMdEProperty* albumType;
- CMdEPropertyDef& albumTypeProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameAlbumType);
- TInt albumTypeIndex = aContainer->Property(albumTypeProperty, albumType);
+ CMdEPropertyDef& albumTypeProperty =
+ aContainer->Def().GetPropertyDefL( KPropertyDefNameAlbumType);
+ TInt albumTypeIndex = aContainer->Property(albumTypeProperty,
+ albumType);
if( KErrNotFound != albumTypeIndex )
{
- TInt albumTypeValue = static_cast<CMdEUint16Property*>(albumType)->Value();
-
- if( (albumTypeValue == MdeConstants::Album::EAlbumSystemCamera) || (albumTypeValue == MdeConstants::Album::EAlbumSystemFavourite ) )
+ TInt albumTypeValue =
+ static_cast<CMdEUint16Property*>(albumType)->Value();
+ if( (albumTypeValue == MdeConstants::Album::EAlbumSystemCamera) ||
+ (albumTypeValue == MdeConstants::Album::EAlbumSystemFavourite ) )
{
systemItem = ETrue;
}
@@ -663,8 +688,10 @@
TGlxFilterProperties filterProperties = iFilterProperties;
AddMonthFilterL(aContainer, filterProperties);
filterProperties.iItemType = EGlxFilterImage;
-#if 0 /// @todo AB camera album
- QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery, EQueryResultModeCount, DataSource()->CameraAlbumId(), request->Attributes()[i], aEntry, filterProperties);
+#if 0 /// AB camera album
+ QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
+ EQueryResultModeCount, DataSource()->CameraAlbumId(),
+ request->Attributes()[i], aEntry, filterProperties);
#endif
break;
}
@@ -685,8 +712,10 @@
TGlxFilterProperties filterProperties = iFilterProperties;
AddMonthFilterL(aContainer, filterProperties);
filterProperties.iItemType = EGlxFilterVideo;
-#if 0 /// @todo AB camera album
- QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery, EQueryResultModeCount, DataSource()->CameraAlbumId(), request->Attributes()[i], aEntry, filterProperties);
+#if 0 /// AB camera album
+ QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
+ EQueryResultModeCount, DataSource()->CameraAlbumId(),
+ request->Attributes()[i], aEntry, filterProperties);
#endif
break;
}
@@ -699,7 +728,8 @@
else if ( request->Attributes()[i] == KMPXMediaColDetailSpaceId )
{
- aEntry->SetTObjectValueL(KMPXMediaColDetailSpaceId, KGlxDataSourceMdeImplementationUid);
+ aEntry->SetTObjectValueL(KMPXMediaColDetailSpaceId,
+ KGlxDataSourceMdeImplementationUid);
}
else if ( request->Attributes()[i] == KGlxMediaCollectionInternalStartDate )
{
@@ -734,14 +764,18 @@
case CGlxDataSource::EContainerTypeAlbum:
case CGlxDataSource::EContainerTypeTag:
{
- QueueObjectQueryL(aContainer->Def(), ETrue, EAttributeQuery, EQueryResultModeCount, TGlxMediaId(aContainer->Id()), request->Attributes()[i], aEntry, filterProperties);
+ QueueObjectQueryL(aContainer->Def(), ETrue, EAttributeQuery,
+ EQueryResultModeCount, TGlxMediaId(aContainer->Id()),
+ request->Attributes()[i], aEntry, filterProperties);
break;
}
case CGlxDataSource::EContainerTypeMonth:
{
- filterProperties.iOrigin = EGlxFilterOriginCamera;
+ filterProperties.iOrigin = EGlxFilterOriginAll;
AddMonthFilterL(aContainer, filterProperties);
- QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery, EQueryResultModeCount, TGlxMediaId(KGlxCollectionRootId), request->Attributes()[i], aEntry, filterProperties);
+ QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
+ EQueryResultModeCount, TGlxMediaId(KGlxCollectionRootId),
+ request->Attributes()[i], aEntry, filterProperties);
break;
}
}
@@ -749,13 +783,15 @@
else if ( request->Attributes()[i] == KGlxMediaGeneralLastModifiedDate )
{
CMdEProperty* time;
- CMdEPropertyDef& timeProperty = aContainer->Def().GetPropertyDefL(KPropertyDefNameLastModifiedDate);
+ CMdEPropertyDef& timeProperty = aContainer->Def().GetPropertyDefL(
+ KPropertyDefNameLastModifiedDate);
TInt timeIndex = aContainer->Property(timeProperty, time);
if( KErrNotFound == timeIndex)
{
User::Leave(KErrCorrupt);
}
- aEntry->SetTObjectValueL(KGlxMediaGeneralLastModifiedDate, static_cast<CMdETimeProperty*>(time)->Value());
+ aEntry->SetTObjectValueL(KGlxMediaGeneralLastModifiedDate,
+ static_cast<CMdETimeProperty*>(time)->Value());
}
else if ( request->Attributes()[i] == KGlxMediaGeneralDimensions )
{
@@ -778,7 +814,8 @@
// CGlxDataSourceTaskMdeAttribute::AddItemAttributesL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeAttributeMde::AddItemAttributesL(CMPXMedia* aEntry, CMdEObject* aItem, CGlxDataSource::TItemType aType)
+void CGlxDataSourceTaskMdeAttributeMde::AddItemAttributesL(CMPXMedia* aEntry,
+ CMdEObject* aItem, CGlxDataSource::TItemType aType)
{
TRACER("CGlxDataSourceTaskMdeAttribute::AddItemAttributesL()")
__ASSERT_DEBUG(aEntry, Panic(EGlxPanicLogicError));
@@ -786,12 +823,13 @@
__ASSERT_DEBUG(dynamic_cast<CGlxGetRequest*>(iRequest), Panic(EGlxPanicLogicError));
CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);
- /// @todo check property defs are valid and type is correct
+ /// check property defs are valid and type is correct
for ( TInt i = 0; i < request->Attributes().Count(); i++ )
{
if ( request->Attributes()[i] == KMPXMediaGeneralId )
{
- aEntry->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, (TMPXItemId)aItem->Id());
+ aEntry->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId,
+ (TMPXItemId)aItem->Id());
}
else if ( request->Attributes()[i] == KMPXMediaGeneralType )
{
@@ -819,7 +857,8 @@
else if ( request->Attributes()[i] == KMPXMediaGeneralTitle )
{
CMdEProperty* title;
- CMdEPropertyDef& titleProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameTitle);
+ CMdEPropertyDef& titleProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameTitle);
TInt titleIndex = aItem->Property(titleProperty, title);
if( KErrNotFound == titleIndex )
{
@@ -828,35 +867,41 @@
}
else
{
- aEntry->SetTextValueL(KMPXMediaGeneralTitle, static_cast<CMdETextProperty*>(title)->Value());
+ aEntry->SetTextValueL(KMPXMediaGeneralTitle,
+ static_cast<CMdETextProperty*>(title)->Value());
}
}
else if ( request->Attributes()[i] == KMPXMediaGeneralDate )
{
CMdEProperty* time;
- CMdEPropertyDef& timeProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameCreationDate);
+ CMdEPropertyDef& timeProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameCreationDate);
TInt timeIndex = aItem->Property(timeProperty, time);
if( KErrNotFound == timeIndex)
{
User::Leave(KErrCorrupt);
}
- aEntry->SetTObjectValueL(KMPXMediaGeneralDate, static_cast<CMdETimeProperty*>(time)->Value());
+ aEntry->SetTObjectValueL(KMPXMediaGeneralDate,
+ static_cast<CMdETimeProperty*>(time)->Value());
}
else if ( request->Attributes()[i] == KGlxMediaGeneralLastModifiedDate )
{
CMdEProperty* time;
- CMdEPropertyDef& timeProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameLastModifiedDate);
+ CMdEPropertyDef& timeProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameLastModifiedDate);
TInt timeIndex = aItem->Property(timeProperty, time);
if( KErrNotFound == timeIndex)
{
User::Leave(KErrCorrupt);
}
- aEntry->SetTObjectValueL(KGlxMediaGeneralLastModifiedDate, static_cast<CMdETimeProperty*>(time)->Value());
+ aEntry->SetTObjectValueL(KGlxMediaGeneralLastModifiedDate,
+ static_cast<CMdETimeProperty*>(time)->Value());
}
else if ( request->Attributes()[i] == KMPXMediaGeneralSize )
{
CMdEProperty* size;
- CMdEPropertyDef& sizeProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameSize);
+ CMdEPropertyDef& sizeProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameSize);
TInt sizeIndex = aItem->Property(sizeProperty, size);
User::LeaveIfError(sizeIndex);
@@ -870,11 +915,34 @@
else if ( request->Attributes()[i] == KMPXMediaGeneralMimeType )
{
CMdEProperty* mimeType;
- CMdEPropertyDef& mimeTypeProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameItemType);
+ CMdEPropertyDef& mimeTypeProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameItemType);
TInt mimeTypeIndex = aItem->Property(mimeTypeProperty, mimeType);
-
- User::LeaveIfError(mimeTypeIndex);
- aEntry->SetTextValueL(KMPXMediaGeneralMimeType, static_cast<CMdETextProperty*>(mimeType)->Value());
+ if(mimeTypeIndex == KErrNotFound)
+ {
+ //MDS retrieves the Mimetype of the file the moment it is notified about
+ //the new file.But in case of new downloaded video file ,MDS is notified about
+ //it the moment download starts. As mimetype is available only after the download completes,
+ //so MDS fails to give the mimetype of the file. But mimetype can also be retrieved
+ //from CContent class once the download completes.
+ RBuf mimeTypeData;
+ CleanupClosePushL(mimeTypeData);
+ mimeTypeData.CreateL(KMaxFileName);
+ ContentAccess::CContent* content = ContentAccess::CContent::NewLC(aItem->Uri());
+ TInt err = content->GetStringAttribute(ContentAccess::EMimeType, mimeTypeData);
+ CleanupStack::PopAndDestroy(content);
+ if(err != KErrNone)
+ {
+ mimeTypeData.Copy(KNullDesC);
+ }
+ aEntry->SetTextValueL(KMPXMediaGeneralMimeType,mimeTypeData);
+ CleanupStack::PopAndDestroy(&mimeTypeData);
+ }
+ else
+ {
+ aEntry->SetTextValueL(KMPXMediaGeneralMimeType,
+ static_cast<CMdETextProperty*>(mimeType)->Value());
+ }
}
else if ( request->Attributes()[i] == KMPXMediaGeneralDuration )
{
@@ -885,11 +953,18 @@
else
{
CMdEProperty* duration;
- CMdEPropertyDef& durationProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameDuration);
+ CMdEPropertyDef& durationProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameDuration);
TInt durationIndex = aItem->Property(durationProperty, duration);
- User::LeaveIfError(durationIndex);
-
- aEntry->SetTObjectValueL(KMPXMediaGeneralDuration, static_cast<CMdEReal32Property*>(duration)->Value());
+ if(durationIndex == KErrNotFound)
+ {
+ aEntry->SetTObjectValueL(KMPXMediaGeneralDuration,0);
+ }
+ else
+ {
+ aEntry->SetTObjectValueL(KMPXMediaGeneralDuration,
+ static_cast<CMdEReal32Property*>(duration)->Value());
+ }
}
}
else if ( request->Attributes()[i] == KGlxMediaGeneralSystemItem)
@@ -901,11 +976,12 @@
TSize dimensions(0,0);
CMdEProperty* xDim;
- CMdEPropertyDef& xDimProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameWidth);
+ CMdEPropertyDef& xDimProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameWidth);
TInt xDimIndex = aItem->Property(xDimProperty, xDim);
if( KErrNotFound == xDimIndex )
{
- //User::Leave(KErrCorrupt);
+ //Do nothing
}
else
{
@@ -913,11 +989,12 @@
}
CMdEProperty* yDim;
- CMdEPropertyDef& yDimProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameHeight);
+ CMdEPropertyDef& yDimProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameHeight);
TInt yDimIndex = aItem->Property(yDimProperty, yDim);
if( KErrNotFound == yDimIndex )
{
- //User::Leave(KErrCorrupt);
+ //Do nothing
}
else
{
@@ -930,7 +1007,9 @@
// EXIF header is corrupt, must read size from file.
CImageDecoder* decoder = NULL;
- TRAPD(err, decoder = CImageDecoder::FileNewL( DataSource()->FileServerSession(), aItem->Uri(), CImageDecoder::EOptionNone ));
+ TRAPD(err, decoder = CImageDecoder::FileNewL(
+ DataSource()->FileServerSession(), aItem->Uri(),
+ CImageDecoder::EOptionNone ));
if (err == KErrNone)
{
dimensions = decoder->FrameInfo().iOverallSizeInPixels;
@@ -945,9 +1024,10 @@
{
CMdEProperty* framecount;
TInt fcount = 1;
- //@todo AB test this
+ // AB test this
CMdEPropertyDef* framecountProperty = NULL;
- TRAP_IGNORE(framecountProperty = &aItem->Def().GetPropertyDefL(KPropertyDefNameFrameCount));
+ TRAP_IGNORE(framecountProperty = &aItem->Def().GetPropertyDefL(
+ KPropertyDefNameFrameCount));
if( framecountProperty )
{
TInt framecountIndex = aItem->Property(*framecountProperty, framecount);
@@ -961,7 +1041,8 @@
else if ( request->Attributes()[i] == KMPXMediaGeneralComment )
{
CMdEProperty* comment;
- CMdEPropertyDef& commentProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameComment); /// @todo using Exif Comment field for comment as spec is not clear
+ CMdEPropertyDef& commentProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameComment); /// using Exif Comment field for comment as spec is not clear
TInt commentIndex = aItem->Property(commentProperty, comment);
if( KErrNotFound == commentIndex)
{
@@ -969,13 +1050,15 @@
}
else
{
- aEntry->SetTextValueL(KMPXMediaGeneralComment, static_cast<CMdETextProperty*>(comment)->Value());
+ aEntry->SetTextValueL(KMPXMediaGeneralComment,
+ static_cast<CMdETextProperty*>(comment)->Value());
}
}
else if ( request->Attributes()[i] == KMPXMediaDrmProtected )
{
CMdEProperty* drmProtected;
- CMdEPropertyDef& drmProtectedProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameDRM);
+ CMdEPropertyDef& drmProtectedProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameDRM);
TInt drmProtectedIndex = aItem->Property(drmProtectedProperty, drmProtected);
if( KErrNotFound == drmProtectedIndex)
{
@@ -983,27 +1066,32 @@
}
else
{
- aEntry->SetTObjectValueL(KMPXMediaDrmProtected, static_cast<CMdEBoolProperty*>(drmProtected)->Value());
+ aEntry->SetTObjectValueL(KMPXMediaDrmProtected,
+ static_cast<CMdEBoolProperty*>(drmProtected)->Value());
}
}
else if ( request->Attributes()[i] == KGlxMediaGeneralDRMRightsValid )
{
CMdEProperty* drmProtected;
- CMdEPropertyDef& drmProtectedProperty = aItem->Def().GetPropertyDefL(KPropertyDefNameDRM);
+ CMdEPropertyDef& drmProtectedProperty = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameDRM);
TInt drmProtectedIndex = aItem->Property(drmProtectedProperty, drmProtected);
if( KErrNotFound == drmProtectedIndex)
{
- aEntry->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid, EGlxDrmRightsValidityUnknown);
+ aEntry->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid,
+ EGlxDrmRightsValidityUnknown);
}
else
{
if( static_cast<CMdEBoolProperty*>(drmProtected)->Value() )
{
- aEntry->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid, EGlxDrmRightsValidityUnknown);
+ aEntry->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid,
+ EGlxDrmRightsValidityUnknown);
}
else
{
- aEntry->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid, EGlxDrmRightsValid);
+ aEntry->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid,
+ EGlxDrmRightsValid);
}
}
}
@@ -1013,7 +1101,8 @@
}
else if ( request->Attributes()[i] == KMPXMediaColDetailSpaceId )
{
- aEntry->SetTObjectValueL(KMPXMediaColDetailSpaceId, KGlxDataSourceMdeImplementationUid);
+ aEntry->SetTObjectValueL(KMPXMediaColDetailSpaceId,
+ KGlxDataSourceMdeImplementationUid);
}
else if ( request->Attributes()[i] == KGlxMediaGeneralSlideshowableContent )
{
@@ -1035,25 +1124,30 @@
// CGlxDataSourceTaskMde::AddLocationAttributeToMediaL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeAttributeMde::AddLocationAttributeToMediaL(CMPXMedia& aMedia, const TItemId& aLocationId)
+void CGlxDataSourceTaskMdeAttributeMde::AddLocationAttributeToMediaL(
+ CMPXMedia& aMedia, const TItemId& aLocationId)
{
TRACER("CGlxDataSourceTaskMdeAttribute::AddLocationAttributeToMediaL()")
- CMdEObject* location = DataSource()->Session().GetObjectL(aLocationId, DataSource()->LocationDef());
+ CMdEObject* location = DataSource()->Session().GetObjectL(aLocationId,
+ DataSource()->LocationDef());
if(!location)
{
User::Leave(KErrNotFound);
}
CleanupStack::PushL(location);
CMdEProperty* longitude = NULL;
- CMdEPropertyDef& longitudePropertyDef = location->Def().GetPropertyDefL(KPropertyDefNameLongitude);
+ CMdEPropertyDef& longitudePropertyDef = location->Def().GetPropertyDefL(
+ KPropertyDefNameLongitude);
TInt longitudeIndex = location->Property(longitudePropertyDef, longitude);
CMdEProperty* latitude = NULL;
- CMdEPropertyDef& latitudePropertyDef = location->Def().GetPropertyDefL(KPropertyDefNameLatitude);
+ CMdEPropertyDef& latitudePropertyDef = location->Def().GetPropertyDefL(
+ KPropertyDefNameLatitude);
TInt latitudeIndex = location->Property(latitudePropertyDef, latitude);
if (longitudeIndex > KErrNotFound && latitudeIndex > KErrNotFound)
{
- TCoordinate coordinate(static_cast< CMdEReal64Property *>(latitude)->Value(),static_cast< CMdEReal64Property *>(longitude)->Value());
+ TCoordinate coordinate(static_cast< CMdEReal64Property *>(latitude)->Value(),
+ static_cast< CMdEReal64Property *>(longitude)->Value());
aMedia.SetTObjectValueL(KGlxMediaGeneralLocation, coordinate);
}
@@ -1070,41 +1164,63 @@
__ASSERT_DEBUG(iQueryAttributes.Count(), Panic(EGlxPanicIllegalState));
CMdEQuery* query = iQueries[0];
- if( query->ResultMode() == EQueryResultModeObjectWithFreetexts )
+ if( query->ResultMode() == EQueryResultModeItem )
{
- __ASSERT_DEBUG(( iQueryAttributes[0].iAttribute == KGlxMediaCollectionInternalStartDate ), Panic(EGlxPanicIllegalState));
- CMdEPropertyDef& creationDateDef = DataSource()->ObjectDef().GetPropertyDefL(KPropertyDefNameCreationDate);
+ __ASSERT_DEBUG(( iQueryAttributes[0].iAttribute ==
+ KGlxMediaCollectionInternalStartDate || iQueryAttributes[0].iAttribute ==
+ KGlxMediaCollectionInternalEndDate), Panic(EGlxPanicIllegalState));
+ CMdEPropertyDef& creationDateDef = DataSource()->ObjectDef().GetPropertyDefL(
+ KPropertyDefNameCreationDate);
if (creationDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
}
TTime startMonth(0);
TTime endMonth(0);
+ GLX_DEBUG2("CGlxDataSourceTaskMdeAttributeMde::DoHandleAttributeQueryCompletedL iQueries[0]->Count()=%d", iQueries[0]->Count());
+ TInt timeIndex(0) ;
if(iQueries[0]->Count() )
{
- CMdEProperty* startTime;
- CMdEObject& startObject = (CMdEObject&)query->ResultItem(0);
- TInt timeIndex = startObject.Property(creationDateDef, startTime);
- if( KErrNotFound == timeIndex )
- {
- User::Leave(KErrCorrupt);
- }
- startMonth = static_cast<CMdETimeProperty*>(startTime)->Value();
- CMdEProperty* endTime;
- CMdEObject& endObject = (CMdEObject&)query->ResultItem(query->Count()-1);
- timeIndex = endObject.Property(creationDateDef, endTime);
- if( KErrNotFound == timeIndex )
- {
- User::Leave(KErrCorrupt);
- }
- endMonth = static_cast<CMdETimeProperty*>(endTime)->Value();
+ GLX_DEBUG2("CGlxDataSourceTaskMdeAttributeMde::DoHandleAttributeQueryCompletedL query->Count()=%d", query->Count());
+ if(iQueryAttributes[0].iAttribute == KGlxMediaCollectionInternalStartDate)
+ {
+ CMdEProperty* startTime;
+ CMdEObject& startObject = (CMdEObject&)query->ResultItem(0);
+ TInt timeIndex = startObject.Property(creationDateDef, startTime);
+ if( KErrNotFound == timeIndex )
+ {
+ User::Leave(KErrCorrupt);
+ }
+ startMonth = static_cast<CMdETimeProperty*>(startTime)->Value();
+ iQueryAttributes[0].iMedia->SetTObjectValueL(
+ KGlxMediaCollectionInternalStartDate, startMonth);
+ }
+ else if(iQueryAttributes[0].iAttribute == KGlxMediaCollectionInternalEndDate)
+ {
+ CMdEProperty* endTime;
+ CMdEObject& endObject = (CMdEObject&)query->ResultItem(0);
+ timeIndex = endObject.Property(creationDateDef, endTime);
+ if( KErrNotFound == timeIndex )
+ {
+ User::Leave(KErrCorrupt);
+ }
+ endMonth = static_cast<CMdETimeProperty*>(endTime)->Value();
+ iQueryAttributes[0].iMedia->SetTObjectValueL(
+ KGlxMediaCollectionInternalEndDate, endMonth);
+ }
}
- iQueryAttributes[0].iMedia->SetTObjectValueL(KGlxMediaCollectionInternalStartDate, startMonth);
- iQueryAttributes[0].iMedia->SetTObjectValueL(KGlxMediaCollectionInternalEndDate, endMonth);
+ else
+ {
+ iQueryAttributes[0].iMedia->SetTObjectValueL(
+ KGlxMediaCollectionInternalStartDate, startMonth);
+ iQueryAttributes[0].iMedia->SetTObjectValueL(
+ KGlxMediaCollectionInternalEndDate, endMonth);
+ }
}
else if( EQueryResultModeCount == query->ResultMode() )
{
- iQueryAttributes[0].iMedia->SetTObjectValueL(iQueryAttributes[0].iAttribute, query->Count());
+ iQueryAttributes[0].iMedia->SetTObjectValueL(
+ iQueryAttributes[0].iAttribute, query->Count());
}
else
{
@@ -1124,7 +1240,8 @@
for (TInt queryResultsPos = 0; queryResultsPos < queryResultsCount; queryResultsPos++)
{
- CMdERelation& relation = static_cast<CMdERelation&>(iQueries[0]->ResultItem(queryResultsPos));
+ CMdERelation& relation = static_cast<CMdERelation&>(
+ iQueries[0]->ResultItem(queryResultsPos));
CMPXMedia* targetMedia = NULL;
if (iMediaArray)
{
@@ -1165,14 +1282,9 @@
CMdEQuery* query = iQueries[0];
TInt queryResultsCount = query->Count();
- GLX_LOG_INFO1("==> CGlxDataSourceTaskMdeAttributeMde::DoHandleImageVideoQueryCompletedL - queryResultsCount=%d", queryResultsCount);
-#ifdef _DEBUG
- iStopTime.HomeTime(); // Get home time
- if (queryResultsCount)
- {
- GLX_LOG_INFO1("==> CGlxDataSourceTaskMdeAttributeMde::DoHandleImageVideoQueryCompletedL took <%d> us", (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
- }
-#endif
+ GLX_DEBUG2("CGlxDataSourceTaskMdeAttributeMde::DoHandleImageVideoQueryCompletedL()"
+ " queryResultsCount=%d", queryResultsCount);
+
if( ( queryResultsCount == 1 ) && ( !iMediaArray ) )
{
CMdEObject& object = static_cast<CMdEObject&>(query->ResultItem(0));
@@ -1188,10 +1300,11 @@
for (TInt i = 0; i < queryResultsCount; i++)
{
CMdEObject& object = static_cast<CMdEObject&>(query->ResultItem(i));
+
CMPXMedia* entry = CMPXMedia::NewL();
CleanupStack::PushL(entry);
- iMediaArray->AppendL(*entry);
- CleanupStack::PopAndDestroy(entry);
+ iMediaArray->AppendL(entry);
+ CleanupStack::Pop(entry);
AddAttributesL(object, (*iMediaArray)[iMediaArray->Count() - 1]);
}
}
@@ -1207,11 +1320,14 @@
__ASSERT_DEBUG(dynamic_cast<CGlxGetRequest*>(iRequest), Panic(EGlxPanicLogicError));
CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);
- CMdEQuery* query = DataSource()->Session().NewRelationQueryL(*DataSource()->NamespaceDef(), this);
+ CMdEQuery* query = DataSource()->Session().NewRelationQueryL(
+ *DataSource()->NamespaceDef(), this);
CleanupStack::PushL(query);
CMdELogicCondition& rootCondition = query->Conditions();
- CMdERelationCondition& containerRelationCondition = rootCondition.AddRelationConditionL(DataSource()->ContainsLocationDef(), ERelationConditionSideRight);
+ CMdERelationCondition& containerRelationCondition =
+ rootCondition.AddRelationConditionL(DataSource()->ContainsLocationDef(),
+ ERelationConditionSideRight);
CMdELogicCondition& itemLogicCondition = containerRelationCondition.LeftL();
CMdELogicCondition& locationLogicCondition = containerRelationCondition.RightL();
locationLogicCondition.AddObjectConditionL(DataSource()->LocationDef());
@@ -1290,8 +1406,10 @@
// CGlxDataSourceTask::QueueObjectQueryL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeAttributeMde::QueueObjectQueryL(CMdEObjectDef& aObjectDef, TBool aIsContent, TGlxQueryType aQueryType,
- TQueryResultMode aResultMode, const TGlxMediaId& aContainerId, TMPXAttribute aAttribute, CMPXMedia* aEntry,
+void CGlxDataSourceTaskMdeAttributeMde::QueueObjectQueryL(CMdEObjectDef& aObjectDef,
+ TBool aIsContent, TGlxQueryType aQueryType,
+ TQueryResultMode aResultMode, const TGlxMediaId& aContainerId,
+ TMPXAttribute aAttribute, CMPXMedia* aEntry,
const TGlxFilterProperties& aFilterProperties)
{
TRACER("CGlxDataSourceTaskMdeAttribute::QueueObjectQueryL()")
@@ -1318,10 +1436,11 @@
}
}
- CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(), *queryBaseObject, this);
+ CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(),
+ *queryBaseObject, this);
CleanupStack::PushL(query);
+ query->SetResultMode(aResultMode);
SetQueryConditionsL(*query, aFilterProperties, aContainerId, aObjectDef);
- query->SetResultMode(aResultMode);
iQueryAttributes.AppendL(TGlxQueryAttribute(aAttribute, aEntry, aFilterProperties));
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -90,18 +90,28 @@
_LIT(KColonBackslash, ":\\");
_LIT(KFileNameFormatString, "(%+02u)");
+// Items to be deleted from File server at a time before calling scheduler wait
+const TInt KDeletedItemCount = 10;
+const TInt KDeleteOperationInterval = 1000;
+
// ----------------------------------------------------------------------------
// Destructor
// ----------------------------------------------------------------------------
//
CGlxDataSourceTaskMdeCommand::~CGlxDataSourceTaskMdeCommand()
{
- TRACER("CGlxDataSourceTaskMdeCommand::~CGlxDataSourceTaskMdeCommand()")
+ TRACER("CGlxDataSourceTaskMdeCommand::~CGlxDataSourceTaskMdeCommand()");
iLeftIds.Close();
iRightIds.Close();
delete iTitle;
delete iObjectToRename;
delete iStringCache;
+ if(iTimer && iTimer->IsActive())
+ {
+ iTimer->Cancel();
+ }
+ delete iTimer;
+ delete iSchedulerWait;
}
@@ -114,7 +124,7 @@
CGlxDataSource* aDataSource)
: CGlxDataSourceTaskMde(aRequest, aObserver, aDataSource)
{
- TRACER("CGlxDataSourceTaskMdeCommand::CGlxDataSourceTaskMdeCommand()")
+ TRACER("CGlxDataSourceTaskMdeCommand::CGlxDataSourceTaskMdeCommand()");
// No implementation required
}
@@ -124,13 +134,16 @@
//
void CGlxDataSourceTaskMdeCommand::ConstructL()
{
- TRACER("CGlxDataSourceTaskMdeCommand::ConstructL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::ConstructL()");
iResponse = CMPXCommand::NewL(static_cast<CGlxCommandRequest*>(iRequest)->Command());
#ifdef USE_S60_TNM
DataSource()->CancelFetchThumbnail();
#else
DataSource()->ThumbnailCreator().CancelRequest( TGlxMediaId(0) );
-#endif
+#endif
+
+ iTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+ iSchedulerWait = new (ELeave) CActiveSchedulerWait();
}
/// @todo minor: Rowland Cook 12/06/2007 Add method decription.
@@ -140,7 +153,7 @@
//
void CGlxDataSourceTaskMdeCommand::ExecuteRequestL()
{
- TRACER("CGlxDataSourceTaskMdeCommand::ExecuteRequestL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::ExecuteRequestL()");
__ASSERT_DEBUG(DataSource()->NamespaceDef(), Panic(EGlxPanicIllegalState));
const CMPXCommand& command = static_cast<CGlxCommandRequest*>(iRequest)->Command();
@@ -164,7 +177,7 @@
//
void CGlxDataSourceTaskMdeCommand::AddContainerL(const TDesC& aContainerName)
{
- TRACER("CGlxDataSourceTaskMdeCommand::AddContainerL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::AddContainerL()");
iTitle = aContainerName.AllocL();
AppendContainerTitleCountQueryL(ECommandAddContainer, aContainerName);
ExecuteQueryL();
@@ -174,19 +187,24 @@
// Add items to container by id
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeCommand::AddToContainerL(const RArray<TGlxMediaId>& aSourceIds, const RArray<TGlxMediaId>& aTargetContainers)
+void CGlxDataSourceTaskMdeCommand::AddToContainerL(const RArray<TGlxMediaId>& aSourceIds,
+ const RArray<TGlxMediaId>& aTargetContainers)
{
- TRACER("CGlxDataSourceTaskMdeCommand::AddToContainerL(const RArray<TGlxMediaId>& aSourceIds, const RArray<TGlxMediaId>& aTargetContainers)")
- __ASSERT_DEBUG(aSourceIds.Count() && aTargetContainers.Count(), Panic(EGlxPanicEmptyArray));
+ TRACER("CGlxDataSourceTaskMdeCommand::AddToContainerL(const RArray<TGlxMediaId>& aSourceIds,const RArray<TGlxMediaId>& aTargetContainers)");
+ __ASSERT_DEBUG(aSourceIds.Count() && aTargetContainers.Count(),
+ Panic(EGlxPanicEmptyArray));
iLeftIds.Reset();
iRightIds.Reset();
- CMdEQuery* query = DataSource()->Session().NewRelationQueryL(*DataSource()->NamespaceDef(), this);
+ CMdEQuery* query = DataSource()->Session().NewRelationQueryL(
+ *DataSource()->NamespaceDef(), this);
AppendQueryL(query, ECommandAddToContainer);
CMdELogicCondition& rootCondition = query->Conditions();
- CMdERelationCondition& containerRelationCondition = rootCondition.AddRelationConditionL(DataSource()->ContainsDef(), ERelationConditionSideLeft);
+ CMdERelationCondition& containerRelationCondition =
+ rootCondition.AddRelationConditionL(DataSource()->ContainsDef(),
+ ERelationConditionSideLeft);
CMdELogicCondition& leftLogicCondition = containerRelationCondition.LeftL();
CMdELogicCondition& rightLogicCondition = containerRelationCondition.RightL();
leftLogicCondition.SetOperator(ELogicConditionOperatorOr);
@@ -236,7 +254,7 @@
void CGlxDataSourceTaskMdeCommand::AddToContainerL(const TDesC& aSourceUri,
const RArray< TGlxMediaId >& aTargetContainers)
{
- TRACER("CGlxDataSourceTaskMdeCommand::AddToContainerL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::AddToContainerL()");
CMdEObject* sourceObject = DataSource()->Session().GetObjectL(aSourceUri);
if (!sourceObject)
{
@@ -254,10 +272,10 @@
// Copy files to another drive.
// ----------------------------------------------------------------------------
//
-/// @todo minor: Rowland Cook 12/06/2007 Has this method been tested? If so remove comments
-void CGlxDataSourceTaskMdeCommand::CopyL(const RArray<TGlxMediaId>& aSourceIds, const TDesC& aDrive)
+void CGlxDataSourceTaskMdeCommand::CopyL(const RArray<TGlxMediaId>& aSourceIds,
+ const TDesC& aDrive)
{
- TRACER("CGlxDataSourceTaskMdeCommand::CopyL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::CopyL()");
FileOperationL(aSourceIds.Array(), aDrive, ECopy);
}
@@ -265,10 +283,10 @@
// Move files to another drive.
// ----------------------------------------------------------------------------
//
-/// @todo minor: Rowland Cook 12/06/2007 Has this method been tested? If so remove comments
-void CGlxDataSourceTaskMdeCommand::MoveL(const RArray<TGlxMediaId>& aSourceIds, const TDesC& aDrive)
+void CGlxDataSourceTaskMdeCommand::MoveL(const RArray<TGlxMediaId>& aSourceIds,
+ const TDesC& aDrive)
{
- TRACER("CGlxDataSourceTaskMdeCommand::MoveL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::MoveL()");
FileOperationL(aSourceIds.Array(), aDrive, EMove);
}
@@ -276,9 +294,10 @@
// Remove items from a container.
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeCommand::RemoveFromContainerL(const RArray<TGlxMediaId>& aItemIds, const TGlxMediaId& aContainerId)
+void CGlxDataSourceTaskMdeCommand::RemoveFromContainerL(
+ const RArray<TGlxMediaId>& aItemIds, const TGlxMediaId& aContainerId)
{
- TRACER("CGlxDataSourceTaskMdeCommand::RemoveFromContainerL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::RemoveFromContainerL()");
// Answer to question in @bug above: No
CMdEObject* object = NULL;
@@ -289,12 +308,15 @@
User::Leave(KErrNotFound);
}
- CMdEQuery* query = DataSource()->Session().NewRelationQueryL(*DataSource()->NamespaceDef(), this);
+ CMdEQuery* query = DataSource()->Session().NewRelationQueryL(
+ *DataSource()->NamespaceDef(), this);
AppendQueryL(query, ECommandRemoveFromContainer); // query is now owned by the query array.
CMdELogicCondition& rootCondition = query->Conditions();
- CMdERelationCondition& containerRelationCondition = rootCondition.AddRelationConditionL(DataSource()->ContainsDef(), ERelationConditionSideLeft);
+ CMdERelationCondition& containerRelationCondition =
+ rootCondition.AddRelationConditionL(
+ DataSource()->ContainsDef(), ERelationConditionSideLeft);
CMdELogicCondition* containerLogicCondition = NULL;
CMdELogicCondition* itemLogicCondition = NULL;
// Containers are on the left for albums, right for tags
@@ -326,7 +348,7 @@
//
void CGlxDataSourceTaskMdeCommand::DeleteL(const RArray<TGlxMediaId>& aItemIds)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DeleteL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DeleteL()");
CMdEObjectDef* containerObjectDef = NULL;
TInt err = ContainerObjectDef(containerObjectDef);
if (err == KErrNone)
@@ -348,10 +370,10 @@
//
// ----------------------------------------------------------------------------
//
-/// @todo minor: Rowland Cook 12/06/2007 Has this method been tested? If so remove comments
-void CGlxDataSourceTaskMdeCommand::RenameL(const TGlxMediaId& aSourceItemId, const TDesC& aTitle)
+void CGlxDataSourceTaskMdeCommand::RenameL(const TGlxMediaId& aSourceItemId,
+ const TDesC& aTitle)
{
- TRACER("CGlxDataSourceTaskMdeCommand::RenameL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::RenameL()");
delete iTitle;
iTitle = NULL;
iTitle = aTitle.AllocL();
@@ -370,10 +392,12 @@
// Set description.
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeCommand::SetDescriptionL(const RArray<TGlxMediaId>& aItemIds, const TDesC& aDescription)
+void CGlxDataSourceTaskMdeCommand::SetDescriptionL(const RArray<TGlxMediaId>& aItemIds,
+ const TDesC& aDescription)
{
- TRACER("CGlxDataSourceTaskMdeCommand::SetDescriptionL()")
- CMdEPropertyDef& descriptionPropertyDef = DataSource()->MediaDef().GetPropertyDefL(KPropertyDefNameDescription);
+ TRACER("CGlxDataSourceTaskMdeCommand::SetDescriptionL()");
+ CMdEPropertyDef& descriptionPropertyDef = DataSource()->MediaDef().GetPropertyDefL(
+ KPropertyDefNameDescription);
if (descriptionPropertyDef.PropertyType() != EPropertyText)
{
User::Leave(KErrCorrupt);
@@ -430,9 +454,10 @@
// Set capture location.
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeCommand::SetCaptureLocationL(const RArray<TGlxMediaId>& aItemIds, const TCoordinate& aCoordinate)
+void CGlxDataSourceTaskMdeCommand::SetCaptureLocationL(const RArray<TGlxMediaId>& aItemIds,
+ const TCoordinate& aCoordinate)
{
- TRACER("CGlxDataSourceTaskMdeCommand::SetCaptureLocationL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::SetCaptureLocationL()") ;
if (!Math::IsNaN(aCoordinate.Latitude()) || !Math::IsNaN(aCoordinate.Longitude()))
{
User::Leave(KErrArgument);
@@ -443,7 +468,8 @@
CMdELogicCondition& rootCondition = query->Conditions();
- CMdERelationCondition& containerRelationCondition = rootCondition.AddRelationConditionL(ERelationConditionSideLeft);
+ CMdERelationCondition& containerRelationCondition = rootCondition.AddRelationConditionL(
+ ERelationConditionSideLeft);
CMdELogicCondition& locationLogicCondition = containerRelationCondition.RightL();
CMdELogicCondition& itemLogicCondition = containerRelationCondition.LeftL();
locationLogicCondition.AddObjectConditionL(DataSource()->LocationDef());
@@ -463,7 +489,7 @@
//
void CGlxDataSourceTaskMdeCommand::ThumbnailCleanupL()
{
- TRACER("CGlxDataSourceTaskMdeCommand::ThumbnailCleanupL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::ThumbnailCleanupL()");
#ifndef USE_S60_TNM
CGlxDataSourceMde* ds = DataSource();
ds->ThumbnailCreator().CleanupThumbnailsL(&ds->ThumbnailDatabase());
@@ -477,7 +503,7 @@
//
void CGlxDataSourceTaskMdeCommand::DoHandleQueryCompletedL(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoHandleQueryCompletedL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DoHandleQueryCompletedL()");
TGlxQueryType queryType = iQueryTypes[0];
switch (queryType)
@@ -502,7 +528,8 @@
if (queryCount)
{
- User::LeaveIfError(DataSource()->Session().RemoveRelationsL(relationsToRemove, successfullyRemovedReleations));
+ User::LeaveIfError(DataSource()->Session().RemoveRelationsL(
+ relationsToRemove, successfullyRemovedReleations));
}
CleanupStack::PopAndDestroy(&successfullyRemovedReleations);
@@ -547,7 +574,7 @@
//
void CGlxDataSourceTaskMdeCommand::DoNextQueryL()
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoNextQueryL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DoNextQueryL()");
if (iQueries.Count())
{
ExecuteQueryL();
@@ -562,9 +589,10 @@
// CGlxDataSourceTaskMdeCommand::FileOperationL
// ----------------------------------------------------------------------------
//
-void CGlxDataSourceTaskMdeCommand::FileOperationL(const TArray<TGlxMediaId>& aSourceIds, const TDesC& aDrive, TFileOperation aFileOperation)
+void CGlxDataSourceTaskMdeCommand::FileOperationL(const TArray<TGlxMediaId>& aSourceIds,
+ const TDesC& aDrive, TFileOperation aFileOperation)
{
- TRACER("CGlxDataSourceTaskMdeCommand::FileOperationL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::FileOperationL()");
ContentAccess::CManager *manager = ContentAccess::CManager::NewL();
CleanupStack::PushL(manager);
// The following line causes a code scanner warning advising use of EikonEnv RFs instance.
@@ -593,7 +621,8 @@
// the drive that it is located on. (For the C:, the root is C:\data,
// for the D: the root is D:\)
{
- fileNameWithoutRoot.Set(sourceFileName.Right(sourceFileName.Length() - sourceRootPath.Length()));
+ fileNameWithoutRoot.Set(sourceFileName.Right(sourceFileName.Length() -
+ sourceRootPath.Length()));
}
else
{
@@ -606,7 +635,6 @@
// Append the file name
destinationFileName.Append(fileNameWithoutRoot);
-/// @todo minor: Rowland Cook 12/06/2007 majic number.
if (destinationFileName.CompareF(sourceFileName) != 0)
{
// If source and destination are not identical, perform the copy.
@@ -615,7 +643,8 @@
// If the destination file name already exists find an available file name.
TParse destinationFileNameParse;
destinationFileNameParse.Set(destinationFileName,NULL,NULL); // this is a copy of the data
- TInt destinationFileNameWithoutExtensionLength = destinationFileName.Length() - destinationFileNameParse.Ext().Length();
+ TInt destinationFileNameWithoutExtensionLength = destinationFileName.Length()
+ - destinationFileNameParse.Ext().Length();
TInt i = 1;
do
{
@@ -658,16 +687,7 @@
TItemId CGlxDataSourceTaskMdeCommand::ContainerItemId(const TGlxMediaId& aMediaId)
{
TRACER("TMdEItemId CGlxDataSourceTaskMdeCommand::ContainerItemId()");
- TItemId containerId = aMediaId.Value();
- if (aMediaId == KGlxCollectionRootId)
- {
- // Check the collection plugin uid
- if (iCollectionUid == TUid::Uid(KGlxCollectionPluginCameraImplementationUid))
- {
- // containerId = DataSource()->CameraAlbumId().Value();
- }
- }
- return containerId;
+ return aMediaId.Value();
}
// ----------------------------------------------------------------------------
@@ -676,16 +696,19 @@
//
void CGlxDataSourceTaskMdeCommand::RootPath(const TDesC& aDrive, TDes& aRootPath)
{
- TRACER("CGlxDataSourceTaskMdeCommand::RootPath()")
- if (aDrive.Left(KDriveLetterLength).CompareF(PathInfo::PhoneMemoryRootPath().Left(KDriveLetterLength)) == 0)
+ TRACER("CGlxDataSourceTaskMdeCommand::RootPath()");
+ if (aDrive.Left(KDriveLetterLength).CompareF(PathInfo::PhoneMemoryRootPath().Left(
+ KDriveLetterLength)) == 0)
{
aRootPath = PathInfo::PhoneMemoryRootPath();
}
- else if (aDrive.Left(KDriveLetterLength).CompareF(PathInfo::MemoryCardRootPath().Left(KDriveLetterLength)) == 0)
+ else if (aDrive.Left(KDriveLetterLength).CompareF(PathInfo::MemoryCardRootPath().Left(
+ KDriveLetterLength)) == 0)
{
aRootPath = PathInfo::MemoryCardRootPath();
}
- else if (aDrive.Left(KDriveLetterLength).CompareF(PathInfo::RomRootPath().Left(KDriveLetterLength)) == 0)
+ else if (aDrive.Left(KDriveLetterLength).CompareF(PathInfo::RomRootPath().Left(
+ KDriveLetterLength)) == 0)
{
aRootPath = PathInfo::RomRootPath();
}
@@ -702,19 +725,23 @@
//
void CGlxDataSourceTaskMdeCommand::SendProgressMessageL(TInt aCurrentStep, TInt aStepCount)
{
- TRACER("CGlxDataSourceTaskMdeCommand::SendProgressMessageL()")
- MGlxDataSourceUpdateObserver& observer = static_cast<CGlxCommandRequest*>(iRequest)->DataSourceUpdateObserver();
+ TRACER("CGlxDataSourceTaskMdeCommand::SendProgressMessageL()");
+ MGlxDataSourceUpdateObserver& observer =
+ static_cast<CGlxCommandRequest*>(iRequest)->DataSourceUpdateObserver();
const CMPXCommand& command = static_cast<CGlxCommandRequest*>(iRequest)->Command();
- __ASSERT_DEBUG(command.IsSupported(KMPXCommandGeneralSessionId), Panic(EGlxPanicCommandHasNoGeneralSessionId));
+ __ASSERT_DEBUG(command.IsSupported(KMPXCommandGeneralSessionId), Panic(
+ EGlxPanicCommandHasNoGeneralSessionId));
TAny* sessionId = command.ValueTObjectL<TAny*>(KMPXCommandGeneralSessionId);
CMPXMessage* progressMessage = CMPXMessage::NewL();
CleanupStack::PushL(progressMessage);
progressMessage->SetTObjectValueL<TInt>(KMPXMessageGeneralId, KMPXMessageContentIdProgress);
- progressMessage->SetTObjectValueL<TInt>(TMPXAttribute(KMPXMessageContentIdProgress, EMPXMessageProgressCurrentCount), aCurrentStep);
- progressMessage->SetTObjectValueL<TInt>(TMPXAttribute(KMPXMessageContentIdProgress, EMPXMessageProgressTotalCount), aStepCount);
+ progressMessage->SetTObjectValueL<TInt>(TMPXAttribute(KMPXMessageContentIdProgress,
+ EMPXMessageProgressCurrentCount), aCurrentStep);
+ progressMessage->SetTObjectValueL<TInt>(TMPXAttribute(KMPXMessageContentIdProgress,
+ EMPXMessageProgressTotalCount), aStepCount);
progressMessage->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, sessionId);
observer.HandleMessage(*progressMessage);
@@ -728,8 +755,7 @@
//
TInt CGlxDataSourceTaskMdeCommand::ContainerObjectDef(CMdEObjectDef*& aContainerObjectDef)
{
- TRACER("CGlxDataSourceTaskMdeCommand::ContainerObjectDef()")
- //__ASSERT_DEBUG( (iCollectionUid == TUid::Uid(KGlxTagCollectionPluginImplementationUid) || iCollectionUid == TUid::Uid(KGlxCollectionPluginAlbumsImplementationUid)), Panic(EGlxPanicInvalidCollectionUid));
+ TRACER("CGlxDataSourceTaskMdeCommand::ContainerObjectDef()");
TInt err = KErrNone;
if (iCollectionUid == TUid::Uid(KGlxTagCollectionPluginImplementationUid))
{
@@ -757,7 +783,7 @@
void CGlxDataSourceTaskMdeCommand::DoHandleAddToContainerQueryCompletedL
(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoHandleAddToContainerQueryCompletedL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DoHandleAddToContainerQueryCompletedL()");
RPointerArray<CMdEInstanceItem> relations;
CleanupClosePushL(relations);
@@ -783,7 +809,8 @@
if (!alreadyExists)
{
- CMdERelation* relation = DataSource()->Session().NewRelationL(DataSource()->ContainsDef(), iLeftIds[leftPos], iRightIds[rightPos]);
+ CMdERelation* relation = DataSource()->Session().NewRelationL(
+ DataSource()->ContainsDef(), iLeftIds[leftPos], iRightIds[rightPos]);
CleanupStack::PushL(relation);
relations.AppendL(relation);
CleanupStack::Pop(relation);
@@ -811,13 +838,14 @@
(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoHandleAddContainerQueryCompletedL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DoHandleAddContainerQueryCompletedL()");
//Duplicate albums check for the default albums i.e. Favourites
//as title property is left blank in MDS 2.5
if(iCollectionUid == TUid::Uid(KGlxCollectionPluginAlbumsImplementationUid))
{
- if(SearchStringL(R_ALBUM_FAVORITES_TITLE) == 0)
+ if(SearchStringL(R_ALBUM_FAVORITES_TITLE) == 0 ||
+ SearchStringL(R_ALBUM_CAMERA_TITLE) == 0 )
{
User::Leave(KErrAlreadyExists);
}
@@ -837,7 +865,8 @@
object = DataSource()->Session().NewObjectLC(*containerObjectDef, KNullDesC);
// A title property def of type text is required.
- CMdEPropertyDef& titlePropertyDef = containerObjectDef->GetPropertyDefL(KPropertyDefNameTitle);
+ CMdEPropertyDef& titlePropertyDef = containerObjectDef->GetPropertyDefL(
+ KPropertyDefNameTitle);
if (titlePropertyDef.PropertyType() != EPropertyText)
{
User::Leave(KErrCorrupt);
@@ -846,7 +875,8 @@
object->AddTextPropertyL(titlePropertyDef, *iTitle);
//ItemType property def of type text is required.
- CMdEPropertyDef& itemTypePropertyDef = containerObjectDef->GetPropertyDefL(KPropertyDefItemType);
+ CMdEPropertyDef& itemTypePropertyDef = containerObjectDef->GetPropertyDefL(
+ KPropertyDefItemType);
if (itemTypePropertyDef.PropertyType() != EPropertyText)
{
User::Leave(KErrCorrupt);
@@ -865,7 +895,8 @@
// A size property is required.
- CMdEPropertyDef& sizePropertyDef = containerObjectDef->GetPropertyDefL(KPropertyDefNameSize);
+ CMdEPropertyDef& sizePropertyDef = containerObjectDef->GetPropertyDefL(
+ KPropertyDefNameSize);
if (sizePropertyDef.PropertyType() != EPropertyUint32)
{
User::Leave(KErrCorrupt);
@@ -874,14 +905,16 @@
// A creation date property is required.
- CMdEPropertyDef& creationDateDef = containerObjectDef->GetPropertyDefL(KPropertyDefNameCreationDate);
+ CMdEPropertyDef& creationDateDef = containerObjectDef->GetPropertyDefL(
+ KPropertyDefNameCreationDate);
if (creationDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
}
// A last modified date property is required.
- CMdEPropertyDef& lmDateDef = containerObjectDef->GetPropertyDefL(KPropertyDefNameLastModifiedDate);
+ CMdEPropertyDef& lmDateDef = containerObjectDef->GetPropertyDefL(
+ KPropertyDefNameLastModifiedDate);
if (lmDateDef.PropertyType() != EPropertyTime)
{
User::Leave(KErrCorrupt);
@@ -897,7 +930,8 @@
iResponse->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId, id);
iResponse->SetTObjectValueL<TMPXItemId>(KMPXMessageMediaGeneralId, id);
- iResponse->SetTObjectValueL<TMPXChangeEventType>(KMPXMessageChangeEventType, EMPXItemInserted);
+ iResponse->SetTObjectValueL<TMPXChangeEventType>(KMPXMessageChangeEventType,
+ EMPXItemInserted);
}
// ----------------------------------------------------------------------------
// CGlxDataSourceTaskMdeCommand::DoHandleDeleteContainersQueryCompletedL
@@ -906,8 +940,9 @@
void CGlxDataSourceTaskMdeCommand::DoHandleDeleteContainersQueryCompletedL
(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoHandleDeleteContainersQueryCompletedL()")
- CMdEPropertyDef& albumTypeProperty = DataSource()->AlbumDef().GetPropertyDefL(KPropertyDefNameAlbumType);
+ TRACER("CGlxDataSourceTaskMdeCommand::DoHandleDeleteContainersQueryCompletedL()");
+ CMdEPropertyDef& albumTypeProperty = DataSource()->AlbumDef().GetPropertyDefL(
+ KPropertyDefNameAlbumType);
TInt queryCount = aQuery.Count();
RArray<TItemId> objectsForRemoval;
@@ -928,8 +963,8 @@
if (KErrNotFound != albumTypeIndex)
{
TInt albumTypeValue = static_cast<CMdEUint16Property*>(albumType)->Value();
-
- if ((albumTypeValue == MdeConstants::Album::EAlbumSystemFavourite) || (albumTypeValue == MdeConstants::Album::EAlbumSystemCamera))
+ if ((albumTypeValue == MdeConstants::Album::EAlbumSystemFavourite) ||
+ (albumTypeValue == MdeConstants::Album::EAlbumSystemCamera))
{
User::Leave(KErrAccessDenied);
}
@@ -939,7 +974,8 @@
if (queryCount)
{
- User::LeaveIfError(DataSource()->Session().RemoveObjectsL(objectsForRemoval, sucessfullyRemovedObjects));
+ User::LeaveIfError(DataSource()->Session().RemoveObjectsL(objectsForRemoval,
+ sucessfullyRemovedObjects));
}
CleanupStack::PopAndDestroy(&sucessfullyRemovedObjects);
@@ -952,7 +988,8 @@
void CGlxDataSourceTaskMdeCommand::DoHandleDeleteItemsQueryCompletedL
(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoHandleDeleteItemsQueryCompletedL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DoHandleDeleteItemsQueryCompletedL()");
+ TInt deleteItemCounter = 0;
ContentAccess::CManager *manager = ContentAccess::CManager::NewL();
CleanupStack::PushL(manager);
TInt queryCount = aQuery.Count();
@@ -971,7 +1008,10 @@
User::LeaveIfError( fs.Connect() );
TInt lastErr = KErrNone;
- for(TInt queryPos = queryCount - 1; queryPos >= 0; queryPos--)
+
+ // If Delete operation is cancelled before completion,
+ // iCancelled because ETrue, break out of for loop.
+ for(TInt queryPos = queryCount - 1; (queryPos >= 0 && !iCancelled); queryPos--)
{
CMdEObject& object = static_cast<CMdEObject&>(aQuery.ResultItem(queryPos));
//Removes the Read Only attributes of the file
@@ -981,7 +1021,22 @@
{
lastErr = err;
}
- objectsForRemoval.AppendL(object.Id());
+ else
+ {
+ // On successful deletion, delete the same from database
+ objectsForRemoval.AppendL(object.Id());
+ }
+
+ // After every 50 items are deleted, break from the for loop
+ // and process other pending requests if any
+ if(deleteItemCounter == KDeletedItemCount)
+ {
+ iTimer->Start( KDeleteOperationInterval, KDeleteOperationInterval,
+ TCallBack( &SchedulerStopCallback, (TAny *)this ) );
+ iSchedulerWait->Start();
+ deleteItemCounter = 0;
+ }
+ deleteItemCounter++;
}
// Calling Close() on file server session
CleanupStack::PopAndDestroy( &fs );
@@ -1007,7 +1062,7 @@
void CGlxDataSourceTaskMdeCommand::DoHandleRenameConainerQueryCompletedL
(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoHandleRenameConainerQueryCompletedL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DoHandleRenameConainerQueryCompletedL()");
__ASSERT_DEBUG(iObjectToRename, Panic(EGlxPanicLogicError));
if (aQuery.Count())
{
@@ -1035,8 +1090,8 @@
// the type to be a non-localised user defined album
static_cast<CMdEUint16Property*>(albumType)->SetValueL(MdeConstants::Album::EAlbumUser);
}
-
- else if ((albumTypeValue == MdeConstants::Album::EAlbumSystemFavourite) || (albumTypeValue == MdeConstants::Album::EAlbumSystemCamera))
+ else if ((albumTypeValue == MdeConstants::Album::EAlbumSystemFavourite) ||
+ (albumTypeValue == MdeConstants::Album::EAlbumSystemCamera))
{
// Cannot rename system albums
User::Leave(KErrAccessDenied);
@@ -1107,7 +1162,7 @@
void CGlxDataSourceTaskMdeCommand::DoHandleRenameQueryCompletedL
(CMdEQuery& aQuery)
{
- TRACER("CGlxDataSourceTaskMdeCommand::DoHandleRenameQueryCompletedL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::DoHandleRenameQueryCompletedL()");
__ASSERT_DEBUG(aQuery.Count() == 1, Panic(EGlxPanicUnexpectedQueryResultCount ));
delete iObjectToRename;
iObjectToRename = static_cast<CMdEObject*>(aQuery.TakeOwnershipOfResult(0));
@@ -1127,20 +1182,23 @@
void CGlxDataSourceTaskMdeCommand::AppendContainerTitleCountQueryL
(const TGlxQueryType& aQueryType, const TDesC& aTitle)
{
- TRACER("CGlxDataSourceTaskMdeCommand::AppendContainerTitleCountQueryL()")
+ TRACER("CGlxDataSourceTaskMdeCommand::AppendContainerTitleCountQueryL()");
// Test to see if a container alerady exists in the database with aContainerName
CMdEObjectDef* containerObjectDef = NULL;
TInt err = ContainerObjectDef(containerObjectDef);
__ASSERT_ALWAYS(err == KErrNone, Panic(EGlxPanicInvalidCollectionUid));
- CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(), *containerObjectDef, this);
+ CMdEQuery* query = DataSource()->Session().NewObjectQueryL(*DataSource()->NamespaceDef(),
+ *containerObjectDef, this);
CleanupStack::PushL(query);
- CMdEPropertyDef& titlePropertyDef = DataSource()->ObjectDef().GetPropertyDefL(KPropertyDefNameTitle);
+ CMdEPropertyDef& titlePropertyDef = DataSource()->ObjectDef().GetPropertyDefL(
+ KPropertyDefNameTitle);
query->SetResultMode(EQueryResultModeCount);
- query->Conditions().AddPropertyConditionL(titlePropertyDef, ETextPropertyConditionCompareEquals, aTitle);
+ query->Conditions().AddPropertyConditionL(titlePropertyDef,
+ ETextPropertyConditionCompareEquals, aTitle);
CleanupStack::Pop(query);
@@ -1153,7 +1211,7 @@
//
TInt CGlxDataSourceTaskMdeCommand::SearchStringL(TInt aResourceId)
{
-
+ TRACER("CGlxDataSourceTaskMdeCommand::SearchStringL()");
_LIT(KResourceFile, "z:glxpluginalbums.rsc");
if (!iStringCache)
@@ -1170,3 +1228,39 @@
return result;
}
+
+// ----------------------------------------------------------------------------
+// CGlxDataSourceTaskMdeCommand::SchedulerStopCallback
+// ----------------------------------------------------------------------------
+//
+TInt CGlxDataSourceTaskMdeCommand::SchedulerStopCallback(TAny* aPtr)
+ {
+ TRACER("CGlxDataSourceTaskMdeCommand::SchedulerStopCallback");
+
+ CGlxDataSourceTaskMdeCommand* self = (CGlxDataSourceTaskMdeCommand*) aPtr;
+ if ( self )
+ {
+ self->SchedulerStopComplete();
+ }
+
+ return KErrNone;
+ }
+
+// -----------------------------------------------------------------------------
+// SchedulerStopComplete
+// -----------------------------------------------------------------------------
+//
+void CGlxDataSourceTaskMdeCommand::SchedulerStopComplete()
+ {
+ TRACER("CGlxDataSourceTaskMdeCommand::SchedulerStopComplete");
+
+ if(iTimer && iTimer->IsActive())
+ {
+ iTimer->Cancel();
+ }
+
+ if(iSchedulerWait)
+ {
+ iSchedulerWait->AsyncStop();
+ }
+ }
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsidlist.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsidlist.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -74,7 +74,8 @@
// Constructor
// ----------------------------------------------------------------------------
//
-CGlxDataSourceTaskMdeIdList::CGlxDataSourceTaskMdeIdList(CGlxIdListRequest* aRequest, MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource)
+CGlxDataSourceTaskMdeIdList::CGlxDataSourceTaskMdeIdList(CGlxIdListRequest* aRequest,
+ MGlxDataSourceRequestObserver& aObserver, CGlxDataSource* aDataSource)
: CGlxDataSourceTaskMde(aRequest, aObserver, aDataSource)
{
TRACER("CGlxDataSourceTaskMdeIdList::CGlxDataSourceTaskMdeIdList()")
@@ -109,6 +110,9 @@
void CGlxDataSourceTaskMdeIdList::ExecuteRequestL()
{
TRACER("CGlxDataSourceTaskMdeIdList::ExecuteRequestL()")
+#ifdef _DEBUG
+ iStartTime.HomeTime();
+#endif
CGlxIdListRequest* request = static_cast<CGlxIdListRequest*>(iRequest);
TGlxMediaId container = request->ContainerId();
TGlxQueryType queryType = EIdListQuery;
@@ -140,9 +144,9 @@
}
case KGlxCollectionPluginMonthsImplementationUid:
{
- iFilterProperties.iOrigin = EGlxFilterOriginCamera;
+ iFilterProperties.iOrigin = EGlxFilterOriginAll;
container = TGlxMediaId(KGlxCollectionRootId);
- resultMode = EQueryResultModeObjectWithFreetexts;
+ resultMode = EQueryResultModeItem;
break;
}
case KGlxCollectionPluginImageViewerImplementationUid:
@@ -177,7 +181,7 @@
}
case KGlxCollectionPluginMonthsImplementationUid:
{
- iFilterProperties.iOrigin = EGlxFilterOriginCamera;
+ iFilterProperties.iOrigin = EGlxFilterOriginAll;
AddMonthFilterL(container, iFilterProperties);
container = TGlxMediaId(KGlxCollectionRootId);
break;
@@ -202,6 +206,11 @@
TRACER("CGlxDataSourceTaskMdeIdList::DoHandleQueryCompletedL()")
__ASSERT_DEBUG(iQueryTypes[0] == EIdListQuery, Panic(EGlxPanicLogicError));
DoHandleListQueryCompletedL();
+#ifdef _DEBUG
+ iStopTime.HomeTime();
+ GLX_DEBUG2("GlxDataSrcTaskMdeIdList:DoHandleQueryCompletedL() took %d us",
+ (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
+#endif
}
// ----------------------------------------------------------------------------
@@ -211,7 +220,7 @@
void CGlxDataSourceTaskMdeIdList::DoHandleListQueryCompletedL()
{
TRACER("CGlxDataSourceTaskMdeIdList::DoHandleListQueryCompletedL()")
- if(iQueries[0]->ResultMode() == EQueryResultModeObjectWithFreetexts)
+ if(iQueries[0]->ResultMode() == EQueryResultModeItem)
{
DoMonthListCreationL(*iQueries[0], iFilterProperties);
}
@@ -245,6 +254,7 @@
TTime lastMonth;
TTime currentMonth;
TInt count = aQuery.Count();
+ GLX_DEBUG2("CGlxDataSourceTaskMdeIdList::DoMonthListCreationL count=%d", count);
for( TInt i = 0 ; i < count ; i++ )
{
CMdEObject& object = (CMdEObject&)aQuery.ResultItem(i);
@@ -254,13 +264,17 @@
User::Leave(KErrCorrupt);
}
currentMonth = static_cast<CMdETimeProperty*>(time)->Value();
- if( !DataSource()->SameMonth(lastMonth, currentMonth) )
+
+ // Also Checking for a Valid Month Entry Based on a Year Greater than 0000.
+ if( !DataSource()->SameMonth(lastMonth, currentMonth) && (currentMonth.DateTime().Year() > 0) )
{
const TGlxMediaId monthId = DataSource()->GetMonthIdL(currentMonth);
monthList.AppendL(monthId);
+ GLX_DEBUG2("CGlxDataSourceTaskMdeIdList::DoMonthListCreationL monthId=%d", monthId.Value());
lastMonth = currentMonth;
}
}
+ GLX_DEBUG2("CGlxDataSourceTaskMdeIdList::DoMonthListCreationL monthList.Count=%d", monthList.Count());
PostFilterL(monthList, aFilterProperties);
CleanupStack::PopAndDestroy(&monthList);
}
--- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -156,14 +156,17 @@
void CGlxDataSourceTaskMdeThumbnail::ExecuteRequestL()
{
TRACER("CGlxDataSourceTaskMdeThumbnail::ExecuteRequestL()")
+#ifdef _DEBUG
+ iStartTime.HomeTime();
+#endif
CGlxThumbnailRequest* request = static_cast<CGlxThumbnailRequest*>(iRequest);
TGlxThumbnailRequest tnReq;
request->ThumbnailRequest(tnReq);
-#ifdef _DEBUG
- RDebug::Print(_L("==> CGlxDataSourceTaskMdeThumbnail::ExecuteRequestL - FetchThumbnailL(Id=%d), W(%d), H(%d)"), request->ItemId().Value(), tnReq.iSizeClass.iWidth, tnReq.iSizeClass.iHeight);
- iStartTime.HomeTime(); // Get home time
-#endif
+ GLX_DEBUG4("*** CGlxDataSourceTaskMdeThumbnail::ExecuteRequestL() Id=%d, TN Size w(%d) h(%d) ***", tnReq.iId.Value(),
+ tnReq.iSizeClass.iWidth, tnReq.iSizeClass.iHeight);
+ GLX_DEBUG2("CGlxDataSourceTaskMdeThumbnail::ExecuteRequestL() iPriorityMode=%d", tnReq.iPriorityMode);
+
#ifdef USE_S60_TNM
if(request->ThumbnailInfo())
{
@@ -173,7 +176,7 @@
}
else
{
- ThumbnailFetchComplete(KErrNone);
+ ThumbnailFetchComplete(KErrNone, ETrue);
}
}
else
@@ -241,11 +244,13 @@
{
TRACER("CGlxDataSourceTaskMdeThumbnail::HandleThumbnailFetchCompleteL()")
__ASSERT_DEBUG(dynamic_cast<CGlxThumbnailRequest*>(iRequest), Panic(EGlxPanicLogicError));
+ CGlxThumbnailRequest* req = static_cast<CGlxThumbnailRequest*>(iRequest);
+ GLX_DEBUG2("*** CGlxDataSourceTaskMdeThumbnail::HandleThumbnailFetchCompleteL() Id=%d ***", req->ItemId().Value());
#ifdef _DEBUG
- iStopTime.HomeTime(); // Get home time
- RDebug::Print(_L("==> ThumbnailFetchComplete <%d> us"), (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
-#endif
- CGlxThumbnailRequest* req = static_cast<CGlxThumbnailRequest*>(iRequest);
+ iStopTime.HomeTime();
+ GLX_DEBUG2("CGlxDataSourceTaskMdeThumbnail:HandleThumbnailFetchCompleteL() took %d us",
+ (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
+#endif
delete iResponse;
iResponse = NULL;
iResponse = CMPXMedia::NewL();
@@ -257,6 +262,7 @@
tnAttribute->iDimensions = size;
tnAttribute->iCroppingRect = tnRequest.iCroppingRect;
tnAttribute->iThumbnailQuality = aQuality;
+ GLX_DEBUG2("CGlxDataSourceTaskMdeThumbnail::HandleThumbnailFetchCompleteL() aQuality=%d", aQuality);
TUint attributeId = req->AttributeId();
if ( GlxIsFullThumbnailAttribute(attributeId) )
@@ -273,7 +279,8 @@
}
#ifdef USE_S60_TNM
-void CGlxDataSourceTaskMdeThumbnail::ThumbnailFetchComplete(TInt aError)
+void CGlxDataSourceTaskMdeThumbnail::ThumbnailFetchComplete(TInt aError,
+ TBool aQuality)
{
TRACER("CGlxDataSourceTaskMdeThumbnail::ThumbnailFetchComplete(TNM)")
CGlxThumbnailRequest* request = static_cast<CGlxThumbnailRequest*>(iRequest);
@@ -282,7 +289,12 @@
TInt err = aError;
if(!err)
{
- TRAP(err, HandleThumbnailFetchCompleteL(tnRequest.iId, EGlxThumbnailQualityHigh));
+ TGlxThumbnailQuality tnQuality = EGlxThumbnailQualityHigh;
+ if (!aQuality)
+ {
+ tnQuality = EGlxThumbnailQualityLow;
+ }
+ TRAP(err, HandleThumbnailFetchCompleteL(tnRequest.iId, tnQuality));
}
HandleRequestComplete(err);
}
@@ -297,6 +309,7 @@
const TGlxMediaId& aItemId, TGlxThumbnailQuality aQuality, TInt aErrorCode)
{
TRACER("CGlxDataSourceTaskMdeThumbnail::ThumbnailFetchComplete()")
+ GLX_DEBUG2("CGlxDataSourceTaskMdeThumbnail::ThumbnailFetchComplete() aErrorCode=%d", aErrorCode);
iTnRequestInProgress = EFalse;
TInt err = aErrorCode;
if(!err)
@@ -368,18 +381,19 @@
/// @todo: use default filter so we can ensure we always get correct first item if filters change
iFilterProperties.iSortOrder = EGlxFilterSortOrderCaptureDate;
- iFilterProperties.iSortDirection = EGlxFilterSortDirectionAscending;
+ iFilterProperties.iSortDirection = EGlxFilterSortDirectionOverrideToDescendingIfDate;
iFilterProperties.iLastCaptureDate = ETrue;
if( CGlxDataSource::EContainerTypeMonth == containerType )
{
- iFilterProperties.iOrigin = EGlxFilterOriginCamera;
+ iFilterProperties.iOrigin = EGlxFilterOriginAll;
AddMonthFilterL(item, iFilterProperties);
container = TGlxMediaId(KGlxCollectionRootId);
objectDef = &DataSource()->ObjectDef();
}
- DoQueryL(*objectDef, ETrue, EContainerFirstItemQuery, EQueryResultModeObjectWithFreetexts, container);
+ DoQueryL(*objectDef, ETrue, EContainerFirstItemQuery,
+ EQueryResultModeItem, container);
}
else
{
@@ -433,7 +447,8 @@
}
CMdEProperty* lastModifiedDateProperty;
- CMdEPropertyDef& lastModifiedDatePropertyDef = aItem->Def().GetPropertyDefL(KPropertyDefNameLastModifiedDate);
+ CMdEPropertyDef& lastModifiedDatePropertyDef = aItem->Def().GetPropertyDefL(
+ KPropertyDefNameLastModifiedDate);
#ifdef _DEBUG
TInt index = // This variable is only required for the assert debug below. If it is not wrapped in an
@@ -467,7 +482,8 @@
// i.e. background thumbnail generation
// so we get status from CAF to avoid forcing second stage harvest
TRAP(err,
- ContentAccess::CContent* content = ContentAccess::CContent::NewLC(iTnFileInfo->FilePath());
+ ContentAccess::CContent* content = ContentAccess::CContent::NewLC(
+ iTnFileInfo->FilePath());
content->GetAttribute(ContentAccess::EIsProtected, iTnFileInfo->iIsProtected);
CleanupStack::PopAndDestroy(content);
);
@@ -512,10 +528,11 @@
void CGlxDataSourceTaskMdeThumbnail::CompleteThumbnailRequest(TInt aError)
{
TRACER("CGlxDataSourceTaskMdeThumbnail::CompleteThumbnailRequest(TInt aError)")
+ GLX_DEBUG2("CGlxDataSourceTaskMdeThumbnail::CompleteThumbnailRequest aError=%d", aError);
#ifdef USE_S60_TNM
if (aError != KErrNone)
{
- ThumbnailFetchComplete(aError);
+ ThumbnailFetchComplete(aError, EFalse);
}
else
{
@@ -526,11 +543,15 @@
if (tnReq.iSizeClass.iWidth > 0 && tnReq.iSizeClass.iHeight > 0 )
{
request->SetThumbnailInfo(iTnFileInfo);
+ //This function is called number of times as a callback ,
+ //hence not trapping the leaving function which costs time and memory.
+ //Ignoring this for code scanner warnings - Leaving functions called in non-leaving functions.
DataSource()->FetchThumbnailL(iRequest, *this);
}
else
{
- ThumbnailFetchComplete(KErrArgument);
+ GLX_LOG_INFO("CGlxDataSourceTaskMdeThumbnail::CompleteThumbnailRequest KErrArgument");
+ ThumbnailFetchComplete(KErrArgument, EFalse);
}
}
#else
@@ -571,18 +592,19 @@
/// @todo: use default filter so we can ensure we always get correct first item if filters change
iFilterProperties.iSortOrder = EGlxFilterSortOrderCaptureDate;
- iFilterProperties.iSortDirection = EGlxFilterSortDirectionAscending;
+ iFilterProperties.iSortDirection = EGlxFilterSortDirectionOverrideToDescendingIfDate;
iFilterProperties.iLastCaptureDate = ETrue;
if( CGlxDataSource::EContainerTypeMonth == containerType )
{
- iFilterProperties.iOrigin = EGlxFilterOriginCamera;
+ iFilterProperties.iOrigin = EGlxFilterOriginAll;
AddMonthFilterL(item, iFilterProperties);
container = TGlxMediaId(KGlxCollectionRootId);
objectDef = &DataSource()->ObjectDef();
}
- DoQueryL(*objectDef, ETrue, EContainerFirstItemQuery, EQueryResultModeObjectWithFreetexts, container);
+ DoQueryL(*objectDef, ETrue, EContainerFirstItemQuery,
+ EQueryResultModeItem, container);
}
else
{
--- a/engine/collectionframework/group/bld.inf Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/group/bld.inf Wed Jun 23 17:18:45 2010 +0100
@@ -80,7 +80,7 @@
../datasource/manager/group/glxdatasourcemanager.mmp
../plugins/glxcollectionpluginall/group/glxcollectionpluginall.mmp
../plugins/glxcollectionpluginalbums/group/glxcollectionpluginalbums.mmp
-//../plugins/glxcollectionplugincamera/group/glxcollectionplugincamera.mmp
+../plugins/glxcollectionplugincamera/group/glxcollectionplugincamera.mmp
../plugins/glxcollectionplugindownloads/group/glxcollectionplugindownloads.mmp
../plugins/glxcollectionpluginmonths/group/glxcollectionpluginmonths.mmp
../plugins/glxcollectionpluginimageviewer/group/glxcollectionpluginimageviewer.mmp
@@ -88,12 +88,3 @@
#include "../plugins/group/bld.inf"
#include "../datasource/plugins/group/bld.inf"
-PRJ_TESTMMPFILES
-
-// Alex Birkett 16/01/2008 The following plugins will prevent gallery starting up because they don't return the
-// KMPXMediaColDetailSpaceId attribute (the ID space ID). Build them at your own risk!
-// ../plugins/Test/albumcollectionplugin/group/glxalbumcollectionplugin.mmp
-// ../plugins/Test/glxtestcollectionplugin/group/glxtestcollectionplugin.mmp
-// ../plugins/Test/glxmedialiststestcollectionplugin/group/glxmedialiststestcollectionplugin.mmp
-
-
--- a/engine/collectionframework/plugins/glxcollectionpluginimageviewer/src/glxcollectionpluginimageviewer.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/plugins/glxcollectionpluginimageviewer/src/glxcollectionpluginimageviewer.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -92,8 +92,8 @@
}
void CGlxCollectionPluginImageViewer::CpiAttributeAdditionalAttributes(
- const TMPXAttribute& aCpiAttribute,
- RArray<TMPXAttribute>& aAttributeArray)
+ const TMPXAttribute& /*aCpiAttribute*/,
+ RArray<TMPXAttribute>& /*aAttributeArray*/)
{
// Nothing to be shared apart from the ones that are commonly loaded.
}
@@ -146,8 +146,8 @@
}
void CGlxCollectionPluginImageViewer::HandleCpiAttributeResponseL(
- CMPXMedia* aResponse, TArray<TMPXAttribute> aCpiAttributes,
- TGlxMediaId aMediaId)
+ CMPXMedia* /*aResponse*/, TArray<TMPXAttribute> aCpiAttributes,
+ TGlxMediaId /*aMediaId*/)
{
const TInt attribCount = aCpiAttributes.Count();
--- a/engine/collectionframework/plugins/glxcollectionpluginmonths/inc/glxcollectionpluginmonths.h Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/plugins/glxcollectionpluginmonths/inc/glxcollectionpluginmonths.h Wed Jun 23 17:18:45 2010 +0100
@@ -78,7 +78,8 @@
* @param aCpiAttribute CPI specific attribute to be constructed later
* @param aAttributeArray modifiable list of attributes to be retrieved from data source
*/
- void CpiAttributeAdditionalAttributes(const TMPXAttribute& aCpiAttribute, RArray<TMPXAttribute>& aAttributeArray);
+ void CpiAttributeAdditionalAttributes(const TMPXAttribute& aCpiAttribute,
+ RArray<TMPXAttribute>& aAttributeArray);
/**
* Modifies the response to include all requested CPI specific attributes or Leaves.
@@ -86,7 +87,8 @@
* @param aResponse Data Source constructed response to which CPI specific attributes should be added (also contains any required data)
* @param aCpiAttributes list of CPI specific attributes to be constructed
*/
- void HandleCpiAttributeResponseL(CMPXMedia* aResponse, TArray<TMPXAttribute> aCpiAttributes, TArray<TGlxMediaId> aMediaIds);
+ void HandleCpiAttributeResponseL(CMPXMedia* aResponse,
+ TArray<TMPXAttribute> aCpiAttributes, TArray<TGlxMediaId> aMediaIds);
/**
* Modifies the response to include all requested CPI specific attributes or Leaves.
@@ -95,7 +97,8 @@
* @param aCpiAttributes list of CPI specific attributes to be constructed
* @param aMediaId CPI specific media Id
*/
- void HandleCpiAttributeResponseL(CMPXMedia* aResponse, TArray<TMPXAttribute> aCpiAttributes, TGlxMediaId aMediaId);
+ void HandleCpiAttributeResponseL(CMPXMedia* aResponse,
+ TArray<TMPXAttribute> aCpiAttributes, TGlxMediaId aMediaId);
TBool IsUpdateMessageIgnored(CMPXMessage& aMessage);
--- a/engine/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -46,6 +46,13 @@
* @internal reviewed 14/06/2007 by Alex Birkett
*/
// CONSTANTS
+const TInt KYearBufferSize = 8;
+const TInt KDateBufferPaddingMin = 10;
+const TInt KDateBufferPaddingMax = 20;
+const TInt KDateFormat1 = 1;
+
+const TInt KDateFormat2 = 2;
+const TInt KDateFormat3 = 3;
// ============================ LOCAL FUNCTIONS ==============================
@@ -96,7 +103,8 @@
// CpiAttributeAdditionalAttributes
// ----------------------------------------------------------------------------
//
-void CGlxCollectionPluginMonths::CpiAttributeAdditionalAttributes(const TMPXAttribute& aCpiAttribute, RArray<TMPXAttribute>& aAttributeArray)
+void CGlxCollectionPluginMonths::CpiAttributeAdditionalAttributes(
+ const TMPXAttribute& aCpiAttribute, RArray<TMPXAttribute>& aAttributeArray)
{
TRACER("CGlxCollectionPluginMonths::CpiAttributeAdditionalAttributes");
// Only need to process KGlxMediaCollectionPluginSpecificSubTitle here as all the others are reading straight from resource files
@@ -185,7 +193,8 @@
// HandleCpiAttributeResponseL
// ----------------------------------------------------------------------------
//
-void CGlxCollectionPluginMonths::HandleCpiAttributeResponseL(CMPXMedia* aResponse, TArray<TMPXAttribute> aCpiAttributes, TArray<TGlxMediaId> aMediaIds)
+void CGlxCollectionPluginMonths::HandleCpiAttributeResponseL(CMPXMedia* aResponse,
+ TArray<TMPXAttribute> aCpiAttributes, TArray<TGlxMediaId> aMediaIds)
{
TRACER("CGlxCollectionPluginMonths::HandleCpiAttributeResponseL");
@@ -211,7 +220,8 @@
User::Leave(KErrNotSupported);
}
- CMPXMediaArray* mediaArray = aResponse->ValueCObjectL<CMPXMediaArray>(KMPXMediaArrayContents);
+ CMPXMediaArray* mediaArray =
+ aResponse->ValueCObjectL<CMPXMediaArray>(KMPXMediaArrayContents);
CleanupStack::PushL(mediaArray);
const TInt arrayCount = mediaArray->Count();
@@ -224,7 +234,8 @@
for (TInt index = 0; index < arrayCount; index++)
{
- HandleCpiAttributeResponseL((*mediaArray)[index], aCpiAttributes, aMediaIds[index]);
+ HandleCpiAttributeResponseL((*mediaArray)[index],
+ aCpiAttributes, aMediaIds[index]);
}
aResponse->SetCObjectValueL(KMPXMediaArrayContents, mediaArray);
@@ -239,7 +250,8 @@
// HandleCpiAttributeResponseL
// ----------------------------------------------------------------------------
//
-void CGlxCollectionPluginMonths::HandleCpiAttributeResponseL(CMPXMedia* aResponse, TArray<TMPXAttribute> aCpiAttributes, TGlxMediaId aMediaId)
+void CGlxCollectionPluginMonths::HandleCpiAttributeResponseL(CMPXMedia* aResponse,
+ TArray<TMPXAttribute> aCpiAttributes, TGlxMediaId aMediaId)
{
TRACER("CGlxCollectionPluginMonths::HandleCpiAttributeResponseL");
@@ -297,7 +309,7 @@
TPtr formatString = tempTitle->Des();
// Now create a buffer that will contain the result. needs to be length of format string plus a few extra for the number
- HBufC* title = HBufC::NewLC(formatString.Length() + 10);
+ HBufC* title = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMin);
TPtr ptr = title->Des();
StringLoader::Format(ptr, formatString, -1, usageCount);
@@ -393,7 +405,7 @@
break;
}
}
- TBuf<8> yearTitle2;
+ TBuf<KYearBufferSize> yearTitle2;
end.FormatL(yearTitle2, KGlxTempMonthYearTitleFormat);
HBufC* monthTitle2 = NULL;
switch(end.DateTime().Month())
@@ -460,20 +472,20 @@
}
}
- HBufC* title1 = HBufC::NewLC(formatString.Length() + 20);
+ HBufC* title1 = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMax);
TPtr ptr1 = title1->Des();
- HBufC* title2 = HBufC::NewLC(formatString.Length() + 20);
+ HBufC* title2 = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMax);
TPtr ptr2 = title2->Des();
- HBufC* title3 = HBufC::NewLC(formatString.Length() + 20);
+ HBufC* title3 = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMax);
TPtr ptr3 = title3->Des();
- HBufC* title4 = HBufC::NewLC(formatString.Length() + 20);
+ HBufC* title4 = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMax);
TPtr ptr4 = title4->Des();
TPtr monthPtr = monthTitle->Des();
TPtr monthPtr2 = monthTitle2->Des();
StringLoader::Format(ptr1, formatString, 0, monthPtr);
- StringLoader::Format(ptr2, ptr1, 1, yearTitle);
- StringLoader::Format(ptr3, ptr2, 2, monthPtr2);
- StringLoader::Format(ptr4, ptr3, 3, yearTitle2);
+ StringLoader::Format(ptr2, ptr1, KDateFormat1, yearTitle);
+ StringLoader::Format(ptr3, ptr2, KDateFormat2, monthPtr2);
+ StringLoader::Format(ptr4, ptr3, KDateFormat3, yearTitle2);
aResponse->SetTextValueL(attr, *title4);
@@ -502,7 +514,8 @@
{
GLX_LOG_INFO("VideoCount:0,ImageCount:0");
- tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_SUB_TITLE_NO_IMAGE_NO_VIDEO);
+ tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_SUB_TITLE_NO_IMAGE_NO_VIDEO);
aResponse->SetTextValueL(attr, *tempTitle);
}
else
@@ -512,12 +525,13 @@
{
GLX_LOG_INFO1("ImageCount:1,VideoCount:%d",videoCount);
- tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_SUB_TITLE_ONE_IMAGE_MULTI_VIDEO);
+ tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_SUB_TITLE_ONE_IMAGE_MULTI_VIDEO);
TPtr formatString = tempTitle->Des();
// Now create a buffer that will contain the result. needs to be length of format string plus a few extra for the number
- HBufC* title = HBufC::NewLC(formatString.Length() + 10);
+ HBufC* title = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMin);
TPtr ptr = title->Des();
StringLoader::Format(ptr, formatString, -1, videoCount);
@@ -533,12 +547,13 @@
{
GLX_LOG_INFO1("ImageCount: %d,VideoCount:1",imageCount);
- tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_SUB_TITLE_MULTI_IMAGE_ONE_VIDEO);
+ tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_SUB_TITLE_MULTI_IMAGE_ONE_VIDEO);
TPtr formatString = tempTitle->Des();
// Now create a buffer that will contain the result. needs to be length of format string plus a few extra for the number
- HBufC* title = HBufC::NewLC(formatString.Length() + 10);
+ HBufC* title = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMin);
TPtr ptr = title->Des();
StringLoader::Format(ptr, formatString, -1, imageCount);
@@ -554,17 +569,19 @@
{
GLX_LOG_INFO2("ImageCount %d,VideoCount %d",imageCount,videoCount);
- tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_SUB_TITLE_MULTI_IMAGE_MULTI_VIDEO);
+ tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_SUB_TITLE_MULTI_IMAGE_MULTI_VIDEO);
+
TPtr formatString = tempTitle->Des();
- HBufC* title = HBufC::NewLC(formatString.Length() + 10);
+ HBufC* title = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMin);
TPtr ptr = title->Des();
- HBufC* title1 = HBufC::NewLC(formatString.Length() + 10);
+ HBufC* title1 = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMin);
TPtr ptr1 = title1->Des();
StringLoader::Format(ptr, formatString, 0, imageCount);
- StringLoader::Format(ptr1, ptr, 1, videoCount);
+ StringLoader::Format(ptr1, ptr, KDateFormat1, videoCount);
// Set the title in the response.
aResponse->SetTextValueL(attr, *title1);
@@ -584,36 +601,41 @@
}
else if ( aResponse->IsSupported(KGlxMediaCollectionInternalUsageCount) )
{
- usageCount = aResponse->ValueTObjectL<TInt>(KGlxMediaCollectionInternalUsageCount);
+ usageCount =
+ aResponse->ValueTObjectL<TInt>(KGlxMediaCollectionInternalUsageCount);
}
else
{
User::Leave(KErrNotSupported);
}
HBufC* tempTitle = NULL;
-
+
if(0 == usageCount)
{
- tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_SUB_TITLE_NO_IMAGE_NO_VIDEO);
+ tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_SUB_TITLE_NO_IMAGE_NO_VIDEO);
+
// Set the title in the response.
aResponse->SetTextValueL(attr, *tempTitle);
CleanupStack::PopAndDestroy(tempTitle);
- continue;
- }
-
+ continue;
+ }
+
else if (1 == usageCount)
{
- tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_SUB_TITLE_SINGLE);
+ tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_SUB_TITLE_SINGLE);
}
else
{
- tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_SUB_TITLE_MULTI);
+ tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_SUB_TITLE_MULTI);
}
TPtr formatString = tempTitle->Des();
// Now create a buffer that will contain the result. needs to be length of format string plus a few extra for the number
- HBufC* title = HBufC::NewLC(formatString.Length() + 10);
+ HBufC* title = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMin);
TPtr ptr = title->Des();
StringLoader::Format(ptr, formatString, -1, usageCount);
@@ -651,7 +673,8 @@
{
GLX_LOG_INFO("Attribute : GeneralTitle:RootId");
- HBufC* title = LoadLocalizedStringLC(KResourceFile, R_MONTHS_GENERAL_TITLE);
+ HBufC* title = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_GENERAL_TITLE);
aResponse->SetTextValueL(attr, *title);
CleanupStack::PopAndDestroy(title);
}
@@ -659,11 +682,13 @@
{
if( aResponse->IsSupported(KGlxMediaCollectionInternalStartDate) )
{
- HBufC* tempTitle = LoadLocalizedStringLC(KResourceFile, R_MONTHS_ITEM_TITLE);
+ HBufC* tempTitle = LoadLocalizedStringLC(KResourceFile,
+ R_MONTHS_ITEM_TITLE);
TPtr formatString = tempTitle->Des();
- TTime month = aResponse->ValueTObjectL<TInt64>(KGlxMediaCollectionInternalStartDate);
+ TTime month =
+ aResponse->ValueTObjectL<TInt64>(KGlxMediaCollectionInternalStartDate);
_LIT(KGlxTempMonthYearTitleFormat, "%F%Y");
- TBuf<8> yearTitle;
+ TBuf<KYearBufferSize> yearTitle;
month.FormatL(yearTitle, KGlxTempMonthYearTitleFormat);
HBufC* monthTitle = NULL;
switch(month.DateTime().Month())
@@ -730,13 +755,13 @@
}
}
- HBufC* title1 = HBufC::NewLC(formatString.Length() + 20);
+ HBufC* title1 = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMax);
TPtr ptr = title1->Des();
- HBufC* title = HBufC::NewLC(formatString.Length() + 20);
+ HBufC* title = HBufC::NewLC(formatString.Length() + KDateBufferPaddingMax);
TPtr ptr2 = title->Des();
TPtr monthPtr = monthTitle->Des();
StringLoader::Format(ptr, formatString, 0, monthPtr);
- StringLoader::Format(ptr2, ptr, 1, yearTitle);
+ StringLoader::Format(ptr2, ptr, KDateFormat1, yearTitle);
aResponse->SetTextValueL(attr, *title);
--- a/engine/collectionframework/plugins/tagcollectionplugin/src/glxcollectionplugintags.cpp Tue May 18 12:19:10 2010 +0100
+++ b/engine/collectionframework/plugins/tagcollectionplugin/src/glxcollectionplugintags.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -102,7 +102,7 @@
TInt attrCount = aAttributeArray.Count();
TBool found = EFalse;
- //GLX_DEBUG1("CGlxCollectionPluginTags::CpiAttributeAdditionalAttributes-AttributesCount");
+ GLX_DEBUG1("CGlxCollectionPluginTags::CpiAttributeAdditionalAttributes-AttributesCount");
for ( TInt index = 0 ; index < attrCount ; index++)
{
@@ -169,8 +169,6 @@
HandleCpiAttributeResponseL((*mediaArray)[index], aCpiAttributes,
aMediaIds[index]);
}
-
- /// @todo - Can we reset a value. Does it overwrite the original or does it leak? Must test
aResponse->SetCObjectValueL(KMPXMediaArrayContents, mediaArray);
CleanupStack::PopAndDestroy(mediaArray);
}
@@ -225,6 +223,9 @@
{
tempTitle = LoadLocalizedStringLC(KResourceFile,
R_TAG_SUB_TITLE_SINGLE);
+ aResponse->SetTextValueL(attr, *tempTitle);
+ CleanupStack::PopAndDestroy(tempTitle);
+ continue;
}
else
{
@@ -247,6 +248,9 @@
{
tempTitle = LoadLocalizedStringLC(KResourceFile,
R_TAG_ITEM_SUB_TITLE_SINGLE);
+ aResponse->SetTextValueL(attr, *tempTitle);
+ CleanupStack::PopAndDestroy(tempTitle);
+ continue;
}
else
{
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gallery/gallery.pro Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,19 @@
+#/*
+#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#* All rights reserved.
+#* This component and the accompanying materials are made available
+#* under the terms of "Eclipse Public License v1.0"
+#* which accompanies this distribution, and is available
+#* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#*
+#* Initial Contributors:
+#* Nokia Corporation - initial contribution.
+#*
+#* Contributors:
+#*
+#* Description:
+#*
+#*/
+TEMPLATE = subdirs
+myextension = "$${LITERAL_HASH}include <gallery/sis/bld_stub.inf>"
+BLD_INF_RULES.prj_platforms += myextension
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gallery/sis/bld_stub.inf Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build information for project mgallery.
+*
+*/
+
+PRJ_EXTENSIONS
+#ifdef MARM
+START EXTENSION app-services/buildstubsis
+OPTION SRCDIR ../sis
+OPTION SISNAME photos_stub
+END
+
+#endif
+
--- a/gallery/sis/createsis.bat Tue May 18 12:19:10 2010 +0100
+++ b/gallery/sis/createsis.bat Wed Jun 23 17:18:45 2010 +0100
@@ -15,6 +15,7 @@
rem
+call makesis photos_stub.pkg
-call makesis glxgallery.pkg
-call signsis -s glxgallery.sis glxgallery.sisx RDTest_02.der RDTest_02.key
\ No newline at end of file
+call makesis photos.pkg
+call signsis -s photos.sis photos.sisx RDTest_02.der RDTest_02.key
\ No newline at end of file
--- a/gallery/sis/createsis_udeb.bat Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-rem All rights reserved.
-rem This component and the accompanying materials are made available
-rem under the terms of "Eclipse Public License v1.0"
-rem which accompanies this distribution, and is available
-rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-rem
-rem Initial Contributors:
-rem Nokia Corporation - initial contribution.
-rem
-rem Contributors:
-rem
-rem Description:
-rem
-
-
-
-call makesis glxgallery_udeb.pkg
-call signsis -s glxgallery_udeb.sis glxgallery_udeb.sisx RDTest_02.der RDTest_02.key
\ No newline at end of file
--- a/gallery/sis/glxgallery.pkg Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-;
-; Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Package file for project Gallery
-;
-
-; -------- general --------
-
-; Languages
-&EN
-
-; Package header
-#{"photos"},(0x200009EE),1,0,0,TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-; Dependency for S60 3.0
-[0x101F7961],0,0,0,{"Series60v3.0"}
-
-; -------- files --------
-
-; NOTE: This installation package does not include huitoolkit.dll,
-; so you have to install it separately!
-
-
-"\epoc32\release\armv5\urel\glxcollectionplugintags.dll" -"!:\sys\bin\glxcollectionplugintags.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionplugintags.rsc" -"!:\resource\plugins\glxcollectionplugintags.rsc"
-"\epoc32\data\Z\resource\plugins\glxplugintags.rsc" -"!:\resource\plugins\glxplugintags.rsc"
-"\epoc32\release\armv5\urel\glxcommon.dll" -"!:\sys\bin\glxcommon.dll"
-"\epoc32\release\armv5\urel\glxcommonui.dll" -"!:\sys\bin\glxcommonui.dll"
-"\epoc32\release\armv5\urel\glxdatasourcemanager.dll" -"!:\sys\bin\glxdatasourcemanager.dll"
-"\epoc32\release\armv5\urel\glxdatasourcemde.dll" -"!:\sys\bin\glxdatasourcemde.dll"
-"\epoc32\data\Z\resource\plugins\glxdatasourcemde.rsc" -"!:\resource\plugins\glxdatasourcemde.rsc"
-"\epoc32\release\armv5\urel\glxcollectionpluginalbums.dll" -"!:\sys\bin\glxcollectionpluginalbums.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionpluginalbums.rsc" -"!:\resource\plugins\glxcollectionpluginalbums.rsc"
-"\epoc32\data\Z\resource\plugins\glxpluginalbums.rsc" -"!:\resource\plugins\glxpluginalbums.rsc"
-"\epoc32\release\armv5\urel\glxcollectionpluginall.dll" -"!:\sys\bin\glxcollectionpluginall.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionpluginall.rsc" -"!:\resource\plugins\glxcollectionpluginall.rsc"
-"\epoc32\data\Z\resource\plugins\glxpluginall.rsc" -"!:\resource\plugins\glxpluginall.rsc"
-"\epoc32\release\armv5\urel\glxcollectionplugincamera.dll" -"!:\sys\bin\glxcollectionplugincamera.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionplugincamera.rsc" -"!:\resource\plugins\glxcollectionplugincamera.rsc"
-"\epoc32\data\Z\resource\plugins\glxplugincamera.rsc" -"!:\resource\plugins\glxplugincamera.rsc"
-"\epoc32\release\armv5\urel\glxcollectionplugindownloads.dll" -"!:\sys\bin\glxcollectionplugindownloads.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionplugindownloads.rsc" -"!:\resource\plugins\glxcollectionplugindownloads.rsc"
-"\epoc32\data\Z\resource\plugins\glxplugindownloads.rsc" -"!:\resource\plugins\glxplugindownloads.rsc"
-"\epoc32\release\armv5\urel\glxcollectionpluginmonths.dll" -"!:\sys\bin\glxcollectionpluginmonths.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionpluginmonths.rsc" -"!:\resource\plugins\glxcollectionpluginmonths.rsc"
-"\epoc32\data\Z\resource\plugins\glxpluginmonths.rsc" -"!:\resource\plugins\glxpluginmonths.rsc"
-
-;delete these
-;"\epoc32\release\armv5\urel\glxthumbnailcomposerplugin.dll" -"!:\sys\bin\glxthumbnailcomposerplugin.dll"
-;"\epoc32\data\Z\resource\plugins\glxthumbnailcomposerplugin.rsc" -"!:\resource\plugins\glxthumbnailcomposerplugin.rsc"
-
-"\epoc32\release\armv5\urel\glxmedialists.dll" -"!:\sys\bin\glxmedialists.dll"
-
-"\epoc32\release\armv5\urel\glxdrmutility.dll" -"!:\sys\bin\glxdrmutility.dll"
-
-; Glx logging client
-"\epoc32\release\armv5\urel\glxlogging.dll"-"!:\sys\bin\glxlogging.dll"
-
-; Glx logging app
-;"\epoc32\release\armv5\urel\glxloggingapp.exe"-"!:\sys\bin\glxloggingapp.exe"
-;"\epoc32\data\z\private\10003a3f\import\apps\glxloggingapp_reg.rsc"-"!:\private\10003a3f\import\apps\glxloggingapp_reg.rsc"
-;"\epoc32\data\z\resource\apps\glxloggingapp_loc.rsc"-"!:\resource\apps\glxloggingapp_loc.rsc"
-;"\epoc32\data\z\resource\apps\glxloggingapp.rsc"-"!:\resource\apps\glxloggingapp.rsc"
-
-
-"\epoc32\release\armv5\urel\photos.exe" -"!:\sys\bin\photos.exe"
-"\epoc32\data\z\private\10003a3f\import\apps\photos_reg.rsc"-"!:\private\10003a3f\import\apps\photos_reg.rsc"
-"\epoc32\data\z\resource\apps\photos.rsc"-"!:\resource\apps\photos.rsc"
-"\epoc32\data\z\resource\apps\0xE2C223D9.mif" - "!:\resource\apps\0xE2C223D9.mif"
-
-;qt dlls
-"\epoc32\release\armv5\urel\glxtvoutwrapper.dll" -"!:\sys\bin\glxtvoutwrapper.dll"
-"\epoc32\release\armv5\urel\glxmedialistwrapper.dll" -"!:\sys\bin\glxmedialistwrapper.dll"
-"\epoc32\release\armv5\urel\glxmodelwrapper.dll" -"!:\sys\bin\glxmodelwrapper.dll"
-"\epoc32\release\armv5\urel\glxexternalutility.dll" -"!:\sys\bin\glxexternalutility.dll"
-"\epoc32\release\armv5\urel\glxmediamodel.dll" -"!:\sys\bin\glxmediamodel.dll"
-"\epoc32\release\armv5\urel\glxlistmodel.dll" -"!:\sys\bin\glxlistmodel.dll"
-"\epoc32\release\armv5\urel\glxstatehandler.dll" -"!:\sys\bin\glxstatehandler.dll"
-"\epoc32\release\armv5\urel\glxviewmanager.dll" -"!:\sys\bin\glxviewmanager.dll"
-;"\epoc32\release\armv5\urel\GlxExternalViewPlugin.dll" -"!:\sys\bin\GlxExternalViewPlugin.dll"
-;"\epoc32\data\Z\resource\plugins\GlxExternalViewPlugin.rsc" -"!:\resource\plugins\GlxExternalViewPlugin.rsc"
-"\epoc32\release\armv5\urel\glxviews.dll" -"!:\sys\bin\glxviews.dll"
-"\epoc32\release\armv5\urel\glxloggerqt.dll" -"!:\sys\bin\glxloggerqt.dll"
-"\epoc32\release\armv5\urel\glximagedecoderwrapper.dll" -"!:\sys\bin\glximagedecoderwrapper.dll"
-
-"\epoc32\release\armv5\urel\glxcommandhandlerbase.dll" -"!:\sys\bin\glxcommandhandlerbase.dll"
-"\epoc32\release\armv5\urel\glxcommoncommandhandlers.dll" -"!:\sys\bin\glxcommoncommandhandlers.dll"
Binary file gallery/sis/glxgallery.sis has changed
Binary file gallery/sis/glxgallery.sisx has changed
--- a/gallery/sis/glxgallery_stub.mk Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
- ZDIR = $(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
- ZDIR = $(EPOCROOT)epoc32\data\z
-endif
-
-
-
-do_nothing :
- @rem do_nothing
-MAKMAKE : do_nothing
-BLD : do_nothing
-CLEAN : do_nothing
-LIB : do_nothing
-CLEANLIB : do_nothing
-
-RESOURCE : do_nothing
-FREEZE : do_nothing
-SAVESPACE : do_nothing
-RELEASABLES : do_nothing
-FINAL :
- echo =============================================================
- echo Starting to create stub file..
- makesis -v -s photos_stub.pkg photos_stub.sis
- echo Copying stub sis..
- copy photos_stub.sis $(EPOCROOT)epoc32\data\Z\System\Install\photos_stub.sis
- echo Stub created and copied.
- echo =============================================================
--- a/gallery/sis/glxgallery_stub.pkg Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-;
-; Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Stub package file for project Gallery
-;
-
-; -------- general --------
-
-; Languages
-&EN
-
-; Package header
-#{"mgallery"},(0x200009EE),1,0,0, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-; -------- files --------
-
-""-"z:\private\10003a3f\import\apps\glx_reg.rsc"
-
-""-"z:\sys\bin\glx.exe"
-""-"z:\resource\apps\glx_loc.Rsc"
-""-"z:\resource\apps\glx.Rsc"
-
-""-"z:\resource\apps\glxicons.mbm"
-""-"z:\resource\apps\glxicons.mif"
-""-"z:\resource\apps\glx_aif.mif"
-
-
-;; language-dependent resource files
-
-;; engines
-
-""-"z:\sys\bin\glxsimplelistview.dll"
-""-"z:\sys\bin\glxtagsmanagerviewplugin.dll"
-""-"z:\resource\plugins\glxtagsmanagerviewplugin.rsc"
-""-"z:\resource\apps\glxtagsmanagerview.RSC"
-""-"z:\resource\plugins\glxlistviewplugin.rsc"
-""-"z:\sys\bin\glxmetadatadialog.dll"
-""-"z:\resource\apps\glxmetadatadialog.rsc"
-""-"z:\sys\bin\glxcloudview.dll"
-""-"z:\sys\bin\glxtagsbrowserviewplugin.dll"
-""-"z:\resource\plugins\glxtagsbrowserviewplugin.rsc"
-""-"z:\resource\apps\glxtagsbrowserview.RSC"
-""-"z:\sys\bin\glxupnpcommandhandler.dll"
-""-"z:\sys\bin\glxcollectionplugintags.dll"
-""-"z:\resource\plugins\glxcollectionplugintags.rsc"
-""-"z:\resource\plugins\glxplugintags.rsc"
-""-"z:\sys\bin\glxtexturemanager.dll"
-""-"z:\sys\bin\glxfetcher.dll"
-""-"z:\resource\plugins\glxfetcher.rsc"
-""-"z:\resource\apps\glxfetcherdialog.rsc"
-""-"z:\sys\bin\glxcollectionmanager.dll"
-;""-"z:\sys\bin\glxactivedataplugin.dll"
-;""-"z:\resource\plugins\glxactivedataplugin.rsc"
-""-"z:\sys\bin\glxviewbase.dll"
-""-"z:\resource\apps\glxviewbase.rsc"
-""-"z:\sys\bin\glxcommandhandlerbase.dll"
-""-"z:\sys\bin\glxcommoncommandhandlers.dll"
-""-"z:\resource\apps\glxcommoncommandhandlers.rsc"
-""-"z:\sys\bin\glxcommandhandlermarking.dll"
-""-"z:\sys\bin\glxcommandhandlerdrm.dll"
-""-"z:\sys\bin\glxcommandhandlermoreinfo.dll"
-""-"z:\resource\apps\glxcommandhandlermarking.rsc"
-""-"z:\sys\bin\glxcommon.dll"
-""-"z:\sys\bin\glxcommonui.dll"
-""-"z:\sys\bin\shwslideshowengine.dll"
-""-"z:\resource\apps\shwslideshowengine.rsc"
-""-"z:\sys\bin\shwslideshowviewplugin.dll"
-""-"z:\resource\plugins\shwslideshowviewplugin.rsc"
-""-"z:\resource\apps\shwslideshowview.rsc"
-""-"z:\sys\bin\shwsettingsplugin.dll"
-""-"z:\resource\plugins\shwsettingsplugin.rsc"
-""-"z:\resource\apps\shwsettingsdialog.rsc"
-""-"z:\sys\bin\glxthumbnailcreator.dll"
-""-"z:\sys\bin\glxdatasourcemanager.dll"
-""-"z:\sys\bin\glxdatasourcemde.dll"
-""-"z:\resource\plugins\glxdatasourcemde.rsc"
-""-"z:\sys\bin\glxcollectionpluginalbums.dll"
-""-"z:\resource\plugins\glxcollectionpluginalbums.rsc"
-""-"z:\resource\plugins\glxpluginalbums.rsc"
-""-"z:\sys\bin\glxcollectionpluginall.dll"
-""-"z:\resource\plugins\glxcollectionpluginall.rsc"
-""-"z:\resource\plugins\glxpluginall.rsc"
-""-"z:\sys\bin\glxcollectionplugincamera.dll"
-""-"z:\resource\plugins\glxcollectionplugincamera.rsc"
-""-"z:\resource\plugins\glxplugincamera.rsc"
-""-"z:\sys\bin\glxcollectionplugindownloads.dll"
-""-"z:\resource\plugins\glxcollectionplugindownloads.rsc"
-""-"z:\resource\plugins\glxplugindownloads.rsc"
-""-"z:\sys\bin\glxcollectionpluginmonths.dll"
-""-"z:\resource\plugins\glxcollectionpluginmonths.rsc"
-""-"z:\resource\plugins\glxpluginmonths.rsc"
-""-"z:\sys\bin\glxzoomview.dll"
-
-""-"z:\sys\bin\glxthumbnailcomposerplugin.dll"
-""-"z:\resource\plugins\glxthumbnailcomposerplugin.rsc"
-
-;""-"z:\sys\bin\glxtvout.dll"
-
-""-"z:\sys\bin\glxlayouts.dll"
-""-"z:\sys\bin\glxmedialists.dll"
-""-"z:\sys\bin\glxvisuallistmanager.dll"
-""-"z:\sys\bin\glxuiutilities.dll"
-""-"z:\resource\apps\glxuiutilities.rsc"
-""-"z:\sys\bin\glxdrmutility.dll"
-
-""-"z:\sys\bin\glxgridview.dll"
-""-"z:\resource\apps\glxgridviewdata.rsc"
-""-"z:\sys\bin\glxgridviewpluginbase.dll"
-""-"z:\sys\bin\glxgridviewplugin.dll"
-""-"z:\resource\plugins\glxgridviewplugin.rsc"
-""-"z:\resource\apps\glxdownloadtext.rsc"
-
-
-""-"z:\sys\bin\glxfullscreenview.dll"
-
-""-"z:\sys\bin\glxlistview.dll"
-""-"z:\resource\apps\glxlistviewplugin.rsc"
-""-"z:\sys\bin\glxlistviewpluginbase.dll"
-""-"z:\sys\bin\glxlistviewplugin.dll"
-""-"z:\resource\plugins\glxlistviewplugin.rsc"
-
-""-"z:\system\data\10202BE9\200071d3.txt"
-""-"z:\system\data\10202BE9\200009EE.txt"
-
-;Files for the VIA Player component
-;""-"z:\sys\bin\glxvideoplaybackviewplugin.dll"
-;""-"z:\resource\plugins\glxvideoplaybackviewplugin.rsc"
-
-; Glx logging client
-""-"z:\sys\bin\glxlogging.dll"
-
-; Glx logging app
-""-"z:\sys\bin\glxloggingapp.exe"
-""-"z:\private\10003a3f\import\apps\glxloggingapp_reg.rsc"
-""-"z:\resource\apps\glxloggingapp_loc.rsc"
-""-"z:\resource\apps\glxloggingapp.rsc"
-
-
-""-"z:\sys\bin\glxtileview.dll"
-""-"z:\sys\bin\glxtileviewpluginbase.dll"
-""-"z:\sys\bin\glxtileviewplugin.dll"
-""-"z:\sys\bin\glxtagcollectionplugin.dll"
-""-"z:\sys\bin\glxalbumcollectionplugin.dll"
-""-"z:\sys\bin\glxfullscreenviewpluginbase.dll"
-""-"z:\sys\bin\glxfullscreenviewplugin.dll"
-""-"z:\sys\bin\glxdataprovider.dll"
-""-"z:\sys\bin\glxunifiedmetadataviewplugin.dll"
-""-"z:\sys\bin\glxuitilities.dll"
-""-"z:\sys\bin\glxunifiedmetadataview.dll"
-""-"z:\sys\bin\glxaddtoalbumhandler.dll"
Binary file gallery/sis/glxgallery_stub.sis has changed
--- a/gallery/sis/glxgallery_udeb.pkg Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +0,0 @@
-;
-; Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Package file for project Gallery
-;
-
-; -------- general --------
-
-; Languages
-&EN
-
-; Package header
-#{"mgallery"},(0x200009EE),1,0,0,TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-; Dependency for S60 3.0
-[0x101F7961],0,0,0,{"Series60v3.0"}
-
-; -------- files --------
-
-; NOTE: This installation package does not include huitoolkit.dll,
-; so you have to install it separately!
-
-;; ui files
-
-"..\data\abstract5.jpg"-"c:\abstract5.jpg"
-"..\data\Battle.jpg"-"c:\Battle.jpg"
-"..\data\text_element_left_cap.png"-"c:\text_element_left_cap.png"
-"..\data\text_element_mid.png"-"c:\text_element_mid.png"
-"..\data\text_element_right_cap.png"-"c:\text_element_right_cap.png"
-"..\data\qgn_prop_image_notcreated.png"-"c:\qgn_prop_image_notcreated.png"
-"..\data\Image1.jpg"-"c:\Image1.jpg"
-"..\data\Image2.jpg"-"c:\Image2.jpg"
-"..\data\Image3.jpg"-"c:\Image3.jpg"
-"..\data\Image4.jpg"-"c:\Image4.jpg"
-"..\data\Image5.jpg"-"c:\Image5.jpg"
-"..\data\Image6.jpg"-"c:\Image6.jpg"
-"..\data\Image7.jpg"-"c:\Image7.jpg"
-"..\data\Image8.jpg"-"c:\Image8.jpg"
-"..\data\Image9.jpg"-"c:\Image9.jpg"
-"..\data\Image10.jpg"-"c:\Image10.jpg"
-"..\data\Image11.jpg"-"c:\Image11.jpg"
-"..\data\Image12.jpg"-"c:\Image12.jpg"
-"..\data\Image13.jpg"-"c:\Image13.jpg"
-"..\data\Image14.jpg"-"c:\Image14.jpg"
-"..\data\Image15.jpg"-"c:\Image15.jpg"
-"..\data\Image16.jpg"-"c:\Image16.jpg"
-"..\data\Image17.jpg"-"c:\Image17.jpg"
-"..\data\Image18.jpg"-"c:\Image18.jpg"
-"..\data\Image19.jpg"-"c:\Image19.jpg"
-"..\data\Image20.jpg"-"c:\Image20.jpg"
-"..\data\Image21.jpg"-"c:\Image21.jpg"
-"..\data\Image22.jpg"-"c:\Image22.jpg"
-"..\data\newitem1.jpg"-"c:\newitem1.jpg"
-"..\data\newitem2.jpg"-"c:\newitem2.jpg"
-"..\data\newitem3.jpg"-"c:\newitem3.jpg"
-"..\data\newitem4.jpg"-"c:\newitem4.jpg"
-"..\data\newitem5.jpg"-"c:\newitem5.jpg"
-"..\data\newitem6.jpg"-"c:\newitem6.jpg"
-"..\data\newitem7.jpg"-"c:\newitem7.jpg"
-"..\data\newitem8.jpg"-"c:\newitem8.jpg"
-"..\data\newitem9.jpg"-"c:\newitem9.jpg"
-"..\data\newitem10.jpg"-"c:\newitem10.jpg"
-"..\data\newitem11.jpg"-"c:\newitem11.jpg"
-"..\data\newitem12.jpg"-"c:\newitem12.jpg"
-"..\data\newitem13.jpg"-"c:\newitem13.jpg"
-"..\data\newitem14.jpg"-"c:\newitem14.jpg"
-
-"\epoc32\release\armv5\udeb\glx.exe"-"!:\sys\bin\glx.exe"
-"\epoc32\data\z\private\10003a3f\import\apps\glx_reg.rsc"-"!:\private\10003a3f\import\apps\glx_reg.rsc"
-"\epoc32\data\z\resource\apps\glx_loc.Rsc"-"!:\resource\apps\glx_loc.Rsc"
-"\epoc32\data\z\resource\apps\glx.Rsc"-"!:\resource\apps\glx.Rsc"
-
-;"\epoc32\release\armv5\udeb\proto.exe"-"!:\sys\bin\proto.exe"
-;"\epoc32\data\z\private\10003a3f\import\apps\proto_reg.rsc"-"!:\private\10003a3f\import\apps\proto_reg.rsc"
-;"\epoc32\data\z\resource\apps\proto.Rsc"-"!:\resource\apps\proto.Rsc"
-
-;"\epoc32\release\armv5\udeb\albumpopuptest.exe"-"!:\sys\bin\albumpopuptest.exe"
-;"\epoc32\data\z\private\10003a3f\import\apps\albumpopuptest_reg.rsc"-"!:\private\10003a3f\import\apps\albumpopuptest_reg.rsc"
-;"\epoc32\data\z\resource\apps\albumpopuptest.Rsc"-"!:\resource\apps\albumpopuptest.Rsc"
-
-;"..\..\viewframework\uiutilities\data\icon4.png" -"!:\private\200009EE\icon4.png"
-;"..\..\viewframework\uiutilities\data\listbox_bar.png" -"!:\private\200009EE\listbox_bar.png"
-;"..\..\viewframework\uiutilities\data\listbox_thumb.png" -"!:\private\200009EE\listbox_thumb.png"
-;"..\..\viewframework\uiutilities\data\selector.png" -"!:\private\200009EE\selector.png"
-;"..\..\viewframework\uiutilities\data\capped_element.png" -"!:\private\200009EE\capped_element.png"
-
-"\epoc32\data\z\resource\apps\glxicons.mbm" -"!:\resource\apps\glxicons.mbm"
-"\epoc32\data\z\resource\apps\glxicons.mif" -"!:\resource\apps\glxicons.mif"
-"\epoc32\data\z\resource\apps\glx_aif.mif" -"!:\resource\apps\glx_aif.mif"
-
-
-;; language-dependent resource files
-
-;; engines
-
-
-"\epoc32\data\Z\resource\plugins\glxlistviewplugin.rsc" -"!:\resource\plugins\glxlistviewplugin.rsc"
-;"\epoc32\release\armv5\udeb\glxunifiedmetadataview.dll" -"!:\sys\bin\glxunifiedmetadataview.dll"
-"\epoc32\data\Z\resource\apps\glxmetadatadialog.rsc" -"!:\resource\apps\glxmetadatadialog.rsc"
-"\epoc32\release\armv5\udeb\glxmetadatadialog.dll" -"!:\sys\bin\glxmetadatadialog.dll"
-"\epoc32\data\Z\resource\apps\glxmetadatadialog.rsc" -"!:\resource\apps\glxmetadatadialog.rsc"
-"\epoc32\release\armv5\udeb\glxcloudview.dll" -"!:\sys\bin\glxcloudview.dll"
-"\epoc32\release\armv5\udeb\glxtagsbrowserviewplugin.dll" -"!:\sys\bin\glxtagsbrowserviewplugin.dll"
-"\epoc32\data\Z\resource\plugins\glxtagsbrowserviewplugin.rsc" -"!:\resource\plugins\glxtagsbrowserviewplugin.rsc"
-"\epoc32\data\Z\resource\apps\glxtagsbrowserview.RSC" -"!:\resource\apps\glxtagsbrowserview.RSC"
-"\epoc32\release\armv5\udeb\glxupnpcommandhandler.dll" -"!:\sys\bin\glxupnpcommandhandler.dll"
-"\epoc32\release\armv5\udeb\glxcollectionplugintags.dll" -"!:\sys\bin\glxcollectionplugintags.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionplugintags.rsc" -"!:\resource\plugins\glxcollectionplugintags.rsc"
-"\epoc32\data\Z\resource\plugins\glxplugintags.rsc" -"!:\resource\plugins\glxplugintags.rsc"
-"\epoc32\release\armv5\udeb\glxtexturemanager.dll" -"!:\sys\bin\glxtexturemanager.dll"
-"\epoc32\release\armv5\udeb\glxfetcher.dll" -"!:\sys\bin\glxfetcher.dll"
-"\epoc32\data\Z\resource\plugins\glxfetcher.rsc" -"!:\resource\plugins\glxfetcher.rsc"
-"\epoc32\data\Z\resource\apps\glxfetcherview.rsc" -"!:\resource\apps\glxfetcherview.rsc"
-"\epoc32\release\armv5\udeb\glxcollectionmanager.dll" -"!:\sys\bin\glxcollectionmanager.dll"
-"\epoc32\release\armv5\udeb\glxactivedataplugin.dll" -"!:\sys\bin\glxactivedataplugin.dll"
-"\epoc32\data\Z\resource\plugins\glxactivedataplugin.rsc" -"!:\resource\plugins\glxactivedataplugin.rsc"
-"\epoc32\release\armv5\udeb\glxviewbase.dll" -"!:\sys\bin\glxviewbase.dll"
-"\epoc32\data\z\resource\apps\glxviewbase.rsc" -"!:\resource\apps\glxviewbase.rsc"
-;"\epoc32\release\armv5\udeb\glxtesttileview.dll" -"!:\sys\bin\glxtesttileview.dll"
-;"\epoc32\data\z\resource\apps\glxtesttileview.rsc" -"!:\resource\apps\glxtesttileview.rsc"
-;"\epoc32\release\armv5\udeb\glxtesttileviewplugin.dll" -"!:\sys\bin\glxtesttileviewplugin.dll"
-;"\epoc32\data\Z\resource\plugins\glxtesttileviewplugin.rsc" -"!:\resource\plugins\glxtesttileviewplugin.rsc"
-;"\epoc32\release\armv5\udeb\glxtestremovehandler.dll" -"!:\sys\bin\glxtestremovehandler.dll"
-;"\epoc32\release\armv5\udeb\glxaddtoalbumhandler.dll" -"!:\sys\bin\glxaddtoalbumhandler.dll"
-"\epoc32\release\armv5\udeb\glxcommandhandlerbase.dll" -"!:\sys\bin\glxcommandhandlerbase.dll"
-"\epoc32\release\armv5\udeb\glxcommoncommandhandlers.dll" -"!:\sys\bin\glxcommoncommandhandlers.dll"
-"\epoc32\data\Z\resource\apps\glxcommoncommandhandlers.rsc" -"!:\resource\apps\glxcommoncommandhandlers.rsc"
-"\epoc32\release\armv5\udeb\glxcommandhandlermarking.dll" -"!:\sys\bin\glxcommandhandlermarking.dll"
-"\epoc32\release\armv5\udeb\glxcommandhandlerdrm.dll" -"!:\sys\bin\glxcommandhandlerdrm.dll"
-"\epoc32\release\armv5\udeb\glxcommandhandlermoreinfo.dll" -"!:\sys\bin\glxcommandhandlermoreinfo.dll"
-"\epoc32\data\z\resource\apps\glxcommandhandlermarking.rsc" -"!:\resource\apps\glxcommandhandlermarking.rsc"
-"\epoc32\release\armv5\udeb\glxcommon.dll" -"!:\sys\bin\glxcommon.dll"
-"\epoc32\release\armv5\udeb\glxcommonui.dll" -"!:\sys\bin\glxcommonui.dll"
-;"\epoc32\data\z\resource\apps\glxaddtoalbumhandler.rsc" -"!:\resource\apps\glxaddtoalbumhandler.rsc"
-"\epoc32\release\armv5\udeb\shwslideshowengine.dll" -"!:\sys\bin\shwslideshowengine.dll"
-"\epoc32\data\Z\resource\apps\shwslideshowengine.rsc" -"!:\resource\apps\shwslideshowengine.rsc"
-"\epoc32\release\armv5\udeb\shwslideshowviewplugin.dll" -"!:\sys\bin\shwslideshowviewplugin.dll"
-"\epoc32\data\Z\resource\plugins\shwslideshowviewplugin.rsc" -"!:\resource\plugins\shwslideshowviewplugin.rsc"
-"\epoc32\data\Z\resource\apps\shwslideshowview.rsc" -"!:\resource\apps\shwslideshowview.rsc"
-"\epoc32\release\armv5\udeb\shwsettingsplugin.dll" -"!:\sys\bin\shwsettingsplugin.dll"
-"\epoc32\data\Z\resource\plugins\shwsettingsplugin.rsc" -"!:\resource\plugins\shwsettingsplugin.rsc"
-"\epoc32\data\Z\resource\apps\shwsettingsdialog.rsc" -"!:\resource\apps\shwsettingsdialog.rsc"
-"\epoc32\release\armv5\udeb\glxthumbnailcreator.dll" -"!:\sys\bin\glxthumbnailcreator.dll"
-"\epoc32\release\armv5\udeb\glxdatasourcemanager.dll" -"!:\sys\bin\glxdatasourcemanager.dll"
-"\epoc32\release\armv5\udeb\glxdatasourcemde.dll" -"!:\sys\bin\glxdatasourcemde.dll"
-"\epoc32\data\Z\resource\plugins\glxdatasourcemde.rsc" -"!:\resource\plugins\glxdatasourcemde.rsc"
-;"\epoc32\release\armv5\udeb\glxdatasourcetest.dll" -"!:\sys\bin\glxdatasourcetest.dll"
-;"\epoc32\data\Z\resource\plugins\glxdatasourcetest.rsc" -"!:\resource\plugins\glxdatasourcetest.rsc"
-"\epoc32\release\armv5\udeb\glxcollectionpluginalbums.dll" -"!:\sys\bin\glxcollectionpluginalbums.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionpluginalbums.rsc" -"!:\resource\plugins\glxcollectionpluginalbums.rsc"
-"\epoc32\data\Z\resource\plugins\glxpluginalbums.rsc" -"!:\resource\plugins\glxpluginalbums.rsc"
-;"\epoc32\release\armv5\udeb\glxalbumcollectionplugin.dll" -"!:\sys\bin\glxalbumcollectionplugin.dll"
-;"\epoc32\release\armv5\udeb\glxtestcollectionplugin.dll" -"!:\sys\bin\glxtestcollectionplugin.dll"
-;"\epoc32\data\Z\resource\plugins\glxtestcollectionplugin.rsc" -"!:\resource\plugins\glxtestcollectionplugin.rsc"
-;"\epoc32\data\Z\resource\plugins\glxalbumcollectionplugin.rsc" -"!:\resource\plugins\glxalbumcollectionplugin.rsc"
-"\epoc32\release\armv5\udeb\glxcollectionpluginall.dll" -"!:\sys\bin\glxcollectionpluginall.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionpluginall.rsc" -"!:\resource\plugins\glxcollectionpluginall.rsc"
-"\epoc32\data\Z\resource\plugins\glxpluginall.rsc" -"!:\resource\plugins\glxpluginall.rsc"
-"\epoc32\release\armv5\udeb\glxcollectionplugincamera.dll" -"!:\sys\bin\glxcollectionplugincamera.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionplugincamera.rsc" -"!:\resource\plugins\glxcollectionplugincamera.rsc"
-"\epoc32\data\Z\resource\plugins\glxplugincamera.rsc" -"!:\resource\plugins\glxplugincamera.rsc"
-"\epoc32\release\armv5\udeb\glxcollectionplugindownloads.dll" -"!:\sys\bin\glxcollectionplugindownloads.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionplugindownloads.rsc" -"!:\resource\plugins\glxcollectionplugindownloads.rsc"
-"\epoc32\data\Z\resource\plugins\glxplugindownloads.rsc" -"!:\resource\plugins\glxplugindownloads.rsc"
-"\epoc32\release\armv5\udeb\glxcollectionpluginmonths.dll" -"!:\sys\bin\glxcollectionpluginmonths.dll"
-"\epoc32\data\Z\resource\plugins\glxcollectionpluginmonths.rsc" -"!:\resource\plugins\glxcollectionpluginmonths.rsc"
-"\epoc32\data\Z\resource\plugins\glxpluginmonths.rsc" -"!:\resource\plugins\glxpluginmonths.rsc"
-"\epoc32\release\armv5\udeb\glxzoomview.dll" -"!:\sys\bin\glxzoomview.dll"
-
-"\epoc32\release\armv5\udeb\glxthumbnailcomposerplugin.dll" -"!:\sys\bin\glxthumbnailcomposerplugin.dll"
-"\epoc32\data\Z\resource\plugins\glxthumbnailcomposerplugin.rsc" -"!:\resource\plugins\glxthumbnailcomposerplugin.rsc"
-
-"\epoc32\release\armv5\udeb\glxlayouts.dll" -"!:\sys\bin\glxlayouts.dll"
-"\epoc32\release\armv5\udeb\glxmedialists.dll" -"!:\sys\bin\glxmedialists.dll"
-"\epoc32\release\armv5\udeb\glxvisuallistmanager.dll" -"!:\sys\bin\glxvisuallistmanager.dll"
-"\epoc32\release\armv5\udeb\glxuiutilities.dll" -"!:\sys\bin\glxuiutilities.dll"
-"\epoc32\data\z\resource\apps\glxuiutilities.rsc" -"!:\resource\apps\glxuiutilities.rsc"
-"\epoc32\release\armv5\udeb\glxdrmutility.dll" -"!:\sys\bin\glxdrmutility.dll"
-
-"\epoc32\release\armv5\udeb\glxtileview.dll" -"!:\sys\bin\glxtileview.dll"
-"\epoc32\data\z\resource\apps\glxtileviewdata.rsc" -"!:\resource\apps\glxtileviewdata.rsc"
-"\epoc32\data\z\resource\apps\glxdownloadtext.rsc" -"!:\resource\apps\glxdownloadtext.rsc"
-"\epoc32\release\armv5\udeb\glxtileviewpluginbase.dll" -"!:\sys\bin\glxtileviewpluginbase.dll"
-"\epoc32\release\armv5\udeb\glxtileviewplugin.dll" -"!:\sys\bin\glxtileviewplugin.dll"
-"\epoc32\data\Z\resource\plugins\glxtileviewplugin.rsc" -"!:\resource\plugins\glxtileviewplugin.rsc"
-
-"\epoc32\release\armv5\udeb\glxfullscreenview.dll" -"!:\sys\bin\glxfullscreenview.dll"
-"\epoc32\release\armv5\udeb\glxfullscreenviewpluginbase.dll" -"!:\sys\bin\glxfullscreenviewpluginbase.dll"
-"\epoc32\release\armv5\udeb\glxfullscreenviewplugin.dll" -"!:\sys\bin\glxfullscreenviewplugin.dll"
-"\epoc32\data\z\resource\apps\glxfullscreenviewdata.rsc" -"!:\resource\apps\glxfullscreenviewdata.rsc"
-"\epoc32\data\Z\resource\plugins\glxfullscreenviewplugin.rsc" -"!:\resource\plugins\glxfullscreenviewplugin.rsc"
-
-"\epoc32\release\armv5\udeb\glxlistview.dll" -"!:\sys\bin\glxlistview.dll"
-"\epoc32\data\z\resource\apps\glxlistviewplugin.rsc" -"!:\resource\apps\glxlistviewplugin.rsc"
-"\epoc32\release\armv5\udeb\glxlistviewpluginbase.dll" -"!:\sys\bin\glxlistviewpluginbase.dll"
-"\epoc32\release\armv5\udeb\glxlistviewplugin.dll" -"!:\sys\bin\glxlistviewplugin.dll"
-"\epoc32\data\Z\resource\plugins\glxlistviewplugin.rsc" -"!:\resource\plugins\glxlistviewplugin.rsc"
-
-"\epoc32\data\z\private\10202be9\200071d3.txt" -"!:\system\data\10202BE9\200071d3.txt"
-
-;Files for the VIA Player component
-"\epoc32\release\armv5\udeb\glxvideoplaybackviewplugin.dll" -"!:\sys\bin\glxvideoplaybackviewplugin.dll"
-"\epoc32\data\Z\resource\plugins\glxvideoplaybackviewplugin.rsc"-"!:\resource\plugins\glxvideoplaybackviewplugin.rsc"
-;"\epoc32\release\armv5\udeb\ViaPlayerCore.dll" -"!:\sys\bin\ViaPlayerCore.dll"
-;"\epoc32\release\armv5\udeb\ViaPlayerDefaultView.dll" -"!:\sys\bin\ViaPlayerDefaultView.dll"
-;"\epoc32\data\z\resource\apps\ViaPlayerDefaultView.Rsc" -"!:\resource\apps\ViaPlayerDefaultView.Rsc"
-;"\epoc32\release\armv5\udeb\ViaPlayerUtilities.dll" -"!:\sys\bin\ViaPlayerUtilities.dll"
-;"\epoc32\data\z\resource\apps\ViaPlayerUtilities.Rsc" -"!:\resource\apps\ViaPlayerUtilities.Rsc"
-;"\epoc32\data\z\resource\apps\ViaPlayerUtilities.mif" -"!:\resource\apps\ViaPlayerUtilities.mif"
-;"\epoc32\release\armv5\udeb\ViaPlayerControllerBase.dll" -"!:\sys\bin\ViaPlayerControllerBase.dll"
-;"\epoc32\data\z\resource\apps\ViaPlayer.mif" -"!:\resource\apps\ViaPlayer.mif"
-;"\epoc32\release\armv5\udeb\ViaDlProgressController.dll" -"!:\sys\bin\ViaDlProgressController.dll"
-;"\epoc32\data\z\resource\plugins\ViaDlProgressController.Rsc" -"!:\resource\plugins\ViaDlProgressController.Rsc"
-
-; Glx logging client
-"\epoc32\release\armv5\udeb\glxlogging.dll"-"!:\sys\bin\glxlogging.dll"
-; Glx logging app
-"\epoc32\release\armv5\udeb\glxloggingapp.exe"-"!:\sys\bin\glxloggingapp.exe"
-"\epoc32\data\z\private\10003a3f\apps\glxloggingapp_reg.rsc"-"!:\private\10003a3f\import\apps\glxloggingapp_reg.rsc"
-"\epoc32\data\z\resource\apps\glxloggingapp_loc.rsc"-"!:\resource\apps\glxloggingapp_loc.rsc"
-"\epoc32\data\z\resource\apps\glxloggingapp.rsc"-"!:\resource\apps\glxloggingapp.rsc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gallery/sis/photos.pkg Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,124 @@
+;
+; Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: Package file for project Gallery
+;
+
+; -------- general --------
+
+; Languages
+&EN
+
+; Package header
+#{"photos"},(0x20000A14),2, 1, 0, TYPE=SA ,RU
+
+; Localised Vendor name
+%{"Nokia, Qt"}
+
+; Unique Vendor name
+:"Nokia, Qt"
+
+; Manual PKG pre-rules from PRO files
+; Default dependency to Qt libraries
+(0x2001E61C), 4, 5, 0, {"Qt"}
+
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+
+
+; Executable and default resource files
+"\epoc32\release\armv5\urel\photos.exe" - "!:\sys\bin\photos.exe"
+"\epoc32\data\z\resource\apps\photos.rsc" - "!:\resource\apps\photos.rsc"
+"\epoc32\data\z\private\10003a3f\import\apps\photos_reg.rsc" - "!:\private\10003a3f\import\apps\photos_reg.rsc"
+"\epoc32\data\z\resource\apps\photos.mif" - "!:\resource\apps\photos.mif"
+
+; -------- files --------
+"\epoc32\release\armv5\urel\glxcommonui.dll" -"!:\sys\bin\glxcommonui.dll"
+"\epoc32\release\armv5\urel\glxcommon.dll" -"!:\sys\bin\glxcommon.dll"
+
+; datasource
+"\epoc32\release\armv5\urel\glxdatasourcemanager.dll" -"!:\sys\bin\glxdatasourcemanager.dll"
+"\epoc32\release\armv5\urel\glxdatasourcemde.dll" -"!:\sys\bin\glxdatasourcemde.dll"
+"\epoc32\data\Z\resource\plugins\glxdatasourcemde.rsc" -"!:\resource\plugins\glxdatasourcemde.rsc"
+
+; Collection plugins
+"\epoc32\release\armv5\urel\glxcollectionpluginalbums.dll" -"!:\sys\bin\glxcollectionpluginalbums.dll"
+"\epoc32\data\Z\resource\plugins\glxcollectionpluginalbums.rsc" -"!:\resource\plugins\glxcollectionpluginalbums.rsc"
+"\epoc32\data\Z\resource\plugins\glxpluginalbums.rsc" -"!:\resource\plugins\glxpluginalbums.rsc"
+
+"\epoc32\release\armv5\urel\glxcollectionpluginall.dll" -"!:\sys\bin\glxcollectionpluginall.dll"
+"\epoc32\data\Z\resource\plugins\glxcollectionpluginall.rsc" -"!:\resource\plugins\glxcollectionpluginall.rsc"
+"\epoc32\data\Z\resource\plugins\glxpluginall.rsc" -"!:\resource\plugins\glxpluginall.rsc"
+
+"\epoc32\release\armv5\urel\glxcollectionplugincamera.dll" -"!:\sys\bin\glxcollectionplugincamera.dll"
+"\epoc32\data\Z\resource\plugins\glxcollectionplugincamera.rsc" -"!:\resource\plugins\glxcollectionplugincamera.rsc"
+"\epoc32\data\Z\resource\plugins\glxplugincamera.rsc" -"!:\resource\plugins\glxplugincamera.rsc"
+
+"\epoc32\release\armv5\urel\glxcollectionplugindownloads.dll" -"!:\sys\bin\glxcollectionplugindownloads.dll"
+"\epoc32\data\Z\resource\plugins\glxcollectionplugindownloads.rsc" -"!:\resource\plugins\glxcollectionplugindownloads.rsc"
+"\epoc32\data\Z\resource\plugins\glxplugindownloads.rsc" -"!:\resource\plugins\glxplugindownloads.rsc"
+
+"\epoc32\release\armv5\urel\glxcollectionpluginmonths.dll" -"!:\sys\bin\glxcollectionpluginmonths.dll"
+"\epoc32\data\Z\resource\plugins\glxcollectionpluginmonths.rsc" -"!:\resource\plugins\glxcollectionpluginmonths.rsc"
+"\epoc32\data\Z\resource\plugins\glxpluginmonths.rsc" -"!:\resource\plugins\glxpluginmonths.rsc"
+
+"\epoc32\release\armv5\urel\glxcollectionplugintags.dll" -"!:\sys\bin\glxcollectionplugintags.dll"
+"\epoc32\data\Z\resource\plugins\glxcollectionplugintags.rsc" -"!:\resource\plugins\glxcollectionplugintags.rsc"
+"\epoc32\data\Z\resource\plugins\glxplugintags.rsc" -"!:\resource\plugins\glxplugintags.rsc"
+
+"\epoc32\release\armv5\urel\glxcollectionpluginimageviewer.dll" -"!:\sys\bin\glxcollectionpluginimageviewer.dll"
+"\epoc32\data\Z\resource\plugins\glxcollectionpluginimageviewer.rsc" -"!:\resource\plugins\glxcollectionpluginimageviewer.rsc"
+
+; Glx logging client
+"\epoc32\release\armv5\urel\glxlogging.dll" -"!:\sys\bin\glxlogging.dll"
+
+; commandhandler
+"\epoc32\release\armv5\urel\glxcommandhandlerbase.dll" -"!:\sys\bin\glxcommandhandlerbase.dll"
+"\epoc32\release\armv5\urel\glxcommoncommandhandlers.dll" -"!:\sys\bin\glxcommoncommandhandlers.dll"
+
+; engines
+"\epoc32\release\armv5\urel\glxtvout.dll" -"!:\sys\bin\glxtvout.dll"
+"\epoc32\release\armv5\urel\glxmedialists.dll" -"!:\sys\bin\glxmedialists.dll"
+"\epoc32\release\armv5\urel\glxdrmutility.dll" -"!:\sys\bin\glxdrmutility.dll"
+
+; viewmanagement
+"\epoc32\release\armv5\urel\glxstatehandler.dll" -"!:\sys\bin\glxstatehandler.dll"
+"\epoc32\release\armv5\urel\glxviewmanager.dll" -"!:\sys\bin\glxviewmanager.dll"
+
+;qt dlls
+"\epoc32\release\armv5\urel\glxexternalutility.dll" -"!:\sys\bin\glxexternalutility.dll"
+"\epoc32\release\armv5\urel\glximagedecoderwrapper.dll" -"!:\sys\bin\glximagedecoderwrapper.dll"
+"\epoc32\release\armv5\urel\glxtvoutwrapper.dll" -"!:\sys\bin\glxtvoutwrapper.dll"
+"\epoc32\release\armv5\urel\glxmedialistwrapper.dll" -"!:\sys\bin\glxmedialistwrapper.dll"
+"\epoc32\release\armv5\urel\glxfavmediamodel.dll" -"!:\sys\bin\glxfavmediamodel.dll"
+"\epoc32\release\armv5\urel\glxmediamodel.dll" -"!:\sys\bin\glxmediamodel.dll"
+"\epoc32\release\armv5\urel\glxlistmodel.dll" -"!:\sys\bin\glxlistmodel.dll"
+"\epoc32\release\armv5\urel\glxmodelwrapper.dll" -"!:\sys\bin\glxmodelwrapper.dll"
+"\epoc32\release\armv5\urel\glxloggerqt.dll" -"!:\sys\bin\glxloggerqt.dll"
+"\epoc32\release\armv5\urel\glxviews.dll" -"!:\sys\bin\glxviews.dll"
+"\epoc32\release\armv5\urel\glxviewutilities.dll" -"!:\sys\bin\glxviewutilities.dll"
+"\epoc32\release\armv5\urel\glxzoomwidget.dll" -"!:\sys\bin\glxzoomwidget.dll"
+
+;translations
+"\epoc32\data\z\resource\qt\translations\photos_en.qm" -"!:\resource\qt\translations\photos.qm"
+
+;cenrep
+"\epoc32\data\Z\private\10202BE9\20007194.txt" -"!:\private\10202BE9\20007194.txt"
+
+;splash screen
+"\epoc32\data\z\resource\hb\splashml\photos.splashml" -"!:\resource\hb\splashml\photos.splashml"
+"\epoc32\data\z\resource\hb\splashml\photos.docml" -"!:\resource\hb\splashml\photos.docml"
+
Binary file gallery/sis/photos.sis has changed
Binary file gallery/sis/photos.sisx has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gallery/sis/photos_stub.pkg Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,111 @@
+;
+; Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: Stub package file for project Gallery
+;
+
+; -------- general --------
+
+; Languages
+&EN
+
+; Package header
+#{"photos"},(0x20000A14),1,0,0,TYPE=SA
+
+; Localised Vendor name
+%{"Nokia, Qt"}
+
+; Unique Vendor name
+:"Nokia, Qt"
+
+"" - "z:\sys\bin\photos.exe"
+"" - "z:\private\10003a3f\import\apps\photos_reg.rsc"
+"" - "z:\resource\apps\photos.rsc"
+"" - "z:\resource\apps\photos.mif"
+
+; -------- files --------
+; engines
+"" - "z:\sys\bin\glxcommonui.dll"
+"" - "z:\sys\bin\glxcommon.dll"
+
+; datasource
+"" - "z:\sys\bin\glxdatasourcemanager.dll"
+"" - "z:\sys\bin\glxdatasourcemde.dll"
+"" - "z:\resource\plugins\glxdatasourcemde.rsc"
+
+; collection plugins
+"" - "z:\sys\bin\glxcollectionpluginalbums.dll"
+"" - "z:\resource\plugins\glxcollectionpluginalbums.rsc"
+"" - "z:\resource\plugins\glxpluginalbums.rsc"
+
+"" - "z:\sys\bin\glxcollectionpluginall.dll"
+"" - "z:\resource\plugins\glxcollectionpluginall.rsc"
+"" - "z:\resource\plugins\glxpluginall.rsc"
+
+"" - "z:\sys\bin\glxcollectionplugincamera.dll"
+"" - "z:\resource\plugins\glxcollectionplugincamera.rsc"
+"" - "z:\resource\plugins\glxplugincamera.rsc"
+
+"" - "z:\sys\bin\glxcollectionplugindownloads.dll"
+"" - "z:\resource\plugins\glxcollectionplugindownloads.rsc"
+"" - "z:\resource\plugins\glxplugindownloads.rsc"
+
+"" - "z:\sys\bin\glxcollectionpluginmonths.dll"
+"" - "z:\resource\plugins\glxcollectionpluginmonths.rsc"
+"" - "z:\resource\plugins\glxpluginmonths.rsc"
+
+"" - "z:\sys\bin\glxcollectionplugintags.dll"
+"" - "z:\resource\plugins\glxcollectionplugintags.rsc"
+"" - "z:\resource\plugins\glxplugintags.rsc"
+
+"" - "z:\sys\bin\glxcollectionpluginimageviewer.dll"
+"" - "z:\resource\plugins\glxcollectionpluginimageviewer.rsc"
+
+; Glx logging client
+"" - "z:\sys\bin\glxlogging.dll"
+
+; commandhandlers
+"" - "z:\sys\bin\glxcommandhandlerbase.dll"
+"" - "z:\sys\bin\glxcommoncommandhandlers.dll"
+
+;engines
+"" - "z:\sys\bin\glxdrmutility.dll"
+"" - "z:\sys\bin\glxmedialists.dll"
+"" - "z:\sys\bin\glxtvout.dll"
+
+; viewmanagement
+"" - "z:\sys\bin\glxstatehandler.dll"
+"" - "z:\sys\bin\glxviewmanager.dll"
+
+; qt dlls
+"" - "z:\sys\bin\glxexternalutility.dll"
+"" - "z:\sys\bin\glximagedecoderwrapper.dll"
+"" - "z:\sys\bin\glxloggerqt.dll"
+"" - "z:\sys\bin\glxtvoutwrapper.dll"
+"" - "z:\sys\bin\glxmedialistwrapper.dll"
+"" - "z:\sys\bin\glxlistmodel.dll"
+"" - "z:\sys\bin\glxfavmediamodel.dll"
+"" - "z:\sys\bin\glxlistmodel.dll"
+"" - "z:\sys\bin\glxmodelwrapper.dll"
+"" - "z:\sys\bin\glxviews.dll"
+"" - "z:\sys\bin\glxviewutilities.dll"
+"" - "z:\sys\bin\glxzoomwidget.dll"
+
+"" - "z:\private\10202BE9\20007194.txt"
+
+"" - "z:\resource\qt\translations\photos.qm"
+
+
+;splashscreen
+"" - "z:\resource\hb\splashml\photos.splashml"
+"" - "z:\resource\hb\splashml\photos.docml"
Binary file gallery/sis/photos_stub.sis has changed
--- a/gallery/sis/photosqt_stub.pkg Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-;
-; Copyright (c) 2008 - 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Package file for project Gallery
-;
-
-; -------- general --------
-
-; Languages
-&EN
-
-; Package header
-#{"photos"},(0x200009EE),1,0,0,TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-; Dependency for S60 3.0
-[0x101F7961],0,0,0,{"Series60v3.0"}
-
-; -------- files --------
-
-; NOTE: This installation package does not include huitoolkit.dll,
-; so you have to install it separately!
-
-
-""-"z:\sys\bin\glxcollectionplugintags.dll"
-""-"z:\resource\plugins\glxcollectionplugintags.rsc"
-""-"z:\resource\plugins\glxplugintags.rsc"
-""-"z:\sys\bin\glxcommon.dll"
-""-"z:\sys\bin\glxcommonui.dll"
-""-"z:\sys\bin\glxdatasourcemanager.dll"
-""-"z:\sys\bin\glxdatasourcemde.dll"
-""-"z:\resource\plugins\glxdatasourcemde.rsc"
-""-"z:\sys\bin\glxcollectionpluginalbums.dll"
-""-"z:\resource\plugins\glxcollectionpluginalbums.rsc"
-""-"z:\resource\plugins\glxpluginalbums.rsc"
-""-"z:\sys\bin\glxcollectionpluginall.dll"
-""-"z:\resource\plugins\glxcollectionpluginall.rsc"
-""-"z:\resource\plugins\glxpluginall.rsc"
-""-"z:\sys\bin\glxcollectionplugincamera.dll"
-""-"z:\resource\plugins\glxcollectionplugincamera.rsc"
-""-"z:\resource\plugins\glxplugincamera.rsc"
-""-"z:\sys\bin\glxcollectionplugindownloads.dll"
-""-"z:\resource\plugins\glxcollectionplugindownloads.rsc"
-""-"z:\resource\plugins\glxplugindownloads.rsc"
-""-"z:\sys\bin\glxcollectionpluginmonths.dll"
-""-"z:\resource\plugins\glxcollectionpluginmonths.rsc"
-""-"z:\resource\plugins\glxpluginmonths.rsc"
-
-
-""-"z:\sys\bin\glxmedialists.dll"
-
-""-"z:\sys\bin\glxdrmutility.dll"
-
-; Glx logging client
-""-"z:\sys\bin\glxlogging.dll"
-
-
-""-"z:\sys\bin\photos.exe"
-""-"z:\private\10003a3f\import\apps\photos_reg.rsc"
-""-"z:\resource\apps\photos.rsc"
-""- "z:\resource\apps\0xE2C223D9.mif"
-
-;qt dlls
-""-"z:\sys\bin\glxtvoutwrapper.dll"
-""-"z:\sys\bin\glxmedialistwrapper.dll"
-""-"z:\sys\bin\glxmodelwrapper.dll"
-""-"z:\sys\bin\glxexternalutility.dll"
-""-"z:\sys\bin\glxmediamodel.dll"
-""-"z:\sys\bin\glxlistmodel.dll"
-""-"z:\sys\bin\glxstatehandler.dll"
-""-"z:\sys\bin\glxviewmanager.dll"
-""-"z:\sys\bin\glxviews.dll"
-""-"z:\sys\bin\glxloggerqt.dll"
-""-"z:\sys\bin\glximagedecoderwrapper.dll"
-
-""-"z:\sys\bin\glxcommandhandlerbase.dll"
-""-"z:\sys\bin\glxcommoncommandhandlers.dll"
Binary file gallery/sis/photosqt_stub.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gallery/sis/readme.txt Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors: Indrajit Tapadar
+*
+* Description: Readme file is a help file to know more about the folder, its files and usage
+*
+*/
+
+This file contains the sis package installations for Photos on Qt.
+
+About the files :
+
+Photos.pkg : This contains all the information regarding the photos as a package. all new dll's should
+ be added to this file without fail.
+
+Photos_stub.pkg : This conatins the dll names which needs to be updated later with a sis package.
+ Any New addition of Dll's also should be added here.
+ Remember , This package is used to create a photos_stub.sis file which is then exported to
+ the install directory in epoc, which is again read from the iby file to be passed in rom image.
+
+RDTest_02.key : Key for making a sisx file
+RDTest_02.cert : certificate for creating a sisx file.
+
+Createsis.bat : this file conatins the procedure of creating the Photos_stub.sis file and Photos.sisx file.
+ The former is passed to the install directory wheras the later is installed on phone.
+
+
+After any new addition of dll's please do not forget to update the photos_stub.sis file and also checkin the latest
+ file.
\ No newline at end of file
--- a/inc/glxfiltergeneraldefs.h Tue May 18 12:19:10 2010 +0100
+++ b/inc/glxfiltergeneraldefs.h Wed Jun 23 17:18:45 2010 +0100
@@ -86,6 +86,7 @@
const TMPXAttributeData KGlxFilterGeneralOrigin = { KGlxFilterIdGeneral, EGlxFilterOrigin }; /// TGlxFilterOrigin
const TMPXAttributeData KGlxFilterGeneralNoDRM = { KGlxFilterIdGeneral, EGlxFilterNoDRM }; /// TBool
const TMPXAttributeData KGlxFilterGeneralNavigationalStateOnly = { KGlxFilterIdGeneral, 0x4000 }; /// TBool
+const TMPXAttributeData KGlxFilterGeneralMaxCount = { KGlxFilterIdGeneral, 0x8000 }; // TInt
enum TGlxFilterSortOrder
{
@@ -122,7 +123,8 @@
{
EGlxFilterOriginNotUsed=0,
EGlxFilterOriginCamera,
- EGlxFilterOriginDownload
+ EGlxFilterOriginDownload,
+ EGlxFilterOriginAll
};
#endif // __T_GLXFILTERGENERALDEFS_H__
--- a/inc/glxfilterproperties.h Tue May 18 12:19:10 2010 +0100
+++ b/inc/glxfilterproperties.h Wed Jun 23 17:18:45 2010 +0100
@@ -43,6 +43,7 @@
iContainsItem(0),
iExcludeAnimation(EFalse),
iLastCaptureDate(EFalse),
+ iMaxCount(KMaxTUint),
iThumbnailLoadability(0,0),
iPath(NULL),
iItemType(EGlxFilterVideoAndImages),
@@ -62,6 +63,7 @@
TGlxMediaId iContainsItem;
TBool iExcludeAnimation;
TBool iLastCaptureDate;
+ TInt iMaxCount;
TSize iThumbnailLoadability;
CMPXCollectionPath* iPath;
TGlxFilterItemType iItemType;
--- a/inc/glxlocalisationstrings.h Tue May 18 12:19:10 2010 +0100
+++ b/inc/glxlocalisationstrings.h Wed Jun 23 17:18:45 2010 +0100
@@ -18,6 +18,7 @@
#ifndef GLXLOCALISATIONSTRINGS_H_
#define GLXLOCALISATIONSTRINGS_H_
+#include "hbglobal.h"
//OPTIONS MENU
//Options list item
@@ -106,5 +107,14 @@
#define GLX_MENU_OPEN hbTrId("txt_common_menu_open")
+#define GLX_BUTTON_HIDE hbTrId("txt_common_button_hide")
+
+#define GLX_LABEL_TRANSITION_EFFECT hbTrId("txt_photos_setlabel_transistion_effect")
+#define GLX_VAL_SMOOTH_FADE hbTrId("txt_photos_setlabel_transistion_effect_val_smooth")
+
+#define GLX_LABEL_TRANSITION_DELAY hbTrId("txt_photos_setlabel_transistion_delay")
+#define GLX_VAL_SLOW hbTrId("txt_photos_setlabel_transistion_delay_val_slow")
+#define GLX_VAL_MEDIUM hbTrId("txt_photos_setlabel_transistion_delay_val_medium")
+#define GLX_VAL_FAST hbTrId("txt_photos_setlabel_transistion_delay_val_fast")
#endif /* GLXLOCALISATIONSTRINGS_H_ */
--- a/inc/glxtvconstants.h Tue May 18 12:19:10 2010 +0100
+++ b/inc/glxtvconstants.h Wed Jun 23 17:18:45 2010 +0100
@@ -30,7 +30,8 @@
{
ETvConnectionChanged = 0,
ETvDisplayIsVisible,
- ETvDisplayNotVisible
+ ETvDisplayNotVisible,
+ EDisconnected
};
/** TV size constants */
--- a/main/glxaiwservicehandler.cpp Tue May 18 12:19:10 2010 +0100
+++ b/main/glxaiwservicehandler.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -164,10 +164,10 @@
mModel = new GlxMediaModel(modelParm);
if ( this->orientation() == Qt::Horizontal ) {
- mModel->setData(QModelIndex(), (int)GlxContextLsFs, GlxContextRole );
+ mModel->setData(QModelIndex(), (int)GlxContextLsGrid, GlxContextRole );
}
else {
- mModel->setData(QModelIndex(), (int)GlxContextPtFs, GlxContextRole );
+ mModel->setData(QModelIndex(), (int)GlxContextPtGrid, GlxContextRole );
}
mView = GlxViewsFactory::createView(GLX_GRIDVIEW_ID, this);
@@ -204,6 +204,12 @@
void GlxAiwServiceHandler::openFSView()
{
+ if ( this->orientation() == Qt::Horizontal ) {
+ mModel->setData(QModelIndex(), (int)GlxContextLsFs, GlxContextRole );
+ }
+ else {
+ mModel->setData(QModelIndex(), (int)GlxContextPtFs, GlxContextRole );
+ }
HbAction* selectAction = new HbAction(GLX_BUTTON_SELECT);
connect(selectAction, SIGNAL(triggered()), this, SLOT(handleFSSelect()));
HbToolBar* toolBar = new HbToolBar();
@@ -524,7 +530,7 @@
{
mImageViewerInstance = CGlxImageViewerManager::InstanceL();
}
- QString filepath(QDir::toNativeSeparators(file.at(0)));
+ QString filepath(QDir::toNativeSeparators(file));
TPtrC16 str(reinterpret_cast<const TUint16*> (filepath.utf16()));
HBufC* uri = str.Alloc();
--- a/photos.pro Tue May 18 12:19:10 2010 +0100
+++ b/photos.pro Wed Jun 23 17:18:45 2010 +0100
@@ -24,11 +24,13 @@
CONFIG += ordered
SUBDIRS = group \
loggers \
- commonutilities \
- tvout\tvoutwrapper \
- ui \
- main
+ commonutilities \
+ tvout\tvoutwrapper \
+ ui \
+ main \
+ gallery
BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>" \
"rom/photos.iby CORE_APP_LAYER_IBY_EXPORT_PATH(photos.iby)" \
"rom/photos_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(photos_resources.iby)" \
+ "gallery/sis/photos_stub.sis /epoc32/data/z/system/install/photos_stub.sis" \
--- a/photos.qrc Tue May 18 12:19:10 2010 +0100
+++ b/photos.qrc Wed Jun 23 17:18:45 2010 +0100
@@ -7,6 +7,8 @@
<file>data/transitiondown.fxml</file>
<file>data/opacity_activate.fxml</file>
<file>data/opacity_deactivate.fxml</file>
+ <file>data/zoomin.fxml</file>
+ <file>data/zoomout.fxml</file>
<file>data/view_flip_hide.fxml</file>
<file>data/view_flip_show.fxml</file>
<file>data/fullscreentogrid.fxml</file>
@@ -17,13 +19,19 @@
<file>data/albumlisttogrid.fxml</file>
<file>data/albumlisttogridshow.fxml</file>
<file>data/photos.css</file>
- <file>data/transitionrotate0.fxml</file>
- <file>data/transitionrotate90.fxml</file>
- <file>data/transitionrotate180.fxml</file>
- <file>data/transitionrotate270.fxml</file>
<file>data/grid.docml</file>
<file>data/listview.docml</file>
<file>data/fullscreen.docml</file>
<file>data/slideshow.docml</file>
- </qresource>
+ <file>data/Image1.jpg</file>
+ <file>data/Image2.jpg</file>
+ <file>data/Image3.jpg</file>
+ <file>data/Image4.jpg</file>
+ <file>data/Image5.jpg</file>
+ <file>data/Image6.jpg</file>
+ <file>data/Image7.jpg</file>
+ <file>data/Image8.jpg</file>
+ <file>data/Image9.jpg</file>
+ <file>data/Image10.jpg</file>
+ </qresource>
</RCC>
--- a/rom/photos.iby Tue May 18 12:19:10 2010 +0100
+++ b/rom/photos.iby Wed Jun 23 17:18:45 2010 +0100
@@ -20,17 +20,15 @@
#include <bldvariant.hrh>
#include <data_caging_paths_for_iby.hrh>
-file=ABI_DIR/BUILD_DIR/glxcommonui.dll SHARED_LIB_DIR/glxcommonui.dll
-
+file=ABI_DIR/BUILD_DIR/glxcommonui.dll SHARED_LIB_DIR/glxcommonui.dll
file=ABI_DIR/BUILD_DIR/glxcommon.dll SHARED_LIB_DIR/glxcommon.dll
-file=ABI_DIR/BUILD_DIR/glxexternalutility.dll SHARED_LIB_DIR/glxexternalutility.dll
-file=ABI_DIR/BUILD_DIR/glximagedecoderwrapper.dll SHARED_LIB_DIR/glximagedecoderwrapper.dll
file=ABI_DIR/BUILD_DIR/glximageviewermanager.dll SHARED_LIB_DIR/glximageviewermanager.dll
+// datasource
file=ABI_DIR/BUILD_DIR/glxdatasourcemanager.dll SHARED_LIB_DIR/glxdatasourcemanager.dll
-
ECOM_PLUGIN( glxdatasourcemde.dll, glxdatasourcemde.rsc )
+// Collection plugins
ECOM_PLUGIN( glxcollectionpluginalbums.dll, glxcollectionpluginalbums.rsc )
data=DATAZ_/ECOM_RESOURCE_DIR/glxpluginalbums.rsc ECOM_RESOURCE_DIR/glxpluginalbums.rsc
@@ -51,31 +49,43 @@
ECOM_PLUGIN( glxcollectionpluginimageviewer.dll, glxcollectionpluginimageviewer.rsc )
-file=ABI_DIR/BUILD_DIR/glxlogging.dll SHARED_LIB_DIR/glxlogging.dll
-file=ABI_DIR/BUILD_DIR/glxloggerqt.dll SHARED_LIB_DIR/glxloggerqt.dll
+// logger
+file=ABI_DIR/BUILD_DIR/glxlogging.dll SHARED_LIB_DIR/glxlogging.dll
-file=ABI_DIR/BUILD_DIR/glxcommandhandlerbase.dll SHARED_LIB_DIR/glxcommandhandlerbase.dll
-file=ABI_DIR/BUILD_DIR/glxcommoncommandhandlers.dll SHARED_LIB_DIR/glxcommoncommandhandlers.dll
-file=ABI_DIR/BUILD_DIR/glxtvoutwrapper.dll SHARED_LIB_DIR/glxtvoutwrapper.dll
+// commandhandlers
+file=ABI_DIR/BUILD_DIR/glxcommandhandlerbase.dll SHARED_LIB_DIR/glxcommandhandlerbase.dll
+file=ABI_DIR/BUILD_DIR/glxcommoncommandhandlers.dll SHARED_LIB_DIR/glxcommoncommandhandlers.dll
+
+// engine
+file=ABI_DIR/BUILD_DIR/glxdrmutility.dll SHARED_LIB_DIR/glxdrmutility.dll
+file=ABI_DIR/BUILD_DIR/glxmedialists.dll SHARED_LIB_DIR/glxmedialists.dll
+file=ABI_DIR\BUILD_DIR/glxtvout.dll SHARED_LIB_DIR/glxtvout.dll
-file=ABI_DIR/BUILD_DIR/glxdrmutility.dll SHARED_LIB_DIR/glxdrmutility.dll
-file=ABI_DIR/BUILD_DIR/glxmedialists.dll SHARED_LIB_DIR/glxmedialists.dll
-file=ABI_DIR/BUILD_DIR/glxmedialistwrapper.dll SHARED_LIB_DIR/glxmedialistwrapper.dll
-file=ABI_DIR/BUILD_DIR/glxmediamodel.dll SHARED_LIB_DIR/glxmediamodel.dll
-file=ABI_DIR/BUILD_DIR/glxlistmodel.dll SHARED_LIB_DIR/glxlistmodel.dll
-file=ABI_DIR/BUILD_DIR/glxmodelwrapper.dll SHARED_LIB_DIR/glxmodelwrapper.dll
-file=ABI_DIR/BUILD_DIR/glxfavmediamodel.dll SHARED_LIB_DIR/glxfavmediamodel.dll
+// viewmanagement
+file=ABI_DIR/BUILD_DIR/glxstatehandler.dll SHARED_LIB_DIR/glxstatehandler.dll
+file=ABI_DIR/BUILD_DIR/glxviewmanager.dll SHARED_LIB_DIR/glxviewmanager.dll
-file=ABI_DIR/BUILD_DIR/glxstatehandler.dll SHARED_LIB_DIR/glxstatehandler.dll
-file=ABI_DIR/BUILD_DIR/glxviewmanager.dll SHARED_LIB_DIR/glxviewmanager.dll
-
-file=ABI_DIR/BUILD_DIR/glxviews.dll SHARED_LIB_DIR/glxviews.dll
+//qt
+file=ABI_DIR/BUILD_DIR/glxexternalutility.dll SHARED_LIB_DIR/glxexternalutility.dll
+file=ABI_DIR/BUILD_DIR/glximagedecoderwrapper.dll SHARED_LIB_DIR/glximagedecoderwrapper.dll
+file=ABI_DIR/BUILD_DIR/glxloggerqt.dll SHARED_LIB_DIR/glxloggerqt.dll
+file=ABI_DIR/BUILD_DIR/glxmedialistwrapper.dll SHARED_LIB_DIR/glxmedialistwrapper.dll
+file=ABI_DIR/BUILD_DIR/glxtvoutwrapper.dll SHARED_LIB_DIR/glxtvoutwrapper.dll
+file=ABI_DIR/BUILD_DIR/glxfavmediamodel.dll SHARED_LIB_DIR/glxfavmediamodel.dll
+file=ABI_DIR/BUILD_DIR/glxmediamodel.dll SHARED_LIB_DIR/glxmediamodel.dll
+file=ABI_DIR/BUILD_DIR/glxmodelwrapper.dll SHARED_LIB_DIR/glxmodelwrapper.dll
+file=ABI_DIR/BUILD_DIR/glxlistmodel.dll SHARED_LIB_DIR/glxlistmodel.dll
+file=ABI_DIR/BUILD_DIR/glxviews.dll SHARED_LIB_DIR/glxviews.dll
+file=ABI_DIR/BUILD_DIR/glxviewutilities.dll SHARED_LIB_DIR/glxviewutilities.dll
+file=ABI_DIR/BUILD_DIR/glxzoomwidget.dll SHARED_LIB_DIR/glxzoomwidget.dll
S60_APP_EXE(photos)
data=/epoc32/data/z/private/10003a3f/import/apps/photos_reg.rsc private/10003a3f/import/apps/photos_reg.rsc
-data=DATAZ_/APP_RESOURCE_DIR/0xE2C223D9.mif APP_RESOURCE_DIR/0xE2C223D9.mif
-data=/epoc32/data/Z/private/10202BE9/20007194.txt private/10202BE9/20007194.txt
-//data=/epoc32/data/z/system/install/photos_stub.sis /system/install/photos_stub.sis
+data=DATAZ_/APP_RESOURCE_DIR/photos.mif APP_RESOURCE_DIR/photos.mif
+data=/epoc32/data/Z/private/10202BE9/20007194.txt private/10202BE9/20007194.txt
+data=/epoc32/data/z/system/install/photos_stub.sis /system/install/photos_stub.sis
+data=ZRESOURCE/hb/splashml/photos.splashml RESOURCE_FILES_DIR/hb/splashml/photos.splashml
+data=ZRESOURCE/hb/splashml/photos.docml RESOURCE_FILES_DIR/hb/splashml/photos.docml
#endif //__PHOTOS_IBY__
\ No newline at end of file
--- a/traces/OstTraceDefinitions.h Tue May 18 12:19:10 2010 +0100
+++ b/traces/OstTraceDefinitions.h Wed Jun 23 17:18:45 2010 +0100
@@ -1,19 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
#ifndef __OSTTRACEDEFINITIONS_H__
#define __OSTTRACEDEFINITIONS_H__
// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
--- a/tvout/bwins/glxtvoutwrapperu.def Tue May 18 12:19:10 2010 +0100
+++ b/tvout/bwins/glxtvoutwrapperu.def Wed Jun 23 17:18:45 2010 +0100
@@ -2,10 +2,11 @@
?itemNotSupported@GlxTvOutWrapper@@QAEXXZ @ 1 NONAME ; void GlxTvOutWrapper::itemNotSupported(void)
??1GlxTvOutWrapper@@QAE@XZ @ 2 NONAME ; GlxTvOutWrapper::~GlxTvOutWrapper(void)
?activateZoom@GlxTvOutWrapper@@QAEX_N@Z @ 3 NONAME ; void GlxTvOutWrapper::activateZoom(bool)
- ?setModel@GlxTvOutWrapper@@QAEXPAVQAbstractItemModel@@@Z @ 4 NONAME ; void GlxTvOutWrapper::setModel(class QAbstractItemModel *)
- ??0GlxTvOutWrapper@@QAE@XZ @ 5 NONAME ; GlxTvOutWrapper::GlxTvOutWrapper(void)
- ?deactivateZoom@GlxTvOutWrapper@@QAEXXZ @ 6 NONAME ; void GlxTvOutWrapper::deactivateZoom(void)
- ?setImagetoHDMI@GlxTvOutWrapper@@QAEXXZ @ 7 NONAME ; void GlxTvOutWrapper::setImagetoHDMI(void)
+ ??0GlxTvOutWrapper@@QAE@XZ @ 4 NONAME ; GlxTvOutWrapper::GlxTvOutWrapper(void)
+ ?deactivateZoom@GlxTvOutWrapper@@QAEXXZ @ 5 NONAME ; void GlxTvOutWrapper::deactivateZoom(void)
+ ?fadeSurface@GlxTvOutWrapper@@QAEX_N@Z @ 6 NONAME ; void GlxTvOutWrapper::fadeSurface(bool)
+ ?setModel@GlxTvOutWrapper@@QAEXPAVQAbstractItemModel@@_N@Z @ 7 NONAME ; void GlxTvOutWrapper::setModel(class QAbstractItemModel *, bool)
?setToCloningMode@GlxTvOutWrapper@@QAEXXZ @ 8 NONAME ; void GlxTvOutWrapper::setToCloningMode(void)
- ?setToNativeMode@GlxTvOutWrapper@@QAEXXZ @ 9 NONAME ; void GlxTvOutWrapper::setToNativeMode(void)
+ ?setImagetoHDMI@GlxTvOutWrapper@@QAEXXZ @ 9 NONAME ; void GlxTvOutWrapper::setImagetoHDMI(void)
+ ?setToNativeMode@GlxTvOutWrapper@@QAEXXZ @ 10 NONAME ; void GlxTvOutWrapper::setToNativeMode(void)
--- a/tvout/eabi/glxtvoutwrapperu.def Tue May 18 12:19:10 2010 +0100
+++ b/tvout/eabi/glxtvoutwrapperu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,13 +1,14 @@
EXPORTS
- _ZN15GlxTvOutWrapper12activateZoomEb @ 1 NONAME
- _ZN15GlxTvOutWrapper14deactivateZoomEv @ 2 NONAME
- _ZN15GlxTvOutWrapper14setImagetoHDMIEv @ 3 NONAME
- _ZN15GlxTvOutWrapper15setToNativeModeEv @ 4 NONAME
- _ZN15GlxTvOutWrapper16itemNotSupportedEv @ 5 NONAME
- _ZN15GlxTvOutWrapper16setToCloningModeEv @ 6 NONAME
- _ZN15GlxTvOutWrapper8setModelEP18QAbstractItemModel @ 7 NONAME
- _ZN15GlxTvOutWrapperC1Ev @ 8 NONAME
- _ZN15GlxTvOutWrapperC2Ev @ 9 NONAME
- _ZN15GlxTvOutWrapperD1Ev @ 10 NONAME
- _ZN15GlxTvOutWrapperD2Ev @ 11 NONAME
+ _ZN15GlxTvOutWrapper11fadeSurfaceEb @ 1 NONAME
+ _ZN15GlxTvOutWrapper12activateZoomEb @ 2 NONAME
+ _ZN15GlxTvOutWrapper14deactivateZoomEv @ 3 NONAME
+ _ZN15GlxTvOutWrapper14setImagetoHDMIEv @ 4 NONAME
+ _ZN15GlxTvOutWrapper15setToNativeModeEv @ 5 NONAME
+ _ZN15GlxTvOutWrapper16itemNotSupportedEv @ 6 NONAME
+ _ZN15GlxTvOutWrapper16setToCloningModeEv @ 7 NONAME
+ _ZN15GlxTvOutWrapper8setModelEP18QAbstractItemModelb @ 8 NONAME
+ _ZN15GlxTvOutWrapperC1Ev @ 9 NONAME
+ _ZN15GlxTvOutWrapperC2Ev @ 10 NONAME
+ _ZN15GlxTvOutWrapperD1Ev @ 11 NONAME
+ _ZN15GlxTvOutWrapperD2Ev @ 12 NONAME
--- a/tvout/tvoutengine/bwins/glxtvoutu.def Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/bwins/glxtvoutu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,17 +1,17 @@
EXPORTS
?ActivateZoom@CGlxHdmiController@@QAEXH@Z @ 1 NONAME ; void CGlxHdmiController::ActivateZoom(int)
?ScreenSizeL@CGlxTv@@QBE?AVTSize@@XZ @ 2 NONAME ; class TSize CGlxTv::ScreenSizeL(void) const
- ?SetImageL@CGlxHdmiController@@QAEXABVTDesC16@@PAVCFbsBitmap@@H@Z @ 3 NONAME ; void CGlxHdmiController::SetImageL(class TDesC16 const &, class CFbsBitmap *, int)
- ??1CGlxTv@@UAE@XZ @ 4 NONAME ; CGlxTv::~CGlxTv(void)
- ??1CGlxHdmiController@@UAE@XZ @ 5 NONAME ; CGlxHdmiController::~CGlxHdmiController(void)
- ?NewL@CGlxHdmiController@@SAPAV1@XZ @ 6 NONAME ; class CGlxHdmiController * CGlxHdmiController::NewL(void)
+ ?NewL@CGlxHdmiController@@SAPAV1@H@Z @ 3 NONAME ; class CGlxHdmiController * CGlxHdmiController::NewL(int)
+ ?SetImageL@CGlxHdmiController@@QAEXABVTDesC16@@PAVCFbsBitmap@@H@Z @ 4 NONAME ; void CGlxHdmiController::SetImageL(class TDesC16 const &, class CFbsBitmap *, int)
+ ??1CGlxTv@@UAE@XZ @ 5 NONAME ; CGlxTv::~CGlxTv(void)
+ ??1CGlxHdmiController@@UAE@XZ @ 6 NONAME ; CGlxHdmiController::~CGlxHdmiController(void)
?IsWidescreen@CGlxTv@@QBEHXZ @ 7 NONAME ; int CGlxTv::IsWidescreen(void) const
- ?IsHDMIConnected@CGlxHdmiController@@QAEHXZ @ 8 NONAME ; int CGlxHdmiController::IsHDMIConnected(void)
- ?ShiftToPostingMode@CGlxHdmiController@@QAEXXZ @ 9 NONAME ; void CGlxHdmiController::ShiftToPostingMode(void)
- ?ShiftToCloningMode@CGlxHdmiController@@QAEXXZ @ 10 NONAME ; void CGlxHdmiController::ShiftToCloningMode(void)
- ?NewL@CGlxTv@@SAPAV1@AAVMGlxTvObserver@@@Z @ 11 NONAME ; class CGlxTv * CGlxTv::NewL(class MGlxTvObserver &)
- ?IsConnected@CGlxTv@@QBEHXZ @ 12 NONAME ; int CGlxTv::IsConnected(void) const
- ?ItemNotSupported@CGlxHdmiController@@QAEXXZ @ 13 NONAME ; void CGlxHdmiController::ItemNotSupported(void)
+ ?ShiftToPostingMode@CGlxHdmiController@@QAEXXZ @ 8 NONAME ; void CGlxHdmiController::ShiftToPostingMode(void)
+ ?ShiftToCloningMode@CGlxHdmiController@@QAEXXZ @ 9 NONAME ; void CGlxHdmiController::ShiftToCloningMode(void)
+ ?IsConnected@CGlxTv@@QBEHXZ @ 10 NONAME ; int CGlxTv::IsConnected(void) const
+ ?ItemNotSupported@CGlxHdmiController@@QAEXXZ @ 11 NONAME ; void CGlxHdmiController::ItemNotSupported(void)
+ ?NewL@CGlxTv@@SAPAV1@AAVMGlxTvObserver@@@Z @ 12 NONAME ; class CGlxTv * CGlxTv::NewL(class MGlxTvObserver &)
+ ?FadeSurface@CGlxHdmiController@@QAEXH@Z @ 13 NONAME ; void CGlxHdmiController::FadeSurface(int)
?IsHDMIConnected@CGlxTv@@QBEHXZ @ 14 NONAME ; int CGlxTv::IsHDMIConnected(void) const
?DeactivateZoom@CGlxHdmiController@@QAEXXZ @ 15 NONAME ; void CGlxHdmiController::DeactivateZoom(void)
--- a/tvout/tvoutengine/eabi/glxtvoutu.def Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/eabi/glxtvoutu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,11 +1,11 @@
EXPORTS
- _ZN18CGlxHdmiController12ActivateZoomEi @ 1 NONAME
- _ZN18CGlxHdmiController14DeactivateZoomEv @ 2 NONAME
- _ZN18CGlxHdmiController15IsHDMIConnectedEv @ 3 NONAME
+ _ZN18CGlxHdmiController11FadeSurfaceEi @ 1 NONAME
+ _ZN18CGlxHdmiController12ActivateZoomEi @ 2 NONAME
+ _ZN18CGlxHdmiController14DeactivateZoomEv @ 3 NONAME
_ZN18CGlxHdmiController16ItemNotSupportedEv @ 4 NONAME
_ZN18CGlxHdmiController18ShiftToCloningModeEv @ 5 NONAME
_ZN18CGlxHdmiController18ShiftToPostingModeEv @ 6 NONAME
- _ZN18CGlxHdmiController4NewLEv @ 7 NONAME
+ _ZN18CGlxHdmiController4NewLEi @ 7 NONAME
_ZN18CGlxHdmiController9SetImageLERK7TDesC16P10CFbsBitmapi @ 8 NONAME
_ZN18CGlxHdmiControllerD0Ev @ 9 NONAME
_ZN18CGlxHdmiControllerD1Ev @ 10 NONAME
--- a/tvout/tvoutengine/group/bld.inf Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/group/bld.inf Wed Jun 23 17:18:45 2010 +0100
@@ -23,11 +23,5 @@
#include <platform_paths.hrh>
-PRJ_EXPORTS
-../rom/glxtvout.iby CORE_APP_LAYER_IBY_EXPORT_PATH(glxtvout.iby)
-
PRJ_MMPFILES
glxtvout.mmp
-
-PRJ_TESTMMPFILES
-//../tsrc/group/t_glxtvout.mmp
--- a/tvout/tvoutengine/group/glxtvout.mmp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/group/glxtvout.mmp Wed Jun 23 17:18:45 2010 +0100
@@ -64,6 +64,7 @@
LIBRARY apgrfx.lib //
LIBRARY apmime.lib // For ImageViewer mime type extraction
LIBRARY glxlogging.lib
+LIBRARY alfdecoderserverclient.lib
LIBRARY AccPolicy.lib //For RAccessoryConnection status ID's
// Other Dependency Libraries
#ifdef __MARM
--- a/tvout/tvoutengine/inc/glxhdmicontainer.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/inc/glxhdmicontainer.h Wed Jun 23 17:18:45 2010 +0100
@@ -63,10 +63,10 @@
void CreateHdmiWindowL();
private:
- TRect iRect;
- RWsSession iSession;
+ TRect iRect;
+ RWsSession iSession;
RWindow iWsWindow;
- CWsScreenDevice* iScreenDevice;
+ CWsScreenDevice* iScreenDevice;
RWindowGroup iWsWindowGroup;
CWindowGc* iWindowGc;
TInt iWsWindowGroupID;
--- a/tvout/tvoutengine/inc/glxhdmicontroller.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/inc/glxhdmicontroller.h Wed Jun 23 17:18:45 2010 +0100
@@ -19,24 +19,21 @@
#define GLXHDMICONTROLLER_H_
// Internal includes
-#include <mglxtvobserver.h> // for inteface MGlxTvObserver
class CGlxHdmiContainer;
class CGlxHdmiSurfaceUpdater;
-class CGlxTv;
/*
* This class will be called from FS and Slideshow for its requirements
*/
-class CGlxHdmiController : public CBase,
- public MGlxTvObserver // for TV Out
+class CGlxHdmiController : public CBase
{
public:
/*
* NewLC
* @param1 - Image file path default to NULL
*/
- IMPORT_C static CGlxHdmiController* NewL();
+ IMPORT_C static CGlxHdmiController* NewL(TBool aEfectsOn = EFalse);
/*
* Destructor
@@ -75,18 +72,17 @@
IMPORT_C void ShiftToPostingMode();
/*
- * Tells if HDMi is Connected.
+ * Fadeing of the Surface
+ * @param1 ETrue - FadeIn ( as in gaining brightness )
+ * EFalse - FadeOut ( as in loosing brightness )
*/
- IMPORT_C TBool IsHDMIConnected();
-
-private:// From MGlxTvObserver
- void HandleTvStatusChangedL ( TTvChangeType aChangeType );
-
+ IMPORT_C void FadeSurface(TBool aFadeInOut);
+
private:
/*
* Constructor
*/
- CGlxHdmiController();
+ CGlxHdmiController(TBool aEfectsOn);
/*
* ConstructL
@@ -126,9 +122,8 @@
CGlxHdmiContainer* iHdmiContainer;
CGlxHdmiSurfaceUpdater* iSurfaceUpdater;
- CGlxTv* iGlxTvOut;
TBool iIsImageSupported; // Flag to see if Image is supported
- TBool iIsPostingMode; // Flag for determining if the image needs to be in posting mode
+ TBool iEffectsOn;
};
#endif /* GLXHDMICONTROLLER_H_ */
--- a/tvout/tvoutengine/inc/glxhdmisurfaceupdater.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/inc/glxhdmisurfaceupdater.h Wed Jun 23 17:18:45 2010 +0100
@@ -30,7 +30,9 @@
class CGlxActiveCallBack;
class CGlxHdmiDecoderAO;
class CImageDecoder;
+class CAlfCompositionSource;
class TSurfaceConfiguration;
+
class MGlxGenCallback
{
public:
@@ -44,7 +46,7 @@
* NewL
*/
static CGlxHdmiSurfaceUpdater* NewL(RWindow* aWindow, const TDesC& aImageFile,
- CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack);
+ CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack,TBool aEffectsOn);
/*
* Destructor
@@ -70,10 +72,6 @@
* Deactivate Zoom
*/
void DeactivateZoom();
- /*
- * Zoom in our out depending on parameter
- */
- void Zoom(TBool aZoom);
/*
ShiftToCloningMOde
@@ -85,11 +83,18 @@
*/
void ShiftToPostingMode();
+ /*
+ * Fadeing of the Surface
+ * @param1 ETrue - FadeIn ( as in gaining brightness )
+ * EFalse - FadeOut ( as in loosing brightness )
+ */
+ void FadeTheSurface(TBool aFadeInOut);
+
private:
/*
* Constructor
*/
- CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack);
+ CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack,TBool aEffectsOn);
/*
* ConstructL()
@@ -145,10 +150,20 @@
void CreateHdmiL(TBool aCreateSurface = ETrue);
/*
+ * Zoom in our out depending on parameter
+ */
+ void Zoom(TBool aZoom);
+
+ /*
* This if for zoom timer timeout
*/
static TInt TimeOut(TAny* aSelf);
-
+
+ /*
+ * Animation time out timer
+ */
+ static TInt AnimationTimeOut(TAny* aSelf);
+
/*
* ModifySurface positions of the surface to be displayed on screen
*/
@@ -189,12 +204,22 @@
*/
void InitiateHdmiL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile);
+ /*
+ * Animate untill loop is complete
+ */
+ void Animate();
+
private:
- RWindow* iWindow; // window object
- CFbsBitmap* iFsBitmap; // FS bitmap
- MGlxGenCallback* iCallBack; // callback to the HdmiContainer window
- HBufC* iImagePath; // To store the image uri path
+ RWindow* iWindow; // window object
+ CFbsBitmap* iFsBitmap; // FS bitmap
+ MGlxGenCallback* iCallBack; // callback to the HdmiContainer window
+ HBufC* iImagePath; // To store the image uri path
+ TBool iEffectsOn;
+ TBool iShwFsThumbnail; // If the Fs thumbnail is to be shown before decoding HD images
+ TBool iIsNonJpeg; // If the item is non jpeg
+ TBool iFadeIn; // If FadeIn or Out for only SLideshow animation
+
// GCE Surface
RSurfaceUpdateSession iSurfUpdateSession;
TSurfaceId iSurfId; // TSurfaceId
@@ -210,14 +235,18 @@
void* iSurfBuffer; // Surface buffer
CGlxActiveCallBack* iSurfBufferAO; // Surface buffer AO
+ CAlfCompositionSource* ialfCompositionSurface;
+
//ICL
CGlxHdmiDecoderAO* iGlxDecoderAO; // Internal Image decoder AO
CImageDecoder* iImageDecoder; // Image Decoder
RFs iFsSession; // RFs
TPoint iLeftCornerForZoom; //
- CPeriodic* iTimer; // Timer for Zoom
-
+ CPeriodic* iTimer; // Timer for Zoom
+ CPeriodic* iAnimTimer; // Timer for Animation
+ TInt iAnimCounter;
+
// Various objects to store sizes and count
TSize iTvScreenSize; // to store the Tv screen size
TSize iTargetBitmapSize; // To Store the target bitmap size to display(as per Aspect Ratio)
@@ -227,10 +256,7 @@
TBool iBitmapReady; // If the bitmap is decoded and ready
TBool iAutoZoomOut; // If the UI has asked for auto zoomout
TBool iSurfSessionConnected; // If surface session is connected
- TBool iShiftToCloning;
- TBool iShwFsThumbnail; // If the Fs thumbnail is to be shown before decoding HD images
- TBool iIsNonJpeg; // If the item is non jpeg
-
+ TBool iShiftToCloning;
#ifdef _DEBUG
TTime iStartTime;
TTime iStopTime;
--- a/tvout/tvoutengine/inc/glxtv.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/inc/glxtv.h Wed Jun 23 17:18:45 2010 +0100
@@ -56,9 +56,10 @@
{
public:
/**
- * Handle TV connection state changes
+ * Handle TV/HDMI/Headset connection state changes
+ * @param aChangeType The connection change type
*/
- virtual void HandleTvConnectionStatusChangedL( ) = 0;
+ virtual void HandleTvConnectionStatusChangedL(TTvChangeType aChangeType) = 0;
};
@@ -135,7 +136,7 @@
/**
* @ref MGlxTvConnectionObserver::HandleTvConnectionStatusChangedL
*/
- void HandleTvConnectionStatusChangedL( );
+ void HandleTvConnectionStatusChangedL(TTvChangeType aChangeType);
private: // new private methods
/**
--- a/tvout/tvoutengine/inc/glxtvconnectionmonitor.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/inc/glxtvconnectionmonitor.h Wed Jun 23 17:18:45 2010 +0100
@@ -84,53 +84,58 @@
*/
TBool IsHDMIConnected() const;
-
private: // From CActive
/**
* @ref CActive::RunL
- */
+ */
void RunL();
-
+
/**
* @ref CActive::DoCancel
- */
+ */
void DoCancel();
-
+
/**
* @ref CActive::RunError
- */
- TInt RunError( TInt aError );
-
-
+ */
+ TInt RunError( TInt aError );
+
+
private:
/**
- * Requests TV on/off events
- */
+ * Requests TV on/off events
+ */
void IssueRequest();
/**
* Sends notification to observers when TV Out cable is connected
- */
+ */
void IssueNotificationL();
-
- void UpdateConnectionStatusL();
+
+ /**
+ * Updates the ConnectionState of Tv Out and HDMI
+ */
+ void UpdateConnectionStatusL();
private: // class member data
-
+
// Not owned: TV connection observer
MGlxTvConnectionObserver& iConnectionObserver;
- // TVout The Connection state
- TBool iTvOutConnectionState;
-
- // TVout The Connection state
- TBool iHDMIConnectionState;
+ // TVout The Connection state
+ TBool iIsTvOutConnected;
+
+ // TVout The Connection state
+ TBool iIsHDMIConnected;
+
+ // Headset The Connection state
+ TBool iIsHeadSetConnected;
// The (external device) Accessory Server
RAccessoryServer iTvAccServer;
-
- // Accessory mode
+
+ // Accessory mode
RAccessoryMode iTvAccMode;
// Accessory Connection - details the type of accessory
--- a/tvout/tvoutengine/rom/glxtvout.iby Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Photos TV Out iby file.
-*
-*/
-
-
-
-
-#ifndef __GLX_TVOUT_IBY__
-#define __GLX_TVOUT_IBY__
-
-file=ABI_DIR\BUILD_DIR\glxtvout.dll SHARED_LIB_DIR\glxtvout.dll
-
-#endif // __GLX_TVOUT_IBY__
-
-// End of file
------------------------------------------------------------
\ No newline at end of file
--- a/tvout/tvoutengine/src/glxhdmicontainer.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/src/glxhdmicontainer.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -75,7 +75,7 @@
RWindow* CGlxHdmiContainer::GetWindow()
{
TRACER("CGlxHdmiContainer::GetWindow()");
- return &Window();
+ return &iWsWindow;
}
// -----------------------------------------------------------------------------
--- a/tvout/tvoutengine/src/glxhdmicontroller.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/src/glxhdmicontroller.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -19,7 +19,7 @@
#include <alf/alfutil.h>
#include <glxtracer.h>
#include <glxlog.h>
-#include "glxtv.h" // for CGlxTv
+
#include "glxhdmicontainer.h"
#include "glxhdmisurfaceupdater.h"
@@ -28,10 +28,10 @@
// -----------------------------------------------------------------------------
// NewLC
// -----------------------------------------------------------------------------
-EXPORT_C CGlxHdmiController* CGlxHdmiController::NewL()
+EXPORT_C CGlxHdmiController* CGlxHdmiController::NewL(TBool aEfectsOn)
{
TRACER("CGlxHdmiController* CGlxHdmiController::NewL()");
- CGlxHdmiController* self = new (ELeave) CGlxHdmiController();
+ CGlxHdmiController* self = new (ELeave) CGlxHdmiController(aEfectsOn);
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop(self);
@@ -53,10 +53,6 @@
delete iFsBitmap;
iFsBitmap = NULL;
}
- if(iGlxTvOut)
- {
- delete iGlxTvOut;
- }
}
// -----------------------------------------------------------------------------
@@ -66,47 +62,45 @@
TBool aStore)
{
TRACER("CGlxHdmiController::SetImageL()");
+ if (aFsBitmap == NULL || !aImageFile.Length())
+ {
+ GLX_LOG_INFO("CGlxHdmiController::SetImageL() - NULL Uri");
+ return;
+ }
if (aStore)
{
iIsImageSupported = ETrue;
StoreImageInfoL( aImageFile, aFsBitmap );
}
- if (iGlxTvOut->IsHDMIConnected())
+ GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 2");
+ // do not close the surface , use the same surface instead.
+ // Call a function to pass imagefile
+ if (!iHdmiContainer)
+ {
+ CreateHdmiContainerL();
+ }
+ if (!iSurfaceUpdater)
{
- iIsPostingMode = ETrue; // the image should be in posting mode
- GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 2");
- // do not close the surface , use the same surface instead.
- // Call a function to pass imagefile
- if (!iHdmiContainer)
- {
- CreateHdmiContainerL();
- }
- if (!iSurfaceUpdater)
- {
- // This case would come when surface updater is not created at the first instance and also
- // it satisfies the 720p condition
- CreateSurfaceUpdaterL(aImageFile);
- }
- else
- {
- GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 3");
- iSurfaceUpdater->UpdateNewImageL(aImageFile, aFsBitmap);
- }
- iHdmiContainer->DrawNow();
+ // This case would come when surface updater is not created at the first instance and also
+ // it satisfies the 720p condition
+ CreateSurfaceUpdaterL(aImageFile);
}
+ else
+ {
+ GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 3");
+ iSurfaceUpdater->UpdateNewImageL(aImageFile, aFsBitmap);
+ }
+ iHdmiContainer->DrawNow();
}
// -----------------------------------------------------------------------------
-// IsVideo
+// ItemNotSupported
// -----------------------------------------------------------------------------
EXPORT_C void CGlxHdmiController::ItemNotSupported()
{
TRACER("CGlxHdmiController::IsVideo()");
iIsImageSupported = EFalse;
- if (iGlxTvOut->IsHDMIConnected())
- {
- DestroySurfaceUpdater();
- }
+ DestroySurfaceUpdater();
}
@@ -116,7 +110,7 @@
EXPORT_C void CGlxHdmiController::ActivateZoom(TBool aAutoZoomOut)
{
TRACER("CGlxHdmiController::ActivateZoom()");
- if (iGlxTvOut->IsHDMIConnected())
+ if (iSurfaceUpdater)
{
iSurfaceUpdater->ActivateZoom(aAutoZoomOut);
}
@@ -128,7 +122,7 @@
EXPORT_C void CGlxHdmiController::DeactivateZoom()
{
TRACER("CGlxHdmiController::DeactivateZoom()");
- if (iGlxTvOut->IsHDMIConnected())
+ if (iSurfaceUpdater)
{
iSurfaceUpdater->DeactivateZoom();
}
@@ -141,9 +135,8 @@
{
TRACER("CGlxHdmiController::ShiftToCloningMode()");
// Shift to cloning only if HDMI is connected and surfaceupdater available.
- if (iGlxTvOut->IsHDMIConnected() && iSurfaceUpdater)
+ if (iSurfaceUpdater)
{
- iIsPostingMode = EFalse;
iSurfaceUpdater->ShiftToCloningMode();
}
}
@@ -154,41 +147,46 @@
EXPORT_C void CGlxHdmiController::ShiftToPostingMode()
{
TRACER("CGlxHdmiController::ShiftToPostingMode()");
- if (iGlxTvOut->IsHDMIConnected())
+ if (!iSurfaceUpdater)
{
- if (!iSurfaceUpdater)
+ GLX_LOG_INFO("CGlxHdmiController::ShiftToPostingMode() - 1");
+ // This case would come when HDMI connected, TvOut /headphones being connected
+ // and then it shows a popup of "microphone connected"
+ // thus Background - Foreground when headphones connected during HDMI connected
+ if (iFsBitmap == NULL || !iStoredImagePath->Length())
{
- GLX_LOG_INFO("CGlxHdmiController::ShiftToPostingMode() - 1");
- // This case would come when HDMI connected, TvOut /headphones being connected
- // and then it shows a popup of "microphone connected"
- // thus Background - Foreground when headphones connected during HDMI connected
- SetImageL(iStoredImagePath->Des(), iFsBitmap, EFalse);
+ GLX_LOG_INFO("CGlxHdmiController::ShiftToPostingMode() - NULL Uri");
+ return;
}
- else
- {
- GLX_LOG_INFO("CGlxHdmiController::ShiftToPostingMode() - 2");
- iSurfaceUpdater->ShiftToPostingMode();
- }
- iIsPostingMode = ETrue;
+ SetImageL(iStoredImagePath->Des(), iFsBitmap, EFalse);
+ }
+ else
+ {
+ GLX_LOG_INFO("CGlxHdmiController::ShiftToPostingMode() - 2");
+ iSurfaceUpdater->ShiftToPostingMode();
+ }
+ }
+
+
+// -----------------------------------------------------------------------------
+// FadeSurface
+// -----------------------------------------------------------------------------
+EXPORT_C void CGlxHdmiController::FadeSurface(TBool aFadeInOut)
+ {
+ TRACER("CGlxHdmiController::FadeSurface()");
+ if (iSurfaceUpdater)
+ {
+ iSurfaceUpdater->FadeTheSurface(aFadeInOut);
}
}
// -----------------------------------------------------------------------------
-// IsHDMIConnected
-// -----------------------------------------------------------------------------
-EXPORT_C TBool CGlxHdmiController::IsHDMIConnected()
- {
- TRACER("CGlxHdmiController::IsHDMIConnected()");
- return iGlxTvOut->IsHDMIConnected();
- }
-
-
-// -----------------------------------------------------------------------------
// Constructor
// -----------------------------------------------------------------------------
-CGlxHdmiController::CGlxHdmiController():
+CGlxHdmiController::CGlxHdmiController(TBool aEffectsOn):
iFsBitmap(NULL),
- iIsPostingMode(EFalse)
+ iStoredImagePath(NULL),
+ iEffectsOn(aEffectsOn)
{
TRACER("CGlxHdmiController::CGlxHdmiController()");
// Implement nothing here
@@ -200,7 +198,6 @@
void CGlxHdmiController::ConstructL()
{
TRACER("CGlxHdmiController::ConstructL()");
- iGlxTvOut = CGlxTv::NewL(*this);
}
// -----------------------------------------------------------------------------
@@ -228,7 +225,6 @@
delete iSurfaceUpdater;
iSurfaceUpdater = NULL;
}
- iIsPostingMode = EFalse;
}
// -----------------------------------------------------------------------------
@@ -247,9 +243,9 @@
void CGlxHdmiController::CreateSurfaceUpdaterL(const TDesC& aImageFile)
{
TRACER("CGlxHdmiController::CreateSurfaceUpdater()");
- RWindow* window = iHdmiContainer->GetWindow();
- iSurfaceUpdater = CGlxHdmiSurfaceUpdater::NewL(window, aImageFile, iFsBitmap,
- iHdmiContainer);
+ iSurfaceUpdater = CGlxHdmiSurfaceUpdater::NewL(iHdmiContainer->GetWindow(),
+ aImageFile, iFsBitmap,iHdmiContainer,
+ iEffectsOn);
iHdmiContainer->DrawNow();
}
@@ -274,35 +270,3 @@
iFsBitmap->Duplicate(aFsBitmap->Handle());
}
-// -----------------------------------------------------------------------------
-// HandleTvStatusChangedL
-// -----------------------------------------------------------------------------
-void CGlxHdmiController::HandleTvStatusChangedL( TTvChangeType aChangeType )
- {
- TRACER("CGlxHdmiController::HandleTvStatusChangedL()");
- if ( aChangeType == ETvConnectionChanged )
- {
- if ( iGlxTvOut->IsHDMIConnected() && iGlxTvOut->IsConnected() && iSurfaceUpdater)
- {
- GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI and TV Connected");
- // Do nothing , as this means HDMI is already connected and headset/tv cable connected
- // meaning we shouldnt destroy HDMI and neither have to create surface updater.
- return;
- }
- else if ( iGlxTvOut->IsHDMIConnected() && iIsImageSupported && iIsPostingMode)
- {
- GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Connected");
- // Calling SetImageL() with appropriate parameters
- SetImageL(iStoredImagePath->Des(), iFsBitmap, EFalse);
- }
- else
- {
- GLX_LOG_INFO3("CGlxHdmiController::HandleTvStatusChangedL() iIsImageSupported=%d, iGlxTvOut->IsHDMIConnected()=%d, iIsPostingMode=%d",
- iIsImageSupported,iGlxTvOut->IsHDMIConnected(),iIsPostingMode);
- // if it gets disconnected, destroy the surface
- GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Not Connected");
- DestroySurfaceUpdater();
- }
- }
- }
-
--- a/tvout/tvoutengine/src/glxhdmisurfaceupdater.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/src/glxhdmisurfaceupdater.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -18,8 +18,10 @@
#include <graphics/surface.h>
#include <graphics/surfacemanager.h>
#include <graphics/surfaceupdateclient.h>
+#include <graphics/surface_hints.h>
#include <e32math.h>
#include <apgcli.h>
+#include "alf/alfcompositionclient.h"
#include <imageconversion.h>
#include <fbs.h>
@@ -33,11 +35,19 @@
const TInt KMulFactorToCreateBitmap = 4;
const TInt KZoomDelay = 10000;
+const TInt KAnimationTicker = 26000;
+const TInt KAnimationTickerFadeIn = 45000;
//100 , is decide for 20 steps of zooming , with each step being 5 pixels.
const TInt KMaxZoomLimit = 100;
//evey time we zoom , there is a increase in the ht amd width by 10 pixels.
const TInt KSingleStepForZoom = 10;
+// constants for fade effect
+const TInt KFadeSteps = 19;
+const TReal32 KFadeEachStep = 0.05f;
+const TReal32 KFullTransparent = 0.0f;
+const TReal32 KFullOpaque = 1.0f;
+
_LIT(KMimeJpeg,"image/jpeg");
_LIT(KMimeJpg,"image/jpg");
@@ -46,10 +56,11 @@
// -----------------------------------------------------------------------------
CGlxHdmiSurfaceUpdater* CGlxHdmiSurfaceUpdater::NewL(RWindow* aWindow, const TDesC& aImageFile,
CFbsBitmap* aFsBitmap,
- MGlxGenCallback* aCallBack)
+ MGlxGenCallback* aCallBack,
+ TBool aEffectsOn)
{
TRACER("CGlxHdmiSurfaceUpdater* CGlxHdmiSurfaceUpdater::NewL()");
- CGlxHdmiSurfaceUpdater* self = new (ELeave) CGlxHdmiSurfaceUpdater(aWindow, aCallBack);
+ CGlxHdmiSurfaceUpdater* self = new (ELeave) CGlxHdmiSurfaceUpdater(aWindow, aCallBack, aEffectsOn);
CleanupStack::PushL(self);
self->ConstructL(aFsBitmap,aImageFile);
CleanupStack::Pop(self);
@@ -63,6 +74,13 @@
{
TRACER("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater()");
ReleaseContent();
+ if(iAnimTimer && iAnimTimer->IsActive()) // Check for a CPeriodic Instance
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater() - cancel iAnimTimer");
+ iAnimTimer->Cancel();
+ }
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater() - deleteing ialfCompositionSurface");
+ delete ialfCompositionSurface;
if(iWindow)
{
iWindow->RemoveBackgroundSurface(ETrue);
@@ -72,11 +90,7 @@
iTimer->Cancel();
}
delete iTimer;
- if (iGlxDecoderAO)
- {
- delete iGlxDecoderAO;
- }
- iGlxDecoderAO = NULL;
+ delete iGlxDecoderAO;
iFsSession.Close();
if (iSurfManager)
{
@@ -151,9 +165,11 @@
// CTor
// -----------------------------------------------------------------------------
CGlxHdmiSurfaceUpdater::CGlxHdmiSurfaceUpdater(RWindow* aWindow,
- MGlxGenCallback* aCallBack):
+ MGlxGenCallback* aCallBack,TBool aEffectsOn):
iWindow(aWindow), iCallBack(aCallBack),
- iShwFsThumbnail(ETrue), iIsNonJpeg(EFalse)
+ iEffectsOn(aEffectsOn),
+ iShwFsThumbnail(ETrue), iIsNonJpeg(EFalse),
+ iAnimCounter(0)
{
TRACER("CGlxHdmiSurfaceUpdater::CGlxHdmiSurfaceUpdater()");
// Implement nothing here
@@ -167,7 +183,12 @@
TRACER("CGlxHdmiSurfaceUpdater::ConstructL()");
// Initiate the HDMI by assigning the necessary values
InitiateHdmiL(aFsBitmap,aImageFile);
-
+ if (iEffectsOn)
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ConstructL() Creating iAnimTimer");
+ iAnimTimer = CPeriodic::NewL( CActive::EPriorityStandard-1 );
+ }
+
TInt error = iFsSession.Connect ();
GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ConstructL() FsSession Connect error = %d", error);
User::LeaveIfError(error);
@@ -213,7 +234,7 @@
//Cancel the zoom timers if any
if(iTimer->IsActive())
{
- GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::UpdateNewImageL() - Cancel Timer");
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::UpdateNewImageL() - Cancel Zoom Timer");
iTimer->Cancel();
}
@@ -296,6 +317,15 @@
GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL Open Surface manager error = %d", error);
User::LeaveIfError(error);
+ //Need to set the surface Hint for the surface to indicate
+ //that photos do not need overscan compensation and the image will
+ //be displayed in 720p resolution.
+ //Refer error: HJVA-85DD25 for more info.
+ RSurfaceManager::THintPair surfHint;
+ TUid uid(KNullUid);
+ uid.iUid = surfaceHints::KSurfaceContent;
+ surfHint.Set(uid, surfaceHints::EStillImage, EFalse);
+
RSurfaceManager::TSurfaceCreationAttributesBuf attributes;
attributes().iPixelFormat = EUidPixelFormatARGB_8888;// EUidPixelFormatYUV_420Planar;
attributes().iSize = iTvScreenSize;
@@ -305,7 +335,9 @@
attributes().iAlignment = KMulFactorToCreateBitmap;
attributes().iContiguous = EFalse;
attributes().iMappable = ETrue;
-
+ attributes().iSurfaceHints = &surfHint;
+ attributes().iHintCount = 1;
+
error = iSurfManager->CreateSurface(attributes, iSurfId);
GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL, Creating surface error : %d",error);
if(error == KErrNoMemory)
@@ -720,7 +752,24 @@
void CGlxHdmiSurfaceUpdater::ShiftToCloningMode()
{
TRACER("CGlxHdmiSurfaceUpdater::ShiftToCloningMode()");
- iWindow->RemoveBackgroundSurface(ETrue);
+ if (iAnimTimer)
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ShiftToCloningMode() - cancel iAnimTimer");
+ iAnimTimer->Cancel();
+ delete iAnimTimer;
+ iAnimTimer = NULL;
+ }
+ if (ialfCompositionSurface)
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ShiftToCloningMode() - deleteing ialfCompositionSurface");
+ delete ialfCompositionSurface;
+ ialfCompositionSurface= NULL;
+ }
+ if (iWindow)
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ShiftToCloningMode() - window present");
+ iWindow->RemoveBackgroundSurface(ETrue);
+ }
}
// -----------------------------------------------------------------------------
@@ -729,6 +778,11 @@
void CGlxHdmiSurfaceUpdater::ShiftToPostingMode()
{
TRACER("CGlxHdmiSurfaceUpdater::ShiftToPostingMode()");
+ if (iEffectsOn && !iAnimTimer)
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() Creating iAnimTimer");
+ iAnimTimer = CPeriodic::NewL( CActive::EPriorityStandard-1 );
+ }
if(iSurfManager)
{
#ifdef _DEBUG
@@ -762,6 +816,18 @@
ProcessTvImage();
// set the surface onto background
iWindow->SetBackgroundSurface(iConfig, ETrue);
+ if (iEffectsOn)
+ {
+ //Cancel the Animation timer if any
+ if(!iAnimTimer->IsActive())
+ {
+ iAnimCounter = 0;
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ShowFsThumbnailL() - Cancel iAnimTimer Timer");
+ iAnimTimer->Cancel();
+ }
+
+ FadeTheSurface(ETrue);
+ }
}
// -----------------------------------------------------------------------------
@@ -825,5 +891,91 @@
}
}
+// -----------------------------------------------------------------------------
+// FadeTheSurface
+// -----------------------------------------------------------------------------
+void CGlxHdmiSurfaceUpdater::FadeTheSurface(TBool aFadeInOut)
+ {
+ TRACER("CGlxHdmiSurfaceUpdater::FadeTheSurface()");
+ iFadeIn = aFadeInOut;
+ if (iEffectsOn && !iAnimTimer)
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::FadeTheSurface() Creating iAnimTimer");
+ iAnimTimer = CPeriodic::NewL( CActive::EPriorityStandard-1 );
+ }
+ if (!ialfCompositionSurface)
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ShowFsThumbnailL() - Creating alfcompositionsurface");
+ ialfCompositionSurface = CAlfCompositionSource::NewL(*iWindow);
+ }
+ if(!iAnimTimer->IsActive())
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::FadeTheSurface() - Start Timer");
+ if (iFadeIn)
+ iAnimTimer->Start(0,KAnimationTickerFadeIn,TCallBack( AnimationTimeOut,this ));
+ else
+ {
+ for (TInt i=0;i<=KFadeSteps;i++)
+ {
+ GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::Animate - Fading Out %d",i);
+ ialfCompositionSurface->SetOpacity(KFullOpaque -(i*KFadeEachStep));
+ User::After(KAnimationTicker);
+ }
+ }
+ }
+ else
+ {
+ iAnimCounter = 0;
+ // this case can be when fast swipe in Slideshow
+ ialfCompositionSurface->SetOpacity(KFullOpaque); // set the opacity to maximum when fast swipe
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::FadeTheSurface() - cancel iAnimTimer");
+ iAnimTimer->Cancel();
+ }
+ }
+// ---------------------------------------------------------------------------
+// AnimationTimeOut
+// ---------------------------------------------------------------------------
+//
+TInt CGlxHdmiSurfaceUpdater::AnimationTimeOut(TAny* aSelf)
+ {
+ TRACER("CGlxHdmiSurfaceUpdater::AnimationTimeOut");
+ if(aSelf)
+ {
+ CGlxHdmiSurfaceUpdater* self = static_cast <CGlxHdmiSurfaceUpdater*> (aSelf);
+ if (self)
+ {
+ self->Animate();
+ }
+ }
+ return KErrNone;
+ }
+// -----------------------------------------------------------------------------
+// Animate
+// -----------------------------------------------------------------------------
+void CGlxHdmiSurfaceUpdater::Animate()
+ {
+ TRACER("CGlxHdmiSurfaceUpdater::Animate");
+ iAnimCounter++;
+ if (!ialfCompositionSurface)
+ {
+ // createing alfcompositiosource
+ ialfCompositionSurface = CAlfCompositionSource::NewL(*iWindow);
+ }
+ if (iAnimCounter <=KFadeSteps && iFadeIn)
+ {
+ GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::Animate - iAnimCounter=%d",iAnimCounter);
+ // gaining brightness
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::Animate - Fading In");
+ ialfCompositionSurface->SetOpacity( KFullTransparent +(iAnimCounter*KFadeEachStep));
+ }
+ else
+ {
+ GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::Animate() - cancel iAnimTimer");
+ iAnimCounter = 0;
+ // end the timer , as animation of fade in/out is complete
+ iAnimTimer->Cancel();
+ }
+ }
+
--- a/tvout/tvoutengine/src/glxtv.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/src/glxtv.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -356,25 +356,24 @@
// Called when TV connection state changes
//-----------------------------------------------------------------------------
//
-void CGlxTv::HandleTvConnectionStatusChangedL( )
+void CGlxTv::HandleTvConnectionStatusChangedL(TTvChangeType aChangeType)
{
- TRACER("CGlxTv::HandleTvConnectionStatusChangedL()");
+ TRACER("CGlxTv::HandleTvConnectionStatusChangedL()");
- if ( iTvConnectionMonitor->IsConnected() )
- {
- // Start monitoring the environment for changes
- MonitorEnvironmentL();
- // Calculate the TV Out screen buffer
- CalcTvScreenSzL();
- }
- else
- {
- StopMonitoringEnvironment();
- }
- iTvObserver.HandleTvStatusChangedL( ETvConnectionChanged );
- }
-
-
+ if (iTvConnectionMonitor->IsConnected())
+ {
+ // Start monitoring the environment for changes
+ MonitorEnvironmentL();
+ // Calculate the TV Out screen buffer
+ CalcTvScreenSzL();
+ }
+ else
+ {
+ StopMonitoringEnvironment();
+ }
+
+ iTvObserver.HandleTvStatusChangedL(aChangeType);
+ }
//-----------------------------------------------------------------------------
// Retrieve the TV display aspect ratio
--- a/tvout/tvoutengine/src/glxtvconnectionmonitor.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutengine/src/glxtvconnectionmonitor.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -17,10 +17,6 @@
-/**
- * @internal reviewed 24/08/2007 by D Holland
- */
-
// CLASS HEADER
#include "glxtvconnectionmonitor.h"
@@ -69,17 +65,16 @@
// Default C++ constructor
//-----------------------------------------------------------------------------
//
-CGlxTvConnectionMonitor::CGlxTvConnectionMonitor
- ( MGlxTvConnectionObserver& aConnectionObserver )
- :CActive(EPriorityStandard),
- iConnectionObserver ( aConnectionObserver ),
- iTvOutConnectionState(EFalse),
- iHDMIConnectionState(EFalse)
+CGlxTvConnectionMonitor::CGlxTvConnectionMonitor(
+ MGlxTvConnectionObserver& aConnectionObserver) :
+ CActive(EPriorityStandard), iConnectionObserver(aConnectionObserver),
+ iIsTvOutConnected(EFalse), iIsHDMIConnected(EFalse),
+ iIsHeadSetConnected(EFalse)
- {
- TRACER("CGlxTvConnectionMonitor");
- CActiveScheduler::Add( this );
- }
+ {
+ TRACER("CGlxTvConnectionMonitor");
+ CActiveScheduler::Add(this);
+ }
//-----------------------------------------------------------------------------
@@ -146,8 +141,8 @@
TBool CGlxTvConnectionMonitor::IsConnected() const
{
TRACER("CGlxTvConnectionMonitor::IsConnected");
- GLX_LOG_INFO1("CGlxTvConnectionMonitor::IsConnected iTvOutConnectionState=%d",iTvOutConnectionState);
- return iTvOutConnectionState;
+ GLX_LOG_INFO1("CGlxTvConnectionMonitor::IsConnected iIsTvOutConnected=%d",iIsTvOutConnected);
+ return iIsTvOutConnected;
}
//-----------------------------------------------------------------------------
@@ -158,8 +153,8 @@
TBool CGlxTvConnectionMonitor::IsHDMIConnected() const
{
TRACER("CGlxTvConnectionMonitor::IsHDMIConnected");
- GLX_LOG_INFO1("CGlxTvConnectionMonitor::IsHDMIConnected iHDMIConnectionState=%d",iHDMIConnectionState);
- return iHDMIConnectionState;
+ GLX_LOG_INFO1("CGlxTvConnectionMonitor::IsHDMIConnected iIsHDMIConnected=%d",iIsHDMIConnected);
+ return iIsHDMIConnected;
}
//-----------------------------------------------------------------------------
@@ -181,21 +176,36 @@
//-----------------------------------------------------------------------------
//
void CGlxTvConnectionMonitor::IssueNotificationL()
- {
- TRACER("CGlxTvConnectionMonitor::IssueNotificationL");
- TBool previousTvState = iTvOutConnectionState;
- TBool previousHDMIState = iHDMIConnectionState;
+ {
+ TRACER("CGlxTvConnectionMonitor::IssueNotificationL");
+ TBool previousTvState = iIsTvOutConnected;
+ TBool previousHDMIState = iIsHDMIConnected;
+ TBool previousHeadSetState = iIsHeadSetConnected;
+ TTvChangeType changeType = EDisconnected;
// Update the connection status
UpdateConnectionStatusL();
-
+
// trigger tvstatus change only when there is actually a change the in the connection and not
// for spurious events
- if (previousTvState !=iTvOutConnectionState || previousHDMIState != iHDMIConnectionState)
- {
- GLX_LOG_INFO("CGlxTvConnectionMonitor::IssueNotificationL - Connection Altered");
- iConnectionObserver.HandleTvConnectionStatusChangedL();
- }
+ if (previousTvState != iIsTvOutConnected)
+ {
+ changeType = iIsTvOutConnected == EFalse ? EDisconnected : ETvConnectionChanged;
+ GLX_LOG_INFO1("CGlxTvConnectionMonitor::IssueNotificationL - TVOut Connection Changed %d", changeType);
+ iConnectionObserver.HandleTvConnectionStatusChangedL(changeType);
+ }
+ else if (previousHDMIState != iIsHDMIConnected)
+ {
+ changeType = iIsHDMIConnected == EFalse ? EDisconnected : ETvConnectionChanged;
+ GLX_LOG_INFO1("CGlxTvConnectionMonitor::IssueNotificationL - HDMI Connection Changed %d", changeType);
+ iConnectionObserver.HandleTvConnectionStatusChangedL(changeType);
+ }
+ else if (previousHeadSetState != iIsHeadSetConnected)
+ {
+ changeType = iIsHeadSetConnected == EFalse ? EDisconnected : ETvConnectionChanged;
+ GLX_LOG_INFO1("CGlxTvConnectionMonitor::IssueNotificationL - Headset Connection Changed %d", changeType);
+ iConnectionObserver.HandleTvConnectionStatusChangedL(changeType);
+ }
}
//-----------------------------------------------------------------------------
@@ -206,48 +216,72 @@
{
TRACER("CGlxTvConnectionMonitor::UpdateConnectionStatusL()");
- GLX_LOG_INFO2("CGlxTvConnectionMonitor::UpdateConnectionStatusL previousTvState = %d , previousHDMIState = %d",
- iTvOutConnectionState,iHDMIConnectionState);
+ GLX_LOG_INFO3("CGlxTvConnectionMonitor::UpdateConnectionStatusL previousTvState = %d , previousHDMIState = %d iIsHeadSetConnected=%d",
+ iIsTvOutConnected,iIsHDMIConnected,iIsHeadSetConnected);
+
+ // reset the states
+ iIsHDMIConnected = EFalse;
+ iIsTvOutConnected = EFalse;
+ iIsHeadSetConnected = EFalse;
//gets the TV status in to the iCurrentAccArray and haves the Latest Accesory in 0-index
User::LeaveIfError(iTvAccCon.GetAccessoryConnectionStatus(iCurrentAccArray));
CAccPolSubblockNameArray* nameArray = CAccPolSubblockNameArray::NewL();
CleanupStack::PushL(nameArray);
+
// Get the number of currently connected accessories
// Loop through each connected accessory looking for
// the desired capabilities
//
const TInt count = iCurrentAccArray.Count();
GLX_LOG_INFO1("CGlxTvConnectionMonitor::UpdateConnectionStatusL current count value is %d",count);
- for (TInt index = 0; index <count; index++)
+ for (TInt index = 0; index < count; index++)
{
- TAccPolGenericID genId = iCurrentAccArray.GetGenericIDL(index);
- // Get all supported capabilities for this connected accessory.
- iTvAccCon.GetSubblockNameArrayL(genId, *nameArray);
+ const TAccPolGenericID genId = iCurrentAccArray.GetGenericIDL(index);
// Check if this connected accessory supports TV-Out capabality.
GLX_LOG_INFO1("CGlxTvConnectionMonitor::UpdateConnectionStatusL current index value is %d",index);
- if (nameArray->HasName(KAccVideoOut))
+ GLX_LOG_INFO("CGlxTvConnectionMonitor::UpdateConnectionStatusL Video Accessory Supported");
+ TAccPolNameRecord nameRecord;
+ nameRecord.SetNameL(KAccVideoOut);
+
+ if (genId.DeviceTypeCaps( KDTAVDevice ) &&
+ genId.PhysicalConnectionCaps( KPCHDMI ))
{
- GLX_LOG_INFO("CGlxTvConnectionMonitor::UpdateConnectionStatusL Video Accessory Supported");
- TAccPolNameRecord nameRecord;
- nameRecord.SetNameL(KAccVideoOut);
TAccValueTypeTInt value;
- iTvAccCon.GetValueL(genId, nameRecord, value);
- if (value.iValue == EAccVideoOutEHDMI)
+ TInt err = iTvAccCon.GetValueL(genId, nameRecord, value);
+ if (err ==KErrNone)
{
- GLX_LOG_INFO("CGlxTvConnectionMonitor::UpdateConnectionStatusL HDMI is connected");
- iHDMIConnectionState = ETrue;
- }
- else if (value.iValue == EAccVideoOutCVideo)
- {
- GLX_LOG_INFO("CGlxTvConnectionMonitor::UpdateConnectionStatusL TV is connected");
- iTvOutConnectionState = ETrue;
+ if (value.iValue == EAccVideoOutEHDMI)
+ {
+ GLX_LOG_INFO("CGlxTvConnectionMonitor::UpdateConnectionStatusL HDMI is connected");
+ iIsHDMIConnected = ETrue;
+ }
}
}
- }
+ else if (genId.DeviceTypeCaps( KDTAVDevice ) &&
+ genId.PhysicalConnectionCaps( KPCWired ))
+ {
+ TAccValueTypeTInt value;
+ TInt err = iTvAccCon.GetValueL(genId, nameRecord, value);
+ if (err ==KErrNone)
+ {
+ if (value.iValue == EAccVideoOutCVideo)
+ {
+ GLX_LOG_INFO("CGlxTvConnectionMonitor::UpdateConnectionStatusL Tv is connected");
+ iIsTvOutConnected = ETrue;
+ }
+ }
+ }
+ else if (genId.DeviceTypeCaps(KDTHeadset)
+ && genId.PhysicalConnectionCaps(KPCWired))
+ {
+ GLX_LOG_INFO("CGlxTvConnectionMonitor::UpdateConnectionStatusL HeadSet connect");
+ iIsHeadSetConnected = ETrue;
+ }
+ }
CleanupStack::PopAndDestroy(nameArray);
- GLX_LOG_INFO2("CGlxTvConnectionMonitor::UpdateConnectionStatusL CurrentTvState = %d , CurrentHDMIState = %d",
- iTvOutConnectionState,iHDMIConnectionState);
+ GLX_LOG_INFO3("CGlxTvConnectionMonitor::UpdateConnectionStatusL CurrentTvState = %d , CurrentHDMIState = %d, iIsHeadSetConnected=%d",
+ iIsTvOutConnected,iIsHDMIConnected,iIsHeadSetConnected);
}
--- a/tvout/tvoutwrapper/inc/glxtvconnectionobserver.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutwrapper/inc/glxtvconnectionobserver.h Wed Jun 23 17:18:45 2010 +0100
@@ -38,6 +38,12 @@
* destructor
*/
~CGlxConnectionObserver();
+
+ /*
+ * IsHdmiConnected()
+ */
+ TBool IsHdmiConnected();
+
private:
/*
* ConstructL
--- a/tvout/tvoutwrapper/inc/glxtvoutwrapper.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutwrapper/inc/glxtvoutwrapper.h Wed Jun 23 17:18:45 2010 +0100
@@ -47,7 +47,7 @@
* This also creates the private instance of the wrapper
* to pass the model
*/
- void setModel(QAbstractItemModel* aModel);
+ void setModel(QAbstractItemModel* aModel,bool aEfectsOn = false);
/*
* Set the image on to HDMI
@@ -84,6 +84,14 @@
* Note : This function is not required if bounce back effect finishes automatically
*/
void deactivateZoom();
+
+ /*
+ * Fadeing of the Surface
+ * @param1 ETrue - FadeIn ( as in gaining brightness )
+ * EFalse - FadeOut ( as in loosing brightness )
+ */
+ void fadeSurface(bool aFadeInOut);
+
private:
GlxTvOutWrapperPrivate* mTvOutWrapperPrivate;
};
--- a/tvout/tvoutwrapper/inc/glxtvoutwrapper_p.h Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutwrapper/inc/glxtvoutwrapper_p.h Wed Jun 23 17:18:45 2010 +0100
@@ -27,16 +27,17 @@
class CGlxHdmiController;
// Converting the QVariant to CFbsBitmap*
-Q_DECLARE_METATYPE(CFbsBitmap*);
+Q_DECLARE_METATYPE(CFbsBitmap*)
class GlxTvOutWrapperPrivate
{
public:
/*
* Static method to create an instance
+ * @param3 - to On the Effects of Slideshow - currently only fade in fade out
*/
static GlxTvOutWrapperPrivate* Instance(GlxTvOutWrapper* aTvOutWrapper,
- QAbstractItemModel* aModel);
+ QAbstractItemModel* aModel,bool aEfectsOn);
/*
* destructor
@@ -81,6 +82,14 @@
* Deactivate zoom in posting mode.
*/
void DeactivateZoom();
+
+ /*
+ * Fadeing of the Surface
+ * @param1 ETrue - FadeIn ( as in gaining brightness )
+ * EFalse - FadeOut ( as in loosing brightness )
+ */
+ void FadeSurface(bool aFadeInOut);
+
private:
/*
* constructor
@@ -90,8 +99,9 @@
/*
* constructL()
+ * @param1 - to On the Effects of Slideshow - currently only fade in fade out
*/
- void ConstructL();
+ void ConstructL(bool aEfectsOn);
/*
* SetNewImage
@@ -112,6 +122,7 @@
bool iHdmiConnected; // To check if the HDMI is connected
bool isImageSetToHdmi; // to check if the image is set to HDMI
+ bool iIsPhotosInForeground; // to check if the Photos is on foreground
};
#endif //GLXTVOUTWRAPPERPRIVATE_P_H
--- a/tvout/tvoutwrapper/src/glxtvconnectionobserver.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutwrapper/src/glxtvconnectionobserver.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -19,12 +19,15 @@
#include "glxtvconnectionobserver.h"
#include "glxtvoutwrapper_p.h"
+#include <glxtracer.h>
+#include <glxlog.h>
// -----------------------------------------------------------------------------
// NewL
// -----------------------------------------------------------------------------
CGlxConnectionObserver* CGlxConnectionObserver::NewL(GlxTvOutWrapperPrivate* aTvWrapperPrivate)
{
+ TRACER("CGlxConnectionObserver::NewL()");
CGlxConnectionObserver* self = new (ELeave)CGlxConnectionObserver(aTvWrapperPrivate);
self->ConstructL();
return self;
@@ -35,6 +38,7 @@
// -----------------------------------------------------------------------------
void CGlxConnectionObserver::ConstructL()
{
+ TRACER("CGlxConnectionObserver::ConstructL()");
iGlxTvOut = CGlxTv::NewL(*this);
}
@@ -44,6 +48,7 @@
CGlxConnectionObserver::CGlxConnectionObserver(GlxTvOutWrapperPrivate* aTvWrapperPrivate):
iTvWrapperPrivate(aTvWrapperPrivate)
{
+ TRACER("CGlxConnectionObserver::CGlxConnectionObserver()");
// ctor
}
@@ -52,6 +57,7 @@
// -----------------------------------------------------------------------------
CGlxConnectionObserver::~CGlxConnectionObserver()
{
+ TRACER("CGlxConnectionObserver::~CGlxConnectionObserver()");
if (iGlxTvOut){
delete iGlxTvOut;
iGlxTvOut = NULL;
@@ -63,14 +69,25 @@
// -----------------------------------------------------------------------------
void CGlxConnectionObserver::HandleTvStatusChangedL(TTvChangeType aChangeType)
{
+ TRACER("CGlxConnectionObserver::HandleTvStatusChangedL()");
if ( aChangeType == ETvConnectionChanged ){
- if ( iGlxTvOut->IsHDMIConnected() ){
+ if ( iGlxTvOut->IsHDMIConnected() )
+ {
+ GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI and TV Connected");
iTvWrapperPrivate->HandleConnectionChange(ETrue);
- // emit HDMI connected signal
}
else{
+ GLX_LOG_INFO("CGlxConnectionObserver::HandleTvStatusChangedL() - DisConnected");
iTvWrapperPrivate->HandleConnectionChange(EFalse);
- // emit HDMI disconnected
}
}
}
+
+// -----------------------------------------------------------------------------
+// IsHdmiConnected
+// -----------------------------------------------------------------------------
+TBool CGlxConnectionObserver::IsHdmiConnected()
+ {
+ TRACER("CGlxConnectionObserver::IsHdmiConnected()");
+ return iGlxTvOut->IsHDMIConnected();
+ }
--- a/tvout/tvoutwrapper/src/glxtvoutwrapper.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutwrapper/src/glxtvoutwrapper.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -43,11 +43,11 @@
// setModel
// and Create the private instance to pass the model
// -----------------------------------------------------------------------------
-void GlxTvOutWrapper::setModel(QAbstractItemModel* aModel)
+void GlxTvOutWrapper::setModel(QAbstractItemModel* aModel,bool aEfectsOn)
{
if (!mTvOutWrapperPrivate)
{
- mTvOutWrapperPrivate = GlxTvOutWrapperPrivate::Instance(this,aModel);
+ mTvOutWrapperPrivate = GlxTvOutWrapperPrivate::Instance(this,aModel,aEfectsOn);
}
else
{
@@ -115,4 +115,14 @@
}
}
+// -----------------------------------------------------------------------------
+// deactivateZoom
+// -----------------------------------------------------------------------------
+void GlxTvOutWrapper::fadeSurface(bool aFadeInOut)
+ {
+ if(mTvOutWrapperPrivate){
+ mTvOutWrapperPrivate->FadeSurface(aFadeInOut);
+ }
+ }
+
// End of file
--- a/tvout/tvoutwrapper/src/glxtvoutwrapper_p.cpp Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutwrapper/src/glxtvoutwrapper_p.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -22,15 +22,19 @@
#include "glxmodelparm.h"
#include "glxviewids.h"
+#include "glxtracer.h"
+#include "glxlog.h"
+
// -----------------------------------------------------------------------------
// Static method to create the private wrapper instance
// -----------------------------------------------------------------------------
GlxTvOutWrapperPrivate* GlxTvOutWrapperPrivate::Instance(GlxTvOutWrapper* aTvOutWrapper,
- QAbstractItemModel* aModel)
+ QAbstractItemModel* aModel,bool aEfectsOn)
{
+ TRACER("GlxTvOutWrapperPrivate::Instance()");
GlxTvOutWrapperPrivate* self = new GlxTvOutWrapperPrivate(aTvOutWrapper,aModel);
if (self){
- TRAPD(err,self->ConstructL());
+ TRAPD(err,self->ConstructL(aEfectsOn));
if(err != KErrNone){
delete self;
self = NULL;
@@ -43,12 +47,13 @@
// ConstructL
// This creates the Connection observer and the Hdmi Controller
// -----------------------------------------------------------------------------
-void GlxTvOutWrapperPrivate::ConstructL()
+void GlxTvOutWrapperPrivate::ConstructL(bool aEfectsOn)
{
+ TRACER("GlxTvOutWrapperPrivate::ConstructL()");
iConnectionObserver = CGlxConnectionObserver::NewL(this);
if (!iHdmiController) {
- iHdmiController = CGlxHdmiController::NewL();
- iHdmiConnected = iHdmiController->IsHDMIConnected();
+ iHdmiController = CGlxHdmiController::NewL(aEfectsOn);
+ iHdmiConnected = iConnectionObserver->IsHdmiConnected();
}
}
@@ -61,8 +66,10 @@
iConnectionObserver(NULL),
iHdmiController(NULL),
iHdmiConnected(false),
- isImageSetToHdmi(false)
+ isImageSetToHdmi(false),
+ iIsPhotosInForeground(false)
{
+ TRACER("GlxTvOutWrapperPrivate::GlxTvOutWrapperPrivate()");
// Do Nothing
}
@@ -71,6 +78,7 @@
// -----------------------------------------------------------------------------
GlxTvOutWrapperPrivate::~GlxTvOutWrapperPrivate()
{
+ TRACER("GlxTvOutWrapperPrivate::~GlxTvOutWrapperPrivate()");
if (iConnectionObserver){
delete iConnectionObserver;
iConnectionObserver = NULL;
@@ -87,10 +95,13 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::HandleConnectionChange(bool aConnected)
{
+ TRACER("GlxTvOutWrapperPrivate::HandleConnectionChange()");
iHdmiConnected = aConnected;
// if Connection state positive and uri/bmp are not passed to HDMI already
// then it is a new image - Set it.
- if (!isImageSetToHdmi && iHdmiConnected && getSubState() !=IMAGEVIEWER_S)
+ GLX_LOG_INFO2("GlxTvOutWrapperPrivate::HandleConnectionChange() - isImageSetToHdmi-%d, iHdmiConnected-%d",
+ isImageSetToHdmi,iHdmiConnected);
+ if (!isImageSetToHdmi && iHdmiConnected && getSubState() !=IMAGEVIEWER_S && iIsPhotosInForeground)
{
SetNewImage();
}
@@ -102,6 +113,8 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::SetImagetoHDMI()
{
+ TRACER("GlxTvOutWrapperPrivate::SetImagetoHDMI()");
+ iIsPhotosInForeground = true;
if (iHdmiConnected)
{
// Set the Image
@@ -124,10 +137,12 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::SetNewImage()
{
+ TRACER("GlxTvOutWrapperPrivate::SetNewImage()");
QVariant focusVariant =(iModel->data(iModel->index(0,0),GlxFocusIndexRole));
int focusIndex;
if (focusVariant.isValid() && focusVariant.canConvert<int>()) {
focusIndex = (focusVariant.value<int>());
+ GLX_LOG_INFO1("GlxTvOutWrapperPrivate::SetNewImage() focusindex = %d",focusIndex);
}
else{
return ;
@@ -144,6 +159,7 @@
QVariant var = (iModel->data(iModel->index(focusIndex,0),GlxHdmiBitmap));
CFbsBitmap* bmp = var.value<CFbsBitmap*>();
iHdmiController->SetImageL(aPtr,bmp);
+ iIsPhotosInForeground = true;
}
// -----------------------------------------------------------------------------
@@ -151,7 +167,9 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::SetToCloningMode()
{
- if(iHdmiController){
+ TRACER("GlxTvOutWrapperPrivate::SetToCloningMode()");
+ iIsPhotosInForeground = false;
+ if(iHdmiController && iHdmiConnected){
iHdmiController->ShiftToCloningMode();
}
}
@@ -161,7 +179,16 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::SetToNativeMode()
{
- if(iHdmiController){
+ TRACER("GlxTvOutWrapperPrivate::SetToNativeMode()");
+ iIsPhotosInForeground = true;
+
+ if(iHdmiController && iHdmiConnected) {
+ if (!isImageSetToHdmi){
+ }
+ SetNewImage(); // this case can occur when FS image is opened and set to background
+ // HDMI cable connected and then FS is brought to foreground
+ }
+ else{
iHdmiController->ShiftToPostingMode();
}
}
@@ -171,7 +198,8 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::ItemNotSupported()
{
- if(iHdmiController){
+ TRACER("GlxTvOutWrapperPrivate::ItemNotSupported()");
+ if(iHdmiController && iHdmiConnected){
iHdmiController->ItemNotSupported();
}
}
@@ -181,7 +209,7 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::ActivateZoom(bool autoZoomOut)
{
- if(iHdmiController){
+ if(iHdmiController && iHdmiConnected){
iHdmiController->ActivateZoom(autoZoomOut);
}
}
@@ -191,12 +219,22 @@
// -----------------------------------------------------------------------------
void GlxTvOutWrapperPrivate::DeactivateZoom()
{
- if(iHdmiController){
+ if(iHdmiController && iHdmiConnected){
iHdmiController->DeactivateZoom();
}
}
// -----------------------------------------------------------------------------
+// FadeSurface
+// -----------------------------------------------------------------------------
+void GlxTvOutWrapperPrivate::FadeSurface(bool aFadeInOut)
+ {
+ if(iHdmiController && iHdmiConnected){
+ iHdmiController->FadeSurface(aFadeInOut);
+ }
+ }
+
+// -----------------------------------------------------------------------------
// getSubState
// -----------------------------------------------------------------------------
int GlxTvOutWrapperPrivate::getSubState()
--- a/tvout/tvoutwrapper/tvoutwrapper.pro Tue May 18 12:19:10 2010 +0100
+++ b/tvout/tvoutwrapper/tvoutwrapper.pro Wed Jun 23 17:18:45 2010 +0100
@@ -24,6 +24,7 @@
CONFIG += hb
LIBS += -lglxtvout.dll \
+ -lglxlogging.dll \
DEFINES += BUILD_TVOUTWRAPPER
--- a/ui/bwins/glxviewsu.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/bwins/glxviewsu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,37 +1,3 @@
EXPORTS
- ?qt_metacast@GlxSlideShowEffectEngine@@UAEPAXPBD@Z @ 1 NONAME ; void * GlxSlideShowEffectEngine::qt_metacast(char const *)
- ?deRegisterEffect@GlxSlideShowEffectEngine@@QAEXABVQString@@@Z @ 2 NONAME ; void GlxSlideShowEffectEngine::deRegisterEffect(class QString const &)
- ?transitionEffectFinished@GlxSlideShowEffectEngine@@QAEXABUEffectStatus@HbEffect@@@Z @ 3 NONAME ; void GlxSlideShowEffectEngine::transitionEffectFinished(struct HbEffect::EffectStatus const &)
- ?cancelEffect@GlxSlideShowEffectEngine@@QAEXAAV?$QList@PAVQGraphicsItem@@@@W4GlxEffect@@@Z @ 4 NONAME ; void GlxSlideShowEffectEngine::cancelEffect(class QList<class QGraphicsItem *> &, enum GlxEffect)
- ?initTransitionEffect@GlxSlideShowEffectEngine@@AAEXXZ @ 5 NONAME ; void GlxSlideShowEffectEngine::initTransitionEffect(void)
- ?slideShowEffectFinished@GlxSlideShowEffectEngine@@QAEXABUEffectStatus@HbEffect@@@Z @ 6 NONAME ; void GlxSlideShowEffectEngine::slideShowEffectFinished(struct HbEffect::EffectStatus const &)
- ?tr@GlxSlideShowEffectEngine@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString GlxSlideShowEffectEngine::tr(char const *, char const *, int)
- ?slideDelayTime@GlxSlideShowEffectEngine@@QAEHXZ @ 8 NONAME ; int GlxSlideShowEffectEngine::slideDelayTime(void)
- ?registerTransitionEffect@GlxSlideShowEffectEngine@@QAEXXZ @ 9 NONAME ; void GlxSlideShowEffectEngine::registerTransitionEffect(void)
- ?staticMetaObject@GlxSlideShowEffectEngine@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const GlxSlideShowEffectEngine::staticMetaObject
- ??_EGlxSlideShowEffectEngine@@UAE@I@Z @ 11 NONAME ; GlxSlideShowEffectEngine::~GlxSlideShowEffectEngine(unsigned int)
- ?trUtf8@GlxSlideShowEffectEngine@@SA?AVQString@@PBD0H@Z @ 12 NONAME ; class QString GlxSlideShowEffectEngine::trUtf8(char const *, char const *, int)
- ?createView@GlxViewsFactory@@SAPAVGlxView@@HPAVHbMainWindow@@@Z @ 13 NONAME ; class GlxView * GlxViewsFactory::createView(int, class HbMainWindow *)
- ?trUtf8@GlxSlideShowEffectEngine@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString GlxSlideShowEffectEngine::trUtf8(char const *, char const *)
- ??1GlxSlideShowEffectEngine@@UAE@XZ @ 15 NONAME ; GlxSlideShowEffectEngine::~GlxSlideShowEffectEngine(void)
- ?cleanTransitionEfffect@GlxSlideShowEffectEngine@@AAEXXZ @ 16 NONAME ; void GlxSlideShowEffectEngine::cleanTransitionEfffect(void)
- ?runEffect@GlxSlideShowEffectEngine@@QAEXPAVQGraphicsItem@@ABVQString@@@Z @ 17 NONAME ; void GlxSlideShowEffectEngine::runEffect(class QGraphicsItem *, class QString const &)
- ?tr@GlxSlideShowEffectEngine@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString GlxSlideShowEffectEngine::tr(char const *, char const *)
- ?getStaticMetaObject@GlxSlideShowEffectEngine@@SAABUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const & GlxSlideShowEffectEngine::getStaticMetaObject(void)
- ?qt_metacall@GlxSlideShowEffectEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int GlxSlideShowEffectEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?isEffectRuning@GlxSlideShowEffectEngine@@QAE_NPAVQGraphicsItem@@@Z @ 21 NONAME ; bool GlxSlideShowEffectEngine::isEffectRuning(class QGraphicsItem *)
- ??0GlxSlideShowEffectEngine@@QAE@XZ @ 22 NONAME ; GlxSlideShowEffectEngine::GlxSlideShowEffectEngine(void)
- ?runEffect@GlxSlideShowEffectEngine@@QAEXAAV?$QList@PAVQGraphicsItem@@@@ABVQString@@@Z @ 23 NONAME ; void GlxSlideShowEffectEngine::runEffect(class QList<class QGraphicsItem *> &, class QString const &)
- ?readSetting@GlxSlideShowEffectEngine@@QAEXXZ @ 24 NONAME ; void GlxSlideShowEffectEngine::readSetting(void)
- ?effectPluginResolver@GlxSlideShowEffectEngine@@AAEXXZ @ 25 NONAME ; void GlxSlideShowEffectEngine::effectPluginResolver(void)
- ?slideShowMoveDir@GlxSlideShowEffectEngine@@QAE?AW4GlxSlideShowMoveDir@@XZ @ 26 NONAME ; enum GlxSlideShowMoveDir GlxSlideShowEffectEngine::slideShowMoveDir(void)
- ?metaObject@GlxSlideShowEffectEngine@@UBEPBUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const * GlxSlideShowEffectEngine::metaObject(void) const
- ?runEffect@GlxSlideShowEffectEngine@@QAEXAAV?$QList@PAVQGraphicsItem@@@@W4GlxEffect@@@Z @ 28 NONAME ; void GlxSlideShowEffectEngine::runEffect(class QList<class QGraphicsItem *> &, enum GlxEffect)
- ?cancelEffect@GlxSlideShowEffectEngine@@QAEXPAVQGraphicsItem@@@Z @ 29 NONAME ; void GlxSlideShowEffectEngine::cancelEffect(class QGraphicsItem *)
- ?setEffect@GlxSlideShowEffectEngine@@QAEXW4GlxEffect@@@Z @ 30 NONAME ; void GlxSlideShowEffectEngine::setEffect(enum GlxEffect)
- ?effectFinished@GlxSlideShowEffectEngine@@IAEXXZ @ 31 NONAME ; void GlxSlideShowEffectEngine::effectFinished(void)
- ?isEffectRuning@GlxSlideShowEffectEngine@@QAE_NABV?$QList@PAVQGraphicsItem@@@@@Z @ 32 NONAME ; bool GlxSlideShowEffectEngine::isEffectRuning(class QList<class QGraphicsItem *> const &)
- ?registerEffect@GlxSlideShowEffectEngine@@QAEXABVQString@@@Z @ 33 NONAME ; void GlxSlideShowEffectEngine::registerEffect(class QString const &)
- ?cancelEffect@GlxSlideShowEffectEngine@@QAEXABV?$QList@PAVQGraphicsItem@@@@@Z @ 34 NONAME ; void GlxSlideShowEffectEngine::cancelEffect(class QList<class QGraphicsItem *> const &)
- ?deregistertransitionEffect@GlxSlideShowEffectEngine@@QAEXXZ @ 35 NONAME ; void GlxSlideShowEffectEngine::deregistertransitionEffect(void)
+ ?createView@GlxViewsFactory@@SAPAVGlxView@@HPAVHbMainWindow@@@Z @ 1 NONAME ; class GlxView * GlxViewsFactory::createView(int, class HbMainWindow *)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/bwins/glxviewutilitiesu.def Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,36 @@
+EXPORTS
+ ??0GlxSettingInterface@@IAE@XZ @ 1 NONAME ; GlxSettingInterface::GlxSettingInterface(void)
+ ?initTransitionEffect@GlxEffectEngine@@AAEXXZ @ 2 NONAME ; void GlxEffectEngine::initTransitionEffect(void)
+ ?transitionEffectFinished@GlxEffectEngine@@QAEXABUEffectStatus@HbEffect@@@Z @ 3 NONAME ; void GlxEffectEngine::transitionEffectFinished(struct HbEffect::EffectStatus const &)
+ ?metaObject@GlxEffectEngine@@UBEPBUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const * GlxEffectEngine::metaObject(void) const
+ ??1GlxEffectEngine@@UAE@XZ @ 5 NONAME ; GlxEffectEngine::~GlxEffectEngine(void)
+ ??_EGlxEffectEngine@@UAE@I@Z @ 6 NONAME ; GlxEffectEngine::~GlxEffectEngine(unsigned int)
+ ?qt_metacast@GlxEffectEngine@@UAEPAXPBD@Z @ 7 NONAME ; void * GlxEffectEngine::qt_metacast(char const *)
+ ?isEffectRuning@GlxEffectEngine@@QAE_NABV?$QList@PAVQGraphicsItem@@@@@Z @ 8 NONAME ; bool GlxEffectEngine::isEffectRuning(class QList<class QGraphicsItem *> const &)
+ ?getStaticMetaObject@GlxEffectEngine@@SAABUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const & GlxEffectEngine::getStaticMetaObject(void)
+ ?staticMetaObject@GlxEffectEngine@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const GlxEffectEngine::staticMetaObject
+ ?registerTransitionEffect@GlxEffectEngine@@QAEXXZ @ 11 NONAME ; void GlxEffectEngine::registerTransitionEffect(void)
+ ?cleanTransitionEfffect@GlxEffectEngine@@AAEXXZ @ 12 NONAME ; void GlxEffectEngine::cleanTransitionEfffect(void)
+ ?deregistertransitionEffect@GlxEffectEngine@@QAEXXZ @ 13 NONAME ; void GlxEffectEngine::deregistertransitionEffect(void)
+ ?instance@GlxSettingInterface@@SAPAV1@XZ @ 14 NONAME ; class GlxSettingInterface * GlxSettingInterface::instance(void)
+ ?trUtf8@GlxEffectEngine@@SA?AVQString@@PBD0H@Z @ 15 NONAME ; class QString GlxEffectEngine::trUtf8(char const *, char const *, int)
+ ?effectFinished@GlxEffectEngine@@IAEXXZ @ 16 NONAME ; void GlxEffectEngine::effectFinished(void)
+ ??0GlxEffectEngine@@QAE@XZ @ 17 NONAME ; GlxEffectEngine::GlxEffectEngine(void)
+ ?runEffect@GlxEffectEngine@@QAEXAAV?$QList@PAVQGraphicsItem@@@@W4GlxEffect@@@Z @ 18 NONAME ; void GlxEffectEngine::runEffect(class QList<class QGraphicsItem *> &, enum GlxEffect)
+ ??_EGlxSettingInterface@@UAE@I@Z @ 19 NONAME ; GlxSettingInterface::~GlxSettingInterface(unsigned int)
+ ?deRegisterEffect@GlxEffectEngine@@QAEXABVQString@@@Z @ 20 NONAME ; void GlxEffectEngine::deRegisterEffect(class QString const &)
+ ?runEffect@GlxEffectEngine@@QAEXAAV?$QList@PAVQGraphicsItem@@@@ABVQString@@@Z @ 21 NONAME ; void GlxEffectEngine::runEffect(class QList<class QGraphicsItem *> &, class QString const &)
+ ?trUtf8@GlxEffectEngine@@SA?AVQString@@PBD0@Z @ 22 NONAME ; class QString GlxEffectEngine::trUtf8(char const *, char const *)
+ ??0GlxSettingInterface@@IAE@AAV0@@Z @ 23 NONAME ; GlxSettingInterface::GlxSettingInterface(class GlxSettingInterface &)
+ ?cancelEffect@GlxEffectEngine@@QAEXAAV?$QList@PAVQGraphicsItem@@@@W4GlxEffect@@@Z @ 24 NONAME ; void GlxEffectEngine::cancelEffect(class QList<class QGraphicsItem *> &, enum GlxEffect)
+ ?tr@GlxEffectEngine@@SA?AVQString@@PBD0@Z @ 25 NONAME ; class QString GlxEffectEngine::tr(char const *, char const *)
+ ?isEffectRuning@GlxEffectEngine@@QAE_NPAVQGraphicsItem@@@Z @ 26 NONAME ; bool GlxEffectEngine::isEffectRuning(class QGraphicsItem *)
+ ?qt_metacall@GlxEffectEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 27 NONAME ; int GlxEffectEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?runEffect@GlxEffectEngine@@QAEXPAVQGraphicsItem@@ABVQString@@@Z @ 28 NONAME ; void GlxEffectEngine::runEffect(class QGraphicsItem *, class QString const &)
+ ?slideShowEffectFinished@GlxEffectEngine@@QAEXABUEffectStatus@HbEffect@@@Z @ 29 NONAME ; void GlxEffectEngine::slideShowEffectFinished(struct HbEffect::EffectStatus const &)
+ ?registerEffect@GlxEffectEngine@@QAEXABVQString@@@Z @ 30 NONAME ; void GlxEffectEngine::registerEffect(class QString const &)
+ ?cancelEffect@GlxEffectEngine@@QAEXABV?$QList@PAVQGraphicsItem@@@@@Z @ 31 NONAME ; void GlxEffectEngine::cancelEffect(class QList<class QGraphicsItem *> const &)
+ ?tr@GlxEffectEngine@@SA?AVQString@@PBD0H@Z @ 32 NONAME ; class QString GlxEffectEngine::tr(char const *, char const *, int)
+ ??1GlxSettingInterface@@MAE@XZ @ 33 NONAME ; GlxSettingInterface::~GlxSettingInterface(void)
+ ?cancelEffect@GlxEffectEngine@@QAEXPAVQGraphicsItem@@@Z @ 34 NONAME ; void GlxEffectEngine::cancelEffect(class QGraphicsItem *)
+
--- a/ui/commandhandlers/commandhandlerbase/src/glxmodelcommandhandler.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/commandhandlers/commandhandlerbase/src/glxmodelcommandhandler.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -1,20 +1,3 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
#include <glxmediamodel.h>
#include <glxmodelcommandhandler.h>
#include <glxmodelparm.h>
--- a/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlersend.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlersend.h Wed Jun 23 17:18:45 2010 +0100
@@ -21,6 +21,7 @@
#include "glxmodelcommandhandler.h"
#include <QList>
#include <QString>
+class ShareUi;
#ifdef BUILD_COMMONCOMMANDHANDLERS
@@ -36,5 +37,7 @@
GlxCommandHandlerSend();
~GlxCommandHandlerSend();
void doHandleUserAction(GlxMediaModel* model,QList<QModelIndex> indexList)const ;
+private:
+ ShareUi *mSendUiDialog;
};
#endif // GLXCOMMANDHANDLERSEND_H
--- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -24,35 +24,35 @@
GlxCommandHandlerSend::GlxCommandHandlerSend()
{
-
+ mSendUiDialog = new ShareUi();
}
GlxCommandHandlerSend::~GlxCommandHandlerSend()
{
-
+ delete mSendUiDialog;
+ mSendUiDialog =NULL;
}
void GlxCommandHandlerSend::doHandleUserAction(GlxMediaModel* model,QList<QModelIndex> indexList) const
{
- QList <QVariant> fileList;
- QString imagePath ;
+ QStringList fileList;
+ QString imagePath ;
//The Index list is NULL, when the item is selected to be sent from contect menu
// and fullscreen view,so that inturn is sending the focused item
if(indexList.count() == 0)
{
imagePath = (model->data(model->index(model->data(model->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxUriRole)).value<QString>();
- fileList.append(QVariant(imagePath));
+ fileList.append(imagePath);
}
else
{
for ( int i = 0; i < indexList.count(); i++)
{
imagePath = (model->data(indexList[i],GlxUriRole)).value<QString>();
- fileList.append(QVariant(imagePath));
+ fileList.append(imagePath);
}
- }
- ShareUi dialog;
- dialog.init(fileList,true);
+ }
+ mSendUiDialog->send(fileList,true);
}
--- a/ui/eabi/glxviewsu.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/eabi/glxviewsu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,33 +1,3 @@
EXPORTS
_ZN15GlxViewsFactory10createViewEiP12HbMainWindow @ 1 NONAME
- _ZN24GlxSlideShowEffectEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
- _ZN24GlxSlideShowEffectEngine11qt_metacastEPKc @ 3 NONAME
- _ZN24GlxSlideShowEffectEngine12cancelEffectEP13QGraphicsItem @ 4 NONAME
- _ZN24GlxSlideShowEffectEngine12cancelEffectER5QListIP13QGraphicsItemE9GlxEffect @ 5 NONAME
- _ZN24GlxSlideShowEffectEngine12cancelEffectERK5QListIP13QGraphicsItemE @ 6 NONAME
- _ZN24GlxSlideShowEffectEngine14effectFinishedEv @ 7 NONAME
- _ZN24GlxSlideShowEffectEngine14isEffectRuningEP13QGraphicsItem @ 8 NONAME
- _ZN24GlxSlideShowEffectEngine14isEffectRuningERK5QListIP13QGraphicsItemE @ 9 NONAME
- _ZN24GlxSlideShowEffectEngine14registerEffectERK7QString @ 10 NONAME
- _ZN24GlxSlideShowEffectEngine16deRegisterEffectERK7QString @ 11 NONAME
- _ZN24GlxSlideShowEffectEngine16staticMetaObjectE @ 12 NONAME DATA 16
- _ZN24GlxSlideShowEffectEngine19getStaticMetaObjectEv @ 13 NONAME
- _ZN24GlxSlideShowEffectEngine20effectPluginResolverEv @ 14 NONAME
- _ZN24GlxSlideShowEffectEngine20initTransitionEffectEv @ 15 NONAME
- _ZN24GlxSlideShowEffectEngine22cleanTransitionEfffectEv @ 16 NONAME
- _ZN24GlxSlideShowEffectEngine23slideShowEffectFinishedERKN8HbEffect12EffectStatusE @ 17 NONAME
- _ZN24GlxSlideShowEffectEngine24registerTransitionEffectEv @ 18 NONAME
- _ZN24GlxSlideShowEffectEngine24transitionEffectFinishedERKN8HbEffect12EffectStatusE @ 19 NONAME
- _ZN24GlxSlideShowEffectEngine26deregistertransitionEffectEv @ 20 NONAME
- _ZN24GlxSlideShowEffectEngine9runEffectEP13QGraphicsItemRK7QString @ 21 NONAME
- _ZN24GlxSlideShowEffectEngine9runEffectER5QListIP13QGraphicsItemE9GlxEffect @ 22 NONAME
- _ZN24GlxSlideShowEffectEngine9runEffectER5QListIP13QGraphicsItemERK7QString @ 23 NONAME
- _ZN24GlxSlideShowEffectEngineC1Ev @ 24 NONAME
- _ZN24GlxSlideShowEffectEngineC2Ev @ 25 NONAME
- _ZN24GlxSlideShowEffectEngineD0Ev @ 26 NONAME
- _ZN24GlxSlideShowEffectEngineD1Ev @ 27 NONAME
- _ZN24GlxSlideShowEffectEngineD2Ev @ 28 NONAME
- _ZNK24GlxSlideShowEffectEngine10metaObjectEv @ 29 NONAME
- _ZTI24GlxSlideShowEffectEngine @ 30 NONAME
- _ZTV24GlxSlideShowEffectEngine @ 31 NONAME
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/eabi/glxviewutilitiesu.def Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,39 @@
+EXPORTS
+ _ZN15GlxEffectEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+ _ZN15GlxEffectEngine11qt_metacastEPKc @ 2 NONAME
+ _ZN15GlxEffectEngine12cancelEffectEP13QGraphicsItem @ 3 NONAME
+ _ZN15GlxEffectEngine12cancelEffectER5QListIP13QGraphicsItemE9GlxEffect @ 4 NONAME
+ _ZN15GlxEffectEngine12cancelEffectERK5QListIP13QGraphicsItemE @ 5 NONAME
+ _ZN15GlxEffectEngine14effectFinishedEv @ 6 NONAME
+ _ZN15GlxEffectEngine14isEffectRuningEP13QGraphicsItem @ 7 NONAME
+ _ZN15GlxEffectEngine14isEffectRuningERK5QListIP13QGraphicsItemE @ 8 NONAME
+ _ZN15GlxEffectEngine14registerEffectERK7QString @ 9 NONAME
+ _ZN15GlxEffectEngine16deRegisterEffectERK7QString @ 10 NONAME
+ _ZN15GlxEffectEngine16staticMetaObjectE @ 11 NONAME DATA 16
+ _ZN15GlxEffectEngine19getStaticMetaObjectEv @ 12 NONAME
+ _ZN15GlxEffectEngine20initTransitionEffectEv @ 13 NONAME
+ _ZN15GlxEffectEngine22cleanTransitionEfffectEv @ 14 NONAME
+ _ZN15GlxEffectEngine23slideShowEffectFinishedERKN8HbEffect12EffectStatusE @ 15 NONAME
+ _ZN15GlxEffectEngine24registerTransitionEffectEv @ 16 NONAME
+ _ZN15GlxEffectEngine24transitionEffectFinishedERKN8HbEffect12EffectStatusE @ 17 NONAME
+ _ZN15GlxEffectEngine26deregistertransitionEffectEv @ 18 NONAME
+ _ZN15GlxEffectEngine9runEffectEP13QGraphicsItemRK7QString @ 19 NONAME
+ _ZN15GlxEffectEngine9runEffectER5QListIP13QGraphicsItemE9GlxEffect @ 20 NONAME
+ _ZN15GlxEffectEngine9runEffectER5QListIP13QGraphicsItemERK7QString @ 21 NONAME
+ _ZN15GlxEffectEngineC1Ev @ 22 NONAME
+ _ZN15GlxEffectEngineC2Ev @ 23 NONAME
+ _ZN15GlxEffectEngineD0Ev @ 24 NONAME
+ _ZN15GlxEffectEngineD1Ev @ 25 NONAME
+ _ZN15GlxEffectEngineD2Ev @ 26 NONAME
+ _ZN19GlxSettingInterface8instanceEv @ 27 NONAME
+ _ZN19GlxSettingInterfaceC2ERS_ @ 28 NONAME
+ _ZN19GlxSettingInterfaceC2Ev @ 29 NONAME
+ _ZN19GlxSettingInterfaceD0Ev @ 30 NONAME
+ _ZN19GlxSettingInterfaceD1Ev @ 31 NONAME
+ _ZN19GlxSettingInterfaceD2Ev @ 32 NONAME
+ _ZNK15GlxEffectEngine10metaObjectEv @ 33 NONAME
+ _ZTI15GlxEffectEngine @ 34 NONAME
+ _ZTI19GlxSettingInterface @ 35 NONAME
+ _ZTV15GlxEffectEngine @ 36 NONAME
+ _ZTV19GlxSettingInterface @ 37 NONAME
+
--- a/ui/inc/glxcommandhandlers.hrh Tue May 18 12:19:10 2010 +0100
+++ b/ui/inc/glxcommandhandlers.hrh Wed Jun 23 17:18:45 2010 +0100
@@ -115,6 +115,8 @@
EGlxCmdContextSend,
EGlxCmdContextRename,
EGlxCmdSetupItem,
+ EGlxCmdAppBackground, //when application goes into background
+ EGlxCmdAppForeground, //when application comes into foreground
EGlxCmdAiwBase = 0x6000
};
--- a/ui/inc/glxdocloaderdefs.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/inc/glxdocloaderdefs.h Wed Jun 23 17:18:45 2010 +0100
@@ -27,6 +27,7 @@
#define GLXFULLSCREEN_TOOLBAR "toolBar"
#define GLXFULLSCREENLSSECTION "landscape"
#define GLXFULLSCREENPTSECTION "portrait"
+#define GLXFULLSCREENZOOMWIDGET "glxZoomWidget"
#define GLXFULLSCREENDOCMLPATH ":/data/fullscreen.docml"
//SLIDE SHOW
--- a/ui/inc/glxicondefs.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/inc/glxicondefs.h Wed Jun 23 17:18:45 2010 +0100
@@ -28,8 +28,8 @@
#define GLXICON_USEIMAGE "qtg_small_ovi"
//GRID TOOLBAR
-#define GLXICON_ALL "qtg_mono_photos_all"
-#define GLXICON_ALBUMS "qtg_mono_albums"
+#define GLXICON_ALL "qtg_mono_photos"
+#define GLXICON_ALBUMS "qtg_mono_photo_albums"
#define GLXICON_CAMERA "qtg_mono_camera"
#define GLXICON_OVI "qtg_small_ovi"
@@ -45,4 +45,6 @@
#define GLXICON_ADD_TO_FAV "qtg_graf_ratingslider_rated"
#define GLXICON_REMOVE_FAV "qtg_graf_ratingslider_unrated"
+#define GLXICON_WALL_UI_ON "qtg_mono_back"
+
#endif /* GLXICONDEFS_H */
--- a/ui/inc/glxmodelparm.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/inc/glxmodelparm.h Wed Jun 23 17:18:45 2010 +0100
@@ -42,7 +42,9 @@
GlxFavorites, //to get the image is in favorites folder or not
GlxQImageSmall, //To Get Grid Thumbnail as QImage
GlxQImageLarge, //To Get FullScreen Thumbnail as QImage
- GlxDefaultImage //To Get Default Thumbnail
+ GlxDefaultImage, //To Get Default Thumbnail
+ GlxViewTitle,
+ GlxPopulated
};
--- a/ui/inc/glxuistd.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/inc/glxuistd.h Wed Jun 23 17:18:45 2010 +0100
@@ -56,7 +56,7 @@
typedef enum
{
NO_EFFECT,
- WAVE_EFFECT,
+ FLIP_EFFECT,
SMOOTH_FADE,
ZOOM_TO_FACE,
TRANSITION_EFFECT,
--- a/ui/ui.pro Tue May 18 12:19:10 2010 +0100
+++ b/ui/ui.pro Wed Jun 23 17:18:45 2010 +0100
@@ -18,6 +18,8 @@
CONFIG += ordered
SUBDIRS = uiengine \
commandhandlers \
+ viewutilities \
+ widgets \
views \
viewmanagement \
# viewplugins
--- a/ui/uiengine/bwins/glxmedialistwrapperu.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/bwins/glxmedialistwrapperu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,43 +1,51 @@
EXPORTS
?retrieveItemUri@GlxMLWrapper@@QAE?AVQString@@H@Z @ 1 NONAME ; class QString GlxMLWrapper::retrieveItemUri(int)
- ?itemCorrupted@GlxMLWrapper@@IAEXH@Z @ 2 NONAME ; void GlxMLWrapper::itemCorrupted(int)
- ?trUtf8@GlxMLWrapper@@SA?AVQString@@PBD0H@Z @ 3 NONAME ; class QString GlxMLWrapper::trUtf8(char const *, char const *, int)
- ?handleGeneralError@GlxMLWrapper@@QAEXH@Z @ 4 NONAME ; void GlxMLWrapper::handleGeneralError(int)
- ?updateItem@GlxMLWrapper@@IAEXHW4GlxTBContextType@@@Z @ 5 NONAME ; void GlxMLWrapper::updateItem(int, enum GlxTBContextType)
- ?removeItems@GlxMLWrapper@@IAEXHH@Z @ 6 NONAME ; void GlxMLWrapper::removeItems(int, int)
- ?getItemCount@GlxMLWrapper@@QAEHXZ @ 7 NONAME ; int GlxMLWrapper::getItemCount(void)
- ?getVisibleWindowIndex@GlxMLWrapper@@QAEHXZ @ 8 NONAME ; int GlxMLWrapper::getVisibleWindowIndex(void)
- ?setFocusIndex@GlxMLWrapper@@QAEXH@Z @ 9 NONAME ; void GlxMLWrapper::setFocusIndex(int)
- ?retrieveItemDate@GlxMLWrapper@@QAE?AVQDate@@H@Z @ 10 NONAME ; class QDate GlxMLWrapper::retrieveItemDate(int)
- ?qt_metacall@GlxMLWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 11 NONAME ; int GlxMLWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?retrieveItemFrameCount@GlxMLWrapper@@QAEHH@Z @ 12 NONAME ; int GlxMLWrapper::retrieveItemFrameCount(int)
- ?retrieveListTitle@GlxMLWrapper@@QAE?AVQString@@H@Z @ 13 NONAME ; class QString GlxMLWrapper::retrieveListTitle(int)
- ?retrieveListItemCount@GlxMLWrapper@@QAEHH@Z @ 14 NONAME ; int GlxMLWrapper::retrieveListItemCount(int)
- ?tr@GlxMLWrapper@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString GlxMLWrapper::tr(char const *, char const *)
- ?setVisibleWindowIndex@GlxMLWrapper@@QAEXH@Z @ 16 NONAME ; void GlxMLWrapper::setVisibleWindowIndex(int)
- ?getStaticMetaObject@GlxMLWrapper@@SAABUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const & GlxMLWrapper::getStaticMetaObject(void)
- ?retrieveListSubTitle@GlxMLWrapper@@QAE?AVQString@@H@Z @ 18 NONAME ; class QString GlxMLWrapper::retrieveListSubTitle(int)
- ?staticMetaObject@GlxMLWrapper@@2UQMetaObject@@B @ 19 NONAME ; struct QMetaObject const GlxMLWrapper::staticMetaObject
- ?handleListItemAvailable@GlxMLWrapper@@QAEXH@Z @ 20 NONAME ; void GlxMLWrapper::handleListItemAvailable(int)
- ?trUtf8@GlxMLWrapper@@SA?AVQString@@PBD0@Z @ 21 NONAME ; class QString GlxMLWrapper::trUtf8(char const *, char const *)
- ?itemsRemoved@GlxMLWrapper@@QAEXHH@Z @ 22 NONAME ; void GlxMLWrapper::itemsRemoved(int, int)
- ?metaObject@GlxMLWrapper@@UBEPBUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const * GlxMLWrapper::metaObject(void) const
- ?insertItems@GlxMLWrapper@@IAEXHH@Z @ 24 NONAME ; void GlxMLWrapper::insertItems(int, int)
- ?isSystemItem@GlxMLWrapper@@QAE_NH@Z @ 25 NONAME ; bool GlxMLWrapper::isSystemItem(int)
- ?getFocusIndex@GlxMLWrapper@@QBEHXZ @ 26 NONAME ; int GlxMLWrapper::getFocusIndex(void) const
- ?handleIconCorrupt@GlxMLWrapper@@QAEXH@Z @ 27 NONAME ; void GlxMLWrapper::handleIconCorrupt(int)
- ?retrieveItemDimension@GlxMLWrapper@@QAE?AVQSize@@H@Z @ 28 NONAME ; class QSize GlxMLWrapper::retrieveItemDimension(int)
- ?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 29 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
- ?handleReceivedIcon@GlxMLWrapper@@QAEXHW4GlxTBContextType@@@Z @ 30 NONAME ; void GlxMLWrapper::handleReceivedIcon(int, enum GlxTBContextType)
- ?tr@GlxMLWrapper@@SA?AVQString@@PBD0H@Z @ 31 NONAME ; class QString GlxMLWrapper::tr(char const *, char const *, int)
- ??_EGlxMLWrapper@@UAE@I@Z @ 32 NONAME ; GlxMLWrapper::~GlxMLWrapper(unsigned int)
- ?setContextMode@GlxMLWrapper@@QAEXW4GlxContextMode@@@Z @ 33 NONAME ; void GlxMLWrapper::setContextMode(enum GlxContextMode)
- ??1GlxMLWrapper@@UAE@XZ @ 34 NONAME ; GlxMLWrapper::~GlxMLWrapper(void)
- ?RetrieveBitmap@GlxMLWrapper@@QAE?AVQVariant@@H@Z @ 35 NONAME ; class QVariant GlxMLWrapper::RetrieveBitmap(int)
- ?qt_metacast@GlxMLWrapper@@UAEPAXPBD@Z @ 36 NONAME ; void * GlxMLWrapper::qt_metacast(char const *)
- ?retrieveItemImage@GlxMLWrapper@@QAE?AVQImage@@HW4GlxTBContextType@@@Z @ 37 NONAME ; class QImage GlxMLWrapper::retrieveItemImage(int, enum GlxTBContextType)
- ??0GlxMLWrapper@@QAE@HHW4TGlxFilterItemType@@VQString@@@Z @ 38 NONAME ; GlxMLWrapper::GlxMLWrapper(int, int, enum TGlxFilterItemType, class QString)
- ?setSelectedIndex@GlxMLWrapper@@QAEXH@Z @ 39 NONAME ; void GlxMLWrapper::setSelectedIndex(int)
- ?itemsAdded@GlxMLWrapper@@QAEXHH@Z @ 40 NONAME ; void GlxMLWrapper::itemsAdded(int, int)
- ?retrieveItemIcon@GlxMLWrapper@@QAEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 41 NONAME ; class HbIcon * GlxMLWrapper::retrieveItemIcon(int, enum GlxTBContextType)
+ ?handlepopulated@GlxMLWrapper@@QAEXXZ @ 2 NONAME ; void GlxMLWrapper::handlepopulated(void)
+ ?itemCorrupted@GlxMLWrapper@@IAEXH@Z @ 3 NONAME ; void GlxMLWrapper::itemCorrupted(int)
+ ?populated@GlxMLWrapper@@IAEXXZ @ 4 NONAME ; void GlxMLWrapper::populated(void)
+ ?trUtf8@GlxMLWrapper@@SA?AVQString@@PBD0H@Z @ 5 NONAME ; class QString GlxMLWrapper::trUtf8(char const *, char const *, int)
+ ?handleGeneralError@GlxMLWrapper@@QAEXH@Z @ 6 NONAME ; void GlxMLWrapper::handleGeneralError(int)
+ ?updateItem@GlxMLWrapper@@IAEXHW4GlxTBContextType@@@Z @ 7 NONAME ; void GlxMLWrapper::updateItem(int, enum GlxTBContextType)
+ ?removeItems@GlxMLWrapper@@IAEXHH@Z @ 8 NONAME ; void GlxMLWrapper::removeItems(int, int)
+ ?IsPopulated@GlxMLWrapper@@QAE_NXZ @ 9 NONAME ; bool GlxMLWrapper::IsPopulated(void)
+ ?getItemCount@GlxMLWrapper@@QAEHXZ @ 10 NONAME ; int GlxMLWrapper::getItemCount(void)
+ ?getVisibleWindowIndex@GlxMLWrapper@@QAEHXZ @ 11 NONAME ; int GlxMLWrapper::getVisibleWindowIndex(void)
+ ?setFocusIndex@GlxMLWrapper@@QAEXH@Z @ 12 NONAME ; void GlxMLWrapper::setFocusIndex(int)
+ ?retrieveItemDate@GlxMLWrapper@@QAE?AVQDate@@H@Z @ 13 NONAME ; class QDate GlxMLWrapper::retrieveItemDate(int)
+ ?qt_metacall@GlxMLWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 14 NONAME ; int GlxMLWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?retrieveItemFrameCount@GlxMLWrapper@@QAEHH@Z @ 15 NONAME ; int GlxMLWrapper::retrieveItemFrameCount(int)
+ ?retrieveListTitle@GlxMLWrapper@@QAE?AVQString@@H@Z @ 16 NONAME ; class QString GlxMLWrapper::retrieveListTitle(int)
+ ?retrieveListItemCount@GlxMLWrapper@@QAEHH@Z @ 17 NONAME ; int GlxMLWrapper::retrieveListItemCount(int)
+ ?tr@GlxMLWrapper@@SA?AVQString@@PBD0@Z @ 18 NONAME ; class QString GlxMLWrapper::tr(char const *, char const *)
+ ?setVisibleWindowIndex@GlxMLWrapper@@QAEXH@Z @ 19 NONAME ; void GlxMLWrapper::setVisibleWindowIndex(int)
+ ?getStaticMetaObject@GlxMLWrapper@@SAABUQMetaObject@@XZ @ 20 NONAME ; struct QMetaObject const & GlxMLWrapper::getStaticMetaObject(void)
+ ?retrieveListSubTitle@GlxMLWrapper@@QAE?AVQString@@H@Z @ 21 NONAME ; class QString GlxMLWrapper::retrieveListSubTitle(int)
+ ?updateAlbumTitle@GlxMLWrapper@@IAEXVQString@@@Z @ 22 NONAME ; void GlxMLWrapper::updateAlbumTitle(class QString)
+ ?staticMetaObject@GlxMLWrapper@@2UQMetaObject@@B @ 23 NONAME ; struct QMetaObject const GlxMLWrapper::staticMetaObject
+ ?handleListItemAvailable@GlxMLWrapper@@QAEXH@Z @ 24 NONAME ; void GlxMLWrapper::handleListItemAvailable(int)
+ ?trUtf8@GlxMLWrapper@@SA?AVQString@@PBD0@Z @ 25 NONAME ; class QString GlxMLWrapper::trUtf8(char const *, char const *)
+ ?itemsRemoved@GlxMLWrapper@@QAEXHH@Z @ 26 NONAME ; void GlxMLWrapper::itemsRemoved(int, int)
+ ?handleTitleAvailable@GlxMLWrapper@@QAEXVQString@@@Z @ 27 NONAME ; void GlxMLWrapper::handleTitleAvailable(class QString)
+ ?metaObject@GlxMLWrapper@@UBEPBUQMetaObject@@XZ @ 28 NONAME ; struct QMetaObject const * GlxMLWrapper::metaObject(void) const
+ ?insertItems@GlxMLWrapper@@IAEXHH@Z @ 29 NONAME ; void GlxMLWrapper::insertItems(int, int)
+ ?isSystemItem@GlxMLWrapper@@QAE_NH@Z @ 30 NONAME ; bool GlxMLWrapper::isSystemItem(int)
+ ?getFocusIndex@GlxMLWrapper@@QBEHXZ @ 31 NONAME ; int GlxMLWrapper::getFocusIndex(void) const
+ ?handleIconCorrupt@GlxMLWrapper@@QAEXH@Z @ 32 NONAME ; void GlxMLWrapper::handleIconCorrupt(int)
+ ?retrieveItemDimension@GlxMLWrapper@@QAE?AVQSize@@H@Z @ 33 NONAME ; class QSize GlxMLWrapper::retrieveItemDimension(int)
+ ?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 34 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
+ ?handleReceivedIcon@GlxMLWrapper@@QAEXHW4GlxTBContextType@@@Z @ 35 NONAME ; void GlxMLWrapper::handleReceivedIcon(int, enum GlxTBContextType)
+ ?retrieveViewTitle@GlxMLWrapper@@QAE?AVQString@@XZ @ 36 NONAME ; class QString GlxMLWrapper::retrieveViewTitle(void)
+ ?tr@GlxMLWrapper@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString GlxMLWrapper::tr(char const *, char const *, int)
+ ?setContextMode@GlxMLWrapper@@QAEXW4GlxContextMode@@@Z @ 38 NONAME ; void GlxMLWrapper::setContextMode(enum GlxContextMode)
+ ??_EGlxMLWrapper@@UAE@I@Z @ 39 NONAME ; GlxMLWrapper::~GlxMLWrapper(unsigned int)
+ ??1GlxMLWrapper@@UAE@XZ @ 40 NONAME ; GlxMLWrapper::~GlxMLWrapper(void)
+ ?RetrieveBitmap@GlxMLWrapper@@QAE?AVQVariant@@H@Z @ 41 NONAME ; class QVariant GlxMLWrapper::RetrieveBitmap(int)
+ ??1CGlxTitleFetcher@@UAE@XZ @ 42 NONAME ; CGlxTitleFetcher::~CGlxTitleFetcher(void)
+ ?HandleTitleAvailableL@GlxMLWrapperPrivate@@UAEXABVTDesC16@@@Z @ 43 NONAME ; void GlxMLWrapperPrivate::HandleTitleAvailableL(class TDesC16 const &)
+ ?qt_metacast@GlxMLWrapper@@UAEPAXPBD@Z @ 44 NONAME ; void * GlxMLWrapper::qt_metacast(char const *)
+ ?retrieveItemImage@GlxMLWrapper@@QAE?AVQImage@@HW4GlxTBContextType@@@Z @ 45 NONAME ; class QImage GlxMLWrapper::retrieveItemImage(int, enum GlxTBContextType)
+ ?setSelectedIndex@GlxMLWrapper@@QAEXH@Z @ 46 NONAME ; void GlxMLWrapper::setSelectedIndex(int)
+ ??0GlxMLWrapper@@QAE@HHW4TGlxFilterItemType@@VQString@@@Z @ 47 NONAME ; GlxMLWrapper::GlxMLWrapper(int, int, enum TGlxFilterItemType, class QString)
+ ?itemsAdded@GlxMLWrapper@@QAEXHH@Z @ 48 NONAME ; void GlxMLWrapper::itemsAdded(int, int)
+ ?retrieveItemIcon@GlxMLWrapper@@QAEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 49 NONAME ; class HbIcon * GlxMLWrapper::retrieveItemIcon(int, enum GlxTBContextType)
--- a/ui/uiengine/eabi/glxmedialistwrapperu.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/eabi/glxmedialistwrapperu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,42 +1,48 @@
EXPORTS
_ZN12GlxMLWrapper10itemsAddedEii @ 1 NONAME
_ZN12GlxMLWrapper10updateItemEi16GlxTBContextType @ 2 NONAME
- _ZN12GlxMLWrapper11insertItemsEii @ 3 NONAME
- _ZN12GlxMLWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 4 NONAME
- _ZN12GlxMLWrapper11qt_metacastEPKc @ 5 NONAME
- _ZN12GlxMLWrapper11removeItemsEii @ 6 NONAME
- _ZN12GlxMLWrapper12getItemCountEv @ 7 NONAME
- _ZN12GlxMLWrapper12isSystemItemEi @ 8 NONAME
- _ZN12GlxMLWrapper12itemsRemovedEii @ 9 NONAME
- _ZN12GlxMLWrapper13itemCorruptedEi @ 10 NONAME
- _ZN12GlxMLWrapper13setFocusIndexEi @ 11 NONAME
- _ZN12GlxMLWrapper14RetrieveBitmapEi @ 12 NONAME
- _ZN12GlxMLWrapper14setContextModeE14GlxContextMode @ 13 NONAME
- _ZN12GlxMLWrapper15retrieveItemUriEi @ 14 NONAME
- _ZN12GlxMLWrapper16retrieveItemDateEi @ 15 NONAME
- _ZN12GlxMLWrapper16retrieveItemIconEi16GlxTBContextType @ 16 NONAME
- _ZN12GlxMLWrapper16setSelectedIndexEi @ 17 NONAME
- _ZN12GlxMLWrapper16staticMetaObjectE @ 18 NONAME DATA 16
- _ZN12GlxMLWrapper17handleIconCorruptEi @ 19 NONAME
- _ZN12GlxMLWrapper17retrieveItemImageEi16GlxTBContextType @ 20 NONAME
- _ZN12GlxMLWrapper17retrieveListTitleEi @ 21 NONAME
- _ZN12GlxMLWrapper18handleGeneralErrorEi @ 22 NONAME
- _ZN12GlxMLWrapper18handleReceivedIconEi16GlxTBContextType @ 23 NONAME
- _ZN12GlxMLWrapper19getStaticMetaObjectEv @ 24 NONAME
- _ZN12GlxMLWrapper20retrieveListSubTitleEi @ 25 NONAME
- _ZN12GlxMLWrapper21getVisibleWindowIndexEv @ 26 NONAME
- _ZN12GlxMLWrapper21retrieveItemDimensionEi @ 27 NONAME
- _ZN12GlxMLWrapper21retrieveListItemCountEi @ 28 NONAME
- _ZN12GlxMLWrapper21setVisibleWindowIndexEi @ 29 NONAME
- _ZN12GlxMLWrapper22retrieveItemFrameCountEi @ 30 NONAME
- _ZN12GlxMLWrapper23handleListItemAvailableEi @ 31 NONAME
- _ZN12GlxMLWrapperC1Eii18TGlxFilterItemType7QString @ 32 NONAME
- _ZN12GlxMLWrapperC2Eii18TGlxFilterItemType7QString @ 33 NONAME
- _ZN12GlxMLWrapperD0Ev @ 34 NONAME
- _ZN12GlxMLWrapperD1Ev @ 35 NONAME
- _ZN12GlxMLWrapperD2Ev @ 36 NONAME
- _ZNK12GlxMLWrapper10metaObjectEv @ 37 NONAME
- _ZNK12GlxMLWrapper13getFocusIndexEv @ 38 NONAME
- _ZTI12GlxMLWrapper @ 39 NONAME
- _ZTV12GlxMLWrapper @ 40 NONAME
+ _ZN12GlxMLWrapper11IsPopulatedEv @ 3 NONAME
+ _ZN12GlxMLWrapper11insertItemsEii @ 4 NONAME
+ _ZN12GlxMLWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 5 NONAME
+ _ZN12GlxMLWrapper11qt_metacastEPKc @ 6 NONAME
+ _ZN12GlxMLWrapper11removeItemsEii @ 7 NONAME
+ _ZN12GlxMLWrapper12getItemCountEv @ 8 NONAME
+ _ZN12GlxMLWrapper12isSystemItemEi @ 9 NONAME
+ _ZN12GlxMLWrapper12itemsRemovedEii @ 10 NONAME
+ _ZN12GlxMLWrapper13itemCorruptedEi @ 11 NONAME
+ _ZN12GlxMLWrapper13setFocusIndexEi @ 12 NONAME
+ _ZN12GlxMLWrapper14RetrieveBitmapEi @ 13 NONAME
+ _ZN12GlxMLWrapper14setContextModeE14GlxContextMode @ 14 NONAME
+ _ZN12GlxMLWrapper15handlepopulatedEv @ 15 NONAME
+ _ZN12GlxMLWrapper15retrieveItemUriEi @ 16 NONAME
+ _ZN12GlxMLWrapper16retrieveItemDateEi @ 17 NONAME
+ _ZN12GlxMLWrapper16retrieveItemIconEi16GlxTBContextType @ 18 NONAME
+ _ZN12GlxMLWrapper16setSelectedIndexEi @ 19 NONAME
+ _ZN12GlxMLWrapper16staticMetaObjectE @ 20 NONAME DATA 16
+ _ZN12GlxMLWrapper16updateAlbumTitleE7QString @ 21 NONAME
+ _ZN12GlxMLWrapper17handleIconCorruptEi @ 22 NONAME
+ _ZN12GlxMLWrapper17retrieveItemImageEi16GlxTBContextType @ 23 NONAME
+ _ZN12GlxMLWrapper17retrieveListTitleEi @ 24 NONAME
+ _ZN12GlxMLWrapper17retrieveViewTitleEv @ 25 NONAME
+ _ZN12GlxMLWrapper18handleGeneralErrorEi @ 26 NONAME
+ _ZN12GlxMLWrapper18handleReceivedIconEi16GlxTBContextType @ 27 NONAME
+ _ZN12GlxMLWrapper19getStaticMetaObjectEv @ 28 NONAME
+ _ZN12GlxMLWrapper20handleTitleAvailableE7QString @ 29 NONAME
+ _ZN12GlxMLWrapper20retrieveListSubTitleEi @ 30 NONAME
+ _ZN12GlxMLWrapper21getVisibleWindowIndexEv @ 31 NONAME
+ _ZN12GlxMLWrapper21retrieveItemDimensionEi @ 32 NONAME
+ _ZN12GlxMLWrapper21retrieveListItemCountEi @ 33 NONAME
+ _ZN12GlxMLWrapper21setVisibleWindowIndexEi @ 34 NONAME
+ _ZN12GlxMLWrapper22retrieveItemFrameCountEi @ 35 NONAME
+ _ZN12GlxMLWrapper23handleListItemAvailableEi @ 36 NONAME
+ _ZN12GlxMLWrapper9populatedEv @ 37 NONAME
+ _ZN12GlxMLWrapperC1Eii18TGlxFilterItemType7QString @ 38 NONAME
+ _ZN12GlxMLWrapperC2Eii18TGlxFilterItemType7QString @ 39 NONAME
+ _ZN12GlxMLWrapperD0Ev @ 40 NONAME
+ _ZN12GlxMLWrapperD1Ev @ 41 NONAME
+ _ZN12GlxMLWrapperD2Ev @ 42 NONAME
+ _ZNK12GlxMLWrapper10metaObjectEv @ 43 NONAME
+ _ZNK12GlxMLWrapper13getFocusIndexEv @ 44 NONAME
+ _ZTI12GlxMLWrapper @ 45 NONAME
+ _ZTV12GlxMLWrapper @ 46 NONAME
--- a/ui/uiengine/medialists/src/glxmedialist.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialists/src/glxmedialist.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -1494,8 +1494,8 @@
if (!iIsPopulated)
{
TListPopulatedNotificationStrategy strategy( *this );
+ iIsPopulated = ETrue; // Do this only once.
NotifyObservers( strategy );
- iIsPopulated = ETrue; // Do this only once.
}
}
--- a/ui/uiengine/medialistwrapper/inc/glxmlgenericobserver.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialistwrapper/inc/glxmlgenericobserver.h Wed Jun 23 17:18:45 2010 +0100
@@ -61,6 +61,7 @@
MGlxMediaList* aList );
void HandleMediaL( TInt aListIndex, MGlxMediaList* aList );
void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList );
+ void HandlePopulatedL(MGlxMediaList* aList);
private:
--- a/ui/uiengine/medialistwrapper/inc/glxmlwrapper.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialistwrapper/inc/glxmlwrapper.h Wed Jun 23 17:18:45 2010 +0100
@@ -89,7 +89,9 @@
QSize retrieveItemDimension(int index);
QDate retrieveItemDate(int index);
int retrieveItemFrameCount(int index);
-
+ QString retrieveViewTitle();
+ void handlepopulated();
+ bool IsPopulated();
/*
* retriveBitmap helps to retrive the bitmap
* @param1 index
@@ -105,12 +107,15 @@
* @param1 index
*/
bool isSystemItem( int aItemIndex );
+ void handleTitleAvailable(QString aTitle);
signals:
void updateItem(int index, GlxTBContextType tbContextType);
void insertItems(int startIndex,int endIndex);
void removeItems(int startIndex,int endIndex);
void itemCorrupted(int itemIndex);
+ void updateAlbumTitle(QString aTitle);
+ void populated();
private:
GlxMLWrapperPrivate* mMLWrapperPrivate;
--- a/ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h Wed Jun 23 17:18:45 2010 +0100
@@ -26,6 +26,9 @@
#include <qdatetime.h>
#include "glxmedialistiterator.h"
#include "glxmlwrapper.h"
+#include <QImage>
+#include "mglxtitlefetcherobserver.h"
+
//Forward Declarations
class MGlxMediaList;
class CGlxMLGenericObserver;
@@ -35,10 +38,10 @@
class CGlxDefaultAttributeContext;
class CGlxDefaultThumbnailContext;
class CGlxDefaultListAttributeContext;
-
+class CGlxTitleFetcher;
//to use first call GlxMLWrapperPrivate::Instance then set the mode by calling GlxMLWrapperPrivate::SetContextMode()
//CLASS Declaration
-class GlxMLWrapperPrivate : public QObject
+class GlxMLWrapperPrivate : public QObject,public MGlxTitleFetcherObserver
{
public:
@@ -83,6 +86,10 @@
*/
void SetVisibleWindowIndex(int aItemIndex);
+public:
+ // From MGlxTitleFetcherObserver
+ IMPORT_C void HandleTitleAvailableL(const TDesC& aTitle);
+
public:
void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList );
void HandleItemRemovedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList*/* aList */);
@@ -95,6 +102,7 @@
//todo remove comment void HandleCommandCompleteL( CMPXCommand* aCommandResult, TInt aError,MGlxMediaList* aList );
void HandleMediaL( TInt aListIndex, MGlxMediaList* aList );
void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList );
+ void HandlePopulatedL(MGlxMediaList* aList);
public:
/**
@@ -111,6 +119,8 @@
CFbsBitmap* RetrieveBitmap(int aItemIndex);
int RetrieveListItemCount( int aItemIndex );
bool isSystemItem( int aItemIndex );
+ QString RetrieveViewTitle();
+ bool IsPopulated();
private:
@@ -203,6 +213,9 @@
TBool iLsListContextActivated; //currently not used as we have not implemented the logic for 3 thumbnails
TBool iPtListContextActivated;
TBool iSelectionListContextActivated;
+ CGlxTitleFetcher* iTitleFetcher;
+ QImage iCorruptImage;
+ QString iViewTitle;
};
#endif //GLXMLWRAPPER_P_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/uiengine/medialistwrapper/inc/glxtitlefetcher.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Title fetcher
+*
+*/
+
+
+
+
+#ifndef GLXTITLEFETCHER_H
+#define GLXTITLEFETCHER_H
+
+#include <e32base.h>
+#include <coedef.h>
+#include <w32std.h>
+#include <mglxmedialistobserver.h>
+#include "mglxtitlefetcherobserver.h"
+
+
+class CMPXCollectionPath;
+class MGlxMediaList;
+class CGlxDefaultAttributeContext;
+
+
+class CGlxTitleFetcher : public CBase, public MGlxMediaListObserver
+ {
+public:
+ /**
+ * Constructs an instance of CGlxTitleFetcher and initiates obtaining
+ * a title
+ *
+ * @param aObserver Observer of this list
+ * @param aPath The current path by which to obtain the title
+ */
+ static CGlxTitleFetcher* NewL(MGlxTitleFetcherObserver& aObserver,
+ CMPXCollectionPath* aPath);
+
+ IMPORT_C virtual ~CGlxTitleFetcher();
+
+ // From MGlxMediaListObserver
+ virtual void HandleItemAddedL(TInt aStartIndex, TInt aEndIndex,
+ MGlxMediaList* aList);
+
+ /**
+ * Notification that media object is now available for an item
+ *
+ * @param Index of the item
+ */
+ virtual void HandleMediaL(TInt /*aListIndex*/, MGlxMediaList* /*aList*/) {};
+
+ /**
+ * Notification that media item was removed from the list
+ *
+ * @param aStartIndex First item that was removed
+ * @param aEndIndex Last item that was removed
+ */
+ virtual void HandleItemRemovedL(TInt /*aStartIndex*/, TInt /*aEndIndex*/,
+ MGlxMediaList* /*aList*/) {};
+
+ /**
+ * Notification that media item was changed
+ *
+ * @param aItemIndexes Indexes of items that were changed
+ */
+ virtual void HandleItemModifiedL(const RArray<TInt>& /*aItemIndexes*/,
+ MGlxMediaList* /*aList*/) {};
+
+
+ /**
+ * Notification that an attribute is available
+ *
+ * @param aItemIndex Index of the for which the thumbnail is available
+ * @param aAttributes Array of attributes that have become available
+ * @param aList List that this callback relates to
+ */
+ virtual void HandleAttributesAvailableL(TInt aItemIndex,
+ const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList);
+
+ /**
+ * Notification that focus has moved
+ *
+ * @param aType the direction of the focus change
+ * @param aNewIndex the new index after the focus change
+ * @param aOldIndex the old index before the focus change
+ * @param aList List that this callback relates to
+ */
+ virtual void HandleFocusChangedL(NGlxListDefs::TFocusChangeType /*aType*/,
+ TInt /*aNewIndex*/, TInt /*aOldIndex*/, MGlxMediaList* /*aList*/) {};
+
+ /**
+ * Notification that an item has been selected/deselected
+ *
+ * @param aIndex Index of the item that has been selected/deselected
+ * @param aSelected Boolean to indicate selection/deselection
+ * @param aList List that the selection relates to
+ */
+ virtual void HandleItemSelectedL(TInt /*aIndex*/, TBool /*aSelected*/,
+ MGlxMediaList* /*aList*/) {};
+
+ /**
+ * Notification from the collection. E.g. Items added/modified/deleted and progress notifications
+ *
+ * @param aMessage Message notification from the collection
+ * @param aList List that the notification relates to
+ */
+ virtual void HandleMessageL(const CMPXMessage& /*aMessage*/,
+ MGlxMediaList* /*aList*/) {};
+
+private:
+
+ CGlxTitleFetcher(MGlxTitleFetcherObserver& aObserver,
+ CMPXCollectionPath* aPath);
+
+ void ConstructL();
+
+private:
+
+ MGlxTitleFetcherObserver& iObserver;
+ CMPXCollectionPath* iPath;
+ TMPXItemId iPathId;
+ MGlxMediaList* iBackMediaList;
+ CGlxDefaultAttributeContext* iContext;
+ };
+
+
+#endif // GLXTITLEFETCHER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/uiengine/medialistwrapper/inc/mglxtitlefetcherobserver.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Title fetcher observer
+*
+*/
+
+
+
+
+#ifndef MGLXTITLEFETCHEROBSERVER_H
+#define MGLXTITLEFETCHEROBSERVER_H
+
+#include <e32base.h>
+//#include <coedef.h>
+//#include <w32std.h>
+
+/**
+ * MGlxTitleFetcherObserver
+ *
+ * Title fetcher interface
+ */
+class MGlxTitleFetcherObserver
+ {
+public:
+ /**
+ * Handle the title
+ * @param aTitle The title
+ */
+ virtual void HandleTitleAvailableL(const TDesC& aTitle) = 0;
+
+ };
+
+
+
+
+#endif // MGLXTITLEFETCHEROBSERVER_H
--- a/ui/uiengine/medialistwrapper/medialistwrapper.pro Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialistwrapper/medialistwrapper.pro Wed Jun 23 17:18:45 2010 +0100
@@ -44,10 +44,11 @@
TARGET.EPOCALLOWDLLDATA = 1
}
# Input
-HEADERS += inc/glxmlgenericobserver.h inc/glxmlwrapper.h inc/glxmlwrapper_p.h inc/glxattributeretriever.h
+HEADERS += inc/glxmlgenericobserver.h inc/glxmlwrapper.h inc/glxmlwrapper_p.h inc/glxattributeretriever.h inc/glxtitlefetcher.h
SOURCES += src/glxmlgenericobserver.cpp \
src/glxmlwrapper.cpp \
src/glxmlwrapper_p.cpp \
- src/glxattributeretriever.cpp
+ src/glxattributeretriever.cpp \
+ src/glxtitlefetcher.cpp
DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
\ No newline at end of file
--- a/ui/uiengine/medialistwrapper/src/glxmlgenericobserver.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialistwrapper/src/glxmlgenericobserver.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -206,3 +206,10 @@
iMLWrapperPrivate->HandleItemModifiedL(aItemIndexes, aList);
}
+void CGlxMLGenericObserver::HandlePopulatedL(MGlxMediaList* aList)
+ {
+ TRACER("CGlxMLGenericObserver::HandlePopulatedL()");
+ iMLWrapperPrivate->HandlePopulatedL(aList);
+ }
+
+
--- a/ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -119,6 +119,21 @@
return (mMLWrapperPrivate->RetrieveItemFrameCount(index));
}
+QString GlxMLWrapper::retrieveViewTitle()
+{
+ return (mMLWrapperPrivate->RetrieveViewTitle());
+}
+
+void GlxMLWrapper::handlepopulated()
+{
+ emit populated();
+}
+
+bool GlxMLWrapper::IsPopulated()
+{
+ return mMLWrapperPrivate->IsPopulated();
+}
+
QVariant GlxMLWrapper::RetrieveBitmap(int index)
{
QVariant var;
@@ -238,4 +253,12 @@
Q_UNUSED(aError);
}
+// ---------------------------------------------------------------------------
+// handleTitleAvailable.
+// ---------------------------------------------------------------------------
+//
+void GlxMLWrapper::handleTitleAvailable(QString aTitle)
+{
+ emit updateAlbumTitle(aTitle);
+}
--- a/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -46,7 +46,7 @@
//#define GLXPERFORMANCE_LOG
#include <glxperformancemacro.h>
-
+#include "glxtitlefetcher.h"
//constant declaration
const TInt KTBAttributeAvailable(1);
const TInt KTBAttributeUnavailable(0);
@@ -103,7 +103,9 @@
iFocusGridThumbnailContext = NULL;
iFocusFsThumbnailContext = NULL;
iFilmStripThumbnailContext = NULL;
- iFavouriteContext = NULL;
+ iFavouriteContext = NULL;
+ iTitleFetcher = NULL;
+ iViewTitle = QString();
}
// ---------------------------------------------------------------------------
@@ -318,7 +320,11 @@
iMediaList->AddContextL(iGridThumbnailContext, KGlxFetchContextPriorityNormal );
iGridContextActivated = ETrue;
}
-
+
+ CMPXCollectionPath* path = iMediaList->PathLC( NGlxListDefs::EPathParent );
+ iTitleFetcher = CGlxTitleFetcher::NewL(*this, path);
+ CleanupStack::PopAndDestroy(path);
+
}
// ---------------------------------------------------------------------------
@@ -428,6 +434,8 @@
iGridThumbnailContext = NULL;
iGridContextActivated = EFalse;
}
+ delete iTitleFetcher;
+ iTitleFetcher = NULL;
}
// ---------------------------------------------------------------------------
@@ -617,6 +625,8 @@
{
TRACER("GlxMLWrapperPrivate::CreateMediaListFavoritesItemL");
Q_UNUSED(aHierarchyId);
+ Q_UNUSED(aCollectionId);
+ Q_UNUSED(aFilterType);
// Create path to the list of images and videos
CMPXCollectionPath* path = CMPXCollectionPath::NewL();
CleanupStack::PushL( path );
@@ -749,7 +759,18 @@
}
else if( tnError )
{
- return QImage(GLXICON_CORRUPT);
+ if(iCorruptImage.isNull())
+ {
+ HbIcon *icon = new HbIcon(GLXICON_CORRUPT);
+ if(!icon->isNull())
+ {
+ // this image Creation is Slow.
+ // But what to do, Q class's Does not undersatnd our Localised File names
+ iCorruptImage = icon->pixmap().toImage();
+ }
+ delete icon;
+ }
+ return iCorruptImage;
}
return QImage();
@@ -870,9 +891,22 @@
{
GLX_LOG_INFO1("GlxMLWrapperPrivate::RetrieveBitmap %d",aItemIndex);
const TGlxMedia& item = iMediaList->Item( aItemIndex );
+ TInt height =KFullScreenTNPTWidth; // default as portrait
+ TInt width =KFullScreenTNPTHeight;
+ if (iPtFsContextActivated )
+ {
+ GLX_LOG_INFO("GlxMLWrapperPrivate::RetrieveBitmap - CGlxHdmi :PT");
+ width = KFullScreenTNPTWidth;
+ height = KFullScreenTNPTHeight;
+ }
+ else if (iLsFsContextActivated)
+ {
+ GLX_LOG_INFO("GlxMLWrapperPrivate::RetrieveBitmap - CGlxHdmi :LS");
+ width = KFullScreenTNLSWidth;
+ height = KFullScreenTNLSHeight;
+ }
TMPXAttribute fsTnAttrib= TMPXAttribute(KGlxMediaIdThumbnail,
- GlxFullThumbnailAttributeId(ETrue, KFullScreenTNPTWidth,
- KFullScreenTNPTHeight));
+ GlxFullThumbnailAttributeId(ETrue, width, height));
const CGlxThumbnailAttribute* fsTnValue = item.ThumbnailAttribute(
fsTnAttrib);
if (fsTnValue)
@@ -928,6 +962,18 @@
{
Q_UNUSED(aList);
iMLWrapper->itemsRemoved(aStartIndex,aEndIndex);
+ TInt mediaCount = aList->Count();
+ if (mediaCount <=0)
+ {
+ if(iMediaList->VisibleWindowIndex() > iMediaList->Count())
+ {
+ iMediaList->SetVisibleWindowIndexL(0);
+ }
+ }
+ else if (iMediaList->VisibleWindowIndex() > iMediaList->Count())
+ {
+ iMediaList->SetVisibleWindowIndexL(iMediaList->Count()-1);
+ }
}
// ---------------------------------------------------------------------------
// HandleAttributesAvailableL
@@ -1119,6 +1165,7 @@
//
void GlxMLWrapperPrivate::HandleError( TInt aError )
{
+ Q_UNUSED(aError);
GLX_LOG_INFO1("GlxMLWrapperPrivate::HandleError Error %d", aError);
for ( TInt i = 0; i < iMediaList->Count(); i++ )
@@ -1162,6 +1209,12 @@
Q_UNUSED(aList);
}
+void GlxMLWrapperPrivate::HandlePopulatedL(MGlxMediaList* aList)
+{
+ Q_UNUSED(aList);
+ iMLWrapper->handlepopulated();
+}
+
// ---------------------------------------------------------------------------
// GetItemCount
// ---------------------------------------------------------------------------
@@ -1243,3 +1296,27 @@
{
iMediaList->SetVisibleWindowIndexL(aItemIndex);
}
+
+// -----------------------------------------------------------------------------
+// HandleTitleAvailableL
+// -----------------------------------------------------------------------------
+//
+void GlxMLWrapperPrivate::HandleTitleAvailableL(
+ const TDesC& aTitle)
+ {
+ iViewTitle = QString::fromUtf16(aTitle.Ptr(), aTitle.Length());
+ iMLWrapper->handleTitleAvailable(iViewTitle);
+ RDebug::Print(_L("GlxPhotos: GlxMLWrapperPrivate : TITLE =-%S"),&aTitle);
+ }
+
+QString GlxMLWrapperPrivate::RetrieveViewTitle()
+ {
+ return iViewTitle;
+ }
+
+bool GlxMLWrapperPrivate::IsPopulated()
+ {
+ return iMediaList->IsPopulated();
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/uiengine/medialistwrapper/src/glxtitlefetcher.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,205 @@
+/*
+* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Title fetcher
+*
+*/
+
+
+
+
+
+// INCLUDE FILES
+#include "glxtitlefetcher.h"
+
+#include <mpxcollectionpath.h>
+#include <mpxmediageneraldefs.h>
+#include <mglxmedialist.h>
+#include <glxattributecontext.h>
+#include <glxuistd.h>
+#include "glxlog.h"
+#include "glxtracer.h"
+
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CGlxTitleFetcher::CGlxTitleFetcher(MGlxTitleFetcherObserver& aObserver,
+ CMPXCollectionPath* aPath) :
+ iObserver(aObserver), iPath(aPath)
+ {
+ TRACER("CGlxTitleFetcher::CGlxTitleFetcher");
+ }
+
+// ---------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+
+void CGlxTitleFetcher::ConstructL()
+ {
+ TRACER("CGlxTitleFetcher::ConstructL");
+ // Go back one level to obtain the ID
+ iPathId = iPath->Id();
+ // Go back another level from which to create a media list containing
+ // this path
+ iPath->Back();
+
+ if( iPath->Levels() < 0 )
+ {
+ return;
+ }
+
+ iBackMediaList = MGlxMediaList::InstanceL(*iPath);
+
+ /// @todo: This idSpaceId must be calculated properly
+ TGlxIdSpaceId idSpaceId = iBackMediaList->IdSpaceId(0);
+
+ TGlxMediaId id(iPathId);
+ TBool requestAttributes = ETrue;
+ TInt index = iBackMediaList->Index(idSpaceId, id);
+
+ if ( index != KErrNotFound )
+ {
+ const TGlxMedia& item = iBackMediaList->Item(index);
+ const CGlxMedia* media = item.Properties();
+
+ // get the Title from the attribute if it is already present
+ if (media && media->IsSupported(KMPXMediaGeneralTitle)
+ && index != KErrNotFound)
+ {
+ const TDesC& title = media->ValueText(KMPXMediaGeneralTitle);
+ // notify the observer
+ iObserver.HandleTitleAvailableL(title);
+ requestAttributes = EFalse;
+ }
+ }
+
+ if ( requestAttributes )
+ {
+ // Otherwise add a context setting range to cover all items
+ iContext = CGlxDefaultAttributeContext::NewL();
+ iContext->SetRangeOffsets(10000,10000);
+ iContext->AddAttributeL(KMPXMediaGeneralTitle);
+ // Add the context at a high priority
+ iBackMediaList->AddContextL( iContext,
+ KGlxFetchContextPriorityTitleFetcher );
+ // Set self as observer
+ iBackMediaList->AddMediaListObserverL(this);
+ }
+ }
+
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CGlxTitleFetcher* CGlxTitleFetcher::NewL(MGlxTitleFetcherObserver& aObserver,
+ CMPXCollectionPath* aPath)
+ {
+ CGlxTitleFetcher* self = new (ELeave) CGlxTitleFetcher(aObserver, aPath);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CGlxTitleFetcher::~CGlxTitleFetcher()
+ {
+ TRACER("CGlxTitleFetcher::~CGlxTitleFetcher ()");
+
+ if(iBackMediaList)
+ {
+ if(iContext)
+ {
+ iBackMediaList->RemoveContext(iContext);
+ delete iContext;
+ }
+ iBackMediaList->RemoveMediaListObserver(this);
+ iBackMediaList->Close();
+ }
+
+ }
+// ---------------------------------------------------------------------------
+// CGlxTitleFetcher::HandleItemAddedL
+// ---------------------------------------------------------------------------
+//
+void CGlxTitleFetcher::HandleItemAddedL(TInt aStartIndex, TInt aEndIndex,
+ MGlxMediaList* aList)
+ {
+ TRACER("CGlxTitleFetcher::HandleItemAddedL ()");
+ if(aList == iBackMediaList)
+ {
+ for(TInt index = aStartIndex;index <= aEndIndex;index++)
+ // Is it the item (path) that we want
+ {
+ if(aList->Item(index).Id().Value() == (TUint32)iPathId)
+ {
+ const TGlxMedia& item = aList->Item(index);
+ const CGlxMedia* media = item.Properties();
+ // get the Title from the attribute
+ if (media && media->IsSupported(KMPXMediaGeneralTitle))
+ {
+ const TDesC& title = media->ValueText(KMPXMediaGeneralTitle);
+ // notify the observer
+ iObserver.HandleTitleAvailableL(title);
+ iBackMediaList->RemoveContext(iContext);
+ delete iContext;
+ iContext = NULL;
+ }
+ }
+ }
+ }
+ }
+// ---------------------------------------------------------------------------
+// CGlxTitleFetcher::HandleAttributesAvailableL
+// ---------------------------------------------------------------------------
+//
+void CGlxTitleFetcher::HandleAttributesAvailableL(TInt aItemIndex,
+ const RArray<TMPXAttribute>& /*aAttributes*/, MGlxMediaList* aList)
+ {
+ TRACER("CGlxTitleFetcher::HandleAttributesAvailableL ()");
+ // Is it the list that we want
+ if(aList == iBackMediaList)
+ {
+ // Is it the item (path) that we want
+ if(aList->Item(aItemIndex).Id().Value() == (TUint32)iPathId)
+ {
+ const TGlxMedia& item = aList->Item(aItemIndex);
+ const CGlxMedia* media = item.Properties();
+ // get the Title from the attribute
+ if (media && media->IsSupported(KMPXMediaGeneralTitle))
+ {
+ const TDesC& title = media->ValueText(KMPXMediaGeneralTitle);
+ // notify the observer
+ iObserver.HandleTitleAvailableL(title);
+ iBackMediaList->RemoveContext(iContext);
+ delete iContext;
+ iContext = NULL;
+
+ }
+ }
+ }
+ }
+
+
+
+// End of File
--- a/ui/uiengine/model/bwins/glxmediamodelu.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/model/bwins/glxmediamodelu.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,35 +1,39 @@
EXPORTS
- ?addExternalItems@GlxMediaModel@@QAEXPAV?$QList@UGlxInterfaceParams@@@@@Z @ 1 NONAME ; void GlxMediaModel::addExternalItems(class QList<struct GlxInterfaceParams> *)
- ?metaObject@GlxMediaModel@@UBEPBUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const * GlxMediaModel::metaObject(void) const
- ?parent@GlxMediaModel@@UBE?AVQModelIndex@@ABV2@@Z @ 3 NONAME ; class QModelIndex GlxMediaModel::parent(class QModelIndex const &) const
- ?itemsAdded@GlxMediaModel@@QAEXHH@Z @ 4 NONAME ; void GlxMediaModel::itemsAdded(int, int)
- ?tr@GlxMediaModel@@SA?AVQString@@PBD0@Z @ 5 NONAME ; class QString GlxMediaModel::tr(char const *, char const *)
- ?getStaticMetaObject@GlxMediaModel@@SAABUQMetaObject@@XZ @ 6 NONAME ; struct QMetaObject const & GlxMediaModel::getStaticMetaObject(void)
- ?updateItemIcon@GlxMediaModel@@AAEXHPAVHbIcon@@W4GlxTBContextType@@@Z @ 7 NONAME ; void GlxMediaModel::updateItemIcon(int, class HbIcon *, enum GlxTBContextType)
- ?qt_metacast@GlxMediaModel@@UAEPAXPBD@Z @ 8 NONAME ; void * GlxMediaModel::qt_metacast(char const *)
- ?itemsRemoved@GlxMediaModel@@QAEXHH@Z @ 9 NONAME ; void GlxMediaModel::itemsRemoved(int, int)
- ?rowCount@GlxMediaModel@@UBEHABVQModelIndex@@@Z @ 10 NONAME ; int GlxMediaModel::rowCount(class QModelIndex const &) const
- ??1GlxMediaModel@@UAE@XZ @ 11 NONAME ; GlxMediaModel::~GlxMediaModel(void)
- ?GetFsIconItem@GlxMediaModel@@ABEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 12 NONAME ; class HbIcon * GlxMediaModel::GetFsIconItem(int, enum GlxTBContextType) const
- ?columnCount@GlxMediaModel@@UBEHABVQModelIndex@@@Z @ 13 NONAME ; int GlxMediaModel::columnCount(class QModelIndex const &) const
- ?setSelectedIndex@GlxMediaModel@@AAEXABVQModelIndex@@@Z @ 14 NONAME ; void GlxMediaModel::setSelectedIndex(class QModelIndex const &)
- ?qt_metacall@GlxMediaModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 15 NONAME ; int GlxMediaModel::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?setFocusIndex@GlxMediaModel@@AAEXABVQModelIndex@@@Z @ 16 NONAME ; void GlxMediaModel::setFocusIndex(class QModelIndex const &)
- ?setContextMode@GlxMediaModel@@AAEXW4GlxContextMode@@@Z @ 17 NONAME ; void GlxMediaModel::setContextMode(enum GlxContextMode)
- ?trUtf8@GlxMediaModel@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString GlxMediaModel::trUtf8(char const *, char const *, int)
- ?staticMetaObject@GlxMediaModel@@2UQMetaObject@@B @ 19 NONAME ; struct QMetaObject const GlxMediaModel::staticMetaObject
- ?itemUpdated1@GlxMediaModel@@QAEXHW4GlxTBContextType@@@Z @ 20 NONAME ; void GlxMediaModel::itemUpdated1(int, enum GlxTBContextType)
- ?setData@GlxMediaModel@@UAE_NABVQModelIndex@@ABVQVariant@@H@Z @ 21 NONAME ; bool GlxMediaModel::setData(class QModelIndex const &, class QVariant const &, int)
- ?GetGridIconItem@GlxMediaModel@@ABEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 22 NONAME ; class HbIcon * GlxMediaModel::GetGridIconItem(int, enum GlxTBContextType) const
- ?data@GlxMediaModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 23 NONAME ; class QVariant GlxMediaModel::data(class QModelIndex const &, int) const
- ??_EGlxMediaModel@@UAE@I@Z @ 24 NONAME ; GlxMediaModel::~GlxMediaModel(unsigned int)
- ?clearExternalItems@GlxMediaModel@@QAEXXZ @ 25 NONAME ; void GlxMediaModel::clearExternalItems(void)
- ?getFocusIndex@GlxMediaModel@@ABE?AVQModelIndex@@XZ @ 26 NONAME ; class QModelIndex GlxMediaModel::getFocusIndex(void) const
- ?trUtf8@GlxMediaModel@@SA?AVQString@@PBD0@Z @ 27 NONAME ; class QString GlxMediaModel::trUtf8(char const *, char const *)
- ?iconAvailable@GlxMediaModel@@IBEXHPAVHbIcon@@W4GlxTBContextType@@@Z @ 28 NONAME ; void GlxMediaModel::iconAvailable(int, class HbIcon *, enum GlxTBContextType) const
- ??0GlxMediaModel@@QAE@AAVGlxModelParm@@@Z @ 29 NONAME ; GlxMediaModel::GlxMediaModel(class GlxModelParm &)
- ?tr@GlxMediaModel@@SA?AVQString@@PBD0H@Z @ 30 NONAME ; class QString GlxMediaModel::tr(char const *, char const *, int)
- ?index@GlxMediaModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 31 NONAME ; class QModelIndex GlxMediaModel::index(int, int, class QModelIndex const &) const
- ?GetExternalIconItem@GlxMediaModel@@ABEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 32 NONAME ; class HbIcon * GlxMediaModel::GetExternalIconItem(int, enum GlxTBContextType) const
- ?itemCorrupted@GlxMediaModel@@QAEXH@Z @ 33 NONAME ; void GlxMediaModel::itemCorrupted(int)
+ ?metaObject@GlxMediaModel@@UBEPBUQMetaObject@@XZ @ 1 NONAME ; struct QMetaObject const * GlxMediaModel::metaObject(void) const
+ ?itemsAdded@GlxMediaModel@@QAEXHH@Z @ 2 NONAME ; void GlxMediaModel::itemsAdded(int, int)
+ ?getStaticMetaObject@GlxMediaModel@@SAABUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const & GlxMediaModel::getStaticMetaObject(void)
+ ?updateItemIcon@GlxMediaModel@@AAEXHPAVHbIcon@@W4GlxTBContextType@@@Z @ 4 NONAME ; void GlxMediaModel::updateItemIcon(int, class HbIcon *, enum GlxTBContextType)
+ ?qt_metacast@GlxMediaModel@@UAEPAXPBD@Z @ 5 NONAME ; void * GlxMediaModel::qt_metacast(char const *)
+ ?rowCount@GlxMediaModel@@UBEHABVQModelIndex@@@Z @ 6 NONAME ; int GlxMediaModel::rowCount(class QModelIndex const &) const
+ ?setSelectedIndex@GlxMediaModel@@AAEXABVQModelIndex@@@Z @ 7 NONAME ; void GlxMediaModel::setSelectedIndex(class QModelIndex const &)
+ ?setFocusIndex@GlxMediaModel@@AAEXABVQModelIndex@@@Z @ 8 NONAME ; void GlxMediaModel::setFocusIndex(class QModelIndex const &)
+ ?setContextMode@GlxMediaModel@@AAEXW4GlxContextMode@@@Z @ 9 NONAME ; void GlxMediaModel::setContextMode(enum GlxContextMode)
+ ?trUtf8@GlxMediaModel@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString GlxMediaModel::trUtf8(char const *, char const *, int)
+ ?staticMetaObject@GlxMediaModel@@2UQMetaObject@@B @ 11 NONAME ; struct QMetaObject const GlxMediaModel::staticMetaObject
+ ?GetGridIconItem@GlxMediaModel@@ABEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 12 NONAME ; class HbIcon * GlxMediaModel::GetGridIconItem(int, enum GlxTBContextType) const
+ ??_EGlxMediaModel@@UAE@I@Z @ 13 NONAME ; GlxMediaModel::~GlxMediaModel(unsigned int)
+ ?getFocusIndex@GlxMediaModel@@ABE?AVQModelIndex@@XZ @ 14 NONAME ; class QModelIndex GlxMediaModel::getFocusIndex(void) const
+ ?tr@GlxMediaModel@@SA?AVQString@@PBD0H@Z @ 15 NONAME ; class QString GlxMediaModel::tr(char const *, char const *, int)
+ ?itemCorrupted@GlxMediaModel@@QAEXH@Z @ 16 NONAME ; void GlxMediaModel::itemCorrupted(int)
+ ?addExternalItems@GlxMediaModel@@QAEXPAV?$QList@UGlxInterfaceParams@@@@@Z @ 17 NONAME ; void GlxMediaModel::addExternalItems(class QList<struct GlxInterfaceParams> *)
+ ?modelpopulated@GlxMediaModel@@QAEXXZ @ 18 NONAME ; void GlxMediaModel::modelpopulated(void)
+ ?parent@GlxMediaModel@@UBE?AVQModelIndex@@ABV2@@Z @ 19 NONAME ; class QModelIndex GlxMediaModel::parent(class QModelIndex const &) const
+ ?tr@GlxMediaModel@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString GlxMediaModel::tr(char const *, char const *)
+ ?itemsRemoved@GlxMediaModel@@QAEXHH@Z @ 21 NONAME ; void GlxMediaModel::itemsRemoved(int, int)
+ ?columnCount@GlxMediaModel@@UBEHABVQModelIndex@@@Z @ 22 NONAME ; int GlxMediaModel::columnCount(class QModelIndex const &) const
+ ?GetFsIconItem@GlxMediaModel@@ABEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 23 NONAME ; class HbIcon * GlxMediaModel::GetFsIconItem(int, enum GlxTBContextType) const
+ ??1GlxMediaModel@@UAE@XZ @ 24 NONAME ; GlxMediaModel::~GlxMediaModel(void)
+ ?qt_metacall@GlxMediaModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 25 NONAME ; int GlxMediaModel::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?albumTitleUpdated@GlxMediaModel@@QAEXVQString@@@Z @ 26 NONAME ; void GlxMediaModel::albumTitleUpdated(class QString)
+ ?itemUpdated1@GlxMediaModel@@QAEXHW4GlxTBContextType@@@Z @ 27 NONAME ; void GlxMediaModel::itemUpdated1(int, enum GlxTBContextType)
+ ?setData@GlxMediaModel@@UAE_NABVQModelIndex@@ABVQVariant@@H@Z @ 28 NONAME ; bool GlxMediaModel::setData(class QModelIndex const &, class QVariant const &, int)
+ ?data@GlxMediaModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 29 NONAME ; class QVariant GlxMediaModel::data(class QModelIndex const &, int) const
+ ?clearExternalItems@GlxMediaModel@@QAEXXZ @ 30 NONAME ; void GlxMediaModel::clearExternalItems(void)
+ ?trUtf8@GlxMediaModel@@SA?AVQString@@PBD0@Z @ 31 NONAME ; class QString GlxMediaModel::trUtf8(char const *, char const *)
+ ?iconAvailable@GlxMediaModel@@IBEXHPAVHbIcon@@W4GlxTBContextType@@@Z @ 32 NONAME ; void GlxMediaModel::iconAvailable(int, class HbIcon *, enum GlxTBContextType) const
+ ?populated@GlxMediaModel@@IAEXXZ @ 33 NONAME ; void GlxMediaModel::populated(void)
+ ??0GlxMediaModel@@QAE@AAVGlxModelParm@@@Z @ 34 NONAME ; GlxMediaModel::GlxMediaModel(class GlxModelParm &)
+ ?index@GlxMediaModel@@UBE?AVQModelIndex@@HHABV2@@Z @ 35 NONAME ; class QModelIndex GlxMediaModel::index(int, int, class QModelIndex const &) const
+ ?GetExternalIconItem@GlxMediaModel@@ABEPAVHbIcon@@HW4GlxTBContextType@@@Z @ 36 NONAME ; class HbIcon * GlxMediaModel::GetExternalIconItem(int, enum GlxTBContextType) const
+ ?albumTitleAvailable@GlxMediaModel@@IAEXVQString@@@Z @ 37 NONAME ; void GlxMediaModel::albumTitleAvailable(class QString)
--- a/ui/uiengine/model/eabi/glxmediamodelu.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/model/eabi/glxmediamodelu.def Wed Jun 23 17:18:45 2010 +0100
@@ -4,32 +4,36 @@
_ZN13GlxMediaModel11qt_metacastEPKc @ 3 NONAME
_ZN13GlxMediaModel12itemUpdated1Ei16GlxTBContextType @ 4 NONAME
_ZN13GlxMediaModel12itemsRemovedEii @ 5 NONAME
- _ZN13GlxMediaModel13setFocusIndexERK11QModelIndex @ 6 NONAME
- _ZN13GlxMediaModel14setContextModeE14GlxContextMode @ 7 NONAME
- _ZN13GlxMediaModel14updateItemIconEiP6HbIcon16GlxTBContextType @ 8 NONAME
- _ZN13GlxMediaModel16addExternalItemsEP5QListI18GlxInterfaceParamsE @ 9 NONAME
- _ZN13GlxMediaModel16setSelectedIndexERK11QModelIndex @ 10 NONAME
- _ZN13GlxMediaModel16staticMetaObjectE @ 11 NONAME DATA 16
- _ZN13GlxMediaModel18clearExternalItemsEv @ 12 NONAME
- _ZN13GlxMediaModel19getStaticMetaObjectEv @ 13 NONAME
- _ZN13GlxMediaModel7setDataERK11QModelIndexRK8QVarianti @ 14 NONAME
- _ZN13GlxMediaModelC1ER12GlxModelParm @ 15 NONAME
- _ZN13GlxMediaModelC2ER12GlxModelParm @ 16 NONAME
- _ZN13GlxMediaModelD0Ev @ 17 NONAME
- _ZN13GlxMediaModelD1Ev @ 18 NONAME
- _ZN13GlxMediaModelD2Ev @ 19 NONAME
- _ZNK13GlxMediaModel10metaObjectEv @ 20 NONAME
- _ZNK13GlxMediaModel11columnCountERK11QModelIndex @ 21 NONAME
- _ZNK13GlxMediaModel13GetFsIconItemEi16GlxTBContextType @ 22 NONAME
- _ZNK13GlxMediaModel13getFocusIndexEv @ 23 NONAME
- _ZNK13GlxMediaModel13iconAvailableEiP6HbIcon16GlxTBContextType @ 24 NONAME
- _ZNK13GlxMediaModel15GetGridIconItemEi16GlxTBContextType @ 25 NONAME
- _ZNK13GlxMediaModel19GetExternalIconItemEi16GlxTBContextType @ 26 NONAME
- _ZNK13GlxMediaModel4dataERK11QModelIndexi @ 27 NONAME
- _ZNK13GlxMediaModel5indexEiiRK11QModelIndex @ 28 NONAME
- _ZNK13GlxMediaModel6parentERK11QModelIndex @ 29 NONAME
- _ZNK13GlxMediaModel8rowCountERK11QModelIndex @ 30 NONAME
- _ZTI13GlxMediaModel @ 31 NONAME
- _ZTV13GlxMediaModel @ 32 NONAME
- _ZN13GlxMediaModel13itemCorruptedEi @ 33 NONAME
+ _ZN13GlxMediaModel13itemCorruptedEi @ 6 NONAME
+ _ZN13GlxMediaModel13setFocusIndexERK11QModelIndex @ 7 NONAME
+ _ZN13GlxMediaModel14modelpopulatedEv @ 8 NONAME
+ _ZN13GlxMediaModel14setContextModeE14GlxContextMode @ 9 NONAME
+ _ZN13GlxMediaModel14updateItemIconEiP6HbIcon16GlxTBContextType @ 10 NONAME
+ _ZN13GlxMediaModel16addExternalItemsEP5QListI18GlxInterfaceParamsE @ 11 NONAME
+ _ZN13GlxMediaModel16setSelectedIndexERK11QModelIndex @ 12 NONAME
+ _ZN13GlxMediaModel16staticMetaObjectE @ 13 NONAME DATA 16
+ _ZN13GlxMediaModel17albumTitleUpdatedE7QString @ 14 NONAME
+ _ZN13GlxMediaModel18clearExternalItemsEv @ 15 NONAME
+ _ZN13GlxMediaModel19albumTitleAvailableE7QString @ 16 NONAME
+ _ZN13GlxMediaModel19getStaticMetaObjectEv @ 17 NONAME
+ _ZN13GlxMediaModel7setDataERK11QModelIndexRK8QVarianti @ 18 NONAME
+ _ZN13GlxMediaModel9populatedEv @ 19 NONAME
+ _ZN13GlxMediaModelC1ER12GlxModelParm @ 20 NONAME
+ _ZN13GlxMediaModelC2ER12GlxModelParm @ 21 NONAME
+ _ZN13GlxMediaModelD0Ev @ 22 NONAME
+ _ZN13GlxMediaModelD1Ev @ 23 NONAME
+ _ZN13GlxMediaModelD2Ev @ 24 NONAME
+ _ZNK13GlxMediaModel10metaObjectEv @ 25 NONAME
+ _ZNK13GlxMediaModel11columnCountERK11QModelIndex @ 26 NONAME
+ _ZNK13GlxMediaModel13GetFsIconItemEi16GlxTBContextType @ 27 NONAME
+ _ZNK13GlxMediaModel13getFocusIndexEv @ 28 NONAME
+ _ZNK13GlxMediaModel13iconAvailableEiP6HbIcon16GlxTBContextType @ 29 NONAME
+ _ZNK13GlxMediaModel15GetGridIconItemEi16GlxTBContextType @ 30 NONAME
+ _ZNK13GlxMediaModel19GetExternalIconItemEi16GlxTBContextType @ 31 NONAME
+ _ZNK13GlxMediaModel4dataERK11QModelIndexi @ 32 NONAME
+ _ZNK13GlxMediaModel5indexEiiRK11QModelIndex @ 33 NONAME
+ _ZNK13GlxMediaModel6parentERK11QModelIndex @ 34 NONAME
+ _ZNK13GlxMediaModel8rowCountERK11QModelIndex @ 35 NONAME
+ _ZTI13GlxMediaModel @ 36 NONAME
+ _ZTV13GlxMediaModel @ 37 NONAME
--- a/ui/uiengine/model/mediamodel/inc/glxmediamodel.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/model/mediamodel/inc/glxmediamodel.h Wed Jun 23 17:18:45 2010 +0100
@@ -64,6 +64,10 @@
* for checking if the item is editab
*/
+signals :
+ void albumTitleAvailable(QString aTitle);
+ void populated();
+
private:
HbIcon* GetGridIconItem(int itemIndex, GlxTBContextType tbContextType) const;
HbIcon* GetFsIconItem(int itemIndex,GlxTBContextType tbContextType)const;
@@ -85,6 +89,8 @@
void itemsAdded(int startIndex, int endIndex);
void itemsRemoved(int startIndex, int endIndex);
void itemCorrupted(int itemIndex);
+ void albumTitleUpdated(QString aTitle);
+ void modelpopulated();
protected:
private slots:
--- a/ui/uiengine/model/mediamodel/src/glxmediamodel.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/uiengine/model/mediamodel/src/glxmediamodel.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -52,6 +52,9 @@
qDebug("updateItem() connection status %d", err);
err = connect(this, SIGNAL(iconAvailable(int, HbIcon*, GlxTBContextType)), this, SLOT(updateItemIcon(int, HbIcon*, GlxTBContextType)));
qDebug("iconAvailable() connection status %d", err);
+ err = connect( mMLWrapper, SIGNAL(updateAlbumTitle(QString)), this, SLOT(albumTitleUpdated(QString)));
+ qDebug("updateAlbumTitle() connection status %d", err);
+ err = connect(mMLWrapper, SIGNAL(populated()), this, SLOT(modelpopulated()));
//itemadded.resize(mMLWrapper->getItemCount());
itemIconCache.setMaxCost(20); //Changed While Doing Media Wall
@@ -80,11 +83,13 @@
clearExternalItems();
err1 = HAL::Get( HALData::EMemoryRAMFree, freeMemory );
qDebug("####mediaModel : Memory available after cache cleanup = %d and error is = %d ", freeMemory , err1 );
- int err = disconnect(mMLWrapper, SIGNAL(updateIcon(int, HbIcon*)), this, SLOT(itemUpdated1(int, HbIcon*)));
+ int err = disconnect(mMLWrapper, SIGNAL(updateItem(int, GlxTBContextType)), this, SLOT(itemUpdated1(int, GlxTBContextType)));
err = disconnect(mMLWrapper, SIGNAL(itemCorrupted(int)), this, SLOT(itemCorrupted(int)));
err = disconnect(mMLWrapper, SIGNAL(insertItems(int, int)), this, SLOT(itemsAdded(int, int)));
err = disconnect(mMLWrapper, SIGNAL(removeItems(int, int)), this, SLOT(itemsRemoved(int, int)));
err = disconnect(this, SIGNAL(iconAvailable(int, HbIcon*, GlxTBContextType)), this, SLOT(updateItemIcon(int, HbIcon*, GlxTBContextType)));
+ err = disconnect(mMLWrapper, SIGNAL(updateAlbumTitle(QString)), this, SLOT(albumTitleUpdated(QString)));
+ err = disconnect(mMLWrapper, SIGNAL(populated()), this, SLOT(modelpopulated()));
delete mMLWrapper;
}
@@ -157,6 +162,15 @@
//todo refactor this whole function ... too many return statements are not good
QVariant GlxMediaModel::data(const QModelIndex &index, int role) const
{
+ if (role == GlxViewTitle)
+ {
+ return mMLWrapper->retrieveViewTitle();
+ }
+
+ if(role == GlxPopulated) {
+ return mMLWrapper->IsPopulated();
+ }
+
if ( role == GlxSubStateRole ) {
return mSubState;
}
@@ -170,8 +184,16 @@
}
if ( role == GlxDefaultImage ) {
+ if(!m_DefaultIcon->isNull()) {
+ // this image Creation is Slow.
+ // But what to do, Q class's Does not undersatnd our Localised File names
return m_DefaultIcon->pixmap().toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);
}
+ else {
+ return QImage();
+ }
+
+ }
HbIcon* itemIcon = NULL;
QImage itemImage;
@@ -359,6 +381,11 @@
emit dataChanged(index(itemIndex+externalDataCount,0),index(itemIndex+externalDataCount,0));
}
+void GlxMediaModel::modelpopulated()
+{
+ emit populated();
+}
+
void GlxMediaModel::itemsAdded(int startIndex, int endIndex)
{
qDebug("GlxMediaModel::itemsAdded %d %d", startIndex, endIndex);
@@ -401,6 +428,10 @@
}
}
+void GlxMediaModel::albumTitleUpdated(QString aTitle)
+{
+ emit albumTitleAvailable(aTitle);
+}
void GlxMediaModel::setFocusIndex(const QModelIndex &index)
{
--- a/ui/viewmanagement/bwins/glxstatehandleru.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/bwins/glxstatehandleru.def Wed Jun 23 17:18:45 2010 +0100
@@ -3,33 +3,35 @@
?actionTriggered@GlxStateManager@@QAEXH@Z @ 2 NONAME ; void GlxStateManager::actionTriggered(int)
?setupItemsSignal@GlxStateManager@@IAEXXZ @ 3 NONAME ; void GlxStateManager::setupItemsSignal(void)
??_EGlxStateManager@@UAE@I@Z @ 4 NONAME ; GlxStateManager::~GlxStateManager(unsigned int)
- ?goBack@GlxStateManager@@QAEXHH@Z @ 5 NONAME ; void GlxStateManager::goBack(int, int)
- ?enterMarkingMode@GlxStateManager@@QAEXXZ @ 6 NONAME ; void GlxStateManager::enterMarkingMode(void)
- ??1GlxStateManager@@UAE@XZ @ 7 NONAME ; GlxStateManager::~GlxStateManager(void)
- ?getStaticMetaObject@GlxStateManager@@SAABUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const & GlxStateManager::getStaticMetaObject(void)
- ?trUtf8@GlxStateManager@@SA?AVQString@@PBD0H@Z @ 9 NONAME ; class QString GlxStateManager::trUtf8(char const *, char const *, int)
- ?eventHandler@GlxStateManager@@AAEXAAH@Z @ 10 NONAME ; void GlxStateManager::eventHandler(int &)
- ?executeCommand@GlxStateManager@@QAE_NH@Z @ 11 NONAME ; bool GlxStateManager::executeCommand(int)
- ?setupItems@GlxStateManager@@QAEXXZ @ 12 NONAME ; void GlxStateManager::setupItems(void)
- ?previousState@GlxStateManager@@QAEXXZ @ 13 NONAME ; void GlxStateManager::previousState(void)
- ?createState@GlxStateManager@@AAEPAVGlxState@@H@Z @ 14 NONAME ; class GlxState * GlxStateManager::createState(int)
- ?exitApplication@GlxStateManager@@AAEXXZ @ 15 NONAME ; void GlxStateManager::exitApplication(void)
- ?changeState@GlxStateManager@@QAEXHH@Z @ 16 NONAME ; void GlxStateManager::changeState(int, int)
- ?qt_metacall@GlxStateManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 17 NONAME ; int GlxStateManager::qt_metacall(enum QMetaObject::Call, int, void * *)
- ??0GlxStateManager@@QAE@XZ @ 18 NONAME ; GlxStateManager::GlxStateManager(void)
- ?cleanupExternal@GlxStateManager@@QAEXXZ @ 19 NONAME ; void GlxStateManager::cleanupExternal(void)
- ?trUtf8@GlxStateManager@@SA?AVQString@@PBD0@Z @ 20 NONAME ; class QString GlxStateManager::trUtf8(char const *, char const *)
- ?qt_metacast@GlxStateManager@@UAEPAXPBD@Z @ 21 NONAME ; void * GlxStateManager::qt_metacast(char const *)
- ?staticMetaObject@GlxStateManager@@2UQMetaObject@@B @ 22 NONAME ; struct QMetaObject const GlxStateManager::staticMetaObject
- ?tr@GlxStateManager@@SA?AVQString@@PBD0H@Z @ 23 NONAME ; class QString GlxStateManager::tr(char const *, char const *, int)
- ?tr@GlxStateManager@@SA?AVQString@@PBD0@Z @ 24 NONAME ; class QString GlxStateManager::tr(char const *, char const *)
- ?nextState@GlxStateManager@@QAEXHH@Z @ 25 NONAME ; void GlxStateManager::nextState(int, int)
- ?launchFromExternal@GlxStateManager@@QAEXXZ @ 26 NONAME ; void GlxStateManager::launchFromExternal(void)
- ?externalCommand@GlxStateManager@@IAEXH@Z @ 27 NONAME ; void GlxStateManager::externalCommand(int)
- ?createGridModel@GlxStateManager@@AAEXHW4NavigationDir@@@Z @ 28 NONAME ; void GlxStateManager::createGridModel(int, enum NavigationDir)
- ?launchApplication@GlxStateManager@@QAEXXZ @ 29 NONAME ; void GlxStateManager::launchApplication(void)
- ?exitMarkingMode@GlxStateManager@@QAEXXZ @ 30 NONAME ; void GlxStateManager::exitMarkingMode(void)
- ?removeCurrentModel@GlxStateManager@@QAEXXZ @ 31 NONAME ; void GlxStateManager::removeCurrentModel(void)
- ?createModel@GlxStateManager@@AAEXHW4NavigationDir@@@Z @ 32 NONAME ; void GlxStateManager::createModel(int, enum NavigationDir)
- ?setFullScreenContext@GlxStateManager@@AAEXXZ @ 33 NONAME ; void GlxStateManager::setFullScreenContext(void)
+ ?updateTNProgress@GlxStateManager@@QAEXH@Z @ 5 NONAME ; void GlxStateManager::updateTNProgress(int)
+ ?goBack@GlxStateManager@@QAEXHH@Z @ 6 NONAME ; void GlxStateManager::goBack(int, int)
+ ?enterMarkingMode@GlxStateManager@@QAEXXZ @ 7 NONAME ; void GlxStateManager::enterMarkingMode(void)
+ ??1GlxStateManager@@UAE@XZ @ 8 NONAME ; GlxStateManager::~GlxStateManager(void)
+ ?getStaticMetaObject@GlxStateManager@@SAABUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const & GlxStateManager::getStaticMetaObject(void)
+ ?trUtf8@GlxStateManager@@SA?AVQString@@PBD0H@Z @ 10 NONAME ; class QString GlxStateManager::trUtf8(char const *, char const *, int)
+ ?eventHandler@GlxStateManager@@AAEXAAH@Z @ 11 NONAME ; void GlxStateManager::eventHandler(int &)
+ ?executeCommand@GlxStateManager@@QAE_NH@Z @ 12 NONAME ; bool GlxStateManager::executeCommand(int)
+ ?setupItems@GlxStateManager@@QAEXXZ @ 13 NONAME ; void GlxStateManager::setupItems(void)
+ ?previousState@GlxStateManager@@QAEXXZ @ 14 NONAME ; void GlxStateManager::previousState(void)
+ ?createState@GlxStateManager@@AAEPAVGlxState@@H@Z @ 15 NONAME ; class GlxState * GlxStateManager::createState(int)
+ ?exitApplication@GlxStateManager@@AAEXXZ @ 16 NONAME ; void GlxStateManager::exitApplication(void)
+ ?changeState@GlxStateManager@@QAEXHH@Z @ 17 NONAME ; void GlxStateManager::changeState(int, int)
+ ?qt_metacall@GlxStateManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 18 NONAME ; int GlxStateManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0GlxStateManager@@QAE@XZ @ 19 NONAME ; GlxStateManager::GlxStateManager(void)
+ ?cleanupExternal@GlxStateManager@@QAEXXZ @ 20 NONAME ; void GlxStateManager::cleanupExternal(void)
+ ?setFullScreenContext@GlxStateManager@@AAEXXZ @ 21 NONAME ; void GlxStateManager::setFullScreenContext(void)
+ ?cleanAllModel@GlxStateManager@@QAEXXZ @ 22 NONAME ; void GlxStateManager::cleanAllModel(void)
+ ?trUtf8@GlxStateManager@@SA?AVQString@@PBD0@Z @ 23 NONAME ; class QString GlxStateManager::trUtf8(char const *, char const *)
+ ?qt_metacast@GlxStateManager@@UAEPAXPBD@Z @ 24 NONAME ; void * GlxStateManager::qt_metacast(char const *)
+ ?staticMetaObject@GlxStateManager@@2UQMetaObject@@B @ 25 NONAME ; struct QMetaObject const GlxStateManager::staticMetaObject
+ ?tr@GlxStateManager@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString GlxStateManager::tr(char const *, char const *, int)
+ ?tr@GlxStateManager@@SA?AVQString@@PBD0@Z @ 27 NONAME ; class QString GlxStateManager::tr(char const *, char const *)
+ ?nextState@GlxStateManager@@QAEXHH@Z @ 28 NONAME ; void GlxStateManager::nextState(int, int)
+ ?launchFromExternal@GlxStateManager@@QAEXXZ @ 29 NONAME ; void GlxStateManager::launchFromExternal(void)
+ ?externalCommand@GlxStateManager@@IAEXH@Z @ 30 NONAME ; void GlxStateManager::externalCommand(int)
+ ?createGridModel@GlxStateManager@@AAEXHW4NavigationDir@@@Z @ 31 NONAME ; void GlxStateManager::createGridModel(int, enum NavigationDir)
+ ?launchApplication@GlxStateManager@@QAEXXZ @ 32 NONAME ; void GlxStateManager::launchApplication(void)
+ ?exitMarkingMode@GlxStateManager@@QAEXXZ @ 33 NONAME ; void GlxStateManager::exitMarkingMode(void)
+ ?removeCurrentModel@GlxStateManager@@QAEXXZ @ 34 NONAME ; void GlxStateManager::removeCurrentModel(void)
+ ?createModel@GlxStateManager@@AAEXHW4NavigationDir@@@Z @ 35 NONAME ; void GlxStateManager::createModel(int, enum NavigationDir)
--- a/ui/viewmanagement/bwins/glxviewmanageru.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/bwins/glxviewmanageru.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,47 +1,50 @@
EXPORTS
- ?updateToolBarIcon@GlxViewManager@@QAEXH@Z @ 1 NONAME ; void GlxViewManager::updateToolBarIcon(int)
- ?tr@GlxViewManager@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString GlxViewManager::tr(char const *, char const *)
- ?getStaticMetaObject@GlxViewManager@@SAABUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const & GlxViewManager::getStaticMetaObject(void)
- ?effectFinished@GlxViewManager@@QAEXXZ @ 4 NONAME ; void GlxViewManager::effectFinished(void)
- ?qt_metacast@GlxViewManager@@UAEPAXPBD@Z @ 5 NONAME ; void * GlxViewManager::qt_metacast(char const *)
- ??_EGlxViewManager@@UAE@I@Z @ 6 NONAME ; GlxViewManager::~GlxViewManager(unsigned int)
- ?addBackSoftKeyAction@GlxViewManager@@QAEXXZ @ 7 NONAME ; void GlxViewManager::addBackSoftKeyAction(void)
- ?findView@GlxViewManager@@AAEPAVGlxView@@H@Z @ 8 NONAME ; class GlxView * GlxViewManager::findView(int)
- ?createActions@GlxViewManager@@AAEXXZ @ 9 NONAME ; void GlxViewManager::createActions(void)
- ?staticMetaObject@GlxViewManager@@2UQMetaObject@@B @ 10 NONAME ; struct QMetaObject const GlxViewManager::staticMetaObject
- ?handleAction@GlxViewManager@@QAEXXZ @ 11 NONAME ; void GlxViewManager::handleAction(void)
- ?handleUserAction@GlxViewManager@@QAEXHH@Z @ 12 NONAME ; void GlxViewManager::handleUserAction(int, int)
- ?metaObject@GlxViewManager@@UBEPBUQMetaObject@@XZ @ 13 NONAME ; struct QMetaObject const * GlxViewManager::metaObject(void) const
- ?actionTriggered@GlxViewManager@@IAEXH@Z @ 14 NONAME ; void GlxViewManager::actionTriggered(int)
- ?launchView@GlxViewManager@@QAEXHPAVQAbstractItemModel@@W4GlxEffect@@W4GlxViewEffect@@@Z @ 15 NONAME ; void GlxViewManager::launchView(int, class QAbstractItemModel *, enum GlxEffect, enum GlxViewEffect)
- ?handleMenuAction@GlxViewManager@@QAEXH@Z @ 16 NONAME ; void GlxViewManager::handleMenuAction(int)
- ?externalCommand@GlxViewManager@@IAEXH@Z @ 17 NONAME ; void GlxViewManager::externalCommand(int)
- ??0GlxViewManager@@QAE@XZ @ 18 NONAME ; GlxViewManager::GlxViewManager(void)
- ?exitMarkingMode@GlxViewManager@@QAEXH@Z @ 19 NONAME ; void GlxViewManager::exitMarkingMode(int)
- ?cancelTimer@GlxViewManager@@QAEXXZ @ 20 NONAME ; void GlxViewManager::cancelTimer(void)
- ?createToolBar@GlxViewManager@@AAEXXZ @ 21 NONAME ; void GlxViewManager::createToolBar(void)
- ?removeConnection@GlxViewManager@@AAEXXZ @ 22 NONAME ; void GlxViewManager::removeConnection(void)
- ?launchView@GlxViewManager@@QAEXHPAVQAbstractItemModel@@@Z @ 23 NONAME ; void GlxViewManager::launchView(int, class QAbstractItemModel *)
- ?createMarkingModeActions@GlxViewManager@@AAEXXZ @ 24 NONAME ; void GlxViewManager::createMarkingModeActions(void)
- ?qt_metacall@GlxViewManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 25 NONAME ; int GlxViewManager::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?deActivateView@GlxViewManager@@AAEXXZ @ 26 NONAME ; void GlxViewManager::deActivateView(void)
- ?destroyView@GlxViewManager@@QAEXH@Z @ 27 NONAME ; void GlxViewManager::destroyView(int)
- ?resolveView@GlxViewManager@@AAEPAVGlxView@@H@Z @ 28 NONAME ; class GlxView * GlxViewManager::resolveView(int)
- ??1GlxViewManager@@UAE@XZ @ 29 NONAME ; GlxViewManager::~GlxViewManager(void)
- ?getSelectionModel@GlxViewManager@@QAEPAVQItemSelectionModel@@H@Z @ 30 NONAME ; class QItemSelectionModel * GlxViewManager::getSelectionModel(int)
- ?addConnection@GlxViewManager@@AAEXXZ @ 31 NONAME ; void GlxViewManager::addConnection(void)
- ?createMarkingModeToolBar@GlxViewManager@@AAEXXZ @ 32 NONAME ; void GlxViewManager::createMarkingModeToolBar(void)
- ?itemSpecificMenuTriggered@GlxViewManager@@QAEXHVQPointF@@@Z @ 33 NONAME ; void GlxViewManager::itemSpecificMenuTriggered(int, class QPointF)
- ?orientation@GlxViewManager@@QBE?AW4Orientation@Qt@@XZ @ 34 NONAME ; enum Qt::Orientation GlxViewManager::orientation(void) const
- ?enterMarkingMode@GlxViewManager@@QAEXH@Z @ 35 NONAME ; void GlxViewManager::enterMarkingMode(int)
- ?actionProcess@GlxViewManager@@QAEXH@Z @ 36 NONAME ; void GlxViewManager::actionProcess(int)
- ?deactivateCurrentView@GlxViewManager@@QAEXXZ @ 37 NONAME ; void GlxViewManager::deactivateCurrentView(void)
- ?trUtf8@GlxViewManager@@SA?AVQString@@PBD0H@Z @ 38 NONAME ; class QString GlxViewManager::trUtf8(char const *, char const *, int)
- ?trUtf8@GlxViewManager@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString GlxViewManager::trUtf8(char const *, char const *)
- ?tr@GlxViewManager@@SA?AVQString@@PBD0H@Z @ 40 NONAME ; class QString GlxViewManager::tr(char const *, char const *, int)
- ?activateView@GlxViewManager@@AAEXXZ @ 41 NONAME ; void GlxViewManager::activateView(void)
- ?setupItems@GlxViewManager@@QAEXXZ @ 42 NONAME ABSENT ; void GlxViewManager::setupItems(void)
- ?launchApplication@GlxViewManager@@QAEXHPAVQAbstractItemModel@@@Z @ 43 NONAME ; void GlxViewManager::launchApplication(int, class QAbstractItemModel *)
- ?setupItems@GlxViewManager@@QAEXH@Z @ 44 NONAME ; void GlxViewManager::setupItems(int)
- ?checkMarked@GlxViewManager@@AAEXXZ @ 45 NONAME ; void GlxViewManager::checkMarked(void)
+ ?launchProgressDialog@GlxViewManager@@QAEXH@Z @ 1 NONAME ; void GlxViewManager::launchProgressDialog(int)
+ ?updateToolBarIcon@GlxViewManager@@QAEXH@Z @ 2 NONAME ; void GlxViewManager::updateToolBarIcon(int)
+ ?tr@GlxViewManager@@SA?AVQString@@PBD0@Z @ 3 NONAME ; class QString GlxViewManager::tr(char const *, char const *)
+ ?getStaticMetaObject@GlxViewManager@@SAABUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const & GlxViewManager::getStaticMetaObject(void)
+ ?effectFinished@GlxViewManager@@QAEXXZ @ 5 NONAME ; void GlxViewManager::effectFinished(void)
+ ?updateProgressDialog@GlxViewManager@@QAEXH@Z @ 6 NONAME ; void GlxViewManager::updateProgressDialog(int)
+ ?qt_metacast@GlxViewManager@@UAEPAXPBD@Z @ 7 NONAME ; void * GlxViewManager::qt_metacast(char const *)
+ ??_EGlxViewManager@@UAE@I@Z @ 8 NONAME ; GlxViewManager::~GlxViewManager(unsigned int)
+ ?addBackSoftKeyAction@GlxViewManager@@QAEXXZ @ 9 NONAME ; void GlxViewManager::addBackSoftKeyAction(void)
+ ?findView@GlxViewManager@@AAEPAVGlxView@@H@Z @ 10 NONAME ; class GlxView * GlxViewManager::findView(int)
+ ?createActions@GlxViewManager@@AAEXXZ @ 11 NONAME ; void GlxViewManager::createActions(void)
+ ?staticMetaObject@GlxViewManager@@2UQMetaObject@@B @ 12 NONAME ; struct QMetaObject const GlxViewManager::staticMetaObject
+ ?handleAction@GlxViewManager@@QAEXXZ @ 13 NONAME ; void GlxViewManager::handleAction(void)
+ ?handleUserAction@GlxViewManager@@QAEXHH@Z @ 14 NONAME ; void GlxViewManager::handleUserAction(int, int)
+ ?metaObject@GlxViewManager@@UBEPBUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const * GlxViewManager::metaObject(void) const
+ ?actionTriggered@GlxViewManager@@IAEXH@Z @ 16 NONAME ; void GlxViewManager::actionTriggered(int)
+ ?launchView@GlxViewManager@@QAEXHPAVQAbstractItemModel@@W4GlxEffect@@W4GlxViewEffect@@@Z @ 17 NONAME ; void GlxViewManager::launchView(int, class QAbstractItemModel *, enum GlxEffect, enum GlxViewEffect)
+ ?handleMenuAction@GlxViewManager@@QAEXH@Z @ 18 NONAME ; void GlxViewManager::handleMenuAction(int)
+ ?externalCommand@GlxViewManager@@IAEXH@Z @ 19 NONAME ; void GlxViewManager::externalCommand(int)
+ ??0GlxViewManager@@QAE@XZ @ 20 NONAME ; GlxViewManager::GlxViewManager(void)
+ ?exitMarkingMode@GlxViewManager@@QAEXH@Z @ 21 NONAME ; void GlxViewManager::exitMarkingMode(int)
+ ?cancelTimer@GlxViewManager@@QAEXXZ @ 22 NONAME ; void GlxViewManager::cancelTimer(void)
+ ?setModel@GlxViewManager@@QAEXPAVQAbstractItemModel@@@Z @ 23 NONAME ; void GlxViewManager::setModel(class QAbstractItemModel *)
+ ?createToolBar@GlxViewManager@@AAEXXZ @ 24 NONAME ; void GlxViewManager::createToolBar(void)
+ ?removeConnection@GlxViewManager@@AAEXXZ @ 25 NONAME ; void GlxViewManager::removeConnection(void)
+ ?launchView@GlxViewManager@@QAEXHPAVQAbstractItemModel@@@Z @ 26 NONAME ; void GlxViewManager::launchView(int, class QAbstractItemModel *)
+ ?createMarkingModeActions@GlxViewManager@@AAEXXZ @ 27 NONAME ; void GlxViewManager::createMarkingModeActions(void)
+ ?qt_metacall@GlxViewManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 28 NONAME ; int GlxViewManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?deActivateView@GlxViewManager@@AAEXXZ @ 29 NONAME ; void GlxViewManager::deActivateView(void)
+ ?destroyView@GlxViewManager@@QAEXH@Z @ 30 NONAME ; void GlxViewManager::destroyView(int)
+ ?resolveView@GlxViewManager@@AAEPAVGlxView@@H@Z @ 31 NONAME ; class GlxView * GlxViewManager::resolveView(int)
+ ??1GlxViewManager@@UAE@XZ @ 32 NONAME ; GlxViewManager::~GlxViewManager(void)
+ ?getSelectionModel@GlxViewManager@@QAEPAVQItemSelectionModel@@H@Z @ 33 NONAME ; class QItemSelectionModel * GlxViewManager::getSelectionModel(int)
+ ?addConnection@GlxViewManager@@AAEXXZ @ 34 NONAME ; void GlxViewManager::addConnection(void)
+ ?orientation@GlxViewManager@@QBE?AW4Orientation@Qt@@XZ @ 35 NONAME ; enum Qt::Orientation GlxViewManager::orientation(void) const
+ ?createMarkingModeToolBar@GlxViewManager@@AAEXXZ @ 36 NONAME ; void GlxViewManager::createMarkingModeToolBar(void)
+ ?checkMarked@GlxViewManager@@AAEXXZ @ 37 NONAME ; void GlxViewManager::checkMarked(void)
+ ?itemSpecificMenuTriggered@GlxViewManager@@QAEXHVQPointF@@@Z @ 38 NONAME ; void GlxViewManager::itemSpecificMenuTriggered(int, class QPointF)
+ ?setupItems@GlxViewManager@@QAEXXZ @ 39 NONAME ; void GlxViewManager::setupItems(void)
+ ?enterMarkingMode@GlxViewManager@@QAEXH@Z @ 40 NONAME ; void GlxViewManager::enterMarkingMode(int)
+ ?actionProcess@GlxViewManager@@QAEXH@Z @ 41 NONAME ; void GlxViewManager::actionProcess(int)
+ ?deactivateCurrentView@GlxViewManager@@QAEXXZ @ 42 NONAME ; void GlxViewManager::deactivateCurrentView(void)
+ ?trUtf8@GlxViewManager@@SA?AVQString@@PBD0H@Z @ 43 NONAME ; class QString GlxViewManager::trUtf8(char const *, char const *, int)
+ ?trUtf8@GlxViewManager@@SA?AVQString@@PBD0@Z @ 44 NONAME ; class QString GlxViewManager::trUtf8(char const *, char const *)
+ ?launchApplication@GlxViewManager@@QAEXHPAVQAbstractItemModel@@@Z @ 45 NONAME ; void GlxViewManager::launchApplication(int, class QAbstractItemModel *)
+ ?tr@GlxViewManager@@SA?AVQString@@PBD0H@Z @ 46 NONAME ; class QString GlxViewManager::tr(char const *, char const *, int)
+ ?activateView@GlxViewManager@@AAEXXZ @ 47 NONAME ; void GlxViewManager::activateView(void)
+ ?hideProgressDialog@GlxViewManager@@AAEXXZ @ 48 NONAME ; void GlxViewManager::hideProgressDialog(void)
--- a/ui/viewmanagement/eabi/glxstatehandleru.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/eabi/glxstatehandleru.def Wed Jun 23 17:18:45 2010 +0100
@@ -6,30 +6,32 @@
_ZN15GlxStateManager11qt_metacallEN11QMetaObject4CallEiPPv @ 5 NONAME
_ZN15GlxStateManager11qt_metacastEPKc @ 6 NONAME
_ZN15GlxStateManager12eventHandlerERi @ 7 NONAME
- _ZN15GlxStateManager13previousStateEv @ 8 NONAME
- _ZN15GlxStateManager14executeCommandEi @ 9 NONAME
- _ZN15GlxStateManager15actionTriggeredEi @ 10 NONAME
- _ZN15GlxStateManager15cleanupExternalEv @ 11 NONAME
- _ZN15GlxStateManager15createGridModelEi13NavigationDir @ 12 NONAME
- _ZN15GlxStateManager15exitApplicationEv @ 13 NONAME
- _ZN15GlxStateManager15exitMarkingModeEv @ 14 NONAME
- _ZN15GlxStateManager15externalCommandEi @ 15 NONAME
- _ZN15GlxStateManager16enterMarkingModeEv @ 16 NONAME
- _ZN15GlxStateManager16setupItemsSignalEv @ 17 NONAME
- _ZN15GlxStateManager16staticMetaObjectE @ 18 NONAME DATA 16
- _ZN15GlxStateManager17launchApplicationEv @ 19 NONAME
- _ZN15GlxStateManager18launchFromExternalEv @ 20 NONAME
- _ZN15GlxStateManager18removeCurrentModelEv @ 21 NONAME
- _ZN15GlxStateManager19getStaticMetaObjectEv @ 22 NONAME
- _ZN15GlxStateManager6goBackEii @ 23 NONAME
- _ZN15GlxStateManager9nextStateEii @ 24 NONAME
- _ZN15GlxStateManagerC1Ev @ 25 NONAME
- _ZN15GlxStateManagerC2Ev @ 26 NONAME
- _ZN15GlxStateManagerD0Ev @ 27 NONAME
- _ZN15GlxStateManagerD1Ev @ 28 NONAME
- _ZN15GlxStateManagerD2Ev @ 29 NONAME
- _ZNK15GlxStateManager10metaObjectEv @ 30 NONAME
- _ZTI15GlxStateManager @ 31 NONAME
- _ZTV15GlxStateManager @ 32 NONAME
- _ZN15GlxStateManager20setFullScreenContextEv @ 33 NONAME
+ _ZN15GlxStateManager13cleanAllModelEv @ 8 NONAME
+ _ZN15GlxStateManager13previousStateEv @ 9 NONAME
+ _ZN15GlxStateManager14executeCommandEi @ 10 NONAME
+ _ZN15GlxStateManager15actionTriggeredEi @ 11 NONAME
+ _ZN15GlxStateManager15cleanupExternalEv @ 12 NONAME
+ _ZN15GlxStateManager15createGridModelEi13NavigationDir @ 13 NONAME
+ _ZN15GlxStateManager15exitApplicationEv @ 14 NONAME
+ _ZN15GlxStateManager15exitMarkingModeEv @ 15 NONAME
+ _ZN15GlxStateManager15externalCommandEi @ 16 NONAME
+ _ZN15GlxStateManager16enterMarkingModeEv @ 17 NONAME
+ _ZN15GlxStateManager16setupItemsSignalEv @ 18 NONAME
+ _ZN15GlxStateManager16staticMetaObjectE @ 19 NONAME DATA 16
+ _ZN15GlxStateManager16updateTNProgressEi @ 20 NONAME
+ _ZN15GlxStateManager17launchApplicationEv @ 21 NONAME
+ _ZN15GlxStateManager18launchFromExternalEv @ 22 NONAME
+ _ZN15GlxStateManager18removeCurrentModelEv @ 23 NONAME
+ _ZN15GlxStateManager19getStaticMetaObjectEv @ 24 NONAME
+ _ZN15GlxStateManager20setFullScreenContextEv @ 25 NONAME
+ _ZN15GlxStateManager6goBackEii @ 26 NONAME
+ _ZN15GlxStateManager9nextStateEii @ 27 NONAME
+ _ZN15GlxStateManagerC1Ev @ 28 NONAME
+ _ZN15GlxStateManagerC2Ev @ 29 NONAME
+ _ZN15GlxStateManagerD0Ev @ 30 NONAME
+ _ZN15GlxStateManagerD1Ev @ 31 NONAME
+ _ZN15GlxStateManagerD2Ev @ 32 NONAME
+ _ZNK15GlxStateManager10metaObjectEv @ 33 NONAME
+ _ZTI15GlxStateManager @ 34 NONAME
+ _ZTV15GlxStateManager @ 35 NONAME
--- a/ui/viewmanagement/eabi/glxviewmanageru.def Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/eabi/glxviewmanageru.def Wed Jun 23 17:18:45 2010 +0100
@@ -1,46 +1,50 @@
EXPORTS
_ZN14GlxViewManager10launchViewEiP18QAbstractItemModel @ 1 NONAME
_ZN14GlxViewManager10launchViewEiP18QAbstractItemModel9GlxEffect13GlxViewEffect @ 2 NONAME
- _ZN14GlxViewManager10setupItemsEi @ 3 NONAME
+ _ZN14GlxViewManager10setupItemsEv @ 3 NONAME
_ZN14GlxViewManager11cancelTimerEv @ 4 NONAME
- _ZN14GlxViewManager11destroyViewEi @ 5 NONAME
- _ZN14GlxViewManager11qt_metacallEN11QMetaObject4CallEiPPv @ 6 NONAME
- _ZN14GlxViewManager11qt_metacastEPKc @ 7 NONAME
- _ZN14GlxViewManager11resolveViewEi @ 8 NONAME
- _ZN14GlxViewManager12activateViewEv @ 9 NONAME
- _ZN14GlxViewManager12handleActionEv @ 10 NONAME
- _ZN14GlxViewManager13actionProcessEi @ 11 NONAME
- _ZN14GlxViewManager13addConnectionEv @ 12 NONAME
- _ZN14GlxViewManager13createActionsEv @ 13 NONAME
- _ZN14GlxViewManager13createToolBarEv @ 14 NONAME
- _ZN14GlxViewManager14deActivateViewEv @ 15 NONAME
- _ZN14GlxViewManager14effectFinishedEv @ 16 NONAME
- _ZN14GlxViewManager15actionTriggeredEi @ 17 NONAME
- _ZN14GlxViewManager15exitMarkingModeEi @ 18 NONAME
- _ZN14GlxViewManager15externalCommandEi @ 19 NONAME
- _ZN14GlxViewManager16enterMarkingModeEi @ 20 NONAME
- _ZN14GlxViewManager16handleMenuActionEi @ 21 NONAME
- _ZN14GlxViewManager16handleUserActionEii @ 22 NONAME
- _ZN14GlxViewManager16removeConnectionEv @ 23 NONAME
- _ZN14GlxViewManager16staticMetaObjectE @ 24 NONAME DATA 16
- _ZN14GlxViewManager17getSelectionModelEi @ 25 NONAME
- _ZN14GlxViewManager17launchApplicationEiP18QAbstractItemModel @ 26 NONAME
- _ZN14GlxViewManager17updateToolBarIconEi @ 27 NONAME
- _ZN14GlxViewManager19getStaticMetaObjectEv @ 28 NONAME
- _ZN14GlxViewManager20addBackSoftKeyActionEv @ 29 NONAME
- _ZN14GlxViewManager21deactivateCurrentViewEv @ 30 NONAME
- _ZN14GlxViewManager24createMarkingModeActionsEv @ 31 NONAME
- _ZN14GlxViewManager24createMarkingModeToolBarEv @ 32 NONAME
- _ZN14GlxViewManager25itemSpecificMenuTriggeredEi7QPointF @ 33 NONAME
- _ZN14GlxViewManager8findViewEi @ 34 NONAME
- _ZN14GlxViewManagerC1Ev @ 35 NONAME
- _ZN14GlxViewManagerC2Ev @ 36 NONAME
- _ZN14GlxViewManagerD0Ev @ 37 NONAME
- _ZN14GlxViewManagerD1Ev @ 38 NONAME
- _ZN14GlxViewManagerD2Ev @ 39 NONAME
- _ZNK14GlxViewManager10metaObjectEv @ 40 NONAME
- _ZNK14GlxViewManager11orientationEv @ 41 NONAME
- _ZTI14GlxViewManager @ 42 NONAME
- _ZTV14GlxViewManager @ 43 NONAME
- _ZN14GlxViewManager11checkMarkedEv @ 44 NONAME
+ _ZN14GlxViewManager11checkMarkedEv @ 5 NONAME
+ _ZN14GlxViewManager11destroyViewEi @ 6 NONAME
+ _ZN14GlxViewManager11qt_metacallEN11QMetaObject4CallEiPPv @ 7 NONAME
+ _ZN14GlxViewManager11qt_metacastEPKc @ 8 NONAME
+ _ZN14GlxViewManager11resolveViewEi @ 9 NONAME
+ _ZN14GlxViewManager12activateViewEv @ 10 NONAME
+ _ZN14GlxViewManager12handleActionEv @ 11 NONAME
+ _ZN14GlxViewManager13actionProcessEi @ 12 NONAME
+ _ZN14GlxViewManager13addConnectionEv @ 13 NONAME
+ _ZN14GlxViewManager13createActionsEv @ 14 NONAME
+ _ZN14GlxViewManager13createToolBarEv @ 15 NONAME
+ _ZN14GlxViewManager14deActivateViewEv @ 16 NONAME
+ _ZN14GlxViewManager14effectFinishedEv @ 17 NONAME
+ _ZN14GlxViewManager15actionTriggeredEi @ 18 NONAME
+ _ZN14GlxViewManager15exitMarkingModeEi @ 19 NONAME
+ _ZN14GlxViewManager15externalCommandEi @ 20 NONAME
+ _ZN14GlxViewManager16enterMarkingModeEi @ 21 NONAME
+ _ZN14GlxViewManager16handleMenuActionEi @ 22 NONAME
+ _ZN14GlxViewManager16handleUserActionEii @ 23 NONAME
+ _ZN14GlxViewManager16removeConnectionEv @ 24 NONAME
+ _ZN14GlxViewManager16staticMetaObjectE @ 25 NONAME DATA 16
+ _ZN14GlxViewManager17getSelectionModelEi @ 26 NONAME
+ _ZN14GlxViewManager17launchApplicationEiP18QAbstractItemModel @ 27 NONAME
+ _ZN14GlxViewManager17updateToolBarIconEi @ 28 NONAME
+ _ZN14GlxViewManager19getStaticMetaObjectEv @ 29 NONAME
+ _ZN14GlxViewManager20addBackSoftKeyActionEv @ 30 NONAME
+ _ZN14GlxViewManager20launchProgressDialogEi @ 31 NONAME
+ _ZN14GlxViewManager20updateProgressDialogEi @ 32 NONAME
+ _ZN14GlxViewManager21deactivateCurrentViewEv @ 33 NONAME
+ _ZN14GlxViewManager24createMarkingModeActionsEv @ 34 NONAME
+ _ZN14GlxViewManager24createMarkingModeToolBarEv @ 35 NONAME
+ _ZN14GlxViewManager25itemSpecificMenuTriggeredEi7QPointF @ 36 NONAME
+ _ZN14GlxViewManager8findViewEi @ 37 NONAME
+ _ZN14GlxViewManager8setModelEP18QAbstractItemModel @ 38 NONAME
+ _ZN14GlxViewManagerC1Ev @ 39 NONAME
+ _ZN14GlxViewManagerC2Ev @ 40 NONAME
+ _ZN14GlxViewManagerD0Ev @ 41 NONAME
+ _ZN14GlxViewManagerD1Ev @ 42 NONAME
+ _ZN14GlxViewManagerD2Ev @ 43 NONAME
+ _ZNK14GlxViewManager10metaObjectEv @ 44 NONAME
+ _ZNK14GlxViewManager11orientationEv @ 45 NONAME
+ _ZTI14GlxViewManager @ 46 NONAME
+ _ZTV14GlxViewManager @ 47 NONAME
+ _ZN14GlxViewManager18hideProgressDialogEv @ 48 NONAME
--- a/ui/viewmanagement/statehandler/inc/glxstatemanager.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/statehandler/inc/glxstatemanager.h Wed Jun 23 17:18:45 2010 +0100
@@ -31,6 +31,7 @@
class GlxAlbumModel;
class QAbstractItemModel;
class GlxActionHandler;
+class GlxTNObserver;
#ifdef BUILD_STATEMANAGER
#define GLX_STATEMANAGER_EXPORT Q_DECL_EXPORT
@@ -62,6 +63,7 @@
void launchApplication();
void actionTriggered(qint32 id);
void setupItems();
+ void updateTNProgress( int count);
public :
/*
@@ -93,6 +95,11 @@
*/
void removeCurrentModel();
+/*
+ * It will delete the all model used by state manager
+ */
+ void cleanAllModel();
+
private:
/*
@@ -126,7 +133,9 @@
QAbstractItemModel *mCurrentModel; // no owner ship
GlxState *mCurrentState;
GlxActionHandler *mActionHandler;
+ GlxTNObserver *mTNObserver;
int mCollectionId;
+ bool isProgressbarRunning;
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewmanagement/statehandler/inc/glxtnobserver.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+
+
+#ifndef GLXTNOBSERVER_H
+#define GLXTNOBSERVER_H
+
+#include <QObject>
+#include <glxtnmonitor.h>
+
+class CGlxTNMonitor;
+
+class GlxTNObserver : public QObject, public MGlxTNObserver
+{
+ Q_OBJECT
+
+public:
+
+ /*
+ * constructor
+ */
+ GlxTNObserver();
+
+ /*
+ * Call back to get the number of TN is left to create.
+ */
+ void updateTNCount(int &count);
+
+ /*
+ * It will return the number of TN is left to create.
+ */
+ int getTNLeftCount() ;
+
+ /*
+ * It will start the tumbnail generation montior process.
+ */
+ void startTNObserving();
+
+ /*
+ * To start the thumbnail generation in back ground
+ */
+ void startTNMDaemon() ;
+
+ /*
+ * To stop the thumbnail generation in back ground
+ */
+ void stopTNMDaemon() ;
+
+ /*
+ * Destructor
+ */
+ ~GlxTNObserver();
+
+signals :
+ /*
+ * broad cast the number of thumbnail left to generate
+ */
+ void leftTNCount( int count);
+
+private :
+ CGlxTNMonitor* mTNMonitor;
+};
+
+#endif /* GLXTNOBSERVER_H */
--- a/ui/viewmanagement/statehandler/src/glxstatemanager.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/statehandler/src/glxstatemanager.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -25,6 +25,7 @@
#include <glxdetailstate.h>
#include <glxslideshowsettingsstate.h>
#include <glxslideshowstate.h>
+#include <glxtnobserver.h>
#include <glxmodelparm.h>
#include <glxcollectionpluginall.hrh>
#include <glxcollectionplugincamera.hrh>
@@ -43,15 +44,27 @@
#include <hbnotificationdialog.h>
#include <QProcess>
-GlxStateManager::GlxStateManager() : mAllMediaModel(NULL), mAlbumGridMediaModel(NULL),
- mAlbumMediaModel(NULL),mImageviewerMediaModel(NULL), mCurrentModel (NULL), mCurrentState (NULL), mActionHandler (NULL)
+
+GlxStateManager::GlxStateManager()
+ : mAllMediaModel( NULL ),
+ mAlbumGridMediaModel( NULL ),
+ mAlbumMediaModel( NULL ),
+ mImageviewerMediaModel( NULL ),
+ mCurrentModel( NULL ),
+ mCurrentState( NULL ),
+ mActionHandler( NULL ),
+ mTNObserver ( NULL ),
+ isProgressbarRunning ( false )
{
qDebug("GlxStateManager::GlxStateManager");
PERFORMANCE_ADV ( d1, "view manager creation time") {
mViewManager = new GlxViewManager();
}
+ mTNObserver = new GlxTNObserver();
+
connect ( this, SIGNAL( setupItemsSignal() ), this, SLOT( setupItems() ), Qt::QueuedConnection );
- connect ( mViewManager, SIGNAL(actionTriggered(qint32 )), this, SLOT(actionTriggered(qint32 )), Qt::QueuedConnection );
+ connect ( mViewManager, SIGNAL(actionTriggered( qint32 )), this, SLOT(actionTriggered( qint32 )), Qt::QueuedConnection );
+ connect ( mTNObserver, SIGNAL( leftTNCount( int ) ), this, SLOT( updateTNProgress( int ) ) );
//TO:DO TBD through exception when it is null
}
@@ -87,19 +100,23 @@
void GlxStateManager::launchApplication()
{
- qDebug("GlxStateManager::launchApplication");
- //To:Do use it in future once performance code is removed nextState(GLX_GRIDVIEW_ID, ALL_ITEM_S)
-
- mCurrentState = createState(GLX_GRIDVIEW_ID);
- mCurrentState->setState(ALL_ITEM_S);
-
- PERFORMANCE_ADV ( d1, "Media model creation time" ) {
- createModel(GLX_GRIDVIEW_ID);
- }
-
- PERFORMANCE_ADV ( d2, "Grid View Launch time" ) {
- mViewManager->launchApplication( GLX_GRIDVIEW_ID, mCurrentModel);
- }
+ qDebug("GlxStateManager::launchApplication");
+
+ //To:Do use it in future once performance code is removed nextState(GLX_GRIDVIEW_ID, ALL_ITEM_S)
+ mCurrentState = createState( GLX_GRIDVIEW_ID );
+ mCurrentState->setState( ALL_ITEM_S );
+
+ if ( mTNObserver->getTNLeftCount() > 0 ) {
+ mViewManager->launchApplication( GLX_GRIDVIEW_ID, mCurrentModel);
+ mViewManager->launchProgressDialog( mTNObserver->getTNLeftCount() );
+ isProgressbarRunning = true ;
+ }
+ else {
+ createModel( GLX_GRIDVIEW_ID );
+ mViewManager->launchApplication( GLX_GRIDVIEW_ID, mCurrentModel);
+ }
+
+ mTNObserver->startTNObserving() ;
}
void GlxStateManager::launchFromExternal()
@@ -132,6 +149,29 @@
mViewManager->updateToolBarIcon(GLX_ALL_ACTION_ID);
}
+void GlxStateManager::updateTNProgress( int count)
+{
+ // this is case when progress bar is not showing
+ // in the case of rename of an image or capture the single item
+ // it is also launching the progress bar, to avoid this scenario add the check of count more than 5
+ if ( mCurrentModel && count > 5 ) {
+ goBack( GLX_GRIDVIEW_ID, ALL_ITEM_S ) ;
+ cleanAllModel();
+ mViewManager->launchProgressDialog ( count ) ;
+ isProgressbarRunning = true ;
+ }
+
+ if ( isProgressbarRunning ){
+ if ( count == 0 ) {
+ createModel( mCurrentState->id() );
+ mViewManager->setModel( mCurrentModel );
+ isProgressbarRunning = false;
+ }
+
+ mViewManager->updateProgressDialog( count );
+ }
+}
+
void GlxStateManager::nextState(qint32 state, int internalState)
{
qDebug("GlxStateManager::nextState next state = %u", state);
@@ -187,14 +227,23 @@
void GlxStateManager::goBack(qint32 stateId, int internalState)
{
qDebug("GlxStateManager::goBack()");
+
+ //if current state and it internal state is same then no need to do any thing
+ if ( mCurrentState->id() == stateId && mCurrentState->state() == internalState ) {
+ return ;
+ }
+
GlxState *state = mCurrentState;
- do {
+ while ( mCurrentState ) {
+ if ( mCurrentState->id() == stateId && mCurrentState->state() == internalState ) {
+ break ;
+ }
+
mCurrentState = mCurrentState->previousState(); // set pervious state to the current state
delete state; //delete the current state
- state = mCurrentState;
+ state = mCurrentState;
}
- while ( mCurrentState && mCurrentState->id() != stateId ); //check, cuurent state is a new state
//case when new state is not hierarchy then create a new state
if ( mCurrentState == NULL ) {
@@ -257,6 +306,19 @@
}
}
+void GlxStateManager::cleanAllModel()
+{
+ delete mAllMediaModel ;
+ mAllMediaModel = NULL ;
+ delete mAlbumMediaModel ;
+ mAlbumMediaModel = NULL ;
+ delete mAlbumGridMediaModel ;
+ mAlbumGridMediaModel = NULL ;
+ delete mImageviewerMediaModel ;
+ mImageviewerMediaModel = NULL ;
+ mCurrentModel = NULL ;
+}
+
GlxState * GlxStateManager::createState(qint32 stateId)
{
qDebug("GlxStateManager::createState state id = %d", stateId);
@@ -436,16 +498,23 @@
nextState(GLX_SLIDESHOWSETTINGSVIEW_ID,-1 );
id = EGlxCmdHandled;
break;
+
case EGlxCmdDetailsOpen:
qDebug("GlxStateManager::eventHandler EGlxCmdDetailsOpen");
nextState( GLX_DETAILSVIEW_ID, -1 );
id = EGlxCmdHandled;
break;
- case EGlxCmdEmptyData :
- goBack(GLX_GRIDVIEW_ID, NO_GRID_S);
+ case EGlxCmdEmptyData : {
+ GlxState *tmpState = mCurrentState ;
+ while ( tmpState->id() != GLX_GRIDVIEW_ID ) {
+ tmpState = tmpState->previousState() ;
+ }
+
+ goBack( GLX_GRIDVIEW_ID, tmpState->state() );
id = EGlxCmdHandled;
break;
+ }
case EGlxCmdBack :
previousState();
@@ -497,6 +566,18 @@
emit setupItemsSignal();
break;
+ case EGlxCmdAppBackground :
+ if ( isProgressbarRunning ){
+ mTNObserver->stopTNMDaemon();
+ }
+ break;
+
+ case EGlxCmdAppForeground :
+ if ( isProgressbarRunning ){
+ mTNObserver->startTNMDaemon();
+ }
+ break;
+
default :
mActionHandler->handleAction(id,mCollectionId);
break;
@@ -517,25 +598,26 @@
GlxStateManager::~GlxStateManager()
{
qDebug("GlxStateManager::~GlxStateManager");
- delete mAllMediaModel;
- delete mAlbumMediaModel;
- delete mAlbumGridMediaModel;
-
+ cleanAllModel();
delete mActionHandler;
qDebug("GlxStateManager::~GlxStateManager delete Model");
disconnect ( mViewManager, SIGNAL(actionTriggered(qint32 )), this, SLOT(actionTriggered(qint32 )) );
disconnect ( mViewManager, SIGNAL(externalCommand(int )), this, SIGNAL(externalCommand(int )) );
+ disconnect ( mTNObserver, SIGNAL( leftTNCount( int ) ), this, SLOT( updateTNProgress( int ) ) );
+ disconnect ( this, SIGNAL( setupItemsSignal() ), this, SLOT( setupItems() ) );
+
+ delete mTNObserver;
delete mViewManager;
qDebug("GlxStateManager::~GlxStateManager delete view manager");
- delete mImageviewerMediaModel;
+
GlxState *tmp;
while (mCurrentState) {
tmp = mCurrentState;
mCurrentState = mCurrentState->previousState();
delete tmp;
}
- disconnect ( this, SIGNAL( setupItemsSignal() ), this, SLOT( setupItems() ) );
+
qDebug("GlxStateManager::~GlxStateManager Exit");
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewmanagement/statehandler/src/glxtnobserver.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#include <glxtnobserver.h>
+#include <e32property.h>
+
+#include "glxtracer.h"
+
+const TUid KTAGDPSNotification = { 0x2001FD51 };
+const TInt KForceBackgroundGeneration = 0x00000010;
+const TInt KItemsleft = 0x00000008;
+
+GlxTNObserver::GlxTNObserver() : mTNMonitor( NULL )
+{
+ TRACER("GlxTNObserver::GlxTNObserver() ");
+ RProperty::Set( KTAGDPSNotification, KForceBackgroundGeneration, ETrue );
+}
+
+void GlxTNObserver::updateTNCount(int &count)
+{
+ TRACER("GlxTNObserver::updateTNCount() ");
+ emit leftTNCount( count );
+}
+
+int GlxTNObserver::getTNLeftCount()
+{
+ TRACER("GlxTNObserver::getTNLeftCount() ");
+ TInt leftVariable = 0;
+ RProperty::Get( KTAGDPSNotification, KItemsleft, leftVariable );
+ //To:Do error handling
+ return leftVariable;
+}
+
+void GlxTNObserver::startTNObserving()
+{
+ TRACER("GlxTNObserver::startTNObserving() ");
+ mTNMonitor = CGlxTNMonitor::NewL( this );
+}
+
+void GlxTNObserver::startTNMDaemon()
+{
+ TRACER("GlxTNObserver::startTNMDaemon() ");
+ RProperty::Set( KTAGDPSNotification, KForceBackgroundGeneration, ETrue );
+}
+
+void GlxTNObserver::stopTNMDaemon()
+{
+ TRACER("GlxTNObserver::stopTNMDaemon() ");
+ RProperty::Set( KTAGDPSNotification, KForceBackgroundGeneration, EFalse );
+}
+
+GlxTNObserver::~GlxTNObserver()
+{
+ TRACER("GlxTNObserver::~GlxTNObserver() ");
+ delete mTNMonitor;
+}
--- a/ui/viewmanagement/statehandler/statehandler.pro Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/statehandler/statehandler.pro Wed Jun 23 17:18:45 2010 +0100
@@ -24,6 +24,7 @@
../../inc \
../../../inc \
../../../loggers/loggerqt/inc \
+ ../../../commonutilities/common/inc \
../../uiengine/medialists/inc \
../../uiengine/medialistwrapper/inc \
../../uiengine/model/mediamodel/inc \
@@ -47,7 +48,8 @@
-lglxexternalutility.dll \
-lglxloggerqt.dll \
-lglxcommoncommandhandlers.dll \
- -lglxlogging.dll
+ -lglxlogging.dll \
+ -lglxcommon.dll
# Input
HEADERS += inc/glxbasestate.h \
@@ -59,7 +61,8 @@
inc/glxstatemanager.h \
inc/glxslideshowstate.h \
inc/glxactionhandler.h \
- inc/glxcommandhandlerfactory.h
+ inc/glxcommandhandlerfactory.h \
+ inc/glxtnobserver.h
SOURCES += src/glxbasestate.cpp \
src/glxfullscreenstate.cpp \
@@ -70,6 +73,7 @@
src/glxstatemanager.cpp \
src/glxslideshowstate.cpp \
src/glxactionhandler.cpp \
- src/glxcommandhandlerfactory.cpp
+ src/glxcommandhandlerfactory.cpp \
+ src/glxtnobserver.cpp
DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewmanagement/viewmanager/inc/glxmainwindoweventfilter.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,26 @@
+#ifndef GLXMAINWINDOWEVENTFILTER_H
+#define GLXMAINWINDOWEVENTFILTER_H
+#include <QObject>
+#include <QEvent>
+class GlxMainWindowEventFilter : public QObject {
+ Q_OBJECT
+public:
+
+ GlxMainWindowEventFilter() {}
+ virtual bool eventFilter(QObject *o, QEvent *e) {
+ Q_UNUSED(o);
+ switch(e->type()) {
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ case QEvent::TouchEnd:
+ e->accept();
+ return true;
+ default:
+ break;
+ }
+ return false;
+ }
+
+};
+
+#endif
\ No newline at end of file
--- a/ui/viewmanagement/viewmanager/inc/glxviewmanager.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/viewmanager/inc/glxviewmanager.h Wed Jun 23 17:18:45 2010 +0100
@@ -19,7 +19,7 @@
#ifndef GLXVIEWMANAGER_H
#define GLXVIEWMANAGER_H
- #include <QItemSelectionModel>
+
#include <QObject>
#include <QList>
#include <hbeffect.h>
@@ -34,7 +34,9 @@
class HbAction;
class QItemSelectionModel;
class HbMenu;
-class GlxSlideShowEffectEngine;
+class GlxEffectEngine;
+class HbProgressDialog;
+class GlxMainWindowEventFilter;
#ifdef BUILD_VIEWMANAGER
#define GLX_VIEWMANAGER_EXPORT Q_DECL_EXPORT
@@ -59,7 +61,7 @@
public :
GlxViewManager();
~GlxViewManager();
- void setupItems(int subState = -1);
+ void setupItems( );
void launchApplication(qint32 id, QAbstractItemModel *model);
void addBackSoftKeyAction();
/*
@@ -92,6 +94,10 @@
* Return the selection model to the user
*/
QItemSelectionModel * getSelectionModel(qint32 viewId);
+/*
+ * To set the model of current view
+ */
+ void setModel( QAbstractItemModel *model );
signals :
/*
@@ -109,6 +115,9 @@
* It is over load slot and used to run the animation for view transition and launch the view
*/
void launchView (qint32 id, QAbstractItemModel *model, GlxEffect effect, GlxViewEffect viewEffect);
+
+ void launchProgressDialog( int maxValue );
+ void updateProgressDialog( int currentValue);
/*
* It will removed and deleted the view.
* Currently It is not used so may be in future, It will be removed.
@@ -142,6 +151,8 @@
private slots:
void checkMarked();
+ void hideProgressDialog();
+
private:
/*
* It will create and return the view
@@ -189,7 +200,7 @@
HbMainWindow *mMainWindow; //main window pointer, It have ownership only if
HbAction *mBackAction; // For back soft key
GlxMenuManager *mMenuManager; //Pointer of menu manger to add the menu in the view
- GlxSlideShowEffectEngine *mEffectEngine; //To run the animation in between view transition
+ GlxEffectEngine *mEffectEngine; //To run the animation in between view transition
QList<HbAction *> mActionList; //Tool bar action list
QList<HbAction *> mMarkingActionList; //marking mode tool bar action list
HbToolBar *mViewToolBar; //view tool bar
@@ -197,7 +208,10 @@
HbMenu *mMenu;
GlxView *mView;
QAbstractItemModel *mModel; //no ownership
- QItemSelectionModel * mSelectionModel;
+ QItemSelectionModel * mSelectionModel;
+ HbProgressDialog *mProgressDialog;
+ GlxMainWindowEventFilter* mWindowEventFilter;
+
};
--- a/ui/viewmanagement/viewmanager/src/glxviewmanager.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/viewmanager/src/glxviewmanager.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -35,6 +35,9 @@
#include <hbmenu.h>
#include <QDebug>
#include <hbstyleloader.h>
+#include <hbprogressdialog.h>
+#include <QItemSelectionModel>
+#include <glxmainwindoweventfilter.h>
GlxViewManager::GlxViewManager()
@@ -42,9 +45,10 @@
mMenuManager( NULL ),
mEffectEngine( NULL ),
mViewToolBar( NULL ),
- mMarkingToolBar( NULL ),
+ mMarkingToolBar( NULL ),
mMenu( NULL ),
- mSelectionModel ( NULL )
+ mSelectionModel ( NULL ),
+ mProgressDialog( NULL )
{
qDebug("GlxViewManager::GlxViewManager() ");
PERFORMANCE_ADV ( viewMgrD1, "main window creation time" ) {
@@ -54,18 +58,22 @@
mMainWindow = new HbMainWindow();
}
//Without this Zoom Does not work
+
+ mWindowEventFilter = new GlxMainWindowEventFilter;
+ mMainWindow->scene()->installEventFilter(mWindowEventFilter);
+ mMainWindow->viewport()->setAttribute(Qt::WA_AcceptTouchEvents);
mMainWindow->viewport()->grabGesture(Qt::PinchGesture);
}
HbStyleLoader::registerFilePath(":/data/photos.css");
}
-void GlxViewManager::setupItems(int subState)
+void GlxViewManager::setupItems( )
{
mMenuManager = new GlxMenuManager(mMainWindow);
addBackSoftKeyAction();
- createToolBar();
+
addConnection();
- mView->addToolBar(mViewToolBar);
+
mMenuManager->addMenu( mView->viewId(), mView->menu() );
mMenuManager->setModel( mModel );
}
@@ -76,6 +84,18 @@
PERFORMANCE_ADV ( viewMgrD1, "View Creation time" ) {
mView = resolveView(id);
}
+ createToolBar();
+ mView->addToolBar(mViewToolBar);
+
+ /* We are showing the toolBar before activating the
+ * view. This is done to avoid the animation effect seen otherwise
+ * when the tool bar comes up.
+ *
+ * If animation Effect is not removed, it leads to flickering effect
+ * since we are creating a new tool bar..although a fake tool bar was
+ * already created on the splashscreen
+ *
+ */
mView->activate();
PERFORMANCE_ADV ( viewMgrD3, "Set Model time")
@@ -137,7 +157,7 @@
//create and registered the effect
if ( mEffectEngine == NULL ) {
- mEffectEngine = new GlxSlideShowEffectEngine();
+ mEffectEngine = new GlxEffectEngine();
mEffectEngine->registerTransitionEffect();
connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinished() ) );
}
@@ -185,6 +205,83 @@
}
}
+void GlxViewManager::launchProgressDialog( int maxValue )
+{
+ if ( maxValue <= 0 ) {
+ return;
+ }
+ if ( mProgressDialog == NULL ) {
+ mProgressDialog = new HbProgressDialog( HbProgressDialog::ProgressDialog );
+ mProgressDialog->actions().at(0)->disconnect( SIGNAL( triggered() ) );
+ connect ( mProgressDialog->actions().at(0), SIGNAL( triggered() ), this, SLOT( hideProgressDialog() ) );
+ mProgressDialog->setMinimum( 0 );
+ }
+ mProgressDialog->setMaximum( maxValue );
+ mProgressDialog->setProgressValue( 0 );
+ mProgressDialog->setModal( true );
+ mProgressDialog->actions().at(0)->setText( GLX_BUTTON_HIDE );
+ mProgressDialog->open();
+}
+
+void GlxViewManager::hideProgressDialog( )
+{
+ mMainWindow->lower();
+}
+
+void GlxViewManager::updateProgressDialog( int currentValue)
+{
+ static int i = 0;
+ HbIcon icon;
+ User::ResetInactivityTime();
+
+ //To:Do temp code remove later
+ if ( mProgressDialog ) {
+ i = ++i % 10;
+ switch ( i ) {
+ case 0 :
+ icon = HbIcon( QString(":/data/Image1.jpg") );
+ break;
+ case 1 :
+ icon = HbIcon( QString(":/data/Image2.jpg") );
+ break;
+ case 2 :
+ icon = HbIcon( QString(":/data/Image3.jpg") );
+ break;
+ case 3 :
+ icon = HbIcon( QString(":/data/Image4.jpg") );
+ break;
+ case 4 :
+ icon = HbIcon( QString(":/data/Image5.jpg") );
+ break;
+ case 5 :
+ icon = HbIcon( QString(":/data/Image6.jpg") );
+ break;
+ case 6 :
+ icon = HbIcon( QString(":/data/Image7.jpg") );
+ break;
+ case 7 :
+ icon = HbIcon( QString(":/data/Image8.jpg") );
+ break;
+ case 8 :
+ icon = HbIcon( QString(":/data/Image9.jpg") );
+ break;
+ case 9 :
+ icon = HbIcon( QString(":/data/Image10.jpg") );
+ break;
+ }
+
+ int max = mProgressDialog->maximum() ;
+ if ( currentValue > max ) {
+ mProgressDialog->setMaximum( currentValue );
+ max = currentValue ;
+ }
+ int value = max - currentValue;
+ mProgressDialog->setProgressValue( value );
+ mProgressDialog->setIcon(icon);
+ mProgressDialog->setText( QString( " %1 / %2").arg( value ).arg( max ) );
+ }
+}
+
//to be called only when the photos plugin was activated by external means
void GlxViewManager::deactivateCurrentView()
{
@@ -226,13 +323,14 @@
QModelIndexList selectedModelIndex = mSelectionModel->selectedIndexes();
for ( int i = 0 ; i < mMarkingActionList.count(); i++) {
if( mMarkingActionList.at(i)->data()==EGlxCmdSelect) {
- bool noSelection=selectedModelIndex.empty();
- mMarkingActionList.at(i)->setDisabled(noSelection);
- mMenuManager->disableAction(mView->menu(),noSelection);
- break;
+ bool noSelection=selectedModelIndex.empty();
+ mMarkingActionList.at(i)->setDisabled(noSelection);
+ mMenuManager->disableAction(mView->menu(),noSelection);
+ break;
}
}
}
+
void GlxViewManager::enterMarkingMode(qint32 viewId)
{
GlxView *view = findView ( viewId );
@@ -302,6 +400,17 @@
return NULL;
}
+void GlxViewManager::setModel( QAbstractItemModel *model )
+{
+ if ( mView ) {
+ mView->setModel( model ) ;
+ }
+
+ if ( mMenuManager ) {
+ mMenuManager->setModel( model );
+ }
+}
+
GlxView * GlxViewManager::resolveView(qint32 id)
{
qDebug("GlxViewManager::resolveView %d", id);
@@ -545,7 +654,7 @@
delete mViewToolBar;
delete mMarkingToolBar;
delete mMenu;
-
+ delete mProgressDialog;
if ( mEffectEngine ) {
mEffectEngine->deregistertransitionEffect();
delete mEffectEngine;
@@ -555,6 +664,7 @@
qDebug("GlxViewManager::~GlxViewManager remove view");
delete mMainWindow;
}
+ delete mWindowEventFilter;
qDebug("GlxViewManager::~GlxViewManager Exit");
}
--- a/ui/viewmanagement/viewmanager/viewmanager.pro Tue May 18 12:19:10 2010 +0100
+++ b/ui/viewmanagement/viewmanager/viewmanager.pro Wed Jun 23 17:18:45 2010 +0100
@@ -23,13 +23,15 @@
../../views/viewbase/inc \
../../views/effectengine/inc \
../../../loggers/loggerqt/inc \
- ../../../commonutilities/externalutility/inc
+ ../../../commonutilities/externalutility/inc \
+ ../../viewutilities/effectengine/inc \
CONFIG += hb
LIBS += -lglxexternalutility.dll \
-lglxviews.dll \
- -lglxloggerqt.dll
+ -lglxloggerqt.dll \
+ -lglxviewutilities.dll
DEFINES += BUILD_VIEWMANAGER
@@ -41,7 +43,8 @@
}
# Input
HEADERS += inc/glxviewmanager.h \
- inc/glxmenumanager.h
+ inc/glxmenumanager.h \
+ inc/glxmainwindoweventfilter.h
SOURCES += src/glxviewmanager.cpp\
src/glxmenumanager.cpp
--- a/ui/views/detailsview/src/glxdetailsview.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/detailsview/src/glxdetailsview.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -33,7 +33,6 @@
#include "glxviewids.h"
#include "glxicondefs.h" //Contains the icon names/Ids
#include "glxmodelparm.h"
-#include "glxmediamodel.h"
#include "glxdetailsview.h"
#include "glxfavmediamodel.h"
#include <glxcommandhandlers.hrh>
--- a/ui/views/docloaders/src/glxviewdocloader.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/docloaders/src/glxviewdocloader.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -29,6 +29,7 @@
#include "glxcoverflow.h"
#include "glxslideshowwidget.h"
#include "glxslideshowview.h"
+#include "glxzoomwidget.h"
//----------------------------------------------------------------------------------------
// createObject:creates the custom widget and views of fullscreen view
@@ -56,6 +57,14 @@
object->setObjectName(name);
return object;
}
+
+ if (GLXFULLSCREENZOOMWIDGET == name)
+ {
+ qDebug() << "GlxFullscreenViewDocLoader::createObject:ZOOM -->";
+ QObject *object = new GlxZoomWidget();
+ object->setObjectName(name);
+ return object;
+ }
return HbDocumentLoader::createObject(type, name);
}
--- a/ui/views/effectengine/effectplugin/inc/glxbackwardtransitionplugin.h Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-#ifndef GLXBACKWARDTRANSITIONPLUGIN_H
-#define GLXBACKWARDTRANSITIONPLUGIN_H
-
-#include "glxeffectpluginbase.h"
-
-class GlxBackwardTransitionPlugin : public GlxEffectPluginBase
-{
-public :
- GlxBackwardTransitionPlugin();
- ~GlxBackwardTransitionPlugin();
- QList <QString > getEffectFileList() { return mEffectFileList ; }
-
-private :
- QList <QString > mEffectFileList;
-};
-
-#endif /*GLXBACKWARDTRANSITIONPLUGIN_H*/
-
--- a/ui/views/effectengine/effectplugin/inc/glxeffectpluginbase.h Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-#ifndef GLXEFFECTPLUGINBASE_H
-#define GLXEFFECTPLUGINBASE_H
-
-#include <QList>
-#include <QString>
-#include <QGraphicsItem>
-
-class GlxEffectPluginBase
-{
-
-public :
- GlxEffectPluginBase() { }
- virtual ~GlxEffectPluginBase() {}
- virtual QList <QString > getEffectFileList() = 0;
- virtual void setUpItems( QList< QGraphicsItem * > & items ) { Q_UNUSED( items ) }
-/*
- * second animation will run same time(false) or later (true)
- */
- virtual bool isAnimationLater(int index)
- {
- Q_UNUSED( index )
- return false ;
- }
- virtual QString ItemType() { return QString("HbIconItem") ; }
- virtual QGraphicsItem * animationItem() { return NULL; }
-};
-
-#endif /*GLXEFFECTPLUGINBASE_H*/
\ No newline at end of file
--- a/ui/views/effectengine/effectplugin/inc/glxfadeplugin.h Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-#ifndef GLXFADEPLUGIN_H
-#define GLXFADEPLUGIN_H
-
-#include "glxeffectpluginbase.h"
-
-class GlxFadePlugin : public GlxEffectPluginBase
-{
-public :
- GlxFadePlugin();
- ~GlxFadePlugin();
- QList <QString > getEffectFileList() { return mEffectFileList ; }
- /*
- * setup the item postion and set the mItem value
- */
- void setUpItems( QList< QGraphicsItem * > & items );
-/*
- * second animation will be run later
- */
- bool isAnimationLater(int index) ;
- QGraphicsItem * animationItem()
- {
- mItem->show();
- return mItem ;
- }
-
-private :
- QList <QString > mEffectFileList;
- QGraphicsItem *mItem;
-};
-
-#endif /*GLXFADEPLUGIN_H*/
\ No newline at end of file
--- a/ui/views/effectengine/effectplugin/inc/glxforwardtransitionplugin.h Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-#ifndef GLXFORWARDTRANSITIONPLUGIN_H
-#define GLXFORWARDTRANSITIONPLUGIN_H
-
-#include "glxeffectpluginbase.h"
-
-class GlxForwardTransitionPlugin : public GlxEffectPluginBase
-{
-public :
- GlxForwardTransitionPlugin();
- ~GlxForwardTransitionPlugin();
- QList <QString > getEffectFileList() { return mEffectFileList; }
-
-private :
- QList <QString > mEffectFileList;
-};
-
-#endif /*GLXFORWARDTRANSITIONPLUGIN_H*/
-
--- a/ui/views/effectengine/effectplugin/src/glxbackwardtransitionplugin.cpp Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-#include "glxbackwardtransitionplugin.h"
-
-
-GlxBackwardTransitionPlugin::GlxBackwardTransitionPlugin()
-{
- mEffectFileList.append(QString(":/data/transtionbackward.fxml"));
- mEffectFileList.append(QString(":/data/transtion.fxml"));
-}
-
-GlxBackwardTransitionPlugin::~GlxBackwardTransitionPlugin()
-{
- mEffectFileList.clear();
-}
-
-
--- a/ui/views/effectengine/effectplugin/src/glxfadeplugin.cpp Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-#include "glxfadeplugin.h"
-
-GlxFadePlugin::GlxFadePlugin() : mItem(NULL)
-{
- mEffectFileList.append(QString(":/data/view_flip_hide.fxml"));
- mEffectFileList.append(QString(":/data/view_flip_show.fxml"));
-}
-
-void GlxFadePlugin::setUpItems( QList< QGraphicsItem * > & items )
-{
- if ( items.count() < 2 )
- return;
-
- mItem = items.at(1);
- mItem->hide();
- mItem->setPos(0,0);
- items.at(0)->setPos(0,0);
-}
-
-bool GlxFadePlugin::isAnimationLater(int index)
-{
- if ( index == 1) {
- return true;
- }
- return false;
-}
-
-GlxFadePlugin::~GlxFadePlugin()
-{
- mEffectFileList.clear();
-}
-
--- a/ui/views/effectengine/effectplugin/src/glxforwardtransitionplugin.cpp Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-#include "glxforwardtransitionplugin.h"
-
-GlxForwardTransitionPlugin::GlxForwardTransitionPlugin()
-{
- mEffectFileList.append(QString(":/data/transtionforward.fxml"));
- mEffectFileList.append(QString(":/data/transtion.fxml"));
-}
-
-GlxForwardTransitionPlugin::~GlxForwardTransitionPlugin()
-{
- mEffectFileList.clear();
-}
-
-
--- a/ui/views/effectengine/inc/glxeffectengine.h Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-#ifndef GLXEFFECTENGINE_H
-#define GLXEFFECTENGINE_H
-
-#ifdef BUILD_GLXVIEWS
-#define GLX_VIEW_EXPORT Q_DECL_EXPORT
-#else
-#define GLX_VIEW_EXPORT Q_DECL_IMPORT
-#endif
-
-#include <QObject>
-#include <hbeffect.h>
-#include <QString>
-#include <QHash>
-#include <QList>
-#include "glxuistd.h"
-
-class XQSettingsKey;
-class XQSettingsManager;
-class QStringList;
-typedef enum
-{
- NO_MOVE,
- MOVE_FORWARD,
- MOVE_BACKWARD,
-} GlxSlideShowMoveDir;
-
-/*
- * This class is used for read the setting either from File System or from some xml file.
- * This Setting is used by both server and client, but It is coupled with the server and client retreive the data through the server
- */
-class GlxSlideShowSetting
-{
-public :
- GlxSlideShowSetting(int slideDelayTime = 0, GlxEffect effect = NO_EFFECT, GlxSlideShowMoveDir moveDir = NO_MOVE);
- ~GlxSlideShowSetting();
- int slideDelayTime ( ) { return mSlideDelayTime; }
- GlxEffect effect() { return mEffect ; }
- void setEffect(GlxEffect effect) { mEffect = effect ;}
- GlxSlideShowMoveDir slideShowMoveDir() { return mMoveDir; }
- /* Returns the index to the selected transition effect
- This value is fetched from Central repository */
- int slideShowEffectIndex() ;
- /*SlideShowSettingsView will call this API to set the index of the transition effect chosen.
- This data will be written to the Central Repository*/
- void setslideShowEffectIndex( int index );
-
- /* Returns the index to the selected transition delay /
- This value is fetched from Central repository */
- int slideShowDelayIndex();
-
- /*SlideShowSettingsView will call this API to set the index of the transition delay chosen.
- This data will be written to the Central Repository*/
- void setSlideShowDelayIndex( int index );
-
- /*This will return the list of effects as available in the central repository */
- QStringList slideShowEffectList();
-
-/*
- * This funtion read the user setting store in a file system.
- *
- */
- void readSlideShowSetting();
-
-private :
- int mSlideDelayTime; //user set time interval in between showing slide
- GlxEffect mEffect; //user defined effect, To:Do It is either some integer value or some enum
- GlxSlideShowDelay mDelay;
- GlxSlideShowMoveDir mMoveDir; //user defined slide move direction
- QStringList mEffectList;
- XQSettingsManager *mSettingsManager;
- XQSettingsKey *mTransitionEffectCenrepKey;
- XQSettingsKey *mTransitionDelayCenrepKey;
- XQSettingsKey *mWaveEffectCenRepKey;
- XQSettingsKey *mFadeEffectCenRepKey;
- XQSettingsKey *mZoomEffectCenRepKey;
- XQSettingsKey *mSlowCenRepKey;
- XQSettingsKey *mMediumCenRepKey;
- XQSettingsKey *mFastCenRepKey;
-};
-
-/*
- * This class have the views transition effect information
- */
-class GlxTransitionEffectSetting
-{
-public :
- GlxTransitionEffectSetting(GlxEffect effect);
- ~GlxTransitionEffectSetting();
-
- QList <QString > effectFileList() { return mEffectFileList ; }
- QList <QString > itemType() { return mItemType ; }
- QList <QString > eventType() { return mEventType ; }
- bool isTransitionLater() { return mTransitionLater ; }
- QGraphicsItem * animationItem() { return mItem ; }
-
- void setEffectFileList( QList <QString > & effectFileList) { mEffectFileList = effectFileList ; }
- void setItemTypes( QList <QString > & itemType) { mItemType = itemType; }
- void setEventTypes( QList <QString > & eventType) { mEventType = eventType ; }
- void setTransitionLater(bool transitionLater) { mTransitionLater = transitionLater ; }
- void setAnimationItem(QGraphicsItem *item) { mItem = item ;}
- int count() { return mEffectFileList.count() ; }
-
-private :
- void init();
-
-private :
- GlxEffect mEffect; //transition effect type
- bool mTransitionLater; //second animation will run same time(false) or later (true)
- QGraphicsItem *mItem; //it will used in the case of animation run later
- QList <QString > mEffectFileList; //list of fxml file used for animation
- QList <QString > mItemType; //list of item type
- QList <QString > mEventType; //list of event type
-};
-
-
-/*
- * It is customise class for Photo Application to run the effect.
- * In the case of effect setting required to read through File System:
- * first read the setting, register the effect and then run the effect.
- * In the case of run the client effect: first Set the effect, register the effect and then run the effect.
- */
-
-class GlxEffectPluginBase;
-
-class GLX_VIEW_EXPORT GlxSlideShowEffectEngine : public QObject
-{
- Q_OBJECT
-
-public:
- GlxSlideShowEffectEngine( );
- ~GlxSlideShowEffectEngine();
- int slideDelayTime ( ) { return mSlideShowSetting.slideDelayTime(); }
- GlxSlideShowMoveDir slideShowMoveDir() { return mSlideShowSetting.slideShowMoveDir(); }
- void readSetting() { mSlideShowSetting.readSlideShowSetting(); }
- void setEffect(GlxEffect effect) { mSlideShowSetting.setEffect( effect ); }
-
- void registerEffect(const QString &itemType);
- void deRegisterEffect(const QString &itemType);
-
-/* To register a set of transition effect
- * e.g "grid to full screeen", "fullscreen to grid"
- *
- */
- void registerTransitionEffect();
- void deregistertransitionEffect();
-
- void runEffect(QGraphicsItem * item, const QString & itemType );
- void runEffect(QList< QGraphicsItem * > & items, const QString & itemType );
- void runEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect);
-
- void cancelEffect(QGraphicsItem * item);
- void cancelEffect( const QList< QGraphicsItem * > & items );
- void cancelEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect);
-
- bool isEffectRuning(QGraphicsItem * item);
- bool isEffectRuning(const QList< QGraphicsItem * > & items);
-
-signals:
- void effectFinished();
-
-public slots:
- void slideShowEffectFinished( const HbEffect::EffectStatus &status );
- void transitionEffectFinished( const HbEffect::EffectStatus &status );
-
-private:
- void effectPluginResolver();
- void initTransitionEffect();
- void cleanTransitionEfffect();
-
-private:
- GlxSlideShowSetting mSlideShowSetting;
- int mNbrEffectRunning; //containe the number of effect running
- GlxEffectPluginBase *mEffectPlugin;
- QHash<GlxEffect, GlxTransitionEffectSetting *> mTransitionEffectList;
- GlxEffect mTransitionEffect;
-};
-
-#endif /*GLXEFFECTENGINE_H*/
--- a/ui/views/effectengine/src/glxeffectengine.cpp Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,462 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-#include <glxeffectengine.h>
-#include "glxeffectpluginbase.h"
-#include "glxforwardtransitionplugin.h"
-#include "glxbackwardtransitionplugin.h"
-#include "glxfadeplugin.h"
-#include <QDebug>
-
-#include <xqsettingsmanager.h>
-#include <xqsettingskey.h>
-#include <QStringList>
-const TUint32 KGlxTransitionEffect = 0x1;
-const TUint32 KGlxTransitionDelay = 0x2;
-const TUint32 KGlxSlow = 0x3;
-const TUint32 KGlxMeduim = 0x4;
-const TUint32 KGlxFast = 0x5;
-const TUint32 KGlxWaveEffect = 0x6;
-const TUint32 KGlxFadeEffect = 0x7;
-const TUint32 KGlxZoomToFaceEffect = 0x8;
-const TUint32 KCRUidGallery = 0x20007194;
-GlxSlideShowSetting::GlxSlideShowSetting( int slideDelayTime, GlxEffect effect, GlxSlideShowMoveDir moveDir )
- : mSlideDelayTime(slideDelayTime),
- mEffect ( effect),
- mMoveDir ( moveDir)
-{
- mSettingsManager = new XQSettingsManager();
- mTransitionEffectCenrepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery , KGlxTransitionEffect);
- mTransitionDelayCenrepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery , KGlxTransitionDelay);
- mSlowCenRepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxSlow);
- mMediumCenRepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxMeduim);
- mFastCenRepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxFast);
-
- mWaveEffectCenRepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxWaveEffect );
- mFadeEffectCenRepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxFadeEffect);
- mZoomEffectCenRepKey= new XQSettingsKey(XQSettingsKey::TargetCentralRepository, KCRUidGallery , KGlxZoomToFaceEffect );
-}
-
-GlxSlideShowSetting::~GlxSlideShowSetting( )
-{
- delete mFastCenRepKey;
- delete mMediumCenRepKey;
- delete mSlowCenRepKey;
- delete mZoomEffectCenRepKey;
- delete mFadeEffectCenRepKey;
- delete mWaveEffectCenRepKey;
- delete mTransitionDelayCenrepKey;
- delete mTransitionEffectCenrepKey;
- delete mSettingsManager;
-}
-int GlxSlideShowSetting::slideShowDelayIndex()
-{
- QVariant effectvalue = mSettingsManager->readItemValue(*mTransitionDelayCenrepKey);
- return effectvalue.toInt();
-}
-void GlxSlideShowSetting::setSlideShowDelayIndex( int index )
-{
- mSettingsManager->writeItemValue(*mTransitionDelayCenrepKey, index);
-}
-QStringList GlxSlideShowSetting::slideShowEffectList()
-{
- if(mSettingsManager->readItemValue(*mWaveEffectCenRepKey).toInt() == WAVE_EFFECT)
- mEffectList<<"wave";
- if(mSettingsManager->readItemValue(*mFadeEffectCenRepKey).toInt() == SMOOTH_FADE)
- mEffectList<<"Fade";
- if(mSettingsManager->readItemValue(*mZoomEffectCenRepKey).toInt() == ZOOM_TO_FACE)
- mEffectList<<"Zoom to face";
- return mEffectList;
-}
-int GlxSlideShowSetting::slideShowEffectIndex()
-{
- QVariant effectvalue = mSettingsManager->readItemValue(*mTransitionEffectCenrepKey);
- return effectvalue.toInt();
-}
-void GlxSlideShowSetting::setslideShowEffectIndex( int index )
-{
- mSettingsManager->writeItemValue(*mTransitionEffectCenrepKey, index);
-}
-void GlxSlideShowSetting::readSlideShowSetting()
-{
-//To:Do read from the file system
- QVariant effectvalue = mSettingsManager->readItemValue(*mTransitionDelayCenrepKey);
- switch (effectvalue.toInt()) {
- case SLOW:
- mSlideDelayTime = mSettingsManager->readItemValue(*mSlowCenRepKey).toInt();
- break;
- case MEDIUM:
- mSlideDelayTime = mSettingsManager->readItemValue(*mMediumCenRepKey).toInt();
- break;
- case FAST:
- mSlideDelayTime = mSettingsManager->readItemValue(*mFastCenRepKey).toInt();
- break;
- default:
- mSlideDelayTime = 3000;
- break;
- }
- mEffect = FADE_EFFECT;
- mMoveDir = MOVE_FORWARD;
- qDebug("GlxSlideShowSetting::readSlideShowSetting() slide delay time %d effect %d move direction %d", mSlideDelayTime, mEffect, mMoveDir);
-}
-
-
-GlxTransitionEffectSetting::GlxTransitionEffectSetting(GlxEffect effect): mEffect(effect), mTransitionLater(false), mItem(0)
-{
- qDebug("GlxTransitionEffectSetting::GlxTransitionEffectSetting() effect id %d ", effect);
- mEffectFileList.clear();
- mItemType.clear();
- mEventType.clear();
- init();
-}
-
-void GlxTransitionEffectSetting::init()
-{
- qDebug("GlxTransitionEffectSetting::init() effect id %d ", mEffect);
-
- switch( mEffect ) {
- case GRID_TO_FULLSCREEN :
- mEffectFileList.append( QString(":/data/gridtofullscreenhide.fxml"));
- mItemType.append( QString("HbGridViewItem") );
- mEventType.append(QString("click1") );
-
- mEffectFileList.append( QString(":/data/gridtofullscreenshow.fxml"));
- mItemType.append( QString("HbView") );
- mEventType.append(QString("click2") );
- break;
-
- case FULLSCREEN_TO_GRID :
- mEffectFileList.append( QString(":/data/fullscreentogrid.fxml"));
- mItemType.append( QString("HbGridView") );
- mEventType.append(QString("click3") );
- break;
-
- case GRID_TO_ALBUMLIST:
- mEffectFileList.append( QString(":/data/gridtoalbumlisthide.fxml"));
- mItemType.append( QString("HbView") );
- mEventType.append(QString("click4") );
-
- mEffectFileList.append( QString(":/data/gridtoalbumlist.fxml"));
- mItemType.append( QString("HbListView") );
- mEventType.append(QString("click5") );
- break;
-
- case ALBUMLIST_TO_GRID:
- mEffectFileList.append( QString(":/data/albumlisttogrid.fxml"));
- mItemType.append( QString("HbListView") );
- mEventType.append(QString("click6") );
-
- mEffectFileList.append( QString(":/data/albumlisttogridshow.fxml"));
- mItemType.append( QString("HbView") );
- mEventType.append(QString("click7") );
- break;
-
- case FULLSCREEN_TO_DETAIL :
- mEffectFileList.append( QString(":/data/view_flip_hide.fxml"));
- mItemType.append( QString("HbView") );
- mEventType.append(QString("click8") );
-
- mEffectFileList.append( QString(":/data/view_flip_show.fxml"));
- mItemType.append( QString("HbView") );
- mEventType.append(QString("click9") );
- mTransitionLater = true;
- break;
-
- case DETAIL_TO_FULLSCREEN :
- mEffectFileList.append( QString(":/data/view_flip_hide.fxml"));
- mItemType.append( QString("HbView") );
- mEventType.append(QString("click10") );
-
- mEffectFileList.append( QString(":/data/view_flip_show.fxml"));
- mItemType.append( QString("HbView") );
- mEventType.append(QString("click11") );
- mTransitionLater = true;
- break;
-
- default :
- break;
- }
-}
-
-GlxTransitionEffectSetting::~GlxTransitionEffectSetting()
-{
- qDebug("GlxTransitionEffectSetting::~GlxTransitionEffectSetting() effect id %d ", mEffect);
- mEffectFileList.clear();
- mItemType.clear();
- mEventType.clear();
-}
-
-
-GlxSlideShowEffectEngine::GlxSlideShowEffectEngine( ) : mNbrEffectRunning( 0 ),
- mEffectPlugin(NULL),
- mTransitionEffect(NO_EFFECT)
-{
- qDebug("GlxSlideShowEffectEngine::GlxSlideShowEffectEngine()");
- mTransitionEffectList.clear();
-}
-
-GlxSlideShowEffectEngine::~GlxSlideShowEffectEngine()
-{
- qDebug("GlxSlideShowEffectEngine::~GlxSlideShowEffectEngine()");
- delete mEffectPlugin;
- mEffectPlugin = NULL;
-
- cleanTransitionEfffect();
-}
-
-void GlxSlideShowEffectEngine::registerEffect(const QString &itemType)
-{
- effectPluginResolver();
- QList <QString > effectPathList = mEffectPlugin->getEffectFileList();
-
- qDebug("GlxSlideShowEffectEngine::registerEffect() item type %s file path %s", itemType.utf16(), effectPathList[0].utf16());
- for ( int i = 0; i < effectPathList.count() ; ++i ) {
- HbEffect::add(itemType, effectPathList.at(i), QString( "Click%1" ).arg(i));
- }
-}
-
-void GlxSlideShowEffectEngine::deRegisterEffect(const QString &itemType)
-{
- qDebug("GlxSlideShowEffectEngine::deRegisterEffect() item type %s", itemType.utf16());
- QList <QString > effectPathList = mEffectPlugin->getEffectFileList();
- for ( int i = 0; i < effectPathList.count() ; ++i ) {
- HbEffect::remove(itemType, effectPathList.at(i), QString( "Click%1" ).arg(i));
- }
- delete mEffectPlugin ;
- mEffectPlugin = NULL;
-}
-
-void GlxSlideShowEffectEngine::registerTransitionEffect()
-{
- qDebug("GlxSlideShowEffectEngine::registerTransitionEffect()");
- initTransitionEffect();
-}
-
-void GlxSlideShowEffectEngine::deregistertransitionEffect()
-{
- qDebug("GlxSlideShowEffectEngine::deregisterTransitionEffect()");
- cleanTransitionEfffect();
-}
-
-void GlxSlideShowEffectEngine::runEffect(QGraphicsItem * item, const QString & itemType )
-{
- qDebug("GlxSlideShowEffectEngine::runEffect()1 item type %s", itemType.utf16());
- HbEffect::start(item, itemType, QString( "Click1" ), this, "slideShowEffectFinished");
- ++mNbrEffectRunning;
-}
-
-void GlxSlideShowEffectEngine::runEffect(QList< QGraphicsItem * > & items, const QString & itemType )
-{
- qDebug("GlxSlideShowEffectEngine::runEffect()2 item Type %s", itemType.utf16());
- mEffectPlugin->setUpItems(items);
- for ( int i = 0; i < items.count() ; ++i ) {
- if ( mEffectPlugin->isAnimationLater(i) == FALSE ) {
- HbEffect::start(items.at(i), itemType, QString( "Click%1").arg(i), this, "slideShowEffectFinished");
- }
- ++mNbrEffectRunning;
- }
-}
-
-void GlxSlideShowEffectEngine::runEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect)
-{
- qDebug("GlxSlideShowEffectEngine::runEffect()3 effect type %d ", transitionEffect);
-
- GlxTransitionEffectSetting *effectSetting = mTransitionEffectList.value( transitionEffect );
-
- if ( effectSetting == NULL || items.count() != effectSetting->count() ) {
- return;
- }
-
- mTransitionEffect = transitionEffect;
- for ( int i = 0; i < effectSetting->count() ; ++i) {
- ++mNbrEffectRunning;
- if ( ( i == effectSetting->count() -1) && effectSetting->isTransitionLater() )
- {
- effectSetting->setAnimationItem( items.at(i) );
- items.at(i)->hide();
- }
- else {
- HbEffect::start(items.at(i), effectSetting->itemType().at(i), effectSetting->eventType().at(i), this, "transitionEffectFinished");
- }
- }
-}
-
-void GlxSlideShowEffectEngine::cancelEffect(QGraphicsItem * item)
-{
- if ( HbEffect::effectRunning( item, QString( "Click1" ) ) ) {
- HbEffect::cancel( item, QString( "Click1" ) );
- }
-}
-
-void GlxSlideShowEffectEngine::cancelEffect(const QList< QGraphicsItem * > & items)
-{
- for ( int i = 0; i < items.count() ; ++i ) {
- if ( HbEffect::effectRunning( items.at(i), QString( "Click%1").arg(i) ) ) {
- HbEffect::cancel( items.at(i), QString( "Click%1").arg(i) );
- }
- }
-}
-
-void GlxSlideShowEffectEngine::cancelEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect)
-{
- GlxTransitionEffectSetting *effectSetting = mTransitionEffectList.value( transitionEffect );
-
- if ( effectSetting == NULL || items.count() != effectSetting->count() ) {
- return;
- }
-
- for ( int i = 0; i < effectSetting->count() ; ++i) {
- HbEffect::cancel(items.at(i), effectSetting->eventType().at(i) );
- }
-}
-
-bool GlxSlideShowEffectEngine::isEffectRuning(QGraphicsItem * item)
-{
- if ( HbEffect::effectRunning( item, QString( "Click1" ) ) ) {
- return true;
- }
- return false;
-}
-
-bool GlxSlideShowEffectEngine::isEffectRuning(const QList< QGraphicsItem * > & items)
-{
- for ( int i = 0; i < items.count() ; ++i ) {
- if ( HbEffect::effectRunning( items.at(i), QString( "Click%1").arg(i) ) ) {
- return true;
- }
- }
- return false;
-}
-
-void GlxSlideShowEffectEngine::slideShowEffectFinished( const HbEffect::EffectStatus &status )
-{
- Q_UNUSED( status )
- qDebug("GlxSlideShowEffectEngine::slideShowEffectFinished() number of effect %d ", mNbrEffectRunning);
-
- --mNbrEffectRunning;
-
- if ( mEffectPlugin->isAnimationLater( mNbrEffectRunning) ) {
- HbEffect::start( mEffectPlugin->animationItem(), mEffectPlugin->ItemType(), QString( "Click%1").arg(mNbrEffectRunning), this, "slideShowEffectFinished");
- }
-
- if (mNbrEffectRunning == 0) {
- emit effectFinished();
- }
-}
-
-void GlxSlideShowEffectEngine::transitionEffectFinished( const HbEffect::EffectStatus &status )
-{
- Q_UNUSED( status )
- qDebug("GlxSlideShowEffectEngine::transitionEffectFinished() number of effect %d status %d", mNbrEffectRunning, status.reason);
-
- --mNbrEffectRunning;
- if ( mNbrEffectRunning == 1 ) {
- GlxTransitionEffectSetting *effectSetting = mTransitionEffectList.value( mTransitionEffect );
- if ( effectSetting->isTransitionLater() ){
- effectSetting->animationItem()->show();
- HbEffect::start( effectSetting->animationItem(), effectSetting->itemType().at(1), effectSetting->eventType().at(1), this, "transitionEffectFinished");
- mTransitionEffect = NO_EFFECT;
- }
- }
-
- if (mNbrEffectRunning == 0) {
- emit effectFinished();
- }
-}
-
-void GlxSlideShowEffectEngine::effectPluginResolver()
-{
-//TO:DO improved the code by using factory design pattern
-
- delete mEffectPlugin;
- mEffectPlugin = NULL;
-
- switch ( mSlideShowSetting.effect() ) {
- case TRANSITION_EFFECT :
- if ( slideShowMoveDir() == MOVE_FORWARD ) {
- mEffectPlugin = new GlxForwardTransitionPlugin();
- }
- else {
- mEffectPlugin = new GlxBackwardTransitionPlugin();
- }
- break;
-
- case FADE_EFFECT :
- mEffectPlugin = new GlxFadePlugin();
- break;
-
- default :
- break;
- }
-}
-
-void GlxSlideShowEffectEngine::initTransitionEffect()
-{
- GlxTransitionEffectSetting *effectSetting = NULL;
-
- effectSetting = new GlxTransitionEffectSetting(GRID_TO_FULLSCREEN);
- for ( int i = 0; i < effectSetting->count(); ++i ) {
- HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
- }
- mTransitionEffectList[GRID_TO_FULLSCREEN] = effectSetting;
-
- effectSetting = new GlxTransitionEffectSetting( FULLSCREEN_TO_GRID );
- for ( int i = 0; i < effectSetting->count(); ++i ) {
- HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
- }
- mTransitionEffectList[FULLSCREEN_TO_GRID] = effectSetting;
-
- effectSetting = new GlxTransitionEffectSetting( GRID_TO_ALBUMLIST );
- for ( int i = 0; i < effectSetting->count(); ++i ) {
- HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
- }
- mTransitionEffectList[GRID_TO_ALBUMLIST] = effectSetting;
-
- effectSetting = new GlxTransitionEffectSetting( ALBUMLIST_TO_GRID );
- for ( int i = 0; i < effectSetting->count(); ++i ) {
- HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
- }
- mTransitionEffectList[ALBUMLIST_TO_GRID] = effectSetting;
-
- effectSetting = new GlxTransitionEffectSetting( FULLSCREEN_TO_DETAIL );
- for ( int i = 0; i < effectSetting->count(); ++i ) {
- HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
- }
- mTransitionEffectList[FULLSCREEN_TO_DETAIL] = effectSetting;
-
- effectSetting = new GlxTransitionEffectSetting( DETAIL_TO_FULLSCREEN );
- for ( int i = 0; i < effectSetting->count(); ++i ) {
- HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
- }
- mTransitionEffectList[DETAIL_TO_FULLSCREEN] = effectSetting;
-}
-
-void GlxSlideShowEffectEngine::cleanTransitionEfffect()
-{
- qDebug("GlxSlideShowEffectEngine::cleanTrnastionEfffect()");
-
- foreach( GlxTransitionEffectSetting *list, mTransitionEffectList) {
- for ( int i = 0; i < list->count(); ++i ) {
- HbEffect::remove( list->itemType().at(i), list->effectFileList().at(i), list->eventType().at(i)) ;
- }
- delete list;
- }
- mTransitionEffectList.clear();
-
-}
-
--- a/ui/views/fullscreenview/inc/glxcoverflow.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/fullscreenview/inc/glxcoverflow.h Wed Jun 23 17:18:45 2010 +0100
@@ -62,8 +62,11 @@
void partiallyCreate(QAbstractItemModel *model, QSize itemSize);
void setCoverFlow();
void ClearCoverFlow();
+ void setMultitouchFilter(QGraphicsItem* multitouchFilter);
public slots:
+ void zoomStarted(int index);
+ void zoomFinished(int index);
signals :
void coverFlowEvent(GlxCoverFlowEvent e);
@@ -73,8 +76,6 @@
protected slots:
void panGesture ( const QPointF & delta ) ;
- void leftGesture (int value);
- void rightGesture (int value) ;
void longPressGesture(const QPointF &point) ;
void dataChanged(QModelIndex startIndex, QModelIndex endIndex);
void rowsInserted(const QModelIndex &parent, int start, int end);
@@ -116,6 +117,8 @@
QAbstractItemModel *mModel;
GlxUserMove mMoveDir;
int mSpeed;
+ bool mZoomOn;
+ QGraphicsItem* mMultitouchFilter;
};
#endif /* GLXCOVERFLOW_H_ */
--- a/ui/views/fullscreenview/inc/glxfullscreenview.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/fullscreenview/inc/glxfullscreenview.h Wed Jun 23 17:18:45 2010 +0100
@@ -37,8 +37,7 @@
class HbIconItem;
//User Defined forward declartion
-class GlxZoomSlider;
-class GlxZoomControl;
+class GlxZoomWidget;
class GlxTvOutWrapper;
class GlxFullScreenView : public GlxView
@@ -86,8 +85,7 @@
void handleToolBarAction();
protected :
- bool event(QEvent *event);
-
+ bool eventFilter(QObject *obj, QEvent *ev);
private:
/*
@@ -126,9 +124,7 @@
HbAction *mUseImageAction;
//for Zoom
- HbPushButton *mZmPushButton;
- GlxZoomSlider *mZoomSlider;
- GlxZoomControl *mZoomControl;
+ GlxZoomWidget *mZoomWidget;
HbDocumentLoader *mDocLoader;
bool mUiOff; // to check the current status of ui on / off
--- a/ui/views/fullscreenview/inc/glxzoomcontrol.h Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-#ifndef GLXZOOMCONTROL_H
-#define GLXZOOMCONTROL_H
-#include <hbscrollarea.h>
-
-class GlxMediaModel;
-class QAbstractItemModel;
-class HbIconItem;
-class GlxImageDecoderWrapper;
-class GlxZoomControl : public HbScrollArea
-{
-Q_OBJECT
-
-public:
- GlxZoomControl(QGraphicsItem *parent = NULL);
- ~GlxZoomControl();
- void setModel (QAbstractItemModel *model);
- void indexChanged (int index);
- void setWindowSize (QSize windowSize);
-signals:
- void hideFullScreenUi();
-public slots:
- void zoomImage(int zoomFactor);
- void decodedImageAvailable();
- void initialZoomFactor(int initZoomFactor);
-private:
- void initializeZoomControl(int zoomFactor);
- void resetZoomControl();
- void updateItemPosition();
- void calculatePanOffset();
- void checkandAdjustImageBoundaries(QPointF &finalPos, QPointF undefferedPos);
-
-private:
- QGraphicsPixmapItem *mZoomItem;
- QGraphicsWidget *mZoomWidget;
- GlxImageDecoderWrapper* mImageDecoder;
- HbIconItem *mBlackBackgroundItem;
- QSizeF mCurrentSize;
- QSizeF mItemSize;
- GlxMediaModel *mModel; //not owned
- int mInitialZoomFactor;
- int mCurrentZoomFactor;
- bool mIsControlActivated;
- bool mIsItemChanged;
- QSize mWindowSize;
- QPointF mPanOffset;
-};
-#endif //GLXZOOMCONTROL_h
--- a/ui/views/fullscreenview/inc/glxzoomslider.h Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-#ifndef GLXZOOMSLIDER_H
-#define GLXZOOMSLIDER_H
-#include <QObject>
-#include <QSize>
-class HbSlider;
-class GlxMediaModel;
-class QAbstractItemModel;
-class QGraphicsItem;
-class GlxZoomSlider : public QObject
-{
-Q_OBJECT
-
-public:
- GlxZoomSlider (QGraphicsItem *parent = NULL);
- ~GlxZoomSlider ();
- void setModel (QAbstractItemModel *model);
- void indexChanged (int index);
-signals:
- void valueChanged(int newValue);
- void initialZoomFactor(int initZoomFactor);
-public slots:
- void toggleSliderVisibility();
- void filterandEmitSliderValueChanges(int newValue);
- void sliderThumbPressed();
- void sliderThumbReleased();
-private:
- void retrieveActualAndDisplayedSize(QSize& itemsize, QSize& displayedSize);
- int calculateZoomFactor(QSize& itemsize, QSize& displayedSize);
- void calculateAndInitializeFSZoomFactor();
- HbSlider* mZoomSlider;
- bool isSliderVisible;
- bool mSliderThumbPressed;
- GlxMediaModel *mModel; //not owned
-};
-#endif //GLXZOOMSLIDER_H
--- a/ui/views/fullscreenview/src/glxcoverflow.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/fullscreenview/src/glxcoverflow.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -29,8 +29,9 @@
#include <glxcoverflow.h>
#include "glxviewids.h"
-#define GLX_COVERFLOW_SPEED 60
-#define GLX_BOUNCEBACK_SPEED 15
+#define GLX_COVERFLOW_SPEED 32
+#define GLX_BOUNCEBACK_SPEED 16
+#define GLX_BOUNCEBACK_DELTA 8
GlxCoverFlow::GlxCoverFlow(QGraphicsItem *parent )
: HbWidget(parent),
@@ -42,7 +43,9 @@
mItemSize (QSize(0,0)),
mModel ( NULL),
mMoveDir(NO_MOVE),
- mSpeed ( GLX_COVERFLOW_SPEED )
+ mSpeed ( GLX_COVERFLOW_SPEED ),
+ mZoomOn(false),
+ mMultitouchFilter(NULL)
{
//TO:DO through exception
qDebug("GlxCoverFlow::GlxCoverFlow");
@@ -52,16 +55,22 @@
connect( this, SIGNAL( autoRightMoveSignal() ), this, SLOT( autoRightMove() ), Qt::QueuedConnection );
}
+void GlxCoverFlow::setMultitouchFilter(QGraphicsItem* mtFilter)
+{
+ mMultitouchFilter = mtFilter;
+}
void GlxCoverFlow::setCoverFlow()
{
qDebug("GlxCoverFlow::setCoverFlow");
for ( qint8 i = 0; i < NBR_ICON_ITEM ; i++ ) {
mIconItem[i] = new HbIconItem(this);
+ mIconItem[i]->grabGesture(Qt::PinchGesture, Qt::ReceivePartialGestures);
+ mIconItem[i]->installSceneEventFilter(mMultitouchFilter);
mIconItem[i]->setBrush(QBrush(Qt::black));
mIconItem[i]->setSize(QSize(0,0));
}
mUiOn = FALSE;
- mBounceBackDeltaX = 10;
+ mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA;
}
void GlxCoverFlow::setItemSize(QSize &size)
@@ -97,44 +106,43 @@
void GlxCoverFlow::gestureEvent(QGestureEvent *event)
{
- if(QTapGesture *gesture = static_cast<QTapGesture *>(event->gesture(Qt::TapGesture))) {
+ if(QTapGesture *gesture = static_cast<QTapGesture *>(event->gesture(Qt::TapGesture))) {
if (gesture->state() == Qt::GestureFinished) {
- emit coverFlowEvent( TAP_EVENT );
- event->accept(gesture);
+ emit coverFlowEvent( TAP_EVENT );
+ event->accept(gesture);
+ }
+ }
+
+ if (QPanGesture *panningGesture = qobject_cast<QPanGesture*>(event->gesture(Qt::PanGesture))) {
+ HbPanGesture *hbPanGesture = qobject_cast<HbPanGesture *>(panningGesture);
+ if (hbPanGesture) {
+ if(hbPanGesture->state() == Qt::GestureUpdated) {
+ QPointF delta(hbPanGesture->sceneDelta());
+ panGesture(delta);
+ event->accept(panningGesture);
+ }
+
+ if(hbPanGesture->state() == Qt::GestureFinished) {
+ switch( mMoveDir ) {
+ case LEFT_MOVE :
+ mMoveDir = NO_MOVE;
+ mBounceBackDeltaX = ( mItemSize.width() >> 2 ) + ( mItemSize.width() >> 3 );
+ emit autoLeftMoveSignal();
+ break ;
+
+ case RIGHT_MOVE :
+ mMoveDir = NO_MOVE;
+ mBounceBackDeltaX = ( mItemSize.width() >> 2 ) + ( mItemSize.width() >> 3 );
+ emit autoRightMoveSignal();
+ break;
+
+ default:
+ break;
+ }
+ event->accept(panningGesture);
}
}
-
- if (QPanGesture *panningGesture = qobject_cast<QPanGesture*>(event->gesture(Qt::PanGesture))) {
- HbPanGesture *hbPanGesture = qobject_cast<HbPanGesture *>(panningGesture);
- if (hbPanGesture) {
- if(hbPanGesture->state() == Qt::GestureUpdated) {
- QPointF delta(hbPanGesture->sceneDelta());
- panGesture(delta);
- event->accept(panningGesture);
-
- }
- if(hbPanGesture->state() == Qt::GestureFinished) {
- switch( mMoveDir ) {
-
- case LEFT_MOVE:
- mMoveDir = NO_MOVE;
- emit autoLeftMoveSignal();
- break ;
-
- case RIGHT_MOVE :
- mMoveDir = NO_MOVE;
- emit autoRightMoveSignal();
- break;
-
- default:
- break;
- }
- event->accept(panningGesture);
-
- }
- }
- }
-
+ }
}
void GlxCoverFlow::panGesture ( const QPointF & delta )
@@ -157,38 +165,6 @@
}
}
-void GlxCoverFlow::leftGesture(int value)
-{
- Q_UNUSED(value);
- qDebug("GlxCoverFlow::leftGesture CurrentPos= %d value %d", mCurrentPos, value);
- if(getSubState() == IMAGEVIEWER_S || getSubState() == FETCHER_S ) {
- return;
- }
- mMoveDir = NO_MOVE;
- mBounceBackDeltaX = ( mItemSize.width() >> 2 ) + ( mItemSize.width() >> 3 );
- emit autoLeftMoveSignal();
- if ( mUiOn == TRUE ) {
- mUiOn = FALSE;
- emit coverFlowEvent( PANNING_START_EVENT );
- }
-}
-
-void GlxCoverFlow::rightGesture(int value)
-{
- Q_UNUSED(value);
- qDebug("GlxCoverFlow::rightGesture CurrentPos= %d value %d ", mCurrentPos, value);
- if(getSubState() == IMAGEVIEWER_S || getSubState() == FETCHER_S ) {
- return;
- }
- mMoveDir = NO_MOVE;
- mBounceBackDeltaX = ( mItemSize.width() >> 2 ) + ( mItemSize.width() >> 3 );
- emit autoRightMoveSignal();
- if ( mUiOn == TRUE ) {
- mUiOn = FALSE;
- emit coverFlowEvent( PANNING_START_EVENT );
- }
-}
-
void GlxCoverFlow::longPressGesture(const QPointF &point)
{
qDebug("GlxCoverFlow::longPressGesture x = %d y = %d", point.x(), point.y());
@@ -258,7 +234,7 @@
//for bounce back effect for last image ( it will do the back)
if ( ( mCurrentPos + width ) > ( mStripLen + mBounceBackDeltaX ) && mMoveDir == NO_MOVE ) {
mMoveDir = LEFT_MOVE;
- mBounceBackDeltaX = 10;
+ mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA;
autoRightMoveSignal();
return ;
}
@@ -286,10 +262,12 @@
mSelItemIndex = ( ++mSelItemIndex ) % NBR_ICON_ITEM;
selIndex = ( mSelItemIndex + 2 ) % NBR_ICON_ITEM;
updateIconItem( mSelIndex + 2, selIndex, width * 2 ) ;
+ if(!mZoomOn) {
emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ;
+ }
}
mMoveDir = NO_MOVE;
- mBounceBackDeltaX = 10;
+ mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA;
mSpeed = GLX_COVERFLOW_SPEED;
}
}
@@ -308,7 +286,7 @@
qDebug("GlxCoverFlow::autoRightMove diffX x = %d current pos = %d mBounceBackDeltaX x = %d", diffX, mCurrentPos, mBounceBackDeltaX);
if ( diffX > mBounceBackDeltaX && diffX < width && mMoveDir == NO_MOVE ){
mMoveDir = RIGHT_MOVE;
- mBounceBackDeltaX = 10;
+ mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA;
autoLeftMoveSignal();
return ;
}
@@ -338,10 +316,12 @@
mSelItemIndex = ( mSelItemIndex == 0 ) ? NBR_ICON_ITEM -1 : --mSelItemIndex;
selIndex = ( mSelItemIndex + 3 ) % NBR_ICON_ITEM;
updateIconItem( mSelIndex - 2, selIndex, - width * 2 ) ;
+ if(!mZoomOn) {
emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ;
+ }
}
mMoveDir = NO_MOVE;
- mBounceBackDeltaX = 10;
+ mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA;
mSpeed = GLX_COVERFLOW_SPEED;
}
}
@@ -542,3 +522,16 @@
}
return substate;
}
+
+void GlxCoverFlow::zoomStarted(int index)
+{
+ Q_UNUSED(index)
+ mZoomOn = true;
+}
+
+void GlxCoverFlow::zoomFinished(int index)
+{
+ mZoomOn = false;
+ indexChanged(index);
+
+}
--- a/ui/views/fullscreenview/src/glxfullscreenview.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/fullscreenview/src/glxfullscreenview.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -29,6 +29,7 @@
#include <QAbstractItemModel>
#include <hbabstractviewitem.h>
#include <hbiconitem.h>
+#include <QCoreApplication>
//User Includes
#include "glxlog.h"
@@ -42,7 +43,7 @@
#include "glxtvoutwrapper.h"
#include "glxfullscreenview.h"
#include "glxcommandhandlers.hrh"
-//#include "glxzoomwidget.h"
+#include "glxzoomwidget.h"
#include "OstTraceDefinitions.h"
#ifdef OST_TRACE_COMPILER_IN_USE
@@ -65,7 +66,8 @@
mFlipAction(NULL),
mSendAction(NULL),
mDeleteAction(NULL),
- mUseImageAction(NULL)
+ mUseImageAction(NULL),
+ mZoomWidget(NULL)
{
OstTraceFunctionEntry0( GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_ENTRY );
@@ -95,7 +97,9 @@
// to make the widget light weight in order to make
// transition smooth
mCoverFlow->partiallyCreate( model, screenSize());
- setItemVisible(Hb::AllItems, FALSE) ;
+
+ setStatusBarVisible(FALSE);
+ setTitleBarVisible(FALSE);
OstTraceFunctionExit0( GLXFULLSCREENVIEW_INITIALIZEVIEW_EXIT );
}
@@ -107,6 +111,9 @@
//Load the Coverflow and image strip widget
mCoverFlow = qobject_cast<GlxCoverFlow*> (mDocLoader->findWidget(GLXFULLSCREEN_COVERFLOW));
+ mZoomWidget = qobject_cast<GlxZoomWidget*> (mDocLoader->findWidget(GLXFULLSCREENZOOMWIDGET));
+ mZoomWidget->connectDecodeRequestToPinchEvent();
+ mCoverFlow->setMultitouchFilter(mZoomWidget);
//initialise the cover flow for basic connections and the rest
mCoverFlow->setCoverFlow();
@@ -117,6 +124,7 @@
//@to do : hide the widgets by default in docml
mImageStrip->hide();
mImageStrip->setLayoutName( QString( "ImageStrip" ) );
+ mImageStrip->setEnabledAnimations(HbAbstractItemView::None);
OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADWIDGETS_EXIT );
}
@@ -174,12 +182,16 @@
{
OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ACTIVATE_ENTRY );
- setItemVisible(Hb::AllItems, FALSE) ;
+ setStatusBarVisible(FALSE);
+ setTitleBarVisible(FALSE);
+
//for zoom might not be required after wk15 release
mWindow->viewport()->setAttribute(Qt::WA_AcceptTouchEvents,true);
mWindow->viewport()->grabGesture(Qt::PinchGesture);
+ QCoreApplication::instance()->installEventFilter(this);
+
if(!mCoverFlow){
loadWidgets(); //retrives the widgets
}
@@ -236,7 +248,7 @@
//Clean up the rest of the resources allocated
cleanUp();
-
+ QCoreApplication::instance()->removeEventFilter(this);
//deletes the iconitems in the coverflow
mCoverFlow->ClearCoverFlow();
@@ -270,6 +282,11 @@
delete mTvOutWrapper;
mTvOutWrapper = NULL;
}
+ if(mZoomWidget)
+ {
+ mZoomWidget->cleanUp();
+
+ }
OstTraceFunctionExit0( GLXFULLSCREENVIEW_CLEANUP_EXIT );
}
@@ -292,7 +309,7 @@
mModel = model;
setModelContext();
setHdmiModel(mModel);
-
+ mZoomWidget->setModel(mModel);
mCoverFlow->setModel(mModel);
setImageStripModel();
if(getSubState() == IMAGEVIEWER_S)
@@ -300,7 +317,8 @@
setTitle("Image Viewer");
}
else if(getSubState() == FETCHER_S){
- setItemVisible(Hb::AllItems, TRUE) ;
+ setStatusBarVisible(TRUE);
+ setTitleBarVisible(TRUE);
}
OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETMODEL_EXIT );
}
@@ -365,7 +383,9 @@
}
mFullScreenToolBar->show();
- setItemVisible(Hb::AllItems, TRUE) ;
+ setStatusBarVisible(TRUE);
+ setTitleBarVisible(TRUE);
+
if ( mImageStrip && getSubState() != IMAGEVIEWER_S) {
mImageStrip->show();
@@ -395,7 +415,8 @@
mUiOff = TRUE;
if ( getSubState() != FETCHER_S ) {
- setItemVisible(Hb::AllItems, FALSE) ;
+ setStatusBarVisible(FALSE);
+ setTitleBarVisible(FALSE);
}
if ( mImageStrip && ( getSubState() != IMAGEVIEWER_S && getSubState() != FETCHER_S )) {
HbEffect::start(mImageStrip, QString("HbGridView"), QString("TapHide"), this, "effectFinished" );
@@ -421,7 +442,8 @@
}
return;
}
- mModel->setData( index, index.row(), GlxFocusIndexRole );
+ mModel->setData( index, index.row(), GlxFocusIndexRole );
+ mZoomWidget->indexChanged(index.row());
if (mTvOutWrapper){
// for the image changed on swipe
mTvOutWrapper->setImagetoHDMI();
@@ -439,6 +461,7 @@
return;
}
mModel->setData( index, index.row(), GlxFocusIndexRole );
+ mZoomWidget->indexChanged(index.row());
mCoverFlow->indexChanged(index.row());
mImageStrip->scrollTo(index, HbGridView::EnsureVisible );
if (mTvOutWrapper){
@@ -587,7 +610,9 @@
QSize sz = screenSize();
mCoverFlow->setItemSize(sz);
- OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETLAYOUT_EXIT );
+ mZoomWidget->setWindowSize(sz);
+
+ OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETLAYOUT_EXIT );
}
void GlxFullScreenView::addConnection()
@@ -611,6 +636,11 @@
connect(mUiOffTimer, SIGNAL(timeout()), this, SLOT(hideUi()));
}
+ if(mCoverFlow && mZoomWidget) {
+ connect(mZoomWidget,SIGNAL( pinchGestureReceived(int) ), mCoverFlow, SLOT( zoomStarted(int) ) );
+ connect(mZoomWidget,SIGNAL( zoomWidgetMovedBackground(int) ), mCoverFlow, SLOT( zoomFinished(int) ) );
+ }
+
connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation)));
OstTraceFunctionExit0( GLXFULLSCREENVIEW_ADDCONNECTION_EXIT );
@@ -657,6 +687,10 @@
if(mUseImageAction) {
disconnect(mUseImageAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) );
}
+ if(mCoverFlow && mZoomWidget) {
+ disconnect(mZoomWidget,SIGNAL( pinchGestureReceived(int) ), mCoverFlow, SLOT( zoomStarted(int) ) );
+ disconnect(mZoomWidget,SIGNAL( zoomWidgetMovedBackground(int) ), mCoverFlow, SLOT( zoomFinished(int) ) );
+ }
disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation)));
@@ -683,22 +717,10 @@
cleanUp();
delete mIconItem ;
- mIconItem = NULL;
-
- if(mImageStrip) {
- delete mImageStrip;
- mImageStrip = NULL;
- }
-
- if(mFullScreenToolBar) {
- delete mFullScreenToolBar;
- mFullScreenToolBar = NULL;
- }
-
- if(mCoverFlow) {
- delete mCoverFlow;
- mCoverFlow = NULL;
- }
+ delete mImageStrip;
+ delete mFullScreenToolBar;
+ delete mCoverFlow;
+ delete mZoomWidget;
if(mDocLoader != NULL) {
mDocLoader->reset();
@@ -760,19 +782,17 @@
return substate;
}
-bool GlxFullScreenView::event(QEvent *event)
+bool GlxFullScreenView::eventFilter(QObject *obj, QEvent *ev)
{
- GLX_LOG_INFO1("GlxFullScreenView::event() %d event type", event->type());
- if ( event->type() == QEvent::WindowActivate && mCoverFlow) {
- if (mTvOutWrapper){
+ GLX_LOG_INFO1("GlxFullScreenView::event() %d event type", ev->type());
+ if ( ev->type() == QEvent::ApplicationActivate && mTvOutWrapper) {
+ GLX_LOG_INFO("GlxFullScreenView::event() shift to native - CGlxHdmi");
mTvOutWrapper->setToNativeMode();
- }
}
- if ( event->type() == QEvent::WindowDeactivate && mCoverFlow) {
- if (mTvOutWrapper){
+ if ( ev->type() == QEvent::ApplicationDeactivate && mTvOutWrapper) {
+ GLX_LOG_INFO("GlxFullScreenView::event() shift to Clone - CGlxHdmi");
mTvOutWrapper->setToCloningMode();
- }
}
- return HbView::event(event);
+ return HbView::eventFilter(obj,ev);
}
--- a/ui/views/fullscreenview/src/glxzoomcontrol.cpp Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-#include "glxzoomcontrol.h"
-#include "glximagedecoderwrapper.h"
-#include "glxmodelparm.h"
-#include <hbicon.h>
-#include <glxmediamodel.h>
-#include <QtDebug>
-#include <hbinstance.h>
-#include <hbiconitem.h>
-#include <QDebug>
-
-GlxZoomControl::GlxZoomControl(QGraphicsItem *parent) : HbScrollArea(parent),mIsControlActivated(false), mIsItemChanged(true)
-{
- setScrollDirections(Qt::Horizontal | Qt::Vertical);
- hide();
- setZValue(6);
- setScrollingStyle(PanOrFlick);
- mBlackBackgroundItem = new HbIconItem(parent);
- mBlackBackgroundItem->setBrush(QBrush(Qt::black));
- mBlackBackgroundItem->hide();
- mZoomWidget = new QGraphicsWidget(this);
- mZoomItem = new QGraphicsPixmapItem(mZoomWidget);
- mImageDecoder = new GlxImageDecoderWrapper;
-
-}
-
-GlxZoomControl::~GlxZoomControl()
-{
- resetZoomControl();
- delete mZoomItem;
- delete mZoomWidget;
- mImageDecoder->resetDecoder();
- delete mImageDecoder;
- delete mBlackBackgroundItem;
-
-}
-
-void GlxZoomControl::zoomImage(int zoomFactor)
-{
- qDebug("@@@GlxZoomControl::zoomImage ZF=%d, InitialZf=%d", zoomFactor, mInitialZoomFactor);
- if(mIsItemChanged) {
- initializeZoomControl(zoomFactor);
- }
- if(zoomFactor > mInitialZoomFactor) {
-
- qreal zoomPercent = qreal(zoomFactor)/100.00;
- QSizeF requiredSize = QSize(qreal(mItemSize.width() * zoomPercent), qreal(mItemSize.height() * zoomPercent ));
- calculatePanOffset();
- mZoomWidget->scale(requiredSize.width()/mCurrentSize.width(), requiredSize.height()/mCurrentSize.height());
- qDebug()<<"GlxZoomControl::zoomImage scaling factor"<<requiredSize.width()/mCurrentSize.width()<<requiredSize.height()/mCurrentSize.height();
- qDebug()<<"GlxZoomControl::zoomImage required Size"<<requiredSize.width()<<requiredSize.height();
- qDebug()<<"GlxZoomControl::zoomImage current Size"<<mCurrentSize.width()<<mCurrentSize.height();
- qDebug()<<"GlxZoomControl::zoomImage item Size"<<mItemSize.width()<<mItemSize.height();
-
- //mZoomWidget->setGeometry(QRectF(-0.5*QPointF(requiredSize.width(),requiredSize.height()),requiredSize ));
- //mZoomWidget->setPos(mWindowSize.width()/2 - requiredSize.width()/2,mWindowSize.height()/2 - requiredSize.height()/2);
- mCurrentSize = requiredSize;
- mCurrentZoomFactor = zoomFactor;
- updateItemPosition();
- if(!mIsControlActivated) {
- show();
- mBlackBackgroundItem->show();
- mIsControlActivated = true;
- emit hideFullScreenUi();
- }
- }
- if(zoomFactor < mInitialZoomFactor)
- {
- mBlackBackgroundItem->hide();
- hide();
- mPanOffset.setX(0);
- mPanOffset.setY(0);
- updateItemPosition();
- mIsControlActivated = false;
- //mZoomWidget->resetTransform();
- }
-}
-
-void GlxZoomControl::initializeZoomControl(int zoomFactor)
-{
- qDebug("@@@GlxZoomControl::initializeZoomControl Zoom Factor %d", zoomFactor);
- if(mIsControlActivated || zoomFactor < mInitialZoomFactor)
- {
- return;
- }
- qDebug("@@@GlxZoomControl::initializeZoomControl Context not activated yet");
- //get the image path and request for a decoded pixmap first
- QString imagePath = (mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxUriRole)).value<QString>();
- mImageDecoder->decodeImage(imagePath);
- connect(mImageDecoder, SIGNAL(pixmapDecoded()), this, SLOT(decodedImageAvailable()));
- QVariant variant = mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxFsImageRole);
- if ( variant.isValid() && variant.canConvert<HbIcon> () ) {
- qDebug("@@@GlxZoomControl::initializeZoomControl valid icon");
- QIcon itemIcon = variant.value<HbIcon>().qicon();
- //QSize windowSize(360,640);
- QSize itemSize = itemIcon.actualSize(mWindowSize);
- QPixmap itemPixmap = itemIcon.pixmap(itemSize);
- //if(itemPixmap.isNull())
- qDebug("@@@GlxZoomControl::initializeZoomControl Null Pixmap");
- //set item size to the actual size
- mItemSize = (mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxDimensionsRole)).value<QSize>();
- mCurrentSize = itemPixmap.size();
- mZoomItem->setPixmap(itemPixmap);
- mZoomWidget->setGeometry(QRectF(-0.5*QPointF(mCurrentSize.width(),mCurrentSize.height()),mItemSize ));
- mZoomWidget->setPos(mWindowSize.width()/2 - mCurrentSize.width()/2,mWindowSize.height()/2 - mCurrentSize.height()/2);
- //show();
- //mIsControlActivated = true;
- mIsItemChanged = false;
- setContentWidget(mZoomWidget);
- }
-}
-
-void GlxZoomControl::setModel(QAbstractItemModel *model)
-{
- GlxMediaModel *glxModel = dynamic_cast<GlxMediaModel *>(model);
- if ( glxModel ==NULL || glxModel == mModel) {
- return ;
- }
- mModel = glxModel;
-}
-
-void GlxZoomControl::resetZoomControl()
-{
- qDebug("@@@GlxZoomControl::resetZoomControl");
- mBlackBackgroundItem->hide();
- hide();
- mZoomWidget->resetTransform();
- mZoomItem->setPixmap(QPixmap());
- mItemSize = QSizeF(0,0);
- mCurrentSize = mItemSize;
- mIsControlActivated = false;
- mIsItemChanged = true;
- mInitialZoomFactor = 0;
- mPanOffset.setX(0);
- mPanOffset. setY(0);
- mImageDecoder->resetDecoder();
-}
-
-void GlxZoomControl::indexChanged(int index)
-{
- Q_UNUSED(index);
- qDebug("@@@GlxZoomControl::indexChanged");
- resetZoomControl();
-
-}
-
-void GlxZoomControl::decodedImageAvailable()
-{
- //new bitmap with better resolution is available
- //so set it to the item
- QPixmap decodedPixmap = mImageDecoder->getPixmap();
- if(decodedPixmap.isNull()){
- return;
- }
- mCurrentSize = decodedPixmap.size();
- //this is important if not done then old transforms will be applied on the new image
- mZoomWidget->resetTransform();
- mZoomItem->setPixmap(decodedPixmap);
- QPointF undefferedPos;
- undefferedPos.setX(mWindowSize.width()/2 - mCurrentSize.width()/2);
- undefferedPos.setY(mWindowSize.height()/2 - mCurrentSize.height()/2);
- mZoomWidget->setGeometry(QRectF(undefferedPos,mCurrentSize )); //temporarily setting it to an undeffered position
- //update the image transforms
- zoomImage(mCurrentZoomFactor);
-}
-
-void GlxZoomControl::initialZoomFactor(int initZoomFactor)
-{
- qDebug("@@@GlxZoomControl::initialZoomFactor initZoomFactor=%d", initZoomFactor );
- resetZoomControl();
- mInitialZoomFactor = initZoomFactor;
-}
-
-void GlxZoomControl::setWindowSize (QSize windowSize)
-{
- if(mWindowSize != windowSize) {
- mWindowSize = windowSize;
- mBlackBackgroundItem->setSize(mWindowSize);
- mBlackBackgroundItem->setPos(0,0);
- if(!mIsItemChanged) {
- //first calculate offset because after orientation change this value will be lost
- calculatePanOffset();
- //update the item position WRT the new window size
- updateItemPosition();
-
- }
- }
-}
-void GlxZoomControl::updateItemPosition()
-{
- qreal zoomPercent = qreal(mCurrentZoomFactor)/100.00;
- QPointF undefferedPos;
- //calculate position if no panning was done
- undefferedPos.setX(mWindowSize.width()/2 - mCurrentSize.width()/2);
- undefferedPos.setY(mWindowSize.height()/2 - mCurrentSize.height()/2);
- QPointF offset = mPanOffset;
- //convert offset value WRT current zoomFactor
- offset *= zoomPercent;
- QPointF finalPos = undefferedPos + offset;
- //check for boundry conditions
- checkandAdjustImageBoundaries(finalPos, undefferedPos);
- qDebug()<<"GlxZoomControl::updateItemPosition offset x%d, y%d "<<offset.x()<< offset.y();
- //mZoomWidget->setPos(undefferedPos + offset);
- mZoomWidget->setGeometry(QRectF(finalPos,mCurrentSize ));
-}
-
-void GlxZoomControl::calculatePanOffset()
-{
- qreal zoomPercent = qreal(mCurrentZoomFactor)/100.00;
- QPointF currentPos = mZoomWidget->pos();
- //calculate position if no panning was done
- QPointF undefferedPos;
- undefferedPos.setX(mWindowSize.width()/2 - mCurrentSize.width()/2);
- undefferedPos.setY(mWindowSize.height()/2 - mCurrentSize.height()/2);
- //get the offset with the current zoomFactor which is the difference between currentPos and undefferedPos
- QPointF offset = currentPos - undefferedPos ;
- qDebug()<<"GlxZoomControl::calculatePanOffset current Pos x%d, y%d undeffered x %d, y %d"<<currentPos.x()<< currentPos.y()<< undefferedPos.x()<< undefferedPos.y();
- mPanOffset = offset;
- //convert the offset value WRT a 100% zoomed image as that will be used for reference
- mPanOffset /= zoomPercent;
- qDebug()<<"GlxZoomControl::calculatePanOffset mPanOffset x%d, y%d "<<mPanOffset.x()<< mPanOffset.y();
-}
-
-void GlxZoomControl::checkandAdjustImageBoundaries(QPointF &finalPos, QPointF undefferedPos)
-{
- //check for boundary conditions in X Axis
-
- //for Left side
- //since the image is positioned WRT to screens top left corner(0,0) so if the images top left corner's X (finalPos.x()) is positive
- //then boundry conditions for image to be on the leftmost side is met
- if(finalPos.x() > 0) {
- //chk if the original image position without any offset has also reached boundry conditions
- if(undefferedPos.x() < 0) {
- //set the image to the leftmost axis on the screen
- finalPos.setX(0);
- }
- //if original image position without any offset has also reached boundry conditions then use the undefferedPos
- else {
- finalPos.setX(undefferedPos.x());
- //set offset to 0 as it is of no use anymore
- mPanOffset.setX(0);
- }
- }
-
- //Right side
- //since the image is positioned WRT to screens top left corner(0,0) so if image Position added to the image dimensions is
- //greater than the screen dimensions then boundfy conditions for rightmost and lowest points are met.
- //for X axis width will be of our concern
- if((finalPos.x() + mCurrentSize.width()) < mWindowSize.width()){
- //if original image position without any offset has also reached boundry conditions then use the undefferedPos
- if ((undefferedPos.x() + mCurrentSize.width()) < mWindowSize.width()) {
- finalPos.setX(undefferedPos.x());
- //set offset to 0 as it is of no use anymore
- mPanOffset.setX(0);
- }
- else {
- //set the image to the rightmost axis on the screen
- finalPos.setX(mWindowSize.width()- mCurrentSize.width());
- }
- }
-
-
- //check for boundary conditions in Y Axis
-
- //top
- //since the image is positioned WRT to screens top left corner(0,0) so if the images top left corner's Y (finalPos.y()) is positive
- //then boundry conditions for image to be on the topmost side is met
- if(finalPos.y() > 0) {
- //chk if the original image position without any offset has also reached boundry conditions
- if(undefferedPos.y() < 0) {
- //set the image to the topmost axis on the screen
- finalPos.setY(0);
- }
- //if original image position without any offset has also reached boundry conditions then use the undefferedPos
- else {
- finalPos.setY(undefferedPos.y());
- //set offset to 0 as it is of no use anymore
- mPanOffset.setY(0);
- }
- }
-
- //bottom
- //since the image is positioned WRT to screens top left corner(0,0) so if image Position added to the image dimensions is
- //greater than the screen dimensions then boundfy conditions for rightmost and lowest points are met.
- //for Y axis height will be of our concern
-
- if((finalPos.y() + mCurrentSize.height()) < mWindowSize.height()){
- //if original image position without any offset has also reached boundry conditions then use the undefferedPos
- if ((undefferedPos.y() + mCurrentSize.height()) < mWindowSize.height()) {
- finalPos.setY(undefferedPos.y());
- //set offset to 0 as it is of no use anymore
- mPanOffset.setY(0);
- }
- else {
- //set the image to the lowest axis on the screen
- finalPos.setY(mWindowSize.height()- mCurrentSize.height());
- }
- }
-
-}
--- a/ui/views/fullscreenview/src/glxzoomslider.cpp Tue May 18 12:19:10 2010 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-#include "glxzoomslider.h"
-#include <hbslider.h>
-#include <glxmediamodel.h>
-#include <QAbstractItemModel>
-#include <QGraphicsItem>
-#include <QtDebug>
-#include "glxmodelparm.h"
-#include <QDebug>
-
-GlxZoomSlider::GlxZoomSlider(QGraphicsItem *parent)
-{
- mZoomSlider = new HbSlider(Qt::Horizontal,parent);
- mZoomSlider->hide();
- mZoomSlider->setRange(0, 400);
- mZoomSlider->setSingleStep(25);
- mZoomSlider->setSliderPosition(100);
- mZoomSlider->setZValue(7);
- mZoomSlider->setPos(50,100);
- mZoomSlider->resize(300.0, 0.0 );
- isSliderVisible = false;
- mSliderThumbPressed = false;
- connect(mZoomSlider, SIGNAL(valueChanged(int)), this, SLOT(filterandEmitSliderValueChanges(int)));
- connect(mZoomSlider, SIGNAL(sliderPressed()), this, SLOT(sliderThumbPressed()));
- connect(mZoomSlider, SIGNAL(sliderReleased()), this, SLOT(sliderThumbReleased()));
-}
-
-GlxZoomSlider::~GlxZoomSlider()
-{
- disconnect(mZoomSlider, SIGNAL(valueChanged(int)), this, SLOT(filterandEmitSliderValueChanges(int)));
- disconnect(mZoomSlider, SIGNAL(sliderPressed()), this, SLOT(sliderThumbPressed()));
- disconnect(mZoomSlider, SIGNAL(sliderReleased()), this, SLOT(sliderThumbReleased()));
- delete mZoomSlider;
- isSliderVisible = false;
-}
-
-void GlxZoomSlider::setModel (QAbstractItemModel *model)
-{
- GlxMediaModel *glxModel = dynamic_cast<GlxMediaModel *>(model);
- if ( glxModel ==NULL || glxModel == mModel) {
- return ;
- }
- mModel = glxModel;
-
-}
-
-void GlxZoomSlider::indexChanged (int index)
-{
- Q_UNUSED(index);
- mZoomSlider->hide();
- isSliderVisible = false;
-}
-
-void GlxZoomSlider::toggleSliderVisibility()
-{
- if(isSliderVisible) {
- mZoomSlider->hide();
- isSliderVisible = false;
- }
- else {
- calculateAndInitializeFSZoomFactor();
- mZoomSlider->show();
- isSliderVisible = true;
- }
-}
-
-void GlxZoomSlider::retrieveActualAndDisplayedSize(QSize& itemSize, QSize& displayedSize)
-{
- itemSize = (mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxDimensionsRole)).value<QSize>();
- qDebug()<<"GlxZoomSlider::retrieveActualAndDisplayedSize"<<itemSize.width()<<itemSize.height();
- QVariant variant = mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value<int>(),0),GlxFsImageRole);
- if ( variant.isValid() && variant.canConvert<HbIcon> () ) {
- QIcon itemIcon = variant.value<HbIcon>().qicon();
- QSize windowSize(360,640);
- QSize itemSize = itemIcon.actualSize(windowSize);
- QPixmap itemPixmap = itemIcon.pixmap(itemSize);
- displayedSize = itemPixmap.size();
- qDebug()<<"GlxZoomSlider::retrieveActualAndDisplayedSize Display"<<displayedSize.width()<<displayedSize.height();
- }
-
-}
-int GlxZoomSlider::calculateZoomFactor(QSize& itemSize, QSize& displayedSize)
-{
- int zoomFactor = 100 * (displayedSize.width())/(itemSize.width());
- return zoomFactor;
-}
-
-void GlxZoomSlider::calculateAndInitializeFSZoomFactor()
-{
- QSize itemSize,displaySize;
- retrieveActualAndDisplayedSize(itemSize, displaySize);
- int sliderPosition = calculateZoomFactor(itemSize,displaySize);
- emit initialZoomFactor(sliderPosition);
- mZoomSlider->setSliderPosition(sliderPosition);
-}
-
-void GlxZoomSlider::filterandEmitSliderValueChanges(int newValue)
-{
- if (mSliderThumbPressed){
- emit valueChanged(newValue);
- }
- //else {
- qDebug()<<"GlxZoomSlider::filterandEmitSliderValueChanges stray signal"<<newValue;
- //}
-}
-
-void GlxZoomSlider::sliderThumbPressed()
-{
- qDebug()<<"GlxZoomSlider::sliderThumbPressed";
- mSliderThumbPressed = true;
-}
-
-void GlxZoomSlider::sliderThumbReleased()
-{
- qDebug()<<"GlxZoomSlider::sliderThumbReleased";
- mSliderThumbPressed = false;
-}
--- a/ui/views/gridview/inc/glxgridview.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/gridview/inc/glxgridview.h Wed Jun 23 17:18:45 2010 +0100
@@ -30,6 +30,8 @@
class GlxModelWrapper;
class HbPushButton;
class HbIconItem;
+class HbCheckBox;
+class HbLabel;
class GlxGridView : public GlxView
{
@@ -55,13 +57,30 @@
void scrollingStarted();
void orientationchanged(Qt::Orientation orient);
void visibleIndexChanged(const QModelIndex& current, const QModelIndex& previous);
+ void stateChanged(int state);
+ //show the marked item count
+ void showMarkedItemCount();
+ //show item count in the grid
+ void showItemCount();
+ //clear all the model connection
+ void clearCurrentModel();
+ //add the connection to the model
+ void initializeNewModel();
+ void showAlbumTitle(QString aTitle);
+ void populated();
protected :
QVariant itemChange (GraphicsItemChange change, const QVariant &value) ;
+
+ /*
+ * To emit the signal when application goes into background or come back to foreground
+ */
+ bool eventFilter(QObject *obj, QEvent *ev);
private slots:
void indicateLongPress(const QModelIndex& index, QPointF coords);
void uiButtonClicked(bool checked);
+ void cameraButtonClicked(bool checked);
private:
void addViewConnection();
@@ -69,15 +88,25 @@
void hideorshowitems(Qt::Orientation orient);
void scrolltofocus();
void loadGridView();
-
+ void showHbItems();
+ int getSubState();
+ void showNoImageString();
+
HbMainWindow *mWindow; // no ownership
QAbstractItemModel *mModel ;
HgWidget *mWidget; // HG Grid Widget
QItemSelectionModel *mSelectionModel; // Selected items model
GlxModelWrapper *mModelWrapper; // Temp Model Wrapper, so That Role Change not a problem
HbPushButton *mUiOnButton;
+ HbPushButton *mCameraButton; // Camera Button, when item count is zero
bool mScrolling;
HbIconItem *mIconItem;
+ HbCheckBox *mMarkCheckBox; // Mark All checkbox
+ HbLabel *mCountItem; // Item count of the grid
+ HbLabel *mMainLabel;
+ HbLabel *mCountLabel; // Marked item count
+ HbLabel *mZeroItemLabel; // zero itemcount
+ HbLabel *mAlbumName;
};
#endif /* GLXGRIDVIEW_H_ */
--- a/ui/views/gridview/src/glxgridview.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/gridview/src/glxgridview.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -26,12 +26,21 @@
#include <hbiconitem.h>
#include <hbicon.h>
#include <xqserviceutil.h>
+#include <hbcheckbox.h>
+#include <hblabel.h>
+#include <QString>
+#include <hbframeitem.h>
+#include <QCoreApplication>
//User Includes
#include "glxviewids.h"
#include "glxgridview.h"
#include "glxmodelparm.h"
#include "glxcommandhandlers.hrh"
+#include "glxicondefs.h"
+#include "glxlocalisationstrings.h"
+#include "glxlog.h"
+#include "glxtracer.h"
#include "OstTraceDefinitions.h"
@@ -47,8 +56,15 @@
mSelectionModel(NULL),
mModelWrapper(NULL),
mUiOnButton(NULL),
+ mCameraButton(NULL),
mScrolling(FALSE),
- mIconItem(NULL)
+ mIconItem(NULL),
+ mMarkCheckBox(NULL),
+ mCountItem(NULL),
+ mMainLabel(NULL),
+ mCountLabel(NULL),
+ mZeroItemLabel(NULL),
+ mAlbumName(NULL)
{
OstTraceFunctionEntry0( GLXGRIDVIEW_GLXGRIDVIEW_ENTRY );
mModelWrapper = new GlxModelWrapper();
@@ -61,30 +77,54 @@
{
OstTraceFunctionEntry0( GLXGRIDVIEW_ACTIVATE_ENTRY );
if(mUiOnButton == NULL) {
- mUiOnButton = new HbPushButton("UI",this);
+ mUiOnButton = new HbPushButton(this);
connect(mUiOnButton, SIGNAL(clicked(bool)), this, SLOT(uiButtonClicked(bool)));
- mUiOnButton->setGeometry(QRectF(610,0,15,15));
+ mUiOnButton->setGeometry(QRectF(590,0,40,40));
mUiOnButton->setZValue(1);
+ mUiOnButton->setIcon(HbIcon(GLXICON_WALL_UI_ON));
mUiOnButton->hide();
}
loadGridView();
+ connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation)),Qt::UniqueConnection);
+ if(mCountItem == NULL) {
+ mCountItem = new HbLabel(this);
+ HbFrameItem *frame = new HbFrameItem(this); //graphics for mCountItem
+ frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ frame->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans");
+ frame->graphicsItem()->setOpacity(1);
+ mCountItem->setBackgroundItem(frame->graphicsItem(),-1);
+ }
+ QCoreApplication::instance()->installEventFilter(this);
OstTraceFunctionExit0( GLXGRIDVIEW_ACTIVATE_EXIT );
}
void GlxGridView::deActivate()
{
OstTraceFunctionEntry0( GLXGRIDVIEW_DEACTIVATE_ENTRY );
- if (mUiOnButton && mUiOnButton->isVisible())
- {
+ mScrolling = FALSE;
+ if (mUiOnButton){
mUiOnButton->hide();
- }
- if(mIconItem)
- {
+ }
+ if(mIconItem) {
mIconItem->hide();
mIconItem->resetTransform();
mIconItem->setOpacity(0);
mIconItem->setZValue(mIconItem->zValue()-20);
- }
+ }
+ if (mCountItem) {
+ mCountItem->hide();
+ }
+ if (mAlbumName) {
+ mAlbumName->hide();
+ }
+ if(mZeroItemLabel) {
+ mZeroItemLabel->hide();
+ }
+ if(mCameraButton) {
+ mCameraButton->hide();
+ }
+ QCoreApplication::instance()->removeEventFilter(this);
+ disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation)));
OstTraceFunctionExit0( GLXGRIDVIEW_DEACTIVATE_EXIT );
}
@@ -94,12 +134,37 @@
setModel(model);
}
-void GlxGridView::setModel(QAbstractItemModel *model)
+void GlxGridView::clearCurrentModel()
+{
+ if ( mModel ) {
+ disconnect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(showItemCount()));
+ disconnect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(showItemCount()));
+ disconnect(mModel, SIGNAL(destroyed()), this, SLOT( clearCurrentModel()));
+ disconnect(mModel, SIGNAL(albumTitleAvailable(QString)), this, SLOT(showAlbumTitle(QString)));
+ disconnect(mModel, SIGNAL(populated()), this, SLOT( populated()));
+ mModel = NULL ;
+ }
+}
+
+void GlxGridView::initializeNewModel()
+{
+ if ( mModel ) {
+ connect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(showItemCount()));
+ connect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(showItemCount()));
+ connect(mModel, SIGNAL(destroyed()), this, SLOT( clearCurrentModel()));
+ connect(mModel, SIGNAL(albumTitleAvailable(QString)), this, SLOT(showAlbumTitle(QString)));
+ connect(mModel, SIGNAL(populated()), this, SLOT( populated()));
+ }
+}
+
+void GlxGridView::setModel(QAbstractItemModel *model)
{
OstTraceFunctionEntry0( GLXGRIDVIEW_SETMODEL_ENTRY );
if(model)
{
- mModel = model;
+ clearCurrentModel();
+ mModel = model;
+ initializeNewModel();
QVariant variantimage = mModel->data(mModel->index(0,0),GlxDefaultImage);
if (mWidget && variantimage.isValid() && variantimage.canConvert<QImage> () )
{
@@ -114,6 +179,7 @@
mWidget->setSelectionModel(mSelectionModel);
}
scrolltofocus(); // Need to do it here ?
+ showItemCount();
}
OstTraceFunctionExit0( GLXGRIDVIEW_SETMODEL_EXIT );
}
@@ -142,12 +208,226 @@
{
OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ENABLEMARKING, "GlxGridView::enableMarking" );
mWidget->setSelectionMode(HgWidget::MultiSelection);
+ if (mMainLabel == NULL) {
+ mMainLabel = new HbLabel("Select Photos", this);
+ HbFrameItem *frame1 = new HbFrameItem(this); //graphics for mMainLabel
+ frame1->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ frame1->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans");
+ frame1->graphicsItem()->setOpacity(1);
+ mMainLabel->setBackgroundItem(frame1->graphicsItem(),-1);
+ }
+ if (mMarkCheckBox == NULL) {
+ mMarkCheckBox = new HbCheckBox(GLX_OPTION_MARK_ALL, this);
+ HbFrameItem *frame2 = new HbFrameItem(this); //graphics for mMarkCheckBox
+ frame2->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ frame2->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans");
+ frame2->graphicsItem()->setOpacity(1);
+ mMarkCheckBox->setBackgroundItem(frame2->graphicsItem(),-1);
+ }
+ if (mCountLabel == NULL) {
+ mCountLabel = new HbLabel(this);
+ HbFrameItem *frame3 = new HbFrameItem(this); //graphics for mCountLabel
+ frame3->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ frame3->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans");
+ frame3->graphicsItem()->setOpacity(1);
+ mCountLabel->setBackgroundItem(frame3->graphicsItem(),-1);
+ }
+
+ hideorshowitems(mWindow->orientation());
+
+ connect( mWidget->selectionModel() , SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection& ) ), this, SLOT( showMarkedItemCount() ) );
+ connect(mMarkCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( stateChanged(int)));
+
}
void GlxGridView::disableMarking()
{
OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_DISABLEMARKING, "GlxGridView::disableMarking" );
mWidget->setSelectionMode(HgWidget::NoSelection);
+ disconnect( mWidget->selectionModel() , SIGNAL( selectionChanged(const QItemSelection &, const QItemSelection& ) ), this, SLOT( showMarkedItemCount() ) );
+ disconnect(mMarkCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( stateChanged(int)));
+ if (mMainLabel) {
+ mMainLabel->hide();
+ }
+ if (mMarkCheckBox) {
+ mMarkCheckBox->setCheckState(Qt::Unchecked);
+ mMarkCheckBox->hide();
+ }
+ if (mCountLabel) {
+ mCountLabel->hide();
+ }
+
+ hideorshowitems(mWindow->orientation());
+}
+
+void GlxGridView::stateChanged(int state)
+{
+ if(state)
+ handleUserAction(EGlxCmdMarkAll);
+ else
+ handleUserAction(EGlxCmdUnMarkAll);
+}
+
+void GlxGridView::showMarkedItemCount()
+{
+ int count = mModel->rowCount();
+ QModelIndexList indexList = mWidget->selectionModel()->selectedIndexes();
+ int markItemCount = indexList.count();
+
+ QString text= QString("%1 / %2").arg( markItemCount ).arg( count );
+ mCountLabel->setPlainText( text );
+}
+
+void GlxGridView::showItemCount()
+{
+ int count = 0;
+ if(mModel) {
+ count = mModel->rowCount();
+ QSize deviceSize = HbDeviceProfile::current().logicalSize();
+ QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() )
+ : QSize( deviceSize.height(), deviceSize.width() ) ;
+ if(count) {
+ if(mZeroItemLabel) {
+ mZeroItemLabel->hide();
+ }
+ if(mCameraButton) {
+ mCameraButton->hide();
+ }
+ if(isItemVisible(Hb::TitleBarItem)) {
+ QString text;
+ if (getSubState() == ALL_ITEM_S) {
+ if (mAlbumName) {
+ mAlbumName->hide();
+ }
+ mCountItem->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24));
+ text = QString("%1 Items").arg( count );
+ mCountItem->setPlainText( text );
+ mCountItem->setAlignment(Qt::AlignLeft);
+ mCountItem->show();
+ }
+ else if (getSubState() == ALBUM_ITEM_S) {
+ mCountItem->hide();
+ QVariant variant = mModel->data(mModel->index(0,0),GlxViewTitle);
+ if (variant.toString() != NULL) {
+ showAlbumTitle(variant.toString());
+ }
+ }
+ }
+ else {
+ if (mCountItem) {
+ mCountItem->hide();
+ }
+ if (mAlbumName) {
+ mAlbumName->hide();
+ }
+ }
+
+ }
+ else {
+ bool populated = FALSE;
+ QVariant variant = mModel->data(mModel->index(0,0),GlxPopulated);
+ if (variant.isValid() && variant.canConvert<bool>() )
+ {
+ populated = variant.value<bool>();
+ }
+ if(populated) {
+ if (mCountItem) {
+ mCountItem->hide();
+ }
+ if (mAlbumName) {
+ mAlbumName->hide();
+ }
+
+ showNoImageString();
+
+ if (getSubState() == ALBUM_ITEM_S) {
+ QVariant variant = mModel->data(mModel->index(0,0),GlxViewTitle);
+ if (variant.toString() != NULL) {
+ showAlbumTitle(variant.toString());
+ }
+ }
+ }
+ }
+ }
+}
+
+void GlxGridView::showAlbumTitle(QString aTitle)
+{
+ int count = mModel->rowCount();
+ QSize deviceSize = HbDeviceProfile::current().logicalSize();
+ QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() )
+ : QSize( deviceSize.height(), deviceSize.width() ) ;
+ if(mAlbumName == NULL) {
+ mAlbumName = new HbLabel(this);
+ HbFrameItem *frame = new HbFrameItem(this); //graphics for mAlbumName
+ frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ frame->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans");
+ frame->graphicsItem()->setOpacity(1);
+ mAlbumName->setBackgroundItem(frame->graphicsItem(),-1);
+ }
+
+ if(count && isItemVisible(Hb::TitleBarItem)) {
+ mAlbumName->setGeometry(QRectF(0,0,screenSize.width()/2,deviceSize.height()/24));
+ QString text = QString(aTitle);
+ mAlbumName->setPlainText( text );
+ mAlbumName->show();
+ mCountItem->setGeometry(QRectF(screenSize.width()/2,0,screenSize.width()/2,deviceSize.height()/24));
+ text = QString("(%1)").arg(count);
+ mCountItem->setPlainText( text );
+ mCountItem->setAlignment(Qt::AlignRight);
+ mCountItem->show();
+ }
+ else if((!count) && isItemVisible(Hb::TitleBarItem)) {
+ mAlbumName->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24));
+ QString text = QString(aTitle);
+ mAlbumName->setPlainText( text );
+ mAlbumName->show();
+ }
+}
+
+void GlxGridView::showNoImageString()
+{
+ qreal chromeHeight = 0.0;
+ QSize deviceSize = HbDeviceProfile::current().logicalSize();
+ QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() )
+ : QSize( deviceSize.height(), deviceSize.width() ) ;
+ qreal midHeight = screenSize.height()/2;
+ if (isItemVisible(Hb::TitleBarItem)) {
+ style()->parameter("hb-param-widget-chrome-height", chromeHeight);
+ midHeight -= chromeHeight;
+ }
+ if (mZeroItemLabel == NULL) {
+ mZeroItemLabel = new HbLabel("(No Images)\n To capture images Open", this);
+ }
+ mZeroItemLabel->setGeometry(QRectF(0, midHeight - deviceSize.height()/16, screenSize.width(), 3*deviceSize.height()/32));
+ mZeroItemLabel->setAlignment(Qt::AlignHCenter);
+ mZeroItemLabel->show();
+ if (mCameraButton == NULL) {
+ mCameraButton = new HbPushButton(this);
+ mCameraButton->setIcon(HbIcon(GLXICON_CAMERA));
+ connect(mCameraButton, SIGNAL(clicked(bool)), this, SLOT(cameraButtonClicked(bool)));
+ }
+ mCameraButton->setGeometry(QRectF(screenSize.width()/2 - 3*deviceSize.height()/64, midHeight + deviceSize.height()/32, deviceSize.height()/32, deviceSize.height()/32));
+ mCameraButton->show();
+}
+
+void GlxGridView::populated()
+{
+ showItemCount();
+}
+
+bool GlxGridView::eventFilter(QObject *obj, QEvent *event)
+{
+ TRACER("GlxGridView::eventFilter() ");
+ GLX_LOG_INFO1("GlxGridView::eventFilter() %d event type", event->type());
+
+ if ( event->type() == QEvent::ApplicationActivate ) {
+ emit actionTriggered( EGlxCmdAppForeground );
+ }
+ if ( event->type() == QEvent::ApplicationDeactivate ) {
+ emit actionTriggered( EGlxCmdAppBackground );
+ }
+ return HbView::eventFilter(obj,event);
}
void GlxGridView::handleUserAction(qint32 commandId)
@@ -239,10 +519,9 @@
mWidget = new HgGrid(orient);
mWidget->setLongPressEnabled(true);
mWidget->setScrollBarPolicy(HgWidget::ScrollBarAutoHide);
- //mWidget->setItemSize(QSizeF(120,120));
setWidget( mWidget );
addViewConnection();
- //hideorshowitems(orient);
+ hideorshowitems(orient);
}
OstTraceFunctionExit0( GLXGRIDVIEW_LOADGRIDVIEW_EXIT );
}
@@ -253,22 +532,46 @@
}
void GlxGridView::hideorshowitems(Qt::Orientation orient)
{
- if(orient == Qt::Horizontal)
- {
- if (mUiOnButton)
+ if (mWidget && mWidget->selectionMode() == HgWidget::NoSelection) {
+ if(orient == Qt::Horizontal)
{
- mUiOnButton->show();
+ setItemVisible(Hb::AllItems, FALSE) ;
+ setViewFlags(viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden);
+ showItemCount();
+ if (mUiOnButton)
+ {
+ mUiOnButton->show();
+ }
}
- setItemVisible(Hb::AllItems, FALSE) ;
+ else
+ {
+ showHbItems();
+ }
+ }
+
+ if (mWidget && mWidget->selectionMode() == HgWidget::MultiSelection) {
+ setItemVisible(Hb::TitleBarItem, FALSE) ;
+ if (mUiOnButton) {
+ mUiOnButton->hide();
}
- else
- {
- if (mUiOnButton)
- {
- mUiOnButton->hide();
- }
- setItemVisible(Hb::AllItems, TRUE) ;
+ if (mCountItem) {
+ mCountItem->hide();
+ }
+ if (mAlbumName) {
+ mAlbumName->hide();
}
+ QSize deviceSize = HbDeviceProfile::current().logicalSize();
+ QSize screenSize = ( mWindow->orientation() == Qt::Vertical ) ? QSize( deviceSize.width(), deviceSize.height() )
+ : QSize( deviceSize.height(), deviceSize.width() ) ;
+ mMainLabel->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24));
+ mMarkCheckBox->setGeometry(QRectF(0,deviceSize.height()/24,screenSize.width()/2,deviceSize.height()/72));
+ mCountLabel->setGeometry(QRectF(screenSize.width()/2,deviceSize.height()/24,screenSize.width()/2,deviceSize.height()/12 - 3));
+ mCountLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
+ mMainLabel->show();
+ mMarkCheckBox->show();
+ mCountLabel->show();
+ showMarkedItemCount();
+ }
}
void GlxGridView::scrolltofocus()
@@ -298,7 +601,6 @@
void GlxGridView::addViewConnection()
{
OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ADDVIEWCONNECTION, "GlxGridView::addViewConnection" );
- connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation)));
//connect(mWindow, SIGNAL(aboutToChangeOrientation()), mWidget, SLOT(aboutToChangeOrientation()));
connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), mWidget, SLOT(orientationChanged(Qt::Orientation)));
connect(mWidget, SIGNAL(activated(const QModelIndex &)), SLOT( itemSelected(const QModelIndex &)));
@@ -312,7 +614,6 @@
OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_REMOVEVIEWCONNECTION, "GlxGridView::removeViewConnection" );
if(mWidget)
{
- disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation)));
//disconnect(mWindow, SIGNAL(aboutToChangeOrientation()), mWidget, SLOT(aboutToChangeOrientation()));
disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), mWidget, SLOT(orientationChanged(Qt::Orientation)));
disconnect(mWidget, SIGNAL(activated(const QModelIndex &)),this, SLOT( itemSelected(const QModelIndex &)));
@@ -346,16 +647,32 @@
void GlxGridView::scrollingStarted()
{
- if ((mWindow->orientation() == Qt::Horizontal))
+ if ((mWindow->orientation() == Qt::Horizontal) && mWidget->selectionMode() == HgWidget::NoSelection)
{
setItemVisible(Hb::AllItems, FALSE) ;
- }
+ setViewFlags(viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden);
+ if (mUiOnButton)
+ {
+ mUiOnButton->hide();
+ }
+ if (mCountItem) {
+ mCountItem->hide();
+ }
+ if (mAlbumName) {
+ mAlbumName->hide();
+ }
+ }
+
mScrolling = TRUE;
}
void GlxGridView::scrollingEnded()
{
mScrolling = FALSE;
+ if (mUiOnButton && (mWindow->orientation() == Qt::Horizontal))
+ {
+ mUiOnButton->show();
+ }
QList<QModelIndex> visibleIndex = mWidget->getVisibleItemIndices();
if (visibleIndex.count() <= 0)
{
@@ -369,6 +686,7 @@
if(mModel)
{
mModel->setData( index, index.row(), GlxVisualWindowIndex);
+ mModel->setData( index, index.row(), GlxFocusIndexRole );
}
}
@@ -387,7 +705,17 @@
disconnect(mUiOnButton, SIGNAL(clicked(bool)), this, SLOT(uiButtonClicked(bool)));
delete mUiOnButton;
}
+ if(mCameraButton) {
+ disconnect(mCameraButton, SIGNAL(clicked()), this, SLOT(cameraButtonClicked()));
+ delete mCameraButton;
+ }
delete mIconItem;
+ delete mCountItem;
+ delete mAlbumName;
+ delete mMainLabel;
+ delete mMarkCheckBox;
+ delete mCountLabel;
+ delete mZeroItemLabel;
OstTraceFunctionExit0( DUP1_GLXGRIDVIEW_GLXGRIDVIEW_EXIT );
}
@@ -408,13 +736,34 @@
void GlxGridView::uiButtonClicked(bool /*checked*/)
{
- if (isItemVisible(Hb::TitleBarItem)) // W16 All item is Not Working , So Temp Fix
+ showHbItems();
+}
+
+void GlxGridView::showHbItems()
+{
+ setItemVisible(Hb::AllItems, TRUE) ;
+ setViewFlags(viewFlags() &~ HbView::ViewTitleBarHidden &~ HbView::ViewStatusBarHidden);
+ showItemCount();
+ toolBar()->resetTransform(); // Temp, this is for HbToolbar issue to get fixed
+ toolBar()->show();
+ if (mUiOnButton)
{
- setItemVisible(Hb::AllItems, FALSE) ;
- }
- else
- {
- setItemVisible(Hb::AllItems, TRUE) ;
+ mUiOnButton->hide();
}
}
+void GlxGridView::cameraButtonClicked(bool /*checked*/)
+{
+ emit actionTriggered(EGlxCmdCameraOpen);
+}
+
+int GlxGridView::getSubState()
+{
+ int substate = NO_GRID_S;
+ QVariant variant = mModel->data( mModel->index(0,0), GlxSubStateRole );
+ if ( variant.isValid() && variant.canConvert<int> () ) {
+ substate = variant.value<int>();
+ }
+ return substate;
+}
+
--- a/ui/views/slideshowsettingsview/inc/glxslideshowsettingsview.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/slideshowsettingsview/inc/glxslideshowsettingsview.h Wed Jun 23 17:18:45 2010 +0100
@@ -30,7 +30,7 @@
class HbMainWindow;
class HbComboBox;
class QAbstractItemModel;
-class GlxSlideShowSetting;
+class GlxSettingInterface;
class GlxSlideShowSettingsView : public GlxView
{
@@ -47,16 +47,16 @@
void orientationChanged(Qt::Orientation);
private:
-void setLayout();
+ void setLayout();
private:
- HbComboBox *mEffect; //Drop down box to display transition effect
+ HbComboBox *mEffect; //Drop down box to display transition effect
HbComboBox *mDelay; //Drop down box to display transition delay
- HbMainWindow *mWindow; //no ownership
+ HbMainWindow *mWindow; //no ownership
HbLabel *mContextlabel; //Display SlideShow label
HbLabel *mEffectlabel; //Display "Transition Effect: "
- HbLabel *mDelaylabel; //Display "Transition delay: "
- GlxSlideShowSetting *mSettings;
+ HbLabel *mDelaylabel; //Display "Transition delay: "
+ GlxSettingInterface *mSettings; //no ownership
};
#endif /* GLXGRIDVIEW_H_ */
--- a/ui/views/slideshowsettingsview/src/glxslideshowsettingsview.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/slideshowsettingsview/src/glxslideshowsettingsview.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -27,9 +27,8 @@
#include "glxuistd.h"
#include "glxviewids.h"
#include "glxslideshowsettingsview.h"
-#include "glxeffectengine.h"
-
-
+#include "glxsettinginterface.h"
+#include "glxlocalisationstrings.h"
GlxSlideShowSettingsView::GlxSlideShowSettingsView(HbMainWindow *window)
@@ -42,22 +41,22 @@
mDelaylabel (NULL),
mSettings( NULL )
{
- mSettings = new GlxSlideShowSetting();
+ mSettings = GlxSettingInterface::instance() ;
setContentFullScreen( true );
}
GlxSlideShowSettingsView::~GlxSlideShowSettingsView()
{
- delete mContextlabel;
- delete mEffectlabel;
- delete mDelaylabel;
- delete mEffect;
- delete mDelay;
- delete mSettings;
+ delete mContextlabel;
+ delete mEffectlabel;
+ delete mDelaylabel;
+ delete mEffect;
+ delete mDelay;
}
void GlxSlideShowSettingsView::setModel(QAbstractItemModel *model)
{
+ Q_UNUSED( model )
return;
}
@@ -71,35 +70,33 @@
connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation)));
if ( mContextlabel == NULL ) {
- mContextlabel = new HbLabel("Slideshow", this);
+ mContextlabel = new HbLabel( GLX_MENU_SLIDESHOW, this );
}
if ( mEffectlabel == NULL ) {
- mEffectlabel = new HbLabel("Transition effect:", this);
+ mEffectlabel = new HbLabel( GLX_LABEL_TRANSITION_EFFECT, this );
}
if ( mEffect == NULL ) {
mEffect = new HbComboBox(this);
QStringList effectList = mSettings->slideShowEffectList();
- mEffect->addItems( effectList );
-
+ mEffect->addItems( effectList );
}
if ( mDelaylabel == NULL ) {
- mDelaylabel = new HbLabel("Transition delay:", this);
+ mDelaylabel = new HbLabel( GLX_LABEL_TRANSITION_DELAY, this );
}
if ( mDelay == NULL ) {
mDelay = new HbComboBox(this);
QStringList delayList;
- delayList<<"slow"<<"medium"<<"fast";
+ delayList << GLX_VAL_SLOW << GLX_VAL_MEDIUM << GLX_VAL_FAST ;
mDelay->addItems( delayList );
}
- // Read the values from the cenrep
-
- mEffect->setCurrentIndex( mSettings->slideShowEffectIndex());
- mDelay->setCurrentIndex( mSettings->slideShowDelayIndex());
+ // Read the values from the cenrep
+ mEffect->setCurrentIndex( mSettings->slideShowEffectIndex() );
+ mDelay->setCurrentIndex( mSettings->slideShowDelayIndex() );
setLayout();
}
@@ -117,10 +114,8 @@
void GlxSlideShowSettingsView::deActivate()
{
//Store the current effect and delay before going back to the previous view
- mSettings->setslideShowEffectIndex(mEffect->currentIndex());
- mSettings->setSlideShowDelayIndex(mDelay->currentIndex());
+ mSettings->setslideShowEffectIndex( mEffect->currentIndex() );
+ mSettings->setSlideShowDelayIndex( mDelay->currentIndex() );
disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation)));
}
-
-
--- a/ui/views/slideshowview/inc/glxslideshowview.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/slideshowview/inc/glxslideshowview.h Wed Jun 23 17:18:45 2010 +0100
@@ -52,7 +52,7 @@
void modelDestroyed();
protected :
- bool event(QEvent *event);
+ bool eventFilter(QObject *obj, QEvent *ev);
private:
void loadObjects();
--- a/ui/views/slideshowview/inc/glxslideshowwidget.h Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/slideshowview/inc/glxslideshowwidget.h Wed Jun 23 17:18:45 2010 +0100
@@ -36,17 +36,24 @@
class HbAbstractDataModel;
//User Forward Declarations
-class GlxSlideShowEffectEngine;
-
+class GlxEffectEngine;
+class GlxSettingInterface;
#define NBR_ITEM 3
typedef enum
{
UI_ON_EVENT, //send the signal when user tap on screen ( on the UI )
UI_OFF_EVENT, //send the signal when user press continous button ( off the UI)
- EMPTY_DATA_EVENT //send the signal when model have no data
+ EMPTY_DATA_EVENT, //send the signal when model have no data
+ EFFECT_STARTED // sends the signal when effect is started.
} GlxSlideShowEvent;
+typedef enum
+{
+ MOVE_FORWARD,
+ MOVE_BACKWARD,
+} GlxSlideShowMoveDir;
+
class GlxSlideShowWidget : public HbWidget
{
Q_OBJECT
@@ -101,14 +108,14 @@
//add the connection to the model
void initializeNewModel();
void resetSlideShow();
- void setIconItems(int moveDir);
- void setItemPos(int moveDir);
- void moveImage(int nextIndex, int posX, const QString & move, char * callBack);
+ void setIconItems( int moveDir );
+ void moveImage( int nextIndex, int posX, const QString & move, char * callBack );
void addConnections();
void removeConnections();
private:
- GlxSlideShowEffectEngine *mEffectEngine;
+ GlxEffectEngine *mEffectEngine;
+ GlxSettingInterface *mSettings; //no ownership
HbIconItem *mIconItems[NBR_ITEM];
HbPushButton *mContinueButton;
int mItemIndex;
--- a/ui/views/slideshowview/src/glxslideshowview.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/slideshowview/src/glxslideshowview.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -19,6 +19,7 @@
//Includes
#include <QEvent>
#include <QDebug>
+#include <QCoreApplication>
#include <hbmainwindow.h>
#include <hbdocumentloader.h>
@@ -67,10 +68,13 @@
//finds the widgets from the docml
loadObjects();
- setItemVisible(Hb::AllItems, false) ;
+ setTitleBarVisible(FALSE);
+ setStatusBarVisible(FALSE);
connect( mSlideShowWidget, SIGNAL( slideShowEvent( GlxSlideShowEvent ) ), this, SLOT( slideShowEventHandler( GlxSlideShowEvent ) ) );
connect( mSlideShowWidget, SIGNAL( indexchanged() ), this, SLOT( indexchanged() ) );
+ QCoreApplication::instance()->installEventFilter(this);
+
if (!mTvOutWrapper) {
mTvOutWrapper = new GlxTvOutWrapper();
}
@@ -81,12 +85,18 @@
TRACER("GlxSlideShowView::deActivate()");
mWindow->unsetOrientation(true); // Actually it is animation false, Hack for Bug in Media wall -todo- need to Address this ASAP
- setItemVisible( Hb::AllItems , TRUE );
+ setStatusBarVisible(TRUE);
+ setTitleBarVisible(TRUE);
+
+
disconnect( mSlideShowWidget, SIGNAL( slideShowEvent( GlxSlideShowEvent ) ), this, SLOT( slideShowEventHandler( GlxSlideShowEvent ) ) );
disconnect( mSlideShowWidget, SIGNAL( indexchanged() ), this, SLOT( indexchanged() ) );
+
//Delete the Items in the slide show widget
mSlideShowWidget->cleanUp();
+ QCoreApplication::instance()->removeEventFilter(this);
+
if (mTvOutWrapper){
delete mTvOutWrapper;
mTvOutWrapper = NULL;
@@ -107,7 +117,7 @@
mSlideShowWidget->setModel(mModel);
if (mTvOutWrapper){
- mTvOutWrapper->setModel(mModel);
+ mTvOutWrapper->setModel(mModel,true);
mTvOutWrapper->setImagetoHDMI();
}
}
@@ -141,16 +151,24 @@
GLX_LOG_INFO1("GlxSlideShowView::slideShowEventHandler() event %d", e);
switch ( e ) {
case UI_ON_EVENT :
- setItemVisible(Hb::AllItems, TRUE) ;
+ setTitleBarVisible(TRUE);
+ setStatusBarVisible(TRUE);
break;
case UI_OFF_EVENT :
- setItemVisible(Hb::AllItems, false) ;
+ setTitleBarVisible(FALSE);
+ setStatusBarVisible(FALSE);
break;
case EMPTY_DATA_EVENT :
emit actionTriggered( EGlxCmdEmptyData );
break;
+
+ case EFFECT_STARTED:
+ if (mTvOutWrapper){
+ mTvOutWrapper->fadeSurface(false);
+ }
+ break;
default :
break;
@@ -173,24 +191,25 @@
}
}
-bool GlxSlideShowView::event(QEvent *event)
+bool GlxSlideShowView::eventFilter(QObject *obj, QEvent *event)
{
TRACER("GlxSlideShowView::event()");
GLX_LOG_INFO1("GlxSlideShowView::event() %d event type", event->type());
- if ( event->type() == QEvent::WindowActivate && mSlideShowWidget) {
+ if ( event->type() == QEvent::ApplicationActivate && mSlideShowWidget) {
if (mTvOutWrapper){
+ GLX_LOG_INFO("GlxSlideShowView::event() shift to native - CGlxHdmi");
mTvOutWrapper->setToNativeMode();
}
mSlideShowWidget->startSlideShow();
}
-
- if ( event->type() == QEvent::WindowDeactivate && mSlideShowWidget) {
+ if ( event->type() == QEvent::ApplicationDeactivate && mSlideShowWidget) {
if (mTvOutWrapper){
+ GLX_LOG_INFO("GlxSlideShowView::event() shift to Clone - CGlxHdmi");
mTvOutWrapper->setToCloningMode();
}
mSlideShowWidget->stopSlideShow();
}
- return HbView::event(event);
+ return HbView::eventFilter(obj,event);
}
void GlxSlideShowView::loadObjects()
--- a/ui/views/slideshowview/src/glxslideshowwidget.cpp Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/slideshowview/src/glxslideshowwidget.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -29,20 +29,21 @@
#include <QGesture>
#include <hbpangesture.h>
-
//User Includes
#include "glxicondefs.h" //Contains the icon names/Ids
#include "glxmodelparm.h"
#include "glxeffectengine.h"
#include "glxdocloaderdefs.h"
#include "glxslideshowwidget.h"
-#include <glxlog.h>
-#include <glxtracer.h>
+#include "glxsettinginterface.h"
+#include "glxlog.h"
+#include "glxtracer.h"
GlxSlideShowWidget::GlxSlideShowWidget( QGraphicsItem *parent )
: HbWidget(parent),
mEffectEngine(NULL),
+ mSettings( NULL ),
mContinueButton(NULL),
mItemIndex(1),
mSelIndex(0),
@@ -50,17 +51,18 @@
mModel(NULL)
{
TRACER("GlxSlideShowWidget::GlxSlideShowWidget()");
+ mSettings = GlxSettingInterface::instance() ; //no owner ship
grabGesture( Qt::PanGesture );
grabGesture( Qt::TapGesture );
}
void GlxSlideShowWidget::setSlideShowWidget(HbDocumentLoader *DocLoader)
- {
+{
//To:Do error handling
TRACER("GlxSlideShowWidget::setSlideShowWidget()");
//create the effect engine
- mEffectEngine = new GlxSlideShowEffectEngine();
+ mEffectEngine = new GlxEffectEngine();
// Now load the view and the contents.
// and then set the play icon to the button
@@ -70,8 +72,8 @@
mIsPause = false;
for ( int i = 0; i < NBR_ITEM ; i++) {
- mIconItems[i] = new HbIconItem(this);
- mIconItems[i]->setBrush(QBrush(Qt::black));
+ mIconItems[i] = new HbIconItem(this);
+ mIconItems[i]->setBrush(QBrush(Qt::black));
}
mSlideTimer = new QTimer();
@@ -81,75 +83,68 @@
addConnections();
//Create the settings for the effects
- mEffectEngine->readSetting();
- mEffectEngine->registerEffect(QString("HbIconItem"));
+ mEffectEngine->registerEffect( QString("HbIconItem") );
//provide the xml info for the effect to take place
HbEffect::add( QString("HbIconItem"), QString(":/data/transition.fxml"), QString( "Move" ));
HbEffect::add( QString("HbIconItem"), QString(":/data/transitionleft.fxml"), QString( "LeftMove" ));
HbEffect::add( QString("HbIconItem"), QString(":/data/transitionright.fxml"), QString( "RightMove" ));
- }
+}
GlxSlideShowWidget::~GlxSlideShowWidget()
- {
+{
TRACER("GlxSlideShowWidget::~GlxSlideShowWidget()");
//Delete the resources allocated
cleanUp();
- if(mContinueButton)
- {
+ if(mContinueButton) {
delete mContinueButton;
mContinueButton = NULL;
- }
}
-
+}
void GlxSlideShowWidget::cleanUp()
- {
+{
TRACER("GlxSlideShowWidget::cleanUp()");
removeConnections();
- if(mEffectEngine)
- {
+ if(mEffectEngine) {
mEffectEngine->deRegisterEffect( QString("HbIconItem") );
delete mEffectEngine;
mEffectEngine = NULL;
- }
-
+ }
- for ( int i = 0; i < NBR_ITEM ; i++)
- {
+ for ( int i = 0; i < NBR_ITEM ; i++) {
delete mIconItems[i] ;
mIconItems[i] = NULL;
- }
+ }
- if(mSlideTimer)
- {
+ if(mSlideTimer) {
delete mSlideTimer;
mSlideTimer = NULL;
- }
+ }
clearCurrentModel();
HbEffect::remove( QString("HbIconItem"), QString(":/data/transition.fxml"), QString( "Move" ));
HbEffect::remove( QString("HbIconItem"), QString(":/data/transitionleft.fxml"), QString( "LeftMove" ));
HbEffect::remove( QString("HbIconItem"), QString(":/data/transitionright.fxml"), QString( "RightMove" ));
- }
+}
void GlxSlideShowWidget::setModel (QAbstractItemModel *model)
- {
+{
TRACER("GlxSlideShowWidget::setModel()");
if ( model == mModel ) {
- return ;
+ return ;
}
clearCurrentModel();
mModel = model;
initializeNewModel();
resetSlideShow();
- }
+}
void GlxSlideShowWidget::setItemGeometry(QRect screenRect)
- {
+{
TRACER("GlxSlideShowWidget::setItemGeometry()");
int index = mItemIndex;
mScreenRect = screenRect;
@@ -158,10 +153,10 @@
mIconItems[index]->setGeometry( QRect( mScreenRect.width(), mScreenRect.top(), mScreenRect.width(), mScreenRect.height() ) );
index = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1;
mIconItems[index]->setGeometry( QRect( -mScreenRect.width(), mScreenRect.top(), mScreenRect.width(), mScreenRect.height() ) );
- }
+}
void GlxSlideShowWidget::triggeredEffect()
- {
+{
TRACER("GlxSlideShowWidget::triggeredEffect()");
int index = mItemIndex;
mSlideTimer->stop();
@@ -169,54 +164,43 @@
User::ResetInactivityTime();
mItemList.append( mIconItems[index] );
- if ( mEffectEngine->slideShowMoveDir() == MOVE_FORWARD ) {
- index = ( mItemIndex + 1) % NBR_ITEM;
- }
- else {
- index = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1;
- }
+ index = ( mItemIndex + 1 ) % NBR_ITEM;
mItemList.append( mIconItems[index] );
GLX_LOG_INFO3("GlxSlideShowWidget::triggeredEffect() image selected index %d array index %d index %d", mSelIndex, mItemIndex, index);
mEffectEngine->runEffect( mItemList, QString("HbIconItem") );
+ emit slideShowEvent( EFFECT_STARTED );
}
-
void GlxSlideShowWidget::effectFinshed()
- {
+{
TRACER("GlxSlideShowWidget::effectFinshed()");
//To:Do boundery condition or last item check implemented after behaviour of slide show clear
int rowCount = mModel->rowCount();
GLX_LOG_INFO2("GlxSlideShowWidget::effectFinshed() before image selected index %d array index %d", mSelIndex, mItemIndex);
- if ( mEffectEngine->slideShowMoveDir() == MOVE_FORWARD ) {
mSelIndex = ( ++mSelIndex ) % rowCount;
mItemIndex = ( ++mItemIndex ) % NBR_ITEM;
- }
- else {
- mSelIndex = mSelIndex ? --mSelIndex : rowCount - 1;
- mItemIndex = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1;
- }
-
mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxFocusIndexRole );
- setIconItems(mEffectEngine->slideShowMoveDir());
- //setItemPos(mEffectEngine->slideShowMoveDir());
+ setIconItems( MOVE_FORWARD );
+
GLX_LOG_INFO2("GlxSlideShowWidget::effectFinshed() after image selected index %d array index %d ", mSelIndex, mItemIndex);
+
if ( mIsPause == false ) {
- mSlideTimer->start( mEffectEngine->slideDelayTime() );
+ mSlideTimer->start( mSettings->slideShowDelayTime() );
}
mItemList.clear();
emit indexchanged(); // on each item change
- }
+}
void GlxSlideShowWidget::cancelEffect()
- {
+{
TRACER("GlxSlideShowWidget::cancelEffect()");
mEffectEngine->cancelEffect( mItemList );
- }
+}
void GlxSlideShowWidget::pauseSlideShow()
- {
+{
TRACER("GlxSlideShowWidget::pauseSlideShow()");
GLX_LOG_INFO1("GlxSlideShowWidget::pauseSlideShow() %d", this->zValue());
mIsPause = true;
@@ -225,52 +209,52 @@
mContinueButton->setZValue( this->zValue() + 2);
mContinueButton->show() ;
emit slideShowEvent(UI_ON_EVENT);
- }
+}
void GlxSlideShowWidget::continueSlideShow(bool checked)
- {
+{
Q_UNUSED( checked )
TRACER("GlxSlideShowWidget::continueSlideShow()");
mIsPause = false;
if ( mModel && mModel->rowCount() > 1 ) {
- mSlideTimer->start( mEffectEngine->slideDelayTime() );
+ mSlideTimer->start( mSettings->slideShowDelayTime() );
}
mContinueButton->hide();
emit slideShowEvent(UI_OFF_EVENT);
- }
+}
void GlxSlideShowWidget::dataChanged(QModelIndex startIndex, QModelIndex endIndex)
- {
+{
Q_UNUSED( endIndex )
TRACER("GlxSlideShowWidget::dataChanged()");
GLX_LOG_INFO2("GlxSlideShowWidget::dataChanged startIndex = %d mSelIndex = %d ", startIndex.row(), mSelIndex );
int deltaIndex = startIndex.row() - mSelIndex;
if ( deltaIndex <= 1 && deltaIndex >= -1 ) {
- int index = ( mItemIndex + deltaIndex + NBR_ITEM ) % NBR_ITEM; //calculated the array index in which data sould be updated
- GLX_LOG_INFO2("GlxSlideShowWidget::dataChanged index = %d mSelItemIndex = %d ", index, mItemIndex );
-
- QVariant variant = mModel->data( startIndex, GlxFsImageRole );
- if ( variant.isValid() && variant.canConvert<HbIcon> () ) {
- mIconItems[index]->setIcon ( variant.value<HbIcon>() ) ;
- }
- else {
- mIconItems[index]->setIcon ( HbIcon() ) ;
- }
+ int index = ( mItemIndex + deltaIndex + NBR_ITEM ) % NBR_ITEM; //calculated the array index in which data sould be updated
+ GLX_LOG_INFO2("GlxSlideShowWidget::dataChanged index = %d mSelItemIndex = %d ", index, mItemIndex );
+
+ QVariant variant = mModel->data( startIndex, GlxFsImageRole );
+ if ( variant.isValid() && variant.canConvert<HbIcon> () ) {
+ mIconItems[index]->setIcon ( variant.value<HbIcon>() ) ;
+ }
+ else {
+ mIconItems[index]->setIcon ( HbIcon() ) ;
+ }
}
- }
+}
void GlxSlideShowWidget::rowsInserted(const QModelIndex &parent, int start, int end)
- {
+{
TRACER("GlxSlideShowWidget::rowsInserted()");
Q_UNUSED(parent);
Q_UNUSED(start);
Q_UNUSED(end);
resetSlideShow();
- }
+}
void GlxSlideShowWidget::rowsRemoved(const QModelIndex &parent, int start, int end)
- {
+{
TRACER("GlxSlideShowWidget::rowsRemoved()");
Q_UNUSED(parent);
Q_UNUSED(start);
@@ -279,19 +263,19 @@
GLX_LOG_INFO1( "GlxSlideShowWidget::rowsRemoved row count = %d ", mModel->rowCount() );
if ( mModel->rowCount() <= 0 ) {
- clearCurrentModel();
- emit slideShowEvent( EMPTY_DATA_EVENT );
+ clearCurrentModel();
+ emit slideShowEvent( EMPTY_DATA_EVENT );
}
else {
- resetSlideShow();
+ resetSlideShow();
}
- }
+}
void GlxSlideShowWidget::modelDestroyed()
- {
+{
TRACER("GlxSlideShowWidget::modelDestroyed()");
clearCurrentModel();
- }
+}
void GlxSlideShowWidget::orientationChanged(QRect screenRect)
@@ -322,7 +306,7 @@
}
void GlxSlideShowWidget::leftMoveEffectFinished( const HbEffect::EffectStatus &status )
- {
+{
Q_UNUSED(status)
TRACER("GlxSlideShowWidget::leftMoveEffectFinished()");
GLX_LOG_INFO1("GlxSlideShowWidget::leftMoveEffectFinished() %d status", status.reason);
@@ -332,13 +316,13 @@
mItemIndex = ( ++mItemIndex ) % NBR_ITEM;
mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxFocusIndexRole );
- setIconItems(MOVE_FORWARD);
+ setIconItems( MOVE_FORWARD );
startSlideShow();
emit indexchanged(); // on left swipe
- }
+}
void GlxSlideShowWidget::rightMoveEffectFinished( const HbEffect::EffectStatus &status )
- {
+{
Q_UNUSED(status)
TRACER ( "GlxSlideShowWidget::rightMoveEffectFinished( ) ");
GLX_LOG_INFO1("GlxSlideShowWidget::rightMoveEffectFinished() %d status", status.reason);
@@ -348,11 +332,10 @@
mItemIndex = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1;
mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxFocusIndexRole );
- setIconItems(MOVE_BACKWARD);
+ setIconItems( MOVE_BACKWARD);
startSlideShow();
emit indexchanged(); // on right swipe
- }
-
+}
void GlxSlideShowWidget::gestureEvent(QGestureEvent *event)
{
@@ -383,160 +366,146 @@
}
void GlxSlideShowWidget::startSlideShow ( )
- {
+{
TRACER ( "GlxSlideShowWidget::startSlideShow( ) ");
GLX_LOG_INFO1 ( "GlxSlideShowWidget::startSlideShow( ) is pause %d", mIsPause);
if ( mIsPause == false && mModel && mModel->rowCount() > 1 ) {
- mSlideTimer->start( mEffectEngine->slideDelayTime() );
+ mSlideTimer->start( mSettings->slideShowDelayTime() );
}
- }
+}
void GlxSlideShowWidget::stopSlideShow ( )
- {
+{
TRACER ( "GlxSlideShowWidget::stopSlideShow( ) ");
cancelEffect();
mSlideTimer->stop();
- }
+}
void GlxSlideShowWidget::clearCurrentModel()
- {
+{
TRACER ( "GlxSlideShowWidget::clearCurrentModel( ) ");
if ( mModel ) {
- disconnect( mModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) );
- disconnect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(rowsInserted(QModelIndex,int,int)));
- disconnect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(rowsRemoved(QModelIndex,int,int)));
- disconnect(mModel, SIGNAL(destroyed()), this, SLOT( modelDestroyed()));
- mModel = NULL ;
+ disconnect( mModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) );
+ disconnect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(rowsInserted(QModelIndex,int,int)));
+ disconnect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(rowsRemoved(QModelIndex,int,int)));
+ disconnect(mModel, SIGNAL(destroyed()), this, SLOT( modelDestroyed()));
+ mModel = NULL ;
}
/*
disconnect(mModel, SIGNAL(destroyed()), this, SLOT(_q_modelDestroyed()));
disconnect(mModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
*/
- }
+}
void GlxSlideShowWidget::initializeNewModel()
- {
+{
TRACER("GlxSlideShowWidget::initializeNewModel" );
if ( mModel ) {
- connect( mModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) );
- connect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(rowsInserted(QModelIndex,int,int)));
- connect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(rowsRemoved(QModelIndex,int,int)));
- connect(mModel, SIGNAL(destroyed()), this, SLOT( modelDestroyed()));
+ connect( mModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) );
+ connect(mModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(rowsInserted(QModelIndex,int,int)));
+ connect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(rowsRemoved(QModelIndex,int,int)));
+ connect(mModel, SIGNAL(destroyed()), this, SLOT( modelDestroyed()));
}
- }
+}
void GlxSlideShowWidget::resetSlideShow()
- {
+{
TRACER("GlxSlideShowWidget::resetSlideShow()" );
if(! mModel) {
return;
}
QVariant variant = mModel->data( mModel->index( mSelIndex, 0 ), GlxFocusIndexRole );
if ( variant.isValid() && variant.canConvert<int> () ) {
- mSelIndex = variant.value<int>() ;
- GLX_LOG_INFO1("GlxSlideShowWidget::resetSlideShow() selected index %d", mSelIndex );
+ mSelIndex = variant.value<int>() ;
+ GLX_LOG_INFO1("GlxSlideShowWidget::resetSlideShow() selected index %d", mSelIndex );
}
variant = mModel->data( mModel->index( mSelIndex, 0 ), GlxFsImageRole );
if ( variant.isValid() && variant.canConvert<HbIcon> () ) {
- mIconItems[mItemIndex]->setIcon ( variant.value<HbIcon>() ) ;
+ mIconItems[mItemIndex]->setIcon ( variant.value<HbIcon>() ) ;
}
else {
- mIconItems[mItemIndex]->setIcon ( HbIcon() ) ;
+ mIconItems[mItemIndex]->setIcon ( HbIcon() ) ;
}
+
setIconItems(MOVE_FORWARD);
setIconItems(MOVE_BACKWARD);
if ( mIsPause == false && mModel && mModel->rowCount() > 1 ) {
- mSlideTimer->start( mEffectEngine->slideDelayTime() );
+ mSlideTimer->start( mSettings->slideShowDelayTime() );
}
- }
+}
-void GlxSlideShowWidget::setIconItems(int moveDir)
- {
+void GlxSlideShowWidget::setIconItems( int moveDir )
+{
TRACER("GlxSlideShowWidget::setIconItems()");
int index = 0, itemIndex = 0;
int rowCount = mModel->rowCount();
GLX_LOG_INFO1("GlxSlideShowWidget::setIconItems() rowcount %d ", rowCount);
if ( rowCount == 0 ) {
- return ;
+ return ;
}
-
- if (moveDir == MOVE_FORWARD) {
- index = ( mSelIndex + 1) % rowCount;
- itemIndex = ( mItemIndex + 1) % NBR_ITEM;
- }else {
- index = mSelIndex ? mSelIndex - 1 : rowCount - 1;
- itemIndex = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1;
+
+ if ( moveDir == MOVE_FORWARD ) {
+ index = ( mSelIndex + 1 ) % rowCount;
+ itemIndex = ( mItemIndex + 1) % NBR_ITEM;
+ }
+ else {
+ index = mSelIndex ? mSelIndex - 1 : rowCount - 1;
+ itemIndex = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1;
}
GLX_LOG_INFO4("GlxSlideShowWidget::setIconItems() image selected index %d array index %d index %d icon index %d", mSelIndex, mItemIndex, index, itemIndex);
QVariant variant = mModel->data( mModel->index( index, 0 ), GlxFsImageRole );
if ( variant.isValid() && variant.canConvert<HbIcon> () ) {
- mIconItems[itemIndex]->setIcon ( variant.value<HbIcon>() ) ;
+ mIconItems[itemIndex]->setIcon ( variant.value<HbIcon>() ) ;
}
else {
- mIconItems[itemIndex]->setIcon ( HbIcon() ) ;
+ mIconItems[itemIndex]->setIcon ( HbIcon() ) ;
}
- }
-
-//To:DO it is not used so may be remove later
-void GlxSlideShowWidget::setItemPos(int moveDir)
- {
- Q_UNUSED( moveDir)
- TRACER("GlxSlideShowWidget::setItemPos()");
- GLX_LOG_INFO1("GlxSlideShowWidget::setItemPos() array index %d", mItemIndex );
-
- if (moveDir == MOVE_FORWARD) {
- int index = ( mItemIndex + 1) % NBR_ITEM;
- mIconItems[index]->setPos( mScreenRect.width(), mScreenRect.top() );
- }
- else {
- int index = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1;
- mIconItems[index]->setPos( -mScreenRect.width(), mScreenRect.top() );
- }
- }
+}
void GlxSlideShowWidget::moveImage(int nextIndex, int posX, const QString & move, char * callBack)
- {
+{
TRACER("GlxSlideShowWidget::MoveImage()");
if ( mModel->rowCount() <= 1 || mEffectEngine->isEffectRuning( mItemList ) ) {
- return ;
+ return ;
}
mSlideTimer->stop();
- HbEffect::start(mIconItems[mItemIndex], QString("HbIconItem"), move );
+ HbEffect::start( mIconItems[mItemIndex], QString("HbIconItem"), move );
mIconItems[nextIndex]->setPos( posX, mScreenRect.top());
+ mIconItems[nextIndex]->setOpacity(1);
HbEffect::start(mIconItems[nextIndex], QString("HbIconItem"), QString("Move"), this, callBack );
- }
+}
void GlxSlideShowWidget::addConnections()
- {
+{
TRACER("GlxSlideShowWidget::addConnections()");
if ( mEffectEngine ) {
- connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinshed() ) );
+ connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinshed() ) );
}
if ( mSlideTimer ) {
- connect( mSlideTimer, SIGNAL(timeout()), this, SLOT( triggeredEffect() ) );
+ connect( mSlideTimer, SIGNAL(timeout()), this, SLOT( triggeredEffect() ) );
}
if ( mContinueButton ) {
- connect( mContinueButton, SIGNAL( clicked(bool) ), this, SLOT( continueSlideShow(bool) ) );
+ connect( mContinueButton, SIGNAL( clicked(bool) ), this, SLOT( continueSlideShow(bool) ) );
}
- }
+}
void GlxSlideShowWidget::removeConnections()
- {
+{
TRACER("GlxSlideShowWidget::removeConnections()");
if ( mEffectEngine ) {
- disconnect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinshed() ) );
+ disconnect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinshed() ) );
}
if ( mSlideTimer ) {
- disconnect( mSlideTimer, SIGNAL(timeout()), this, SLOT( triggeredEffect() ) );
+ disconnect( mSlideTimer, SIGNAL(timeout()), this, SLOT( triggeredEffect() ) );
}
if ( mContinueButton ) {
- disconnect( mContinueButton, SIGNAL( clicked(bool) ), this, SLOT( continueSlideShow(bool) ) );
+ disconnect( mContinueButton, SIGNAL( clicked(bool) ), this, SLOT( continueSlideShow(bool) ) );
}
- }
+}
--- a/ui/views/views.pro Tue May 18 12:19:10 2010 +0100
+++ b/ui/views/views.pro Wed Jun 23 17:18:45 2010 +0100
@@ -20,10 +20,8 @@
DEPENDPATH += . fullscreenview/inc fullscreenview/src gridview/inc gridview/src slideshowsettingsview/inc slideshowsettingsview/src viewbase/inc
CONFIG += hb
-LIBS += -lglxmediamodel.dll \
- -lglxlistmodel.dll \
- -lglxfavmediamodel.dll \
- -lglximagedecoderwrapper.dll \
+LIBS += -lglxfavmediamodel.dll \
+ -lglximagedecoderwrapper.dll \
-lglxloggerqt.dll \
-lshareui.dll \
-lglxtvout.dll \
@@ -32,15 +30,15 @@
-lglxlogging.dll \
-lganeswidgets.dll \
-lglxmodelwrapper.dll \
- -lxqsettingsmanager
+ -lglxviewutilities.dll \
+ -lglxzoomwidget.dll
DEFINES += BUILD_GLXVIEWS
INCLUDEPATH += . ../inc \
../../inc \
- ../uiengine/model/mediamodel/inc \
- ../uiengine/model/listmodel/inc \
- ../uiengine/model/favmediamodel/inc \
+ ../widgets/glxzoomwidget/inc \
+ ../uiengine/model/favmediamodel/inc \
../uiengine/medialistwrapper/inc \
../viewbase/inc \
../../commonutilities/imagedecoderwrapper/inc \
@@ -48,6 +46,8 @@
../../traces \
../../tvout/tvoutwrapper/inc \
../uiengine/model/modelwrapper/inc \
+ ../viewutilities/effectengine/inc \
+ ../viewutilities/settingutility/inc \
/epoc32/include/mw/hgwidgets
symbian: {
@@ -61,41 +61,28 @@
HEADERS += viewbase/inc/glxview.h \
fullscreenview/inc/glxcoverflow.h \
fullscreenview/inc/glxfullscreenview.h \
- fullscreenview/inc/glxzoomslider.h \
- fullscreenview/inc/glxzoomcontrol.h \
detailsview/inc/glxdetailsview.h \
detailsview/inc/glxdetailscustomwidgets.h \
detailsview/inc/glxdetailscustomicon.h \
gridview/inc/glxgridview.h \
- slideshowsettingsview/inc/glxslideshowsettingsview.h \
+ slideshowsettingsview/inc/glxslideshowsettingsview.h \
listview/inc/glxlistview.h \
- effectengine/inc/glxeffectengine.h \
slideshowview/inc/glxslideshowview.h \
slideshowview/inc/glxslideshowwidget.h \
- effectengine/effectplugin/inc/glxeffectpluginbase.h \
- effectengine/effectplugin/inc/glxbackwardtransitionplugin.h \
- effectengine/effectplugin/inc/glxforwardtransitionplugin.h \
- effectengine/effectplugin/inc/glxfadeplugin.h \
- docloaders/inc/glxviewdocloader.h \
+ docloaders/inc/glxviewdocloader.h \
viewsfactory/inc/glxviewsfactory.h \
SOURCES += viewbase/src/glxview.cpp \
fullscreenview/src/glxcoverflow.cpp \
fullscreenview/src/glxfullscreenview.cpp \
- fullscreenview/src/glxzoomslider.cpp \
- fullscreenview/src/glxzoomcontrol.cpp \
- detailsview/src/glxdetailsview.cpp \
+ detailsview/src/glxdetailsview.cpp \
detailsview/src/glxdetailscustomwidgets.cpp \
detailsview/src/glxdetailscustomicon.cpp \
gridview/src/glxgridview.cpp \
slideshowsettingsview/src/glxslideshowsettingsview.cpp \
listview/src/glxlistview.cpp \
- effectengine/src/glxeffectengine.cpp \
slideshowview/src/glxslideshowview.cpp \
slideshowview/src/glxslideshowwidget.cpp \
- effectengine/effectplugin/src/glxbackwardtransitionplugin.cpp \
- effectengine/effectplugin/src/glxforwardtransitionplugin.cpp \
- effectengine/effectplugin/src/glxfadeplugin.cpp \
docloaders/src/glxviewdocloader.cpp \
viewsfactory/src/glxviewsfactory.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectengine/inc/glxeffectengine.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#ifndef GLXEFFECTENGINE_H
+#define GLXEFFECTENGINE_H
+
+#ifdef BUILD_GLXVIEWUTILITIES
+#define GLX_VIEWUTILITIES_EXPORT Q_DECL_EXPORT
+#else
+#define GLX_VIEWUTILITIES_EXPORT Q_DECL_IMPORT
+#endif
+
+#include <QObject>
+#include <hbeffect.h>
+#include <QString>
+#include <QHash>
+#include <QList>
+#include "glxuistd.h"
+
+
+class QStringList ;
+class GlxTransitionEffectSetting ;
+class GlxEffectPluginBase;
+class GlxEffectPluginResolver;
+
+/*
+ * It is customise class for Photo Application to run the effect.
+ */
+
+class GLX_VIEWUTILITIES_EXPORT GlxEffectEngine : public QObject
+{
+ Q_OBJECT
+
+public:
+ /*
+ * Constructor
+ */
+ GlxEffectEngine( );
+ /*
+ * Destructor
+ */
+ ~GlxEffectEngine();
+
+ /*
+ * Register the item type with selected effect
+ * User can change the effect at run time so it is required to register and deregister the effect
+ * before playing the effect.
+ */
+ void registerEffect(const QString &itemType);
+
+ /*
+ * Deregister the current register slide show effect
+ */
+ void deRegisterEffect(const QString &itemType);
+
+ /*
+ * To register a set of transition effect
+ * e.g "grid to full screeen", "fullscreen to grid"
+ */
+ void registerTransitionEffect();
+
+ /*
+ * Deregister the set of register transition effect
+ */
+ void deregistertransitionEffect();
+
+ /*
+ * Run the effect on single item
+ */
+ void runEffect(QGraphicsItem * item, const QString & itemType );
+
+ /*
+ * Run the effect on multiple item
+ */
+ void runEffect(QList< QGraphicsItem * > & items, const QString & itemType );
+
+ /*
+ * Run the transition effect
+ */
+ void runEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect);
+
+ /*
+ * Cancel the runing effect on the given item
+ */
+ void cancelEffect(QGraphicsItem * item);
+
+ /*
+ * Cancel the running effect on the given items
+ */
+ void cancelEffect( const QList< QGraphicsItem * > & items );
+
+ /*
+ * cancel the runing transition effect
+ */
+ void cancelEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect);
+
+ /*
+ * Return the running status of the given item
+ */
+ bool isEffectRuning(QGraphicsItem * item);
+
+ /*
+ * return the running status of given items
+ */
+ bool isEffectRuning(const QList< QGraphicsItem * > & items);
+
+signals:
+ /*
+ * emit the signal of effect finished
+ */
+ void effectFinished();
+
+public slots:
+ /*
+ * Slot to monitor the slide show effect finished
+ */
+ void slideShowEffectFinished( const HbEffect::EffectStatus &status );
+
+ /*
+ * Slot to monitor the transi
+ */
+ void transitionEffectFinished( const HbEffect::EffectStatus &status );
+
+private:
+ /*
+ * Initialise the all transition effect
+ */
+ void initTransitionEffect();
+
+ /*
+ * Clear the all transition effect
+ */
+ void cleanTransitionEfffect();
+
+private:
+ int mNbrEffectRunning; //containe the number of effect running
+ GlxEffectPluginBase *mEffectPlugin; //No ownership
+ QHash<GlxEffect, GlxTransitionEffectSetting *> mTransitionEffectList;
+ GlxEffect mTransitionEffect;
+ GlxEffectPluginResolver *mEffectResolver;
+};
+
+#endif /*GLXEFFECTENGINE_H*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectengine/inc/glxtransitioneffect.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#ifndef GLXTRANSITIONEFFECT_H
+#define GLXTRANSITIONEFFECT_H
+
+#include <QList>
+
+#include "glxuistd.h"
+
+class QString;
+class QGraphicsItem ;
+
+/*
+ * This class have the views transition effect information
+ */
+class GlxTransitionEffectSetting
+{
+public :
+ GlxTransitionEffectSetting(GlxEffect effect);
+ ~GlxTransitionEffectSetting();
+
+ QList <QString > effectFileList() { return mEffectFileList ; }
+ QList <QString > itemType() { return mItemType ; }
+ QList <QString > eventType() { return mEventType ; }
+ bool isTransitionLater() { return mTransitionLater ; }
+ QGraphicsItem * animationItem() { return mItem ; }
+
+ void setEffectFileList( QList <QString > & effectFileList) { mEffectFileList = effectFileList ; }
+ void setItemTypes( QList <QString > & itemType) { mItemType = itemType; }
+ void setEventTypes( QList <QString > & eventType) { mEventType = eventType ; }
+ void setTransitionLater(bool transitionLater) { mTransitionLater = transitionLater ; }
+ void setAnimationItem(QGraphicsItem *item) { mItem = item ;}
+ int count() { return mEffectFileList.count() ; }
+
+private :
+ void init();
+
+private :
+ GlxEffect mEffect; //transition effect type
+ bool mTransitionLater; //second animation will run same time(false) or later (true)
+ QGraphicsItem *mItem; //it will used in the case of animation run later
+ QList <QString > mEffectFileList; //list of fxml file used for animation
+ QList <QString > mItemType; //list of item type
+ QList <QString > mEventType; //list of event type
+};
+
+#endif //GLXTRANSITIONEFFECT_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectengine/src/glxeffectengine.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,265 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#include "glxeffectengine.h"
+#include "glxeffectpluginbase.h"
+#include "glxtransitioneffect.h"
+#include "glxsettinginterface.h"
+#include "glxeffectpluginresolver.h"
+
+#include <QDebug>
+
+GlxEffectEngine::GlxEffectEngine( )
+ : mNbrEffectRunning( 0 ),
+ mEffectPlugin( NULL ),
+ mTransitionEffect( NO_EFFECT ),
+ mEffectResolver( NULL )
+{
+ qDebug("GlxSlideShowEffectEngine::GlxSlideShowEffectEngine()");
+ mTransitionEffectList.clear();
+}
+
+GlxEffectEngine::~GlxEffectEngine()
+{
+ qDebug("GlxSlideShowEffectEngine::~GlxSlideShowEffectEngine()");
+ delete mEffectResolver;
+ mEffectResolver = NULL;
+
+ cleanTransitionEfffect();
+}
+
+void GlxEffectEngine::registerEffect(const QString &itemType)
+{
+ GlxSettingInterface *settingObj = GlxSettingInterface::instance(); // NO ownership
+ if ( mEffectResolver == NULL ) {
+ mEffectResolver = new GlxEffectPluginResolver();
+ }
+ /* read the selected effect through the centrep and get the effect plugin object through effect plugin resolver*/
+ mEffectPlugin = mEffectResolver->effectPlugin( settingObj->slideShowEffectId( settingObj->slideShowEffectIndex ( ) ) ); //No ownership
+
+ QList <QString > effectPathList = mEffectPlugin->effectFileList();
+
+ qDebug("GlxSlideShowEffectEngine::registerEffect() item type %s file path %s", itemType.utf16(), effectPathList[0].utf16());
+ for ( int i = 0; i < effectPathList.count() ; ++i ) {
+ HbEffect::add(itemType, effectPathList.at(i), QString( "Click%1" ).arg(i));
+ }
+}
+
+void GlxEffectEngine::deRegisterEffect(const QString &itemType)
+{
+ qDebug("GlxSlideShowEffectEngine::deRegisterEffect() item type %s", itemType.utf16());
+ QList <QString > effectPathList = mEffectPlugin->effectFileList();
+ for ( int i = 0; i < effectPathList.count() ; ++i ) {
+ HbEffect::remove(itemType, effectPathList.at(i), QString( "Click%1" ).arg(i));
+ }
+ mEffectPlugin = NULL;
+}
+
+void GlxEffectEngine::registerTransitionEffect()
+{
+ qDebug("GlxSlideShowEffectEngine::registerTransitionEffect()");
+ initTransitionEffect();
+}
+
+void GlxEffectEngine::deregistertransitionEffect()
+{
+ qDebug("GlxSlideShowEffectEngine::deregisterTransitionEffect()");
+ cleanTransitionEfffect();
+}
+
+void GlxEffectEngine::runEffect(QGraphicsItem * item, const QString & itemType )
+{
+ qDebug("GlxSlideShowEffectEngine::runEffect()1 item type %s", itemType.utf16());
+ HbEffect::start(item, itemType, QString( "Click1" ), this, "slideShowEffectFinished");
+ ++mNbrEffectRunning;
+}
+
+void GlxEffectEngine::runEffect(QList< QGraphicsItem * > & items, const QString & itemType )
+{
+ qDebug("GlxSlideShowEffectEngine::runEffect()2 item Type %s", itemType.utf16());
+ mEffectPlugin->setUpItems(items);
+ for ( int i = 0; i < items.count() ; ++i ) {
+ if ( mEffectPlugin->isAnimationLater(i) == FALSE ) {
+ HbEffect::start(items.at(i), itemType, QString( "Click%1").arg(i), this, "slideShowEffectFinished");
+ }
+ ++mNbrEffectRunning;
+ }
+}
+
+void GlxEffectEngine::runEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect)
+{
+ qDebug("GlxSlideShowEffectEngine::runEffect()3 effect type %d ", transitionEffect);
+
+ GlxTransitionEffectSetting *effectSetting = mTransitionEffectList.value( transitionEffect );
+
+ if ( effectSetting == NULL || items.count() != effectSetting->count() ) {
+ return;
+ }
+
+ mTransitionEffect = transitionEffect;
+ for ( int i = 0; i < effectSetting->count() ; ++i) {
+ ++mNbrEffectRunning;
+ if ( ( i == effectSetting->count() -1) && effectSetting->isTransitionLater() )
+ {
+ effectSetting->setAnimationItem( items.at(i) );
+ items.at(i)->hide();
+ }
+ else {
+ HbEffect::start(items.at(i), effectSetting->itemType().at(i), effectSetting->eventType().at(i), this, "transitionEffectFinished");
+ }
+ }
+}
+
+void GlxEffectEngine::cancelEffect(QGraphicsItem * item)
+{
+ if ( HbEffect::effectRunning( item, QString( "Click1" ) ) ) {
+ HbEffect::cancel( item, QString( "Click1" ) );
+ }
+}
+
+void GlxEffectEngine::cancelEffect(const QList< QGraphicsItem * > & items)
+{
+ for ( int i = 0; i < items.count() ; ++i ) {
+ if ( HbEffect::effectRunning( items.at(i), QString( "Click%1").arg(i) ) ) {
+ HbEffect::cancel( items.at(i), QString( "Click%1").arg(i) );
+ }
+ }
+}
+
+void GlxEffectEngine::cancelEffect(QList< QGraphicsItem * > & items, GlxEffect transitionEffect)
+{
+ GlxTransitionEffectSetting *effectSetting = mTransitionEffectList.value( transitionEffect );
+
+ if ( effectSetting == NULL || items.count() != effectSetting->count() ) {
+ return;
+ }
+
+ for ( int i = 0; i < effectSetting->count() ; ++i) {
+ HbEffect::cancel(items.at(i), effectSetting->eventType().at(i) );
+ }
+}
+
+bool GlxEffectEngine::isEffectRuning(QGraphicsItem * item)
+{
+ if ( HbEffect::effectRunning( item, QString( "Click1" ) ) ) {
+ return true;
+ }
+ return false;
+}
+
+bool GlxEffectEngine::isEffectRuning(const QList< QGraphicsItem * > & items)
+{
+ for ( int i = 0; i < items.count() ; ++i ) {
+ if ( HbEffect::effectRunning( items.at(i), QString( "Click%1").arg(i) ) ) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void GlxEffectEngine::slideShowEffectFinished( const HbEffect::EffectStatus &status )
+{
+ Q_UNUSED( status )
+ qDebug("GlxSlideShowEffectEngine::slideShowEffectFinished() number of effect %d ", mNbrEffectRunning);
+
+ --mNbrEffectRunning;
+
+ if ( mEffectPlugin->isAnimationLater( mNbrEffectRunning) ) {
+ HbEffect::start( mEffectPlugin->animationItem(), mEffectPlugin->ItemType(), QString( "Click%1").arg(mNbrEffectRunning), this, "slideShowEffectFinished");
+ }
+
+ if (mNbrEffectRunning == 0) {
+ emit effectFinished();
+ }
+}
+
+void GlxEffectEngine::transitionEffectFinished( const HbEffect::EffectStatus &status )
+{
+ Q_UNUSED( status )
+ qDebug("GlxSlideShowEffectEngine::transitionEffectFinished() number of effect %d status %d", mNbrEffectRunning, status.reason);
+
+ --mNbrEffectRunning;
+ if ( mNbrEffectRunning == 1 ) {
+ GlxTransitionEffectSetting *effectSetting = mTransitionEffectList.value( mTransitionEffect );
+ if ( effectSetting->isTransitionLater() ){
+ effectSetting->animationItem()->show();
+ HbEffect::start( effectSetting->animationItem(), effectSetting->itemType().at(1), effectSetting->eventType().at(1), this, "transitionEffectFinished");
+ mTransitionEffect = NO_EFFECT;
+ }
+ }
+
+ if (mNbrEffectRunning == 0) {
+ emit effectFinished();
+ }
+}
+
+void GlxEffectEngine::initTransitionEffect()
+{
+ GlxTransitionEffectSetting *effectSetting = NULL;
+
+ effectSetting = new GlxTransitionEffectSetting(GRID_TO_FULLSCREEN);
+ for ( int i = 0; i < effectSetting->count(); ++i ) {
+ HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
+ }
+ mTransitionEffectList[GRID_TO_FULLSCREEN] = effectSetting;
+
+ effectSetting = new GlxTransitionEffectSetting( FULLSCREEN_TO_GRID );
+ for ( int i = 0; i < effectSetting->count(); ++i ) {
+ HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
+ }
+ mTransitionEffectList[FULLSCREEN_TO_GRID] = effectSetting;
+
+ effectSetting = new GlxTransitionEffectSetting( GRID_TO_ALBUMLIST );
+ for ( int i = 0; i < effectSetting->count(); ++i ) {
+ HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
+ }
+ mTransitionEffectList[GRID_TO_ALBUMLIST] = effectSetting;
+
+ effectSetting = new GlxTransitionEffectSetting( ALBUMLIST_TO_GRID );
+ for ( int i = 0; i < effectSetting->count(); ++i ) {
+ HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
+ }
+ mTransitionEffectList[ALBUMLIST_TO_GRID] = effectSetting;
+
+ effectSetting = new GlxTransitionEffectSetting( FULLSCREEN_TO_DETAIL );
+ for ( int i = 0; i < effectSetting->count(); ++i ) {
+ HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
+ }
+ mTransitionEffectList[FULLSCREEN_TO_DETAIL] = effectSetting;
+
+ effectSetting = new GlxTransitionEffectSetting( DETAIL_TO_FULLSCREEN );
+ for ( int i = 0; i < effectSetting->count(); ++i ) {
+ HbEffect::add( effectSetting->itemType().at(i), effectSetting->effectFileList().at(i), effectSetting->eventType().at(i)) ;
+ }
+ mTransitionEffectList[DETAIL_TO_FULLSCREEN] = effectSetting;
+}
+
+void GlxEffectEngine::cleanTransitionEfffect()
+{
+ qDebug("GlxSlideShowEffectEngine::cleanTrnastionEfffect()");
+
+ foreach( GlxTransitionEffectSetting *list, mTransitionEffectList) {
+ for ( int i = 0; i < list->count(); ++i ) {
+ HbEffect::remove( list->itemType().at(i), list->effectFileList().at(i), list->eventType().at(i)) ;
+ }
+ delete list;
+ }
+ mTransitionEffectList.clear();
+
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectengine/src/glxtransitioneffect.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#include <glxtransitioneffect.h>
+
+#include <QString>
+
+GlxTransitionEffectSetting::GlxTransitionEffectSetting(GlxEffect effect): mEffect(effect), mTransitionLater(false), mItem(0)
+{
+ qDebug("GlxTransitionEffectSetting::GlxTransitionEffectSetting() effect id %d ", effect);
+ mEffectFileList.clear();
+ mItemType.clear();
+ mEventType.clear();
+ init();
+}
+
+void GlxTransitionEffectSetting::init()
+{
+ qDebug("GlxTransitionEffectSetting::init() effect id %d ", mEffect);
+
+ switch( mEffect ) {
+ case GRID_TO_FULLSCREEN :
+ mEffectFileList.append( QString(":/data/gridtofullscreenhide.fxml"));
+ mItemType.append( QString("HbGridViewItem") );
+ mEventType.append(QString("click1") );
+
+ mEffectFileList.append( QString(":/data/gridtofullscreenshow.fxml"));
+ mItemType.append( QString("HbView") );
+ mEventType.append(QString("click2") );
+ break;
+
+ case FULLSCREEN_TO_GRID :
+ mEffectFileList.append( QString(":/data/fullscreentogrid.fxml"));
+ mItemType.append( QString("HbGridView") );
+ mEventType.append(QString("click3") );
+ break;
+
+ case GRID_TO_ALBUMLIST:
+ mEffectFileList.append( QString(":/data/gridtoalbumlisthide.fxml"));
+ mItemType.append( QString("HbView") );
+ mEventType.append(QString("click4") );
+
+ mEffectFileList.append( QString(":/data/gridtoalbumlist.fxml"));
+ mItemType.append( QString("HbListView") );
+ mEventType.append(QString("click5") );
+ break;
+
+ case ALBUMLIST_TO_GRID:
+ mEffectFileList.append( QString(":/data/albumlisttogrid.fxml"));
+ mItemType.append( QString("HbListView") );
+ mEventType.append(QString("click6") );
+
+ mEffectFileList.append( QString(":/data/albumlisttogridshow.fxml"));
+ mItemType.append( QString("HbView") );
+ mEventType.append(QString("click7") );
+ break;
+
+ case FULLSCREEN_TO_DETAIL :
+ mEffectFileList.append( QString(":/data/view_flip_hide.fxml"));
+ mItemType.append( QString("HbView") );
+ mEventType.append(QString("click8") );
+
+ mEffectFileList.append( QString(":/data/view_flip_show.fxml"));
+ mItemType.append( QString("HbView") );
+ mEventType.append(QString("click9") );
+ mTransitionLater = true;
+ break;
+
+ case DETAIL_TO_FULLSCREEN :
+ mEffectFileList.append( QString(":/data/view_flip_hide.fxml"));
+ mItemType.append( QString("HbView") );
+ mEventType.append(QString("click10") );
+
+ mEffectFileList.append( QString(":/data/view_flip_show.fxml"));
+ mItemType.append( QString("HbView") );
+ mEventType.append(QString("click11") );
+ mTransitionLater = true;
+ break;
+
+ default :
+ break;
+ }
+}
+
+GlxTransitionEffectSetting::~GlxTransitionEffectSetting()
+{
+ qDebug("GlxTransitionEffectSetting::~GlxTransitionEffectSetting() effect id %d ", mEffect);
+ mEffectFileList.clear();
+ mItemType.clear();
+ mEventType.clear();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/inc/glxeffectpluginbase.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#ifndef GLXEFFECTPLUGINBASE_H
+#define GLXEFFECTPLUGINBASE_H
+
+#include <QList>
+#include <QString>
+#include <QGraphicsItem>
+
+/*
+ * It is based class of diffetent animation plugin.
+ * These Plugin mostly used for playing the animation in slide show
+ */
+
+class GlxEffectPluginBase
+{
+public :
+ /*
+ * Constructor
+ */
+ GlxEffectPluginBase( int effectId ) { mEffectId = effectId ; }
+
+ /*
+ * Destructor
+ */
+ virtual ~GlxEffectPluginBase() {}
+
+ /*
+ * return the list of effect file's
+ */
+ virtual QList <QString > effectFileList() = 0;
+
+ /*
+ * Setup the item's postion and other properties before plaing the animation
+ */
+ virtual void setUpItems( QList< QGraphicsItem * > & items ) { Q_UNUSED( items ) }
+
+ /*
+ * second animation will run same time(false) or later (true)
+ */
+ virtual bool isAnimationLater(int index)
+ {
+ Q_UNUSED( index )
+ return false ;
+ }
+
+ /*
+ * Return the item type of animated object
+ */
+ virtual QString ItemType() { return QString("HbIconItem") ; }
+
+ /*
+ * Return the animation object
+ */
+ virtual QGraphicsItem * animationItem() { return NULL; }
+
+private :
+ int mEffectId ;
+
+};
+
+#endif /*GLXEFFECTPLUGINBASE_H*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/inc/glxeffectpluginresolver.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#ifndef GLXEFFECTPLUGINRESOLVER_H
+#define GLXEFFECTPLUGINRESOLVER_H
+
+#include <hbeffect.h>
+#include <QHash>
+
+#include "glxuistd.h"
+
+class GlxEffectPluginBase ;
+class QString ;
+
+class GlxEffectPluginResolver
+{
+
+public :
+ /*
+ * Constructor
+ */
+ GlxEffectPluginResolver( );
+
+ /*
+ * Return the name of the effect
+ */
+ static QString effectName( int effectId );
+
+ /*
+ * Return the effect plugin instance to run the effect
+ */
+ GlxEffectPluginBase * effectPlugin( int effectId );
+
+ /*
+ * Destructor
+ */
+ ~GlxEffectPluginResolver( );
+
+private :
+ QHash< GlxEffect, GlxEffectPluginBase * > mEffectPluginList ;
+};
+
+
+#endif //GLXEFFECTPLUGINRESOLVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/inc/glxfadeeffectplugin.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#ifndef GLXFADEEFFECTPLUGIN_H
+#define GLXFADEEFFECTPLUGIN_H
+
+#include "glxeffectpluginbase.h"
+
+class QString ;
+
+class GlxFadeEffectPlugin : public GlxEffectPluginBase
+{
+public :
+ /*
+ * Constructor
+ */
+ GlxFadeEffectPlugin();
+
+ /*
+ * Destructor
+ */
+ ~GlxFadeEffectPlugin();
+
+ /*
+ * return the fade in and fade out fxml file list
+ */
+ QList <QString > effectFileList() { return mEffectFileList ; }
+
+ /*
+ * setup the item postion and set the mItem value
+ */
+ void setUpItems( QList< QGraphicsItem * > & items );
+
+ /*
+ * get the name of the effect, use to shown in the slide show setting view
+ */
+ static QString effectName();
+
+private :
+ QList <QString > mEffectFileList;
+};
+
+#endif /* GLXFADEEFFECTPLUGIN_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/inc/glxflipeffectplugin.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#ifndef GLXFLIPEFFECTPLUGIN_H
+#define GLXFLIPEFFECTPLUGIN_H
+
+#include "glxeffectpluginbase.h"
+
+class GlxFlipEffectPlugin : public GlxEffectPluginBase
+{
+public :
+ /*
+ * Constructor
+ */
+ GlxFlipEffectPlugin();
+
+ /*
+ * Destructor
+ */
+ ~GlxFlipEffectPlugin();
+
+ /*
+ * Get the flip hide and Flip Show file list
+ */
+ QList <QString > effectFileList() { return mEffectFileList; }
+
+ /*
+ * setup the item postion and set the mItem value
+ */
+ void setUpItems( QList< QGraphicsItem * > & items );
+
+ /*
+ * second animation will be run later
+ */
+ bool isAnimationLater(int index) ;
+
+ /*
+ * return the second animation object to play the flip show animation
+ */
+ QGraphicsItem * animationItem() ;
+
+ /*
+ * get the name of the effect, use to shown in the slide show setting view
+ */
+ static QString effectName() { return QString ("Flip") ; }
+
+private :
+ QList <QString > mEffectFileList;
+ QGraphicsItem *mItem;
+};
+
+#endif /*GLXFLIPEFFECTPLUGIN_H*/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/inc/glxzoominoutplugin.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#ifndef GLXZOOMINOUTEFFECTPLUGIN_H
+#define GLXZOOMINOUTEFFECTPLUGIN_H
+
+#include "glxeffectpluginbase.h"
+
+class GlxZoomInOutEffectPlugin : public GlxEffectPluginBase
+{
+public :
+ /*
+ * Constructor
+ */
+ GlxZoomInOutEffectPlugin();
+
+ /*
+ * Destructor
+ */
+ ~GlxZoomInOutEffectPlugin();
+
+ /*
+ * Get the flip hide and Flip Show file list
+ */
+ QList <QString > effectFileList() { return mEffectFileList; }
+
+ /*
+ * setup the item postion and set the mItem value
+ */
+ void setUpItems( QList< QGraphicsItem * > & items );
+
+ /*
+ * get the name of the effect, use to shown in the slide show setting view
+ */
+ static QString effectName() { return QString ("ZoomInOut") ; }
+
+private :
+ QList <QString > mEffectFileList;
+ QGraphicsItem *mItem;
+};
+
+#endif /*GLXZOOMINOUTEFFECTPLUGIN_H*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/src/glxeffectpluginresolver.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#include <QString>
+
+#include "glxeffectpluginresolver.h"
+#include "glxeffectpluginbase.h"
+#include "glxfadeeffectplugin.h"
+#include "glxflipeffectplugin.h"
+#include "glxzoominoutplugin.h"
+
+GlxEffectPluginResolver::GlxEffectPluginResolver()
+{
+ mEffectPluginList.clear();
+}
+
+QString GlxEffectPluginResolver::effectName( int effectId )
+{
+ switch ( effectId ) {
+ case FLIP_EFFECT :
+ return GlxFlipEffectPlugin::effectName();
+
+ case SMOOTH_FADE :
+ return GlxFadeEffectPlugin::effectName() ;
+
+ case ZOOM_TO_FACE :
+ return GlxZoomInOutEffectPlugin::effectName(); //To:Do temp remove once plugin is ready
+
+ default :
+ return GlxFadeEffectPlugin::effectName() ;
+ }
+}
+
+GlxEffectPluginBase *GlxEffectPluginResolver::effectPlugin( int effectId )
+{
+ GlxEffectPluginBase * effectPlugin = mEffectPluginList.value( ( GlxEffect )effectId );
+ if ( effectPlugin ) {
+ return effectPlugin ;
+ }
+
+ switch ( effectId ) {
+ case FLIP_EFFECT :
+ effectPlugin = new GlxFlipEffectPlugin();
+ mEffectPluginList[ FLIP_EFFECT ] = effectPlugin ;
+ break ;
+
+ case ZOOM_TO_FACE :
+ effectPlugin = new GlxZoomInOutEffectPlugin() ;
+ mEffectPluginList[ ZOOM_TO_FACE ] = effectPlugin ;
+ break ;
+
+ case SMOOTH_FADE :
+ default :
+ effectPlugin = mEffectPluginList.value( SMOOTH_FADE );
+ if ( effectPlugin == NULL ) {
+ effectPlugin = new GlxFadeEffectPlugin();
+ mEffectPluginList[ SMOOTH_FADE ] = effectPlugin ;
+ }
+ break ;
+ }
+
+ return effectPlugin ;
+}
+
+GlxEffectPluginResolver::~GlxEffectPluginResolver()
+{
+ foreach( GlxEffectPluginBase *list, mEffectPluginList) {
+ delete list;
+ list = NULL;
+ }
+ mEffectPluginList.clear();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/src/glxfadeeffectplugin.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#include "glxfadeeffectplugin.h"
+#include "glxuistd.h"
+#include "glxlocalisationstrings.h"
+
+GlxFadeEffectPlugin::GlxFadeEffectPlugin() : GlxEffectPluginBase( SMOOTH_FADE )
+{
+ mEffectFileList.append(QString(":/data/opacity_deactivate.fxml"));
+ mEffectFileList.append(QString(":/data/opacity_activate.fxml"));
+}
+
+void GlxFadeEffectPlugin::setUpItems( QList< QGraphicsItem * > & items )
+{
+ if ( items.count() < 2 )
+ return;
+
+ items.at(0)->setPos(0,0);
+ items.at(1)->setPos(0,0);
+}
+
+QString GlxFadeEffectPlugin::effectName()
+{
+ return ( GLX_VAL_SMOOTH_FADE ) ;
+}
+
+GlxFadeEffectPlugin::~GlxFadeEffectPlugin()
+{
+ mEffectFileList.clear();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/src/glxflipeffectplugin.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#include "glxflipeffectplugin.h"
+#include "glxuistd.h"
+
+GlxFlipEffectPlugin::GlxFlipEffectPlugin() : GlxEffectPluginBase( FLIP_EFFECT )
+{
+ mEffectFileList.append(QString(":/data/view_flip_hide.fxml"));
+ mEffectFileList.append(QString(":/data/view_flip_show.fxml"));
+}
+
+void GlxFlipEffectPlugin::setUpItems( QList< QGraphicsItem * > & items )
+{
+ if ( items.count() < 2 )
+ return;
+
+ mItem = items.at(1);
+ mItem->hide();
+ mItem->setPos(0,0);
+ items.at(0)->setPos(0,0);
+}
+
+bool GlxFlipEffectPlugin::isAnimationLater(int index)
+{
+ if ( index == 1) {
+ return true;
+ }
+ return false;
+}
+
+QGraphicsItem * GlxFlipEffectPlugin::animationItem()
+{
+ mItem->show();
+ return mItem ;
+}
+
+GlxFlipEffectPlugin::~GlxFlipEffectPlugin()
+{
+ mEffectFileList.clear();
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/effectplugin/src/glxzoominoutplugin.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+
+#include "glxzoominoutplugin.h"
+#include "glxuistd.h"
+
+GlxZoomInOutEffectPlugin::GlxZoomInOutEffectPlugin() : GlxEffectPluginBase( ZOOM_TO_FACE )
+{
+ mEffectFileList.append(QString(":/data/zoomin.fxml"));
+ mEffectFileList.append(QString(":/data/zoomout.fxml"));
+}
+
+void GlxZoomInOutEffectPlugin::setUpItems( QList< QGraphicsItem * > & items )
+{
+ if ( items.count() < 2 )
+ return;
+
+ mItem = items.at(1);
+ mItem->setPos(0,0);
+ items.at(0)->setPos(0,0);
+}
+
+GlxZoomInOutEffectPlugin::~GlxZoomInOutEffectPlugin()
+{
+ mEffectFileList.clear();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/settingutility/inc/glxsetting.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#ifndef GLXSETTING_H
+#define GLXSETTING_H
+
+
+#include <glxsettinginterface.h>
+
+class XQSettingsKey;
+class XQSettingsManager;
+class QStringList;
+
+#define NBR_SLIDESHOW_EFFECT 3
+
+/*
+ * This class is used for read and write the photos application related setting from the centrep.
+ */
+class GlxSetting : public GlxSettingInterface
+{
+
+public :
+ /*
+ * It will return the singlton object of this class
+ */
+ static GlxSettingInterface * instance();
+
+ /*
+ * Returns the index to the selected transition effect
+ * This value is fetched from Central repository
+ */
+ int slideShowEffectIndex() ;
+
+ /*
+ * SlideShowSettingsView will call this API to set the index of the transition effect chosen.
+ * This data will be written to the Central Repository
+ */
+ void setslideShowEffectIndex( int index );
+
+ /*
+ * Returns the index to the selected transition delay /
+ * This value is fetched from Central repository
+ */
+ int slideShowDelayIndex();
+
+ /*
+ * SlideShowSettingsView will call this API to set the index of the transition delay chosen.
+ * This data will be written to the Central Repository
+ */
+ void setSlideShowDelayIndex( int index );
+
+ /*
+ * It will return the slide show delay time for playing the slide show.
+ * This value is fetched for central repository
+ */
+ int slideShowDelayTime() ;
+
+ /*
+ * This will return the list of effects as available in the central repository
+ */
+ QStringList slideShowEffectList();
+
+ /*
+ * This will return the effect ID based on the effect index
+ * Effect index will be 0,1,2... and effect ID is GLX_EFFECT
+ * Effect id is store in the centrep with respect to index.
+ */
+ int slideShowEffectId( int index ) ;
+
+protected :
+ /*
+ * Constructor
+ */
+ GlxSetting( );
+
+ /*
+ * Copy Constructor
+ */
+ GlxSetting( GlxSetting & );
+
+ /*
+ * Destructor
+ */
+ ~GlxSetting();
+
+private :
+ XQSettingsManager *mSettingsManager;
+ XQSettingsKey *mTransitionEffectCenrepKey;
+ XQSettingsKey *mTransitionDelayCenrepKey;
+
+ XQSettingsKey *mSlideShowEffectCenRepKey[ NBR_SLIDESHOW_EFFECT ];
+
+
+ XQSettingsKey *mSlowCenRepKey;
+ XQSettingsKey *mMediumCenRepKey;
+ XQSettingsKey *mFastCenRepKey;
+
+ static GlxSetting mObj;
+};
+
+
+
+#endif //GLXSETTING_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/settingutility/inc/glxsettinginterface.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#ifndef GLXSETTINGINTERFACE_H
+#define GLXSETTINGINTERFACE_H
+
+#include <qglobal.h>
+
+#ifdef BUILD_GLXVIEWUTILITIES
+#define GLX_VIEWUTILITIES_EXPORT Q_DECL_EXPORT
+#else
+#define GLX_VIEWUTILITIES_EXPORT Q_DECL_IMPORT
+#endif
+
+class QStringList ;
+
+/*
+ * This is an interface for read and write the photos application related setting from the centrep.
+ */
+class GLX_VIEWUTILITIES_EXPORT GlxSettingInterface
+{
+
+public :
+ /*
+ * return the instance of the GlxSetting
+ */
+ static GlxSettingInterface * instance();
+
+ /*
+ * Returns the index to the selected transition effect
+ * This value is fetched from Central repository
+ */
+ virtual int slideShowEffectIndex() = 0 ;
+
+ /*
+ * SlideShowSettingsView will call this API to set the index of the transition effect chosen.
+ * This data will be written to the Central Repository
+ */
+ virtual void setslideShowEffectIndex( int index ) = 0 ;
+
+ /*
+ * Returns the index to the selected transition delay
+ * This value is fetched from Central repository
+ */
+ virtual int slideShowDelayIndex() = 0 ;
+
+ /*
+ * SlideShowSettingsView will call this API to set the index of the transition delay chosen.
+ * This data will be written to the Central Repository
+ */
+ virtual void setSlideShowDelayIndex( int index ) = 0;
+
+ /*
+ * It will return the slide show delay time for playing the slide show.
+ * This value is fetched for central repository
+ */
+ virtual int slideShowDelayTime() = 0;
+
+ /*
+ * This will return the list of effects as available in the central repository
+ */
+ virtual QStringList slideShowEffectList() = 0;
+
+ /*
+ * This will return the effect ID based on the effect index
+ * Effect index will be 0,1,2... and effect ID is GLX_EFFECT
+ * Effect id is store in the centrep with respect to index.
+ */
+ virtual int slideShowEffectId( int index ) = 0;
+
+protected :
+ /*
+ * Constructor
+ */
+ GlxSettingInterface( );
+
+ /*
+ * Copy Constructor
+ */
+ GlxSettingInterface( GlxSettingInterface & );
+
+ /*
+ * Destructor
+ */
+ virtual ~GlxSettingInterface() ;
+};
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/settingutility/src/glxsetting.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#include <xqsettingsmanager.h>
+#include <xqsettingskey.h>
+#include <QStringList>
+
+#include "glxsetting.h"
+#include "glxeffectpluginresolver.h"
+#include "glxuistd.h"
+
+
+const TUint32 KGlxTransitionEffect = 0x1;
+const TUint32 KGlxTransitionDelay = 0x2;
+const TUint32 KGlxSlow = 0x3;
+const TUint32 KGlxMeduim = 0x4;
+const TUint32 KGlxFast = 0x5;
+const TUint32 KGlxSlideShowEffect[ ] = { 0x6, 0x7, 0x8 };
+const TUint32 KCRUidGallery = 0x20007194;
+
+GlxSetting GlxSetting::mObj ;
+
+
+GlxSetting::GlxSetting( )
+{
+ mSettingsManager = new XQSettingsManager();
+ mTransitionEffectCenrepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery , KGlxTransitionEffect );
+ mTransitionDelayCenrepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery , KGlxTransitionDelay );
+ mSlowCenRepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxSlow );
+ mMediumCenRepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxMeduim );
+ mFastCenRepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxFast );
+
+ for ( int i = 0; i < NBR_SLIDESHOW_EFFECT; i++ ) {
+ mSlideShowEffectCenRepKey[ i ] = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery , KGlxSlideShowEffect[ i ] );
+ }
+}
+
+GlxSetting::GlxSetting( GlxSetting & )
+{
+
+}
+
+GlxSetting::~GlxSetting( )
+{
+ delete mFastCenRepKey;
+ delete mMediumCenRepKey;
+ delete mSlowCenRepKey;
+ delete mTransitionDelayCenrepKey;
+ delete mTransitionEffectCenrepKey;
+ delete mSettingsManager;
+
+ for ( int i = 0 ; i < NBR_SLIDESHOW_EFFECT ; i++ ) {
+ delete mSlideShowEffectCenRepKey[ i ];
+ }
+}
+
+GlxSettingInterface * GlxSetting::instance()
+{
+ return &mObj ;
+}
+
+int GlxSetting::slideShowEffectIndex()
+{
+ QVariant effectvalue = mSettingsManager->readItemValue(*mTransitionEffectCenrepKey);
+ return effectvalue.toInt();
+}
+
+void GlxSetting::setslideShowEffectIndex( int index )
+{
+ mSettingsManager->writeItemValue( *mTransitionEffectCenrepKey, index ) ;
+}
+
+int GlxSetting::slideShowDelayIndex()
+{
+ QVariant effectvalue = mSettingsManager->readItemValue(*mTransitionDelayCenrepKey);
+ return effectvalue.toInt();
+}
+
+void GlxSetting::setSlideShowDelayIndex( int index )
+{
+ mSettingsManager->writeItemValue(*mTransitionDelayCenrepKey, index);
+}
+
+int GlxSetting::slideShowDelayTime()
+{
+ QVariant effectvalue = mSettingsManager->readItemValue(*mTransitionDelayCenrepKey);
+ switch ( effectvalue.toInt() ) {
+ case SLOW:
+ return mSettingsManager->readItemValue(*mSlowCenRepKey).toInt();
+
+ case MEDIUM:
+ return mSettingsManager->readItemValue(*mMediumCenRepKey).toInt();
+
+ case FAST:
+ return mSettingsManager->readItemValue(*mFastCenRepKey).toInt();
+
+ default:
+ return 3000;
+ }
+}
+
+QStringList GlxSetting::slideShowEffectList()
+{
+ QStringList effectList;
+ effectList.clear();
+ int effectId = 0;
+
+ for ( int i = 0 ; i < NBR_SLIDESHOW_EFFECT ; i++ ) {
+ effectId = mSettingsManager->readItemValue( * mSlideShowEffectCenRepKey[ i ] ).toInt() ;
+ effectList << GlxEffectPluginResolver::effectName ( effectId );
+ }
+
+ return effectList;
+}
+
+int GlxSetting::slideShowEffectId( int index )
+{
+ if ( index >= NBR_SLIDESHOW_EFFECT || index < 0 ) {
+ return NO_EFFECT ;
+ }
+
+ return mSettingsManager->readItemValue( * mSlideShowEffectCenRepKey[ index ] ).toInt() ;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/settingutility/src/glxsettinginterface.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ?Description
+*
+*/
+
+#include <glxsettinginterface.h>
+#include <glxsetting.h>
+
+GlxSettingInterface::GlxSettingInterface()
+{
+}
+
+GlxSettingInterface::~GlxSettingInterface()
+{
+}
+
+GlxSettingInterface::GlxSettingInterface( GlxSettingInterface & )
+{
+}
+
+GlxSettingInterface * GlxSettingInterface::instance()
+{
+ return GlxSetting::instance();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/viewutilities/viewutilities.pro Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,60 @@
+#/*
+#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#* All rights reserved.
+#* This component and the accompanying materials are made available
+#* under the terms of "Eclipse Public License v1.0"
+#* which accompanies this distribution, and is available
+#* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#*
+#* Initial Contributors:
+#* Nokia Corporation - initial contribution.
+#*
+#* Contributors:
+#*
+#* Description:
+#*
+#*/
+TEMPLATE = lib
+TARGET = glxviewutilities
+
+DEPENDPATH += . settingutiliy/inc settingutility/src
+CONFIG += hb
+
+LIBS += -lxqsettingsmanager
+
+DEFINES += BUILD_GLXVIEWUTILITIES
+
+INCLUDEPATH += . ../inc \
+ ../../inc \
+ ../../loggers/loggerqt/inc \
+ ../../traces \
+ /epoc32/include/mw/hgwidgets
+
+symbian: {
+TARGET.UID3 = 0x2000718E
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+TARGET.EPOCALLOWDLLDATA = 1
+TARGET.CAPABILITY = ALL -TCB
+}
+
+# Input
+HEADERS += settingutility/inc/glxsetting.h \
+ settingutility/inc/glxsettinginterface.h \
+ effectplugin/inc/glxeffectpluginbase.h \
+ effectplugin/inc/glxfadeeffectplugin.h \
+ effectplugin/inc/glxflipeffectplugin.h \
+ effectplugin/inc/glxzoominoutplugin.h \
+ effectplugin/inc/glxeffectpluginresolver.h \
+ effectengine/inc/glxtransitioneffect.h \
+ effectengine/inc/glxeffectengine.h
+
+SOURCES += settingutility/src/glxsetting.cpp \
+ settingutility/src/glxsettinginterface.cpp \
+ effectplugin/src/glxfadeeffectplugin.cpp \
+ effectplugin/src/glxflipeffectplugin.cpp \
+ effectplugin/src/glxzoominoutplugin.cpp \
+ effectplugin/src/glxeffectpluginresolver.cpp \
+ effectengine/src/glxtransitioneffect.cpp \
+ effectengine/src/glxeffectengine.cpp
+
+DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/widgets/bwins/glxzoomwidgetu.def Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,39 @@
+EXPORTS
+ ?dataChanged@GlxZoomWidget@@IAEXVQModelIndex@@0@Z @ 1 NONAME ; void GlxZoomWidget::dataChanged(class QModelIndex, class QModelIndex)
+ ?limitRequiredSize@GlxZoomWidget@@AAEXAAVQSizeF@@@Z @ 2 NONAME ; void GlxZoomWidget::limitRequiredSize(class QSizeF &)
+ ?cleanUp@GlxZoomWidget@@QAEXXZ @ 3 NONAME ; void GlxZoomWidget::cleanUp(void)
+ ?setMinMaxZValue@GlxZoomWidget@@QAEXHH@Z @ 4 NONAME ; void GlxZoomWidget::setMinMaxZValue(int, int)
+ ?sendDecodeRequest@GlxZoomWidget@@QAEXH@Z @ 5 NONAME ; void GlxZoomWidget::sendDecodeRequest(int)
+ ??0GlxZoomWidget@@QAE@PAVQGraphicsItem@@@Z @ 6 NONAME ; GlxZoomWidget::GlxZoomWidget(class QGraphicsItem *)
+ ?qt_metacast@GlxZoomWidget@@UAEPAXPBD@Z @ 7 NONAME ; void * GlxZoomWidget::qt_metacast(char const *)
+ ?staticMetaObject@GlxZoomWidget@@2UQMetaObject@@B @ 8 NONAME ; struct QMetaObject const GlxZoomWidget::staticMetaObject
+ ?tr@GlxZoomWidget@@SA?AVQString@@PBD0H@Z @ 9 NONAME ; class QString GlxZoomWidget::tr(char const *, char const *, int)
+ ?sceneEvent@GlxZoomWidget@@MAE_NPAVQEvent@@@Z @ 10 NONAME ; bool GlxZoomWidget::sceneEvent(class QEvent *)
+ ?trUtf8@GlxZoomWidget@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString GlxZoomWidget::trUtf8(char const *, char const *)
+ ?getFocusedImage@GlxZoomWidget@@AAE?AVQPixmap@@XZ @ 12 NONAME ; class QPixmap GlxZoomWidget::getFocusedImage(void)
+ ?setModel@GlxZoomWidget@@QAEXPAVQAbstractItemModel@@@Z @ 13 NONAME ; void GlxZoomWidget::setModel(class QAbstractItemModel *)
+ ?finalizeWidgetTransform@GlxZoomWidget@@AAEXXZ @ 14 NONAME ; void GlxZoomWidget::finalizeWidgetTransform(void)
+ ?executeGestureEvent@GlxZoomWidget@@AAE_NPAVQGraphicsItem@@PAVQGestureEvent@@@Z @ 15 NONAME ; bool GlxZoomWidget::executeGestureEvent(class QGraphicsItem *, class QGestureEvent *)
+ ?zoomImage@GlxZoomWidget@@AAEXMVQPointF@@@Z @ 16 NONAME ; void GlxZoomWidget::zoomImage(float, class QPointF)
+ ?activate@GlxZoomWidget@@QAEXXZ @ 17 NONAME ; void GlxZoomWidget::activate(void)
+ ?connectDecodeRequestToPinchEvent@GlxZoomWidget@@QAEXXZ @ 18 NONAME ; void GlxZoomWidget::connectDecodeRequestToPinchEvent(void)
+ ?indexChanged@GlxZoomWidget@@QAEXH@Z @ 19 NONAME ; void GlxZoomWidget::indexChanged(int)
+ ?animateZoomIn@GlxZoomWidget@@QAEXVQPointF@@@Z @ 20 NONAME ; void GlxZoomWidget::animateZoomIn(class QPointF)
+ ?getStaticMetaObject@GlxZoomWidget@@SAABUQMetaObject@@XZ @ 21 NONAME ; struct QMetaObject const & GlxZoomWidget::getStaticMetaObject(void)
+ ?animationTimeLineFinished@GlxZoomWidget@@QAEXXZ @ 22 NONAME ; void GlxZoomWidget::animationTimeLineFinished(void)
+ ?qt_metacall@GlxZoomWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 23 NONAME ; int GlxZoomWidget::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?zoomWidgetMovedBackground@GlxZoomWidget@@IAEXH@Z @ 24 NONAME ; void GlxZoomWidget::zoomWidgetMovedBackground(int)
+ ?animateZoomOut@GlxZoomWidget@@QAEXVQPointF@@@Z @ 25 NONAME ; void GlxZoomWidget::animateZoomOut(class QPointF)
+ ?adjustGestureCenter@GlxZoomWidget@@AAEXAAVQPointF@@AAM@Z @ 26 NONAME ; void GlxZoomWidget::adjustGestureCenter(class QPointF &, float &)
+ ?metaObject@GlxZoomWidget@@UBEPBUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const * GlxZoomWidget::metaObject(void) const
+ ?decodedImageAvailable@GlxZoomWidget@@QAEXXZ @ 28 NONAME ; void GlxZoomWidget::decodedImageAvailable(void)
+ ??_EGlxZoomWidget@@UAE@I@Z @ 29 NONAME ; GlxZoomWidget::~GlxZoomWidget(unsigned int)
+ ??1GlxZoomWidget@@UAE@XZ @ 30 NONAME ; GlxZoomWidget::~GlxZoomWidget(void)
+ ?sceneEventFilter@GlxZoomWidget@@MAE_NPAVQGraphicsItem@@PAVQEvent@@@Z @ 31 NONAME ; bool GlxZoomWidget::sceneEventFilter(class QGraphicsItem *, class QEvent *)
+ ?pinchGestureReceived@GlxZoomWidget@@IAEXH@Z @ 32 NONAME ; void GlxZoomWidget::pinchGestureReceived(int)
+ ?setWindowSize@GlxZoomWidget@@QAEXVQSize@@@Z @ 33 NONAME ; void GlxZoomWidget::setWindowSize(class QSize)
+ ?retreiveFocusedImage@GlxZoomWidget@@AAEXXZ @ 34 NONAME ; void GlxZoomWidget::retreiveFocusedImage(void)
+ ?animationFrameChanged@GlxZoomWidget@@QAEXH@Z @ 35 NONAME ; void GlxZoomWidget::animationFrameChanged(int)
+ ?tr@GlxZoomWidget@@SA?AVQString@@PBD0@Z @ 36 NONAME ; class QString GlxZoomWidget::tr(char const *, char const *)
+ ?trUtf8@GlxZoomWidget@@SA?AVQString@@PBD0H@Z @ 37 NONAME ; class QString GlxZoomWidget::trUtf8(char const *, char const *, int)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/widgets/eabi/glxzoomwidgetu.def Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,45 @@
+EXPORTS
+ _ZN13GlxZoomWidget10sceneEventEP6QEvent @ 1 NONAME
+ _ZN13GlxZoomWidget11dataChangedE11QModelIndexS0_ @ 2 NONAME
+ _ZN13GlxZoomWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 3 NONAME
+ _ZN13GlxZoomWidget11qt_metacastEPKc @ 4 NONAME
+ _ZN13GlxZoomWidget12indexChangedEi @ 5 NONAME
+ _ZN13GlxZoomWidget13animateZoomInE7QPointF @ 6 NONAME
+ _ZN13GlxZoomWidget13setWindowSizeE5QSize @ 7 NONAME
+ _ZN13GlxZoomWidget14animateZoomOutE7QPointF @ 8 NONAME
+ _ZN13GlxZoomWidget15getFocusedImageEv @ 9 NONAME
+ _ZN13GlxZoomWidget15setMinMaxZValueEii @ 10 NONAME
+ _ZN13GlxZoomWidget16sceneEventFilterEP13QGraphicsItemP6QEvent @ 11 NONAME
+ _ZN13GlxZoomWidget16staticMetaObjectE @ 12 NONAME DATA 16
+ _ZN13GlxZoomWidget17limitRequiredSizeER6QSizeF @ 13 NONAME
+ _ZN13GlxZoomWidget17sendDecodeRequestEi @ 14 NONAME
+ _ZN13GlxZoomWidget19adjustGestureCenterER7QPointFRf @ 15 NONAME
+ _ZN13GlxZoomWidget19executeGestureEventEP13QGraphicsItemP13QGestureEvent @ 16 NONAME
+ _ZN13GlxZoomWidget19getStaticMetaObjectEv @ 17 NONAME
+ _ZN13GlxZoomWidget20pinchGestureReceivedEi @ 18 NONAME
+ _ZN13GlxZoomWidget20retreiveFocusedImageEv @ 19 NONAME
+ _ZN13GlxZoomWidget21animationFrameChangedEi @ 20 NONAME
+ _ZN13GlxZoomWidget21decodedImageAvailableEv @ 21 NONAME
+ _ZN13GlxZoomWidget23finalizeWidgetTransformEv @ 22 NONAME
+ _ZN13GlxZoomWidget25animationTimeLineFinishedEv @ 23 NONAME
+ _ZN13GlxZoomWidget25zoomWidgetMovedBackgroundEi @ 24 NONAME
+ _ZN13GlxZoomWidget32connectDecodeRequestToPinchEventEv @ 25 NONAME
+ _ZN13GlxZoomWidget7cleanUpEv @ 26 NONAME
+ _ZN13GlxZoomWidget8activateEv @ 27 NONAME
+ _ZN13GlxZoomWidget8setModelEP18QAbstractItemModel @ 28 NONAME
+ _ZN13GlxZoomWidget9zoomImageEf7QPointF @ 29 NONAME
+ _ZN13GlxZoomWidgetC1EP13QGraphicsItem @ 30 NONAME
+ _ZN13GlxZoomWidgetC2EP13QGraphicsItem @ 31 NONAME
+ _ZN13GlxZoomWidgetD0Ev @ 32 NONAME
+ _ZN13GlxZoomWidgetD1Ev @ 33 NONAME
+ _ZN13GlxZoomWidgetD2Ev @ 34 NONAME
+ _ZNK13GlxZoomWidget10metaObjectEv @ 35 NONAME
+ _ZTI13GlxZoomWidget @ 36 NONAME
+ _ZTV13GlxZoomWidget @ 37 NONAME
+ _ZThn16_N13GlxZoomWidgetD0Ev @ 38 NONAME
+ _ZThn16_N13GlxZoomWidgetD1Ev @ 39 NONAME
+ _ZThn8_N13GlxZoomWidget10sceneEventEP6QEvent @ 40 NONAME
+ _ZThn8_N13GlxZoomWidget16sceneEventFilterEP13QGraphicsItemP6QEvent @ 41 NONAME
+ _ZThn8_N13GlxZoomWidgetD0Ev @ 42 NONAME
+ _ZThn8_N13GlxZoomWidgetD1Ev @ 43 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/widgets/glxzoomwidget/glxzoomwidget.pro Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,48 @@
+#/*
+#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#* All rights reserved.
+#* This component and the accompanying materials are made available
+#* under the terms of "Eclipse Public License v1.0"
+#* which accompanies this distribution, and is available
+#* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#*
+#* Initial Contributors:
+#* Nokia Corporation - initial contribution.
+#*
+#* Contributors:
+#*
+#* Description:
+#*
+#*/
+
+
+TEMPLATE = lib
+TARGET = glxzoomwidget
+
+CONFIG += hb
+
+DEFINES += GLXZOOMWIDGET_LIBRARY
+
+LIBS += -lglxmodelwrapper.dll \
+ -lglximagedecoderwrapper.dll \
+
+DEPENDPATH += . inc src
+INCLUDEPATH += . \
+ ../../../commonutilities/imagedecoderwrapper/inc \
+ ../uiengine/model/modelwrapper/inc \
+ ../../inc \
+ ../../../inc
+
+symbian: {
+TARGET.UID3 = 0x200104E4
+INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+TARGET.EPOCALLOWDLLDATA = 1
+TARGET.CAPABILITY = ALL -TCB
+}
+
+exportfile = "inc/glxzoomwidget.h APP_LAYER_PLATFORM_EXPORT_PATH(glxzoomwidget.h)"
+BLD_INF_RULES.prj_exports += exportfile
+
+# Input
+HEADERS += inc/glxzoomwidget.h inc/glxzoomwidget_global.h
+SOURCES += src/glxzoomwidget.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/widgets/glxzoomwidget/inc/glxzoomwidget.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: glxzoomwidget.h
+* definition of the class glxzoomwidget which controls the Zoom behavior of coverflow.
+*
+*/
+#ifndef GLXZOOMWIDGET_H
+#define GLXZOOMWIDGET_H
+
+#include <QObject>
+#include <QGraphicsWidget>
+#include <QPixmap>
+#include <hbscrollarea.h>
+
+#include <glxzoomwidget_global.h>
+
+class QGestureEvent;
+class QPinchGesture;
+class HbIconItem;
+class GlxImageDecoderWrapper;
+class QTimeLine;
+
+const int MAXZVALUE = 100;
+const int MINZVALUE = 0;
+
+class GLXZOOMWIDGETSHARED_EXPORT GlxZoomWidget : public HbScrollArea
+{
+ Q_OBJECT
+
+ public:
+ GlxZoomWidget (QGraphicsItem *parent = NULL);
+ ~GlxZoomWidget ();
+ void setModel (QAbstractItemModel *model) ;
+ void indexChanged(int index);
+ void setWindowSize(QSize windowSize);
+ void cleanUp();
+ void activate();
+ void setMinMaxZValue(int minZvalue, int maxZvalue);
+ void connectDecodeRequestToPinchEvent();
+
+ signals:
+ void pinchGestureReceived(int index);
+ void zoomWidgetMovedBackground(int index);
+
+ public slots:
+ //for Decoder support
+ void decodedImageAvailable();
+ void sendDecodeRequest(int index);
+
+ //for animation effects
+ void animateZoomIn(QPointF animRefPoint);
+ void animateZoomOut(QPointF animRefPoint);
+ void animationFrameChanged(int frameNumber);
+ void animationTimeLineFinished();
+
+ protected:
+ bool sceneEvent(QEvent *event);
+ bool sceneEventFilter(QGraphicsItem *watched,QEvent *event);
+ protected slots:
+ void dataChanged(QModelIndex startIndex, QModelIndex endIndex);
+
+
+ private:
+ bool executeGestureEvent(QGraphicsItem *source,QGestureEvent *event);
+ //Responsible for changing the transforms of the widget wrt the ZF and center
+ //Also adjusts the ZF, center and final size so as to respect the boundaries
+ void zoomImage(qreal zoomFactor, QPointF center);
+ //This API will adjust the gesture center to maintain boundaries
+ //called from GlxZoomWidget::zoomImage
+ void adjustGestureCenter(QPointF & gestureCenter, qreal& zoomFactor);
+ //this API will limit the max/min Zoom Size possible
+ //called from GlxZoomWidget::zoomImage
+ void limitRequiredSize(QSizeF &requiredSize);
+ //gets the latest focussed image from the model
+ void retreiveFocusedImage();
+ //finalize the transform and update the sizehint of mZoomWidget
+ void finalizeWidgetTransform();
+ //get the focused image from the model
+ QPixmap getFocusedImage();
+
+ //data members
+ private:
+ //view widgets
+ QGraphicsPixmapItem *mZoomItem; //Item containing the pixmap
+ QGraphicsWidget *mZoomWidget; //container :all scaling and transforms would be done on this widget
+ HbIconItem* mBlackBackgroundItem; //for setting black background
+
+ //view Z values
+ //might push to layouts later
+
+ int mMinZValue ;
+ int mMaxZValue ;
+
+
+ //to be in sync with the model
+ QAbstractItemModel *mModel;
+ int mFocusIndex;
+
+ //size parameter
+ QSizeF mItemSize; // the actual pixmap size. Keep it updated with latest pixmap size
+ QSizeF mStepCurrentSize; //to save the size before gesture started
+ QSizeF mCurrentSize; //save sizes scaled by gesture
+ QSize mWindowSize; //the window size
+ QSizeF mMinScaleSize; //minimum posible size
+ QSizeF mMinDecScaleSize; //the Minimum scale limit after which the image scaling down should be decelerated
+ QSizeF mMaxScaleSize; // the maximum scale limit
+ QSizeF mMaxScaleDecSize; // the Maximum scale limit after which the image scaling should be decelerated
+ //for animation effect
+ qreal m_FinalAnimatedScaleFactor;
+ QPointF m_AnimRefPoint;
+ QTimeLine *m_AnimTimeLine;
+ //for Decoder support
+ GlxImageDecoderWrapper* mImageDecoder;
+
+ //status flags
+ //To check if the decode request has already been send or not
+ bool mImageDecodeRequestSend;
+ //To check if the pinch gesture is in progress to block any events to HbScrollArea
+ bool mPinchGestureOngoing;
+ //to check if decoded image is available
+ bool mDecodedImageAvailable;
+
+};
+#endif //GLXZOOMWIDGET_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/widgets/glxzoomwidget/inc/glxzoomwidget_global.h Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,12 @@
+#ifndef GLXZOOMWIDGET_GLOBAL_H
+#define GLXZOOMWIDGET_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(GLXZOOMWIDGET_LIBRARY)
+# define GLXZOOMWIDGETSHARED_EXPORT Q_DECL_EXPORT
+#else
+# define GLXZOOMWIDGETSHARED_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // GLXZOOMWIDGET_GLOBAL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/widgets/glxzoomwidget/src/glxzoomwidget.cpp Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,482 @@
+ /*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: glxzoomwidget.cpp
+* description of the class GlxGlxZoomWidget which controls the Zoom behavior of coverflow.
+*
+*/
+#include <QPinchGesture>
+#include <hbiconitem.h>
+#include <QTimeLine>
+#include <QGesture>
+#include "glximagedecoderwrapper.h"
+#include "glxmodelparm.h"
+#include "glxzoomwidget.h"
+
+GlxZoomWidget::GlxZoomWidget(QGraphicsItem *parent):HbScrollArea(parent), mModel(NULL), mMinZValue(MINZVALUE), mMaxZValue(MAXZVALUE), mImageDecodeRequestSend(false), mPinchGestureOngoing(false), mDecodedImageAvailable(false)
+{
+ grabGesture(Qt::PinchGesture);
+ setAcceptTouchEvents(true) ;
+ setFrictionEnabled(false);
+ setZValue(mMinZValue);
+ //create the child items and background
+ mZoomWidget = new QGraphicsWidget(this);
+ mZoomItem = new QGraphicsPixmapItem(mZoomWidget);
+ mZoomItem->setTransformationMode(Qt::SmoothTransformation);
+ //the black background
+ //replace when a proper substitute for setting backgrounds is known
+ mBlackBackgroundItem = new HbIconItem(this);
+ mBlackBackgroundItem->setBrush(QBrush(Qt::black));
+ mBlackBackgroundItem->hide();
+ //does not work so is commented
+ //setBackgroundItem(mBlackBackgroundItem);
+
+ //initializing the image decoder
+ mImageDecoder = new GlxImageDecoderWrapper;
+
+ //inititalizing the timer for animation
+ m_AnimTimeLine = new QTimeLine(1000, this);
+ m_AnimTimeLine->setFrameRange(0, 100);
+ connect(m_AnimTimeLine, SIGNAL(frameChanged(int)), this, SLOT(animationFrameChanged(int)));
+ connect(m_AnimTimeLine, SIGNAL(finished()), this, SLOT(animationTimeLineFinished()));
+}
+
+GlxZoomWidget::~GlxZoomWidget()
+{
+ //disconnect all existing signals
+ disconnect(this,SIGNAL( pinchGestureReceived(int) ), this, SLOT( sendDecodeRequest(int) ) );
+ //no Null checks required
+ delete mZoomItem;
+// delete mZoomWidget; //as this is a content widegt it will automatically be deleted
+ delete mBlackBackgroundItem;
+ //reset the decoder to cancel pending tasks
+ if(mImageDecoder) {
+ mImageDecoder->resetDecoder();
+ delete mImageDecoder;
+ }
+}
+
+void GlxZoomWidget::setModel (QAbstractItemModel *model)
+{
+ if(model)
+ {
+ mModel = model;
+ retreiveFocusedImage(); //Update mZoomItem with focused Image
+ connect( mModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) );
+ }
+}
+
+void GlxZoomWidget::setWindowSize(QSize windowSize)
+{
+ mWindowSize = windowSize;
+ mBlackBackgroundItem->setGeometry(QRectF(QPointF(0,0), mWindowSize));
+ //try to reset the max and min zoomed size here
+}
+
+void GlxZoomWidget::indexChanged(int index)
+{
+ Q_UNUSED(index);
+ if(mFocusIndex != index) {
+ mImageDecoder->resetDecoder();//reset the decoder first to cancel pending tasks
+ mImageDecodeRequestSend = false;
+ mDecodedImageAvailable = false;
+ retreiveFocusedImage(); //Update mZoomItem with focused Image
+ }
+}
+
+void GlxZoomWidget::cleanUp()
+{
+// disconnect( mModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) );
+ if(mImageDecoder) {
+ mImageDecoder->resetDecoder();
+ }
+ mZoomItem->setPixmap(QPixmap());
+}
+
+void GlxZoomWidget::activate()
+{
+}
+
+void GlxZoomWidget::setMinMaxZValue(int minZvalue, int maxZvalue)
+{
+ mMinZValue = minZvalue;
+ mMaxZValue = maxZvalue;
+}
+
+void GlxZoomWidget::connectDecodeRequestToPinchEvent()
+{
+ connect(this,SIGNAL( pinchGestureReceived(int) ), this, SLOT( sendDecodeRequest(int) ), Qt::QueuedConnection );
+}
+
+bool GlxZoomWidget::sceneEvent(QEvent *event)
+{
+ bool consume(false);
+ if (event->type() == QEvent::Gesture) {
+ consume = executeGestureEvent(this, static_cast<QGestureEvent*>(event));
+ }
+ if(!consume)
+ {
+ consume = HbScrollArea::sceneEvent(event);
+ }
+ return consume;
+}
+
+bool GlxZoomWidget::sceneEventFilter(QGraphicsItem *watched,QEvent *event)
+{
+ qDebug("GlxCoverFlow::eventFilter " );
+ bool consume = false;
+ if (event->type() == QEvent::Gesture) {
+ consume = executeGestureEvent(watched, static_cast<QGestureEvent*>(event));
+ }
+
+ if(!consume) {
+ consume = HbScrollArea::sceneEventFilter(watched,event);
+ }
+ return consume;
+
+}
+
+bool GlxZoomWidget::executeGestureEvent(QGraphicsItem *source,QGestureEvent *event)
+{
+ if (QGesture *pinch = event->gesture(Qt::PinchGesture)) {
+ QPinchGesture* pinchG = static_cast<QPinchGesture *>(pinch);
+ QPinchGesture::ChangeFlags changeFlags = pinchG->changeFlags();
+ if (changeFlags & QPinchGesture::ScaleFactorChanged) {
+ mPinchGestureOngoing = true;
+ //bring the zoom widget to foreground
+ setZValue(mMaxZValue);
+ //show the black background
+ mBlackBackgroundItem->setParentItem(parentItem());
+ mBlackBackgroundItem->setZValue(mMaxZValue - 1);
+ mBlackBackgroundItem->show();
+
+ //retreive the gesture values
+ qreal value = pinchG->scaleFactor() / pinchG->lastScaleFactor();
+ QPointF center = pinchG->property("centerPoint").toPointF();
+ //set the gesture center to the scene coordinates
+ QPointF sceneGestureCenter = source->sceneTransform().map(center);
+ zoomImage(value, sceneGestureCenter);
+
+ }
+ if (pinchG->state() == Qt::GestureStarted) {
+ emit pinchGestureReceived(mFocusIndex);
+ }
+
+ if (pinchG->state() == Qt::GestureFinished) {
+ if(mStepCurrentSize != mCurrentSize) {
+ //For giving a spring effect when user has zoomed more than normal.
+ if(mStepCurrentSize.width() > mMaxScaleDecSize.width()) {
+ //scale the image to limited size
+ qreal value = mMaxScaleDecSize.width()/mCurrentSize.width();
+ QPointF center(mWindowSize.width()/2, mWindowSize.height()/2);
+ QPointF sceneGestureCenter = source->sceneTransform().map(center);
+ zoomImage(value, sceneGestureCenter);
+ }
+ mPinchGestureOngoing = false;
+ //finalize the transforms to the geometry else panning will not work
+ finalizeWidgetTransform();
+ }
+//push the Zoom widget to background when zoomed image size nears FS image
+ if(mStepCurrentSize.width() <= mMinDecScaleSize.width()*1.3) {
+ mBlackBackgroundItem->hide();
+ //push the widget back to background
+ setZValue(mMinZValue);
+ emit zoomWidgetMovedBackground(mFocusIndex);
+ //do not reset the transform here as it will then zoom-in the widget to decoded image size
+ }
+ }
+ //gesture accepted
+ return true;
+ }
+ //gesture rejected
+ if(!mPinchGestureOngoing) {
+ return false;
+ }
+ return true;
+
+}
+
+void GlxZoomWidget::zoomImage(qreal zoomFactor, QPointF center)
+{
+ adjustGestureCenter(center, zoomFactor);
+ QSizeF requiredSize(mCurrentSize.width()*zoomFactor, mCurrentSize.height()*zoomFactor);
+ limitRequiredSize(requiredSize);
+ if(requiredSize != mCurrentSize) {
+ QTransform zoomTransform = mZoomWidget->transform();
+ QPointF transformedCenter = mZoomWidget->sceneTransform().inverted().map(center);
+ zoomTransform.translate(transformedCenter.x(),transformedCenter.y());
+ zoomTransform.scale(requiredSize.width()/mCurrentSize.width(), requiredSize.height()/mCurrentSize.height());
+ zoomTransform.translate(-transformedCenter.x(),-transformedCenter.y());
+ mZoomWidget->setTransform(zoomTransform);
+ mCurrentSize = requiredSize;
+ }
+
+}
+
+
+void GlxZoomWidget::limitRequiredSize(QSizeF &requiredSize)
+{
+ if(requiredSize.width() > mMaxScaleSize.width() ) {
+ requiredSize = mMaxScaleSize ;
+ }
+ else if(requiredSize.width() < mMinDecScaleSize.width() ) {
+ requiredSize = mMinDecScaleSize ;
+ }
+
+
+}
+
+//makes sure that the gesture is on the screen center if the image is smaller than the screen
+void GlxZoomWidget::adjustGestureCenter(QPointF & gestureCenter, qreal& zoomFactor)
+{
+ if(zoomFactor > 1 &&zoomFactor > 1.2 ) {
+ zoomFactor = 1.2;
+ }
+
+ if(zoomFactor < 1 &&zoomFactor < 0.8 ) {
+ zoomFactor = 0.8;
+ }
+ QSizeF requiredSize(mCurrentSize.width()*zoomFactor, mCurrentSize.height()*zoomFactor);
+ //keep smaller image centered
+ if(mCurrentSize.width() <= mWindowSize.width() )
+ {
+ gestureCenter.setX(mWindowSize.width()/2);
+
+ }
+ if(mCurrentSize.height() <= mWindowSize.height())
+ {
+ gestureCenter.setY(mWindowSize.height()/2);
+
+ }
+ //maintains the boundary of the edges for zoom out conditions
+ if(zoomFactor < 1)
+ {
+ QPointF itemOriginPos = mZoomWidget->sceneTransform().map(QPointF(0,0));
+ bool hasWidthExceededWindow = mCurrentSize.width() > mWindowSize.width();
+ bool hasHeightExceededWindow = mCurrentSize.height() > mWindowSize.height();
+ if(itemOriginPos.x() >= 0) {
+ //image has crossed left boundry leaving blank space
+ if(hasWidthExceededWindow) {
+ //stick the gesture to the left corner
+ gestureCenter.setX(itemOriginPos.x());
+ }
+ }
+ //Check if the right boundry can be adjusted
+ if(itemOriginPos.x()+ mCurrentSize.width() <= mWindowSize.width()) {
+ //Image is before the right boundry leaving blank space
+ if(hasWidthExceededWindow) {
+ //stick the gesture to the right corner
+ gestureCenter.setX(itemOriginPos.x()+ mCurrentSize.width());
+ }
+ }
+ //check if the upper boundry could be adjusted
+ if(itemOriginPos.y() >= 0) {
+ //image has crossed the upper boundry leaving blank space
+ if(hasHeightExceededWindow) {
+ //stick the image to the upper boundry
+ gestureCenter.setY(itemOriginPos.y());
+ }
+ }
+ //check if the lower boundry could be adjusted
+ if(itemOriginPos.y()+ mCurrentSize.height() <= mWindowSize.height()) {
+ //Image is before the right boundry leaving blank space
+ if(hasHeightExceededWindow) {
+ //stick the image to the right corner
+ gestureCenter.setY(itemOriginPos.y()+ mCurrentSize.height());
+ }
+
+ }
+ }
+ //control the zoom Factor to boundaries
+ if(mCurrentSize.width() > mWindowSize.width() && requiredSize.width() <= mWindowSize.width())
+ {
+ zoomFactor = mWindowSize.width()/mCurrentSize.width();
+
+ }
+ else if(mCurrentSize.height() > mWindowSize.height() && requiredSize.height() <= mWindowSize.height())
+ {
+ zoomFactor = mWindowSize.height()/mCurrentSize.height();
+
+ }
+
+ //reduce the ZF so as to show a decelerated effect at max/min levels
+
+ if(mCurrentSize.width() > mMaxScaleDecSize.width() && zoomFactor > 1 ) {
+ zoomFactor = 1.0 + ((zoomFactor-1.0)/6) ;
+ }
+ if(mCurrentSize.width() < mMinDecScaleSize.width() && zoomFactor < 1 ) {
+ zoomFactor = 1.0 - ((1.0-zoomFactor)/6) ;
+ }
+
+
+}
+
+//get the latest focused image and set it to mZoomItem
+void GlxZoomWidget::retreiveFocusedImage()
+{
+
+ QPixmap targetPixmap(getFocusedImage());
+ //initialize all the variables wrt the focussed pixmap
+ mZoomWidget->resetTransform();
+ mItemSize = targetPixmap.size();
+ mMaxScaleSize = mItemSize;
+ mMaxScaleSize.scale(mWindowSize*13, Qt::KeepAspectRatio);
+ mMaxScaleDecSize = mItemSize;
+ mMaxScaleDecSize.scale(mWindowSize*7, Qt::KeepAspectRatio);
+ mMinScaleSize = mItemSize* 0.7;
+ mMinDecScaleSize = mItemSize;
+ QPointF originPos = sceneTransform().map(QPointF(0,0));
+ mZoomWidget->setGeometry(QRectF(QPointF(mWindowSize.width()/2 - mItemSize.width()/2,mWindowSize.height()/2 - mItemSize.height()/2),mItemSize )); //chk this
+ mZoomWidget->setPreferredSize(mItemSize);
+ mZoomItem->setPixmap(targetPixmap);
+ mCurrentSize = mItemSize;
+ mStepCurrentSize = mItemSize;
+ setContentWidget(mZoomWidget);
+ show();
+}
+
+
+void GlxZoomWidget::dataChanged(QModelIndex startIndex, QModelIndex endIndex)
+{
+ if(mFocusIndex >= startIndex.row() && mFocusIndex <= endIndex.row()) {
+ //get the latest image from the model
+ //will replace a decoded image if callback is received after decoded image is received so a fix is required
+ //retreiveFocusedImage();
+ if(!mDecodedImageAvailable) {
+ QPixmap targetPixmap(getFocusedImage());
+ mZoomItem->setPixmap(targetPixmap);
+ finalizeWidgetTransform();
+ }
+ }
+}
+
+void GlxZoomWidget::decodedImageAvailable()
+{
+ //new bitmap with better resolution is available
+ //so set it to the item
+ QPixmap decodedPixmap = mImageDecoder->getPixmap();
+ disconnect(mImageDecoder, SIGNAL(pixmapDecoded()), this, SLOT(decodedImageAvailable()));
+ if(decodedPixmap.isNull()){
+ return;
+ }
+ mDecodedImageAvailable = true;
+ mZoomItem->setPixmap(decodedPixmap);
+ mItemSize = decodedPixmap.size();
+ //this is important if not done then old transforms will be applied on the new image
+ finalizeWidgetTransform();
+}
+
+void GlxZoomWidget::sendDecodeRequest(int index)
+{
+ if(!mImageDecodeRequestSend) {
+ QString imagePath = (mModel->data(mModel->index(index,0),GlxUriRole)).value<QString>();
+ mImageDecoder->decodeImage(imagePath);
+ connect(mImageDecoder, SIGNAL(pixmapDecoded()), this, SLOT(decodedImageAvailable()));
+ mImageDecodeRequestSend = true;
+ }
+}
+
+
+void GlxZoomWidget::finalizeWidgetTransform()
+{
+ QPointF widgetPos = mZoomWidget->sceneTransform().map(QPointF(0,0)); //Map the origin wrt scene
+ mZoomWidget->resetTransform();
+ mZoomWidget->scale(mCurrentSize.width()/mItemSize.width(), mCurrentSize.height()/mItemSize.height());
+ mZoomWidget->setGeometry(QRectF(widgetPos , mCurrentSize));
+ // this updates HbScrollArea on the sizeHint of ZoomWidget
+ mZoomWidget->setPreferredSize(mCurrentSize);
+ mStepCurrentSize = mCurrentSize;
+}
+
+QPixmap GlxZoomWidget::getFocusedImage()
+{
+ mFocusIndex = mModel->data(mModel->index(0,0),GlxFocusIndexRole).value<int>();
+ QVariant iconVariant = mModel->data(mModel->index(mFocusIndex,0),GlxFsImageRole);
+ QVariant sizeVariant = mModel->data(mModel->index(mFocusIndex,0),GlxDimensionsRole);
+ QPixmap targetPixmap;
+ //retreive pixmap from the HbIcon received from model
+ //should change the model to return and save pixmaps and convert to HbIcons Instead
+ if ( iconVariant.isValid() && iconVariant.canConvert<HbIcon> () ) {
+ QIcon itemIcon = iconVariant.value<HbIcon>().qicon();
+ QSize itemSize = itemIcon.actualSize(mWindowSize);
+ QSize scaleSize;
+ if(sizeVariant.isValid() && sizeVariant.canConvert<QSize> ()) {
+ scaleSize = sizeVariant.toSize();
+ if(!(scaleSize.width() < mWindowSize.width() && scaleSize.height() < mWindowSize.height())) {
+ scaleSize = mWindowSize;
+ }
+ }
+ targetPixmap = itemIcon.pixmap(itemSize).scaled(scaleSize, Qt::KeepAspectRatio);
+ mItemSize = targetPixmap.size();
+ }
+ return targetPixmap;
+
+}
+
+
+
+
+
+void GlxZoomWidget::animateZoomIn(QPointF animRefPoint)
+{
+ emit pinchGestureReceived(mFocusIndex);
+ //bring the zoom widget to foreground
+ setZValue(mMaxZValue);
+ //show the black background
+ mBlackBackgroundItem->setParentItem(parentItem());
+ mBlackBackgroundItem->setZValue(mMaxZValue - 1);
+ mBlackBackgroundItem->show();
+ m_AnimRefPoint = animRefPoint;
+ QSizeF requiredSize = mItemSize;
+ requiredSize.scale(mWindowSize*3.5, Qt::KeepAspectRatio);
+ m_FinalAnimatedScaleFactor = requiredSize.width()*3.5/mMinScaleSize.width();
+ m_AnimTimeLine->setDirection(QTimeLine::Forward);
+ m_AnimTimeLine->start();
+ // zoomImage(5, m_AnimRefPoint);
+
+}
+void GlxZoomWidget::animateZoomOut(QPointF animRefPoint)
+{
+ m_AnimRefPoint = animRefPoint;
+ m_FinalAnimatedScaleFactor = mMinScaleSize.width()/mCurrentSize.width();
+ //m_AnimTimeLine->setDirection(QTimeLine::Backward);
+ m_AnimTimeLine->start();
+}
+void GlxZoomWidget::animationFrameChanged(int frameNumber)
+{
+qreal scaleFactor = 1;
+ if(m_FinalAnimatedScaleFactor > 1) {
+ // qreal scaleFactor = (100+ ((m_FinalAnimatedScaleFactor*100 - 100)/100)*frameNumber)/100;
+ scaleFactor = 1.0 + (((m_FinalAnimatedScaleFactor - 1)/100)*frameNumber);
+ }
+ if(m_FinalAnimatedScaleFactor < 1) {
+ scaleFactor = (m_FinalAnimatedScaleFactor*100+ ((100 - m_FinalAnimatedScaleFactor*100 )/100)*frameNumber)/100;
+ // qreal scaleFactor = 1.0 + (((m_FinalAnimatedScaleFactor - 1)/100)*frameNumber)
+ }
+
+ zoomImage(scaleFactor, m_AnimRefPoint);
+
+}
+void GlxZoomWidget::animationTimeLineFinished()
+{
+ finalizeWidgetTransform();
+//push the Zoom widget to background when zoomed image size nears FS image
+ if(mStepCurrentSize.width() <= mMinDecScaleSize.width()*1.3) {
+ mBlackBackgroundItem->hide();
+ //push the widget back to background
+ setZValue(mMinZValue);
+ emit zoomWidgetMovedBackground(mFocusIndex);
+ //do not reset the transform here as it will then zoom-in the widget to decoded image size
+ }
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/widgets/widgets.pro Wed Jun 23 17:18:45 2010 +0100
@@ -0,0 +1,19 @@
+#/*
+#* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+#* All rights reserved.
+#* This component and the accompanying materials are made available
+#* under the terms of "Eclipse Public License v1.0"
+#* which accompanies this distribution, and is available
+#* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#*
+#* Initial Contributors:
+#* Nokia Corporation - initial contribution.
+#*
+#* Contributors:
+#*
+#* Description:
+#*
+#*/
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = glxzoomwidget