# HG changeset patch # User William Roberts # Date 1279812812 -3600 # Node ID 525c140ec8db9836beead3fbb09c6a2f9f5dc647 # Parent c9962d0368d93dbc25407df780342d04f473b98f# Parent f291796e213da13c11c6ac82e78d302413e881c0 Catchup to latest Symbian^4 diff -r c9962d0368d9 -r 525c140ec8db commonui/group/glxcommonui.mmp --- a/commonui/group/glxcommonui.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonui/group/glxcommonui.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -64,6 +64,7 @@ LIBRARY cfservices.lib // for CCFContextObject #endif +SMPSAFE //EXPORTUNFROZEN // End of file diff -r c9962d0368d9 -r 525c140ec8db commonui/test/group/t_glxresolutionutilitiy.mmp --- a/commonui/test/group/t_glxresolutionutilitiy.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonui/test/group/t_glxresolutionutilitiy.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -65,5 +65,5 @@ #ifndef WINSCW EPOCALLOWDLLDATA #endif - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db commonui/test/group/t_glxzoomstatepublisher.mmp --- a/commonui/test/group/t_glxzoomstatepublisher.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonui/test/group/t_glxzoomstatepublisher.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -61,4 +61,5 @@ LIBRARY cfservices.lib // for CCFContextObject EXPORTUNFROZEN +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db commonutilities/bwins/glximagedecoderwrapperu.def --- a/commonutilities/bwins/glximagedecoderwrapperu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/bwins/glximagedecoderwrapperu.def Thu Jul 22 16:33:32 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) diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/bwins/glxcommonu.def --- a/commonutilities/common/bwins/glxcommonu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/bwins/glxcommonu.def Thu Jul 22 16:33:32 2010 +0100 @@ -44,4 +44,6 @@ ?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 *) + ?CreateExcludeDrmImageTypeFilterL@TGlxFilterFactory@@SAPAVCMPXMedia@@W4TGlxFilterItemType@@@Z @ 47 NONAME ; class CMPXMedia * TGlxFilterFactory::CreateExcludeDrmImageTypeFilterL(enum TGlxFilterItemType) diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/cenrep/20007193.txt Binary file commonutilities/common/cenrep/20007193.txt has changed diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/cenrep/20007194.txt Binary file commonutilities/common/cenrep/20007194.txt has changed diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/eabi/glxcommonu.def --- a/commonutilities/common/eabi/glxcommonu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/eabi/glxcommonu.def Thu Jul 22 16:33:32 2010 +0100 @@ -45,4 +45,8 @@ _ZN18TGlxCommandFactory28RemoveFromContainerCommandLCERK18CMPXCollectionPath @ 44 NONAME _ZN21CGlxResourceUtilities20GetResourceFilenameLER4TBufILi256EE @ 45 NONAME _ZN21CGlxResourceUtilities20GetResourceFilenameLER4TBufILi256EER3RFs @ 46 NONAME + _ZN13CGlxTNMonitor4NewLEP14MGlxTNObserver @ 47 NONAME + _ZTI13CGlxTNMonitor @ 48 NONAME + _ZTV13CGlxTNMonitor @ 49 NONAME + _ZN17TGlxFilterFactory32CreateExcludeDrmImageTypeFilterLE18TGlxFilterItemType @ 50 NONAME diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/group/bld.inf --- a/commonutilities/common/group/bld.inf Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/group/bld.inf Thu Jul 22 16:33:32 2010 +0100 @@ -45,10 +45,10 @@ ../cenrep/200009EE_orientation_portrait_landscape.txt /epoc32/data/z/private/10202be9/200009EE.txt // 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 + //photos & ci_photos cenrep initialisation file + ../cenrep/20007194.txt z:/private/10202be9/20007194.txt + ../cenrep/20007193.txt z:/private/10202be9/20007193.txt + #endif @@ -56,8 +56,14 @@ ../../../conf/gallery.confml CONFML_EXPORT_PATH(gallery.confml,customsw) ../../../conf/gallery_200009EE.crml CRML_EXPORT_PATH(gallery_200009EE.crml,customsw) -../../../conf/slideshowsettings.confml CONFML_EXPORT_PATH(slideshowsettings.confml,customsw) -../../../conf/slideshowsettings_20007194.crml CRML_EXPORT_PATH(slideshowsettings_20007194.crml,customsw) +../../../conf/photos.confml CONFML_EXPORT_PATH(photos.confml,customsw) +../../../conf/photos_20007194.crml CRML_EXPORT_PATH(photos_20007194.crml,customsw) + +../../../conf/ci_photos.confml CONFML_EXPORT_PATH(ci_photos.confml,customsw) +../../../conf/ci_photos_20007193.crml CRML_EXPORT_PATH(ci_photos_20007193.crml,customsw) + +../../../data/photos.docml z:/resource/hb/splashml/photos.docml +../../../data/photos.splashml z:/resource/hb/splashml/photos.splashml PRJ_MMPFILES glxcommon.mmp diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/group/glxcommon.mmp --- a/commonutilities/common/group/glxcommon.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/group/glxcommon.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -48,6 +48,7 @@ SOURCE glxresourceutilities.cpp SOURCE glxsettingsmodel.cpp SOURCE glxsingletonstore.cpp +SOURCE glxtnmonitor.cpp LIBRARY bafl.lib LIBRARY centralrepository.lib @@ -59,4 +60,5 @@ LIBRARY mpxcommon.lib LIBRARY flogger.lib +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/inc/glxfilterfactory.h --- a/commonutilities/common/inc/glxfilterfactory.h Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/inc/glxfilterfactory.h Thu Jul 22 16:33:32 2010 +0100 @@ -54,7 +54,14 @@ * @return a filter object with array elements set specifying the filter type (Images or Video) */ IMPORT_C static CMPXFilter* CreateItemTypeFilterL(TGlxFilterItemType aItemType); - + /** + * Creates a URI filter, Used to specify 1 particular item (no wild cards allowed). + * + * @param TGlxMediaGeneralCategory ( EMPXImage ) + * @return a filter object with array non drm images + */ + IMPORT_C static CMPXFilter* TGlxFilterFactory::CreateExcludeDrmImageTypeFilterL(TGlxFilterItemType aFilterType); + /** * Creates a URI filter, Used to specify 1 particular item (no wild cards allowed). * diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/inc/glxtnmonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commonutilities/common/inc/glxtnmonitor.h Thu Jul 22 16:33:32 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 +#include + +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 + diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/src/glxfilterfactory.cpp --- a/commonutilities/common/src/glxfilterfactory.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/src/glxfilterfactory.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -29,7 +29,19 @@ filterProperties.iItemType = aItemType; return CreateCombinedFilterL(filterProperties); } - + +// --------------------------------------------------------------------------- +// Creates a eclude drm image filter object +// --------------------------------------------------------------------------- +// +EXPORT_C CMPXFilter* TGlxFilterFactory::CreateExcludeDrmImageTypeFilterL(TGlxFilterItemType aFilterType) + { + TGlxFilterProperties filterProperties; + filterProperties.iItemType = EGlxFilterImage; + filterProperties.iNoDRM = ETrue; + return CreateCombinedFilterL(filterProperties); + } + // --------------------------------------------------------------------------- // Creates a URI filter object // --------------------------------------------------------------------------- diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/src/glxtnmonitor.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commonutilities/common/src/glxtnmonitor.cpp Thu Jul 22 16:33:32 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 + +//#include +#include + +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; +} + + diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/test/group/T_CGlxSettingsModel.mmp --- a/commonutilities/common/test/group/T_CGlxSettingsModel.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/test/group/T_CGlxSettingsModel.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -43,5 +43,5 @@ LIBRARY centralrepository.lib // For central repository LIBRARY eunit.lib LIBRARY euser.lib - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/test/group/t_tcommandfactory.mmp --- a/commonutilities/common/test/group/t_tcommandfactory.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/test/group/t_tcommandfactory.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -58,5 +58,5 @@ LIBRARY ecom.lib LIBRARY lbs.lib LIBRARY mpxcommon.lib - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/test/group/t_tcommandparser.mmp --- a/commonutilities/common/test/group/t_tcommandparser.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/test/group/t_tcommandparser.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -57,5 +57,5 @@ LIBRARY ecom.lib LIBRARY lbs.lib LIBRARY mpxcommon.lib - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db commonutilities/common/test/group/ut_cglxsingletonstore.mmp --- a/commonutilities/common/test/group/ut_cglxsingletonstore.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/common/test/group/ut_cglxsingletonstore.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -48,5 +48,5 @@ LIBRARY euser.lib LIBRARY lbs.lib LIBRARY mpxcommon.lib - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db commonutilities/externalutility/externalutility.pro --- a/commonutilities/externalutility/externalutility.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/externalutility/externalutility.pro Thu Jul 22 16:33:32 2010 +0100 @@ -26,7 +26,8 @@ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE TARGET.UID3 = 0x20007192 TARGET.EPOCALLOWDLLDATA = 1 -TARGET.CAPABILITY = ALL -TCB +TARGET.CAPABILITY = ALL -TCB +MMP_RULES += SMPSAFE } exportfile = "inc/glxexternalutility.h APP_LAYER_PLATFORM_EXPORT_PATH(glxexternalutility.h)" BLD_INF_RULES.prj_exports += exportfile @@ -35,4 +36,12 @@ HEADERS += inc/glxexternalutility.h SOURCES += src/glxexternalutility.cpp -DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT \ No newline at end of file +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxexternalutility.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxexternalutility.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db commonutilities/imagedecoderwrapper/imagedecoderwrapper.pro --- a/commonutilities/imagedecoderwrapper/imagedecoderwrapper.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/imagedecoderwrapper/imagedecoderwrapper.pro Thu Jul 22 16:33:32 2010 +0100 @@ -25,7 +25,8 @@ LIBS += -limageconversion.dll \ -lbitmaptransforms.dll \ -liclextjpegapi.dll \ - -lfbscli.dll + -lfbscli.dll \ + -lefsrv.dll DEFINES += BUILD_IMAGEWRAPPER symbian: { @@ -33,6 +34,7 @@ TARGET.UID3 = 0x2000718D TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } @@ -40,4 +42,13 @@ HEADERS += inc/glximagedecoder.h inc/glximagedecoderwrapper.h SOURCES += src/glximagedecoder.cpp src/glximagedecoderwrapper.cpp -DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT \ No newline at end of file +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glximagedecoderwrapper.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glximagedecoderwrapper.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db commonutilities/imagedecoderwrapper/inc/glximagedecoder.h --- a/commonutilities/imagedecoderwrapper/inc/glximagedecoder.h Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/imagedecoderwrapper/inc/glximagedecoder.h Thu Jul 22 16:33:32 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: diff -r c9962d0368d9 -r 525c140ec8db commonutilities/imagedecoderwrapper/inc/glximagedecoderwrapper.h --- a/commonutilities/imagedecoderwrapper/inc/glximagedecoderwrapper.h Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/imagedecoderwrapper/inc/glximagedecoderwrapper.h Thu Jul 22 16:33:32 2010 +0100 @@ -35,7 +35,7 @@ */ GlxImageDecoderWrapper(); ~GlxImageDecoderWrapper(); - void decodeImage(QString sourcePath); + QSizeF decodeImage(QString sourcePath); QPixmap getPixmap(); void resetDecoder(); void decodedImageAvailable(); diff -r c9962d0368d9 -r 525c140ec8db commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp --- a/commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -21,6 +21,7 @@ #include #include #include // For CExtJpegDecoder +#include // --------------------------------------------------------------------------- @@ -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(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(); } // --------------------------------------------------------------------------- diff -r c9962d0368d9 -r 525c140ec8db commonutilities/imagedecoderwrapper/src/glximagedecoderwrapper.cpp --- a/commonutilities/imagedecoderwrapper/src/glximagedecoderwrapper.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/imagedecoderwrapper/src/glximagedecoderwrapper.cpp Thu Jul 22 16:33:32 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() diff -r c9962d0368d9 -r 525c140ec8db commonutilities/imageviewer/group/glximageviewermanager.mmp --- a/commonutilities/imageviewer/group/glximageviewermanager.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/commonutilities/imageviewer/group/glximageviewermanager.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -43,4 +43,6 @@ LIBRARY flogger.lib // For Logging Tracer LIBRARY glxcommon.lib // CGlxSingetonStore +SMPSAFE + //EXPORTUNFROZEN \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db conf/ci_photos.confml Binary file conf/ci_photos.confml has changed diff -r c9962d0368d9 -r 525c140ec8db conf/ci_photos_20007193.crml Binary file conf/ci_photos_20007193.crml has changed diff -r c9962d0368d9 -r 525c140ec8db conf/photos.confml Binary file conf/photos.confml has changed diff -r c9962d0368d9 -r 525c140ec8db conf/photos_20007194.crml Binary file conf/photos_20007194.crml has changed diff -r c9962d0368d9 -r 525c140ec8db conf/slideshowsettings.confml Binary file conf/slideshowsettings.confml has changed diff -r c9962d0368d9 -r 525c140ec8db conf/slideshowsettings_20007194.crml Binary file conf/slideshowsettings_20007194.crml has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image1.jpg Binary file data/Image1.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image10.jpg Binary file data/Image10.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image2.jpg Binary file data/Image2.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image3.jpg Binary file data/Image3.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image4.jpg Binary file data/Image4.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image5.jpg Binary file data/Image5.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image6.jpg Binary file data/Image6.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image7.jpg Binary file data/Image7.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image8.jpg Binary file data/Image8.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/Image9.jpg Binary file data/Image9.jpg has changed diff -r c9962d0368d9 -r 525c140ec8db data/detailsview.docml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/detailsview.docml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,326 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
diff -r c9962d0368d9 -r 525c140ec8db data/downshow.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/downshow.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,22 @@ + + + Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 + + + + 0.8 + 45.0 + 0.0 + + 1.0 + 1.0 + + + 0.8 + 0.0 + 1.0 + + 1 + + \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db data/fadein.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/fadein.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,13 @@ + + + Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 + + + + 0.8 + 0.0 + 1.0 + + + \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db data/fullscreen.docml --- a/data/fullscreen.docml Wed Jun 16 13:08:54 2010 +0100 +++ b/data/fullscreen.docml Thu Jul 22 16:33:32 2010 +0100 @@ -1,11 +1,11 @@ - + - - + + @@ -20,12 +20,18 @@ - + + - + + + + + + @@ -38,16 +44,24 @@ + + + + - + +
+ + + @@ -60,21 +74,25 @@ + + + + - - -
- + + + + @@ -89,13 +107,14 @@ + + + + - - -
- + diff -r c9962d0368d9 -r 525c140ec8db data/helix.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/helix.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,32 @@ + + + Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 + + + + 0.8 + 0.0 + 90.0 + 180.0 + 270.0 + + 0.5 + 0.5 + 1 + + + 0.8 + 1.0 + 0.0 + + 0.5 + 0.5 + + + 0.8 + 1.0 + 0.0 + + + \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db data/listview.docml --- a/data/listview.docml Wed Jun 16 13:08:54 2010 +0100 +++ b/data/listview.docml Thu Jul 22 16:33:32 2010 +0100 @@ -17,13 +17,13 @@ - + - + - + diff -r c9962d0368d9 -r 525c140ec8db data/opacity_activate.fxml --- a/data/opacity_activate.fxml Wed Jun 16 13:08:54 2010 +0100 +++ b/data/opacity_activate.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -1,14 +1,12 @@ - - - - -2.0 - -0 -0.75 -1.0 - - - + + + + + + 1.0 + 0.0 + 1.0 + + diff -r c9962d0368d9 -r 525c140ec8db data/opacity_deactivate.fxml --- a/data/opacity_deactivate.fxml Wed Jun 16 13:08:54 2010 +0100 +++ b/data/opacity_deactivate.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -1,13 +1,12 @@ - - - -2.0 - -1.0 -0.25 -0 - - - + + + + + + 1.0 + 1.0 + 0.0 + + diff -r c9962d0368d9 -r 525c140ec8db data/photos.css --- a/data/photos.css Wed Jun 16 13:08:54 2010 +0100 +++ b/data/photos.css Thu Jul 22 16:33:32 2010 +0100 @@ -55,7 +55,7 @@ } HbListViewItem::multiselection-toucharea{ - fixed-width: 90.0un; + fixed-width: 0.0un; } HbListViewItem::icon-1{ diff -r c9962d0368d9 -r 525c140ec8db data/photos.docml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/photos.docml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+ + + + + +
diff -r c9962d0368d9 -r 525c140ec8db data/photos.splashml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/photos.splashml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,8 @@ + + photos.docml + mainView + 0x20000A14 + photos + portrait + landscape + diff -r c9962d0368d9 -r 525c140ec8db data/qgn_menu_ovi_photos.svg --- a/data/qgn_menu_ovi_photos.svg Wed Jun 16 13:08:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r c9962d0368d9 -r 525c140ec8db data/slideshow.docml --- a/data/slideshow.docml Wed Jun 16 13:08:54 2010 +0100 +++ b/data/slideshow.docml Thu Jul 22 16:33:32 2010 +0100 @@ -1,18 +1,18 @@ - + - - + + - + - + @@ -26,11 +26,12 @@ - + + - + diff -r c9962d0368d9 -r 525c140ec8db data/transitionrotate0.fxml --- a/data/transitionrotate0.fxml Wed Jun 16 13:08:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - - 0.5 - 0 - 90 - - - 0.5 - 0.5 - 1 - - - diff -r c9962d0368d9 -r 525c140ec8db data/transitionrotate180.fxml --- a/data/transitionrotate180.fxml Wed Jun 16 13:08:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - - 0.5 - 180 - 270 - - - 0.5 - 0.5 - 1 - - - diff -r c9962d0368d9 -r 525c140ec8db data/transitionrotate270.fxml --- a/data/transitionrotate270.fxml Wed Jun 16 13:08:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - - 0.5 - -90 - 0 - - - 0.5 - 0.5 - 1 - - - diff -r c9962d0368d9 -r 525c140ec8db data/transitionrotate90.fxml --- a/data/transitionrotate90.fxml Wed Jun 16 13:08:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - - - 0.5 - 90 - 180 - - - 0.5 - 0.5 - 1 - - - diff -r c9962d0368d9 -r 525c140ec8db data/uphide.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/uphide.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,21 @@ + + + Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 + + + + 0.8 + 1.0 + 0.0 + + + + 0.8 + 0.0 + -45.0 + + 0.0 + 1.0 + + \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db data/zoomin.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/zoomin.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,27 @@ + + + Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 + + + + 0.8 + 1.0 + 0.1 + + 0.5 + 0.5 + + + 0.8 + 1.0 + 0.1 + + + + 0.8 + 1.0 + 0.0 + + + \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db data/zoomout.fxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/zoomout.fxml Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,27 @@ + + + Created using carbide.fx 1.5.0; FxML revision 0.84; Platform 10.1 + + + + 0.8 + 0.1 + 1.0 + + 0.5 + 0.5 + + + 0.8 + 0.1 + 1.0 + + + + 0.8 + 0.0 + 1.0 + + + \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/group/glxdatasourcemanager.mmp --- a/engine/collectionframework/datasource/manager/group/glxdatasourcemanager.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/group/glxdatasourcemanager.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -66,5 +66,6 @@ LIBRARY flogger.lib LIBRARY HbCore.lib +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp --- a/engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/src/glxcollectionpluginbase.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -102,26 +102,40 @@ // ---------------------------------------------------------------------------- // EXPORT_C void CGlxCollectionPluginBase::OpenL(const CMPXCollectionPath& aPath, - const TArray& /*aAttrs*/, + const TArray& 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 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 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(KMPXMediaGeneralSize); + tnFileInfo->iFileSize = aSpecs->ValueTObjectL(KMPXMediaGeneralSize); countInfo++; } if(aSpecs->IsSupported(KGlxMediaGeneralLastModifiedDate)) @@ -359,7 +373,7 @@ EXPORT_C void CGlxCollectionPluginBase::HandleResponse(CMPXMedia* aResponse, CGlxRequest* aRequest, const TInt& aError) { TRACER("void CGlxCollectionPluginBase::HandleResponse()"); - + GLX_DEBUG2("CGlxCollectionPluginBase::HandleResponse()() aError=%d", aError); if (dynamic_cast(aRequest)) // iRequest is a CGlxIdListRequest { @@ -370,8 +384,20 @@ else if (dynamic_cast(aRequest)) // iRequest is a CGlxThumbnailRequest { - iObs->HandleMedia(aResponse, aError); - } + //when IAD update / sisx installation of S60 TNM is done and + //photos asks for the thumbnail, the thumbnail manager returns an + //error KErrServerTerminated(-15)/KErrDied(-13) for which the MPX recreates + //the collection plugins and reconnects to the MPX server and goes into + //a invalid state. After this, the error is not propogated to the Medialist + //and no further requests are processed and it keeps returning KErrNotReady(-18) + //So, as a HACK we are changing the error code to KErrCompletion(-17), + //for which the MPX collection does not take any action and propogates the error + //to the medialist. This error(KErrCompletion) is treated as a temporary error + //and the thumbnail request is made again from the medialist for which the + //S60 TNM returns the thumbnail properly. + iObs->HandleMedia(aResponse, ((aError == KErrServerTerminated + || aError == KErrDied) ? KErrCompletion : aError)); + } else if (dynamic_cast(aRequest)) // iRequest is a CGlxGetRequest { diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/src/glxdatasource.cpp --- a/engine/collectionframework/datasource/manager/src/glxdatasource.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/src/glxdatasource.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: Implementation of the Data Source Class. * */ diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/src/glxdatasourcetask.cpp --- a/engine/collectionframework/datasource/manager/src/glxdatasourcetask.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/src/glxdatasourcetask.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: Data Source Task Class. * */ diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/test/group/t_cglxcommandrequest.mmp --- a/engine/collectionframework/datasource/manager/test/group/t_cglxcommandrequest.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/test/group/t_cglxcommandrequest.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -56,6 +56,6 @@ // Libraries required by the tested code LIBRARY ecom.lib LIBRARY mpxcommon.lib - +SMPSAFE //deffile ../bwins/t_cglxcommandrequest.def // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/test/group/t_cglxgetrequest.mmp --- a/engine/collectionframework/datasource/manager/test/group/t_cglxgetrequest.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/test/group/t_cglxgetrequest.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -56,6 +56,6 @@ // Libraries required by the tested code LIBRARY ecom.lib LIBRARY mpxcommon.lib - +SMPSAFE //deffile ../bwins/t_cglxgetrequest.def // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/test/group/t_cglxidlistrequest.mmp --- a/engine/collectionframework/datasource/manager/test/group/t_cglxidlistrequest.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/test/group/t_cglxidlistrequest.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -58,6 +58,6 @@ LIBRARY ecom.lib LIBRARY mpxcommon.lib - +SMPSAFE //deffile ../bwins/t_cglxidlistrequest.def // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/manager/test/group/t_cglxthumbnailrequest.mmp --- a/engine/collectionframework/datasource/manager/test/group/t_cglxthumbnailrequest.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/manager/test/group/t_cglxthumbnailrequest.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -58,6 +58,6 @@ // Libraries required by the tested code LIBRARY ecom.lib LIBRARY mpxcommon.lib - +SMPSAFE deffile ../bwins/t_cglxthumbnailrequest.def // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde/group/glxdatasourcemde.mmp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde/group/glxdatasourcemde.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde/group/glxdatasourcemde.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -82,4 +82,5 @@ LIBRARY iclextjpegapi.lib LIBRARY imageconversion.lib +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/group/glxdatasourcemde.mmp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/group/glxdatasourcemde.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/group/glxdatasourcemde.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -94,4 +94,7 @@ LIBRARY platformenv.lib LIBRARY flogger.lib LIBRARY imageconversion.lib +LIBRARY harvesterclient.lib + +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h Thu Jul 22 16:33:32 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: The data source mds class * */ @@ -29,10 +29,18 @@ #define _C_GLXDATASOURCEMDS_H_ // INCLUDES +#include +#include +#include + #include #include #include + +#include +#include + #include #include @@ -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& aArray, TMPXChangeEventType aType, TBool aIsObject); + void ProcessUpdateArray(const RArray& 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 iMonthArray; RArray iMonthList; + RArray iAddedItems; + TTime iFirstMonth; TTime iLastMonth; @@ -296,6 +417,16 @@ RArray iUpdateData; TBool iPauseUpdate; TInt iDeletedCount; + + RHarvesterClient iHC; + TBool iHarvestingOngoing; + + CGlxMDSShutdownObserver* iMDSShutdownObserver; + +#ifdef _DEBUG + TTime iStartTime; + TTime iStopTime; +#endif }; #include "glxdatasourcemds.inl" diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl Thu Jul 22 16:33:32 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: Inline methods for the data source MDS class * */ diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h Thu Jul 22 16:33:32 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& aObjectIds, const TGlxFilterProperties& aFilterProperties); + void QueueImageVideoObjectQueriesL(const RArray& aObjectIds, + const TGlxFilterProperties& aFilterProperties); /** * Adds a query for tag objects that have ids specified by aObjectIds diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsattribute.h --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsattribute.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsattribute.h Thu Jul 22 16:33:32 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 }; diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdscommand.h --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdscommand.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdscommand.h Thu Jul 22 16:33:32 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& aSourceIds, const RArray& aTargetContainers); + void AddToContainerL(const RArray& aSourceIds, + const RArray& aTargetContainers); /** * See @ref MGlxCommandParserCallback::AddToContainerL */ - void AddToContainerL(const TDesC& aSourceUri, const RArray& aTargetContainers); + void AddToContainerL(const TDesC& aSourceUri, + const RArray& aTargetContainers); /** * See @ref MGlxCommandParserCallback::CopyL @@ -108,7 +111,8 @@ /** * See @ref MGlxCommandParserCallback::RemoveFromContainerL */ - void RemoveFromContainerL(const RArray& aItemIds, const TGlxMediaId& aContainerId); + void RemoveFromContainerL(const RArray& aItemIds, + const TGlxMediaId& aContainerId); /** * See @ref MGlxCommandParserCallback::DeleteL @@ -123,12 +127,14 @@ /** * See @ref MGlxCommandParserCallback::SetDescriptionL */ - void SetDescriptionL(const RArray& aItemIds, const TDesC& aDescription); + void SetDescriptionL(const RArray& aItemIds, + const TDesC& aDescription); /** * See @ref MGlxCommandParserCallback::SetCaptureLocationL */ - void SetCaptureLocationL(const RArray& aItemIds, const TCoordinate& aCoordinate); + void SetCaptureLocationL(const RArray& 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& aSourceIds, const TDesC& aDrive, TFileOperation aFileOperation); + void FileOperationL(const TArray& 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_ diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.h --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.h Thu Jul 22 16:33:32 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& aIdArray, TInt aErrorCode); - void PostFilterL(const RArray& aFilteredList, const TGlxFilterProperties& aFilterProperties); + void PostFilterL(const RArray& aFilteredList, + const TGlxFilterProperties& aFilterProperties); +#ifdef _DEBUG + TTime iStartTime; + TTime iStopTime; +#endif }; #endif // GLXDATASOURCETASKMDSIDLIST_H_ diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsthumbnail.h --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsthumbnail.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsthumbnail.h Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/mthumbnailfetchrequestobserver.h --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/mthumbnailfetchrequestobserver.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/mthumbnailfetchrequestobserver.h Thu Jul 22 16:33:32 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; }; diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -20,6 +20,7 @@ // INCLUDE FILES #include "glxdatasourcemds.h" +#include #include #include #include @@ -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(aRequest)) { CleanupStack::PushL(aRequest); - CGlxDataSourceTaskMdeCommand* task = new (ELeave) CGlxDataSourceTaskMdeCommand(static_cast(aRequest), aObserver, this); + CGlxDataSourceTaskMdeCommand* task = new (ELeave) + CGlxDataSourceTaskMdeCommand(static_cast(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(aRequest), aObserver, this); + CGlxDataSourceTaskMdeAttributeMde* task = new (ELeave) + CGlxDataSourceTaskMdeAttributeMde(static_cast(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(aRequest), aObserver, this); + CGlxDataSourceTaskMdeIdList* task = new (ELeave) + CGlxDataSourceTaskMdeIdList(static_cast(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(aRequest), aObserver, this); + CGlxDataSourceTaskMdeThumbnail* task = new (ELeave) + CGlxDataSourceTaskMdeThumbnail(static_cast(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,51 @@ TObserverNotificationType aType, const RArray& 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++ ) + { + TInt ret = iAddedItems.Append(aObjectIdArray[i]); + if (ret != KErrNone) + { + GLX_DEBUG2("ENotifyAdd-iAddedItems.Append() failed i(%d)", i); + } + } + GLX_DEBUG2("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_DEBUG1("ENotifyModify - Harvesting Completed - " + "Reset iAddedItems array"); + iAddedItems.Reset(); + break; + } + GLX_DEBUG1("ENotifyModify - Id found in iAddedItems array, DO NOT PROCESS"); + return; + } + } + } + + GLX_DEBUG1("HandleObjectNotification - ProcessUpdateArray"); ProcessUpdateArray(aObjectIdArray, MPXChangeEventType(aType), ETrue); #ifndef USE_S60_TNM if(MPXChangeEventType(aType) == EMPXItemDeleted ) { TInt count = aObjectIdArray.Count(); iDeletedCount += count; + GLX_DEBUG3("EMPXItemDeleted - aObjectIdArray.Count()=%d, iDeletedCount=%d", + count, iDeletedCount); if(iDeletedCount > KGlxThumbnailCleanupAfterDeletions) { TRAPD(err, ThumbnailCreator().CleanupThumbnailsL(iThumbnailDatabase)); @@ -429,10 +596,15 @@ } } } + + if(MPXChangeEventType(aType) == EMPXItemModified ) + { + GLX_DEBUG1("HandleObjectNotification - EMPXItemModified"); + TRAP_IGNORE(ThumbnailCreator().CleanupThumbnailsL(iThumbnailDatabase)); + } #endif } - // --------------------------------------------------------------------------- // CGlxDataSourceMde::HandleObjectPresentNotification // --------------------------------------------------------------------------- @@ -441,7 +613,7 @@ void CGlxDataSourceMde::HandleObjectPresentNotification(CMdESession& /*aSession*/, TBool aPresent, const RArray& aObjectIdArray) { - TRACER("CGlxDataSourceMde::HandleObjectPresentNotification()") + TRACER("CGlxDataSourceMde::HandleObjectPresentNotification()"); if (aPresent) { ProcessUpdateArray(aObjectIdArray, EMPXItemInserted, ETrue); @@ -461,7 +633,7 @@ TObserverNotificationType aType, const RArray& aRelationIdArray) { - TRACER("CGlxDataSourceMde::HandleRelationNotification()") + TRACER("CGlxDataSourceMde::HandleRelationNotification()"); ProcessUpdateArray(aRelationIdArray, MPXChangeEventType(aType), EFalse); } @@ -473,7 +645,7 @@ void CGlxDataSourceMde::HandleRelationPresentNotification(CMdESession& /*aSession*/, TBool aPresent, const RArray& aRelationIdArray) { - TRACER("CGlxDataSourceMde::HandleRelationPresentNotification()") + TRACER("CGlxDataSourceMde::HandleRelationPresentNotification()"); if (aPresent) { ProcessUpdateArray(aRelationIdArray, EMPXItemInserted, EFalse); @@ -488,9 +660,10 @@ // ProcessUpdateArray // --------------------------------------------------------------------------- // -void CGlxDataSourceMde::ProcessUpdateArray(const RArray& aArray, TMPXChangeEventType aType, TBool aIsObject) +void CGlxDataSourceMde::ProcessUpdateArray(const RArray& aArray, + TMPXChangeEventType aType, TBool aIsObject) { - TRACER("CGlxDataSourceMde::ProcessUpdateArray(const RArray& aArray, TMPXChangeEventType aType, TBool aIsObject)") + TRACER("CGlxDataSourceMde::ProcessUpdateArray(const RArray& aArray,TMPXChangeEventType aType, TBool aIsObject)"); // only need one message so process first item TUpdateData update; update.iId = aArray[0]; @@ -510,12 +683,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( aPtr ); TRAP_IGNORE(self->CreateSessionL()); @@ -528,7 +711,9 @@ // void CGlxDataSourceMde::CreateSessionL() { - TRACER("CGlxDataSourceMde::CreateSessionL()") + TRACER("CGlxDataSourceMde::CreateSessionL()"); + delete iSession; + iSession = NULL; iSession = CMdESession::NewL( *this ); } @@ -539,7 +724,7 @@ // TInt CGlxDataSourceMde::ProcessItemUpdate(TAny* aPtr) { - TRACER("CGlxDataSourceMde::ProcessItemUpdate(TAny* aPtr)") + TRACER("CGlxDataSourceMde::ProcessItemUpdate(TAny* aPtr)"); CGlxDataSourceMde* self = reinterpret_cast( aPtr ); TRAP_IGNORE(self->ProcessItemUpdateL()); @@ -552,8 +737,7 @@ // void CGlxDataSourceMde::ProcessItemUpdateL() { - TRACER("CGlxDataSourceMde::ProcessItemUpdateL()") - //__ASSERT_DEBUG(iUpdateData.Count(), Panic(EGlxPanicIllegalState)); + TRACER("CGlxDataSourceMde::ProcessItemUpdateL()"); if ( !iUpdateData.Count() || iPauseUpdate ) { return; @@ -561,7 +745,8 @@ CMPXMessage* message = CMPXMessage::NewL(); CleanupStack::PushL(message); message->SetTObjectValueL(KMPXMessageGeneralId, KMPXMessageIdItemChanged); - message->SetTObjectValueL(KMPXMessageChangeEventType, iUpdateData[0].iType); + message->SetTObjectValueL(KMPXMessageChangeEventType, + iUpdateData[0].iType); TMPXGeneralCategory category = EMPXNoCategory; TMPXItemId id = iUpdateData[0].iId; @@ -589,7 +774,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 +793,10 @@ containerId = leftId; containerCategory = EMPXAlbum; } - message->SetTObjectValueL(KGlxCollectionMessageContainerCategory, containerCategory); - message->SetTObjectValueL(KGlxCollectionMessageContainerId, containerId); + message->SetTObjectValueL(KGlxCollectionMessageContainerCategory, + containerCategory); + message->SetTObjectValueL(KGlxCollectionMessageContainerId, + containerId); } else { @@ -647,7 +835,8 @@ } } #endif // __USING_INTELLIGENT_UPDATE_FILTERING - message->SetTObjectValueL(KMPXMessageMediaGeneralCategory, category); + message->SetTObjectValueL(KMPXMessageMediaGeneralCategory, + category); message->SetTObjectValueL(KMPXMessageMediaGeneralId, id); BroadcastMessage(*message); CleanupStack::PopAndDestroy(message); @@ -660,7 +849,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 +873,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 +901,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 +922,7 @@ // void CGlxDataSourceMde::PrepareMonthsL() { - TRACER("CGlxDataSourceMde::PrepareMonthsL()") + TRACER("CGlxDataSourceMde::PrepareMonthsL()"); TTime month(0); iFirstMonth = month; } @@ -743,7 +933,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 +965,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 +975,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 +985,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 +994,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 +1059,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(aRequest); @@ -877,64 +1077,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 +1198,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); + } + } diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemdsproxy.cpp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemdsproxy.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemdsproxy.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -22,7 +22,7 @@ * @internal reviewed 11/07/2007 by M Byrne */ -#include +#include #include "glxdatasourcemds.h" #include "glxdatasourcemds.hrh" diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp Thu Jul 22 16:33:32 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(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,43 @@ 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)); + + CMdEPropertyDef& drmProperty = DataSource()->ImageDef().GetPropertyDefL(MdeConstants::MediaObject::KDRMProperty); + CMdEPropertyCondition& drmPropertyCondition = aLogicCondition.AddPropertyConditionL(drmProperty); + drmPropertyCondition.SetNegate(ETrue); } if( aFilterProperties.iPath ) // If this is set. Then we need to filter on the Ids it supplies @@ -373,19 +402,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 +428,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 +443,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 +486,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 +505,7 @@ // void CGlxDataSourceTaskMde::RemoveQuery() { - TRACER("CGlxDataSourceTaskMde::RemoveQuery()") + TRACER("CGlxDataSourceTaskMde::RemoveQuery()"); CMdEQuery* query = iQueries[0]; iQueryTypes.Remove(0); iQueries.Remove(0); @@ -478,7 +521,7 @@ TBool aIsContent, TGlxQueryType aQueryType, TQueryResultMode aResultMode, const TGlxMediaId& aContainerId) { - TRACER("CGlxDataSourceTaskMde::DoQueryL()") + TRACER("CGlxDataSourceTaskMde::DoQueryL()"); CMdEObjectDef* queryBaseObject = &aObjectDef; if( aIsContent ) @@ -503,11 +546,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 +567,7 @@ void CGlxDataSourceTaskMde::QueueImageVideoObjectQueriesL(const RArray& aObjectIds, const TGlxFilterProperties& aFilterProperties) { - TRACER("CGlxDataSourceTaskMde::QueueImageVideoObjectQueriesL()") + TRACER("CGlxDataSourceTaskMde::QueueImageVideoObjectQueriesL()"); if (aFilterProperties.iItemType == EGlxFilterImage) { // Only perform the image query @@ -548,7 +592,7 @@ // void CGlxDataSourceTaskMde::QueueTagObjectQueryL(const RArray& aObjectIds) { - TRACER("CGlxDataSourceTaskMde::QueueTagObjectQueryL()") + TRACER("CGlxDataSourceTaskMde::QueueTagObjectQueryL()"); QueueObjectQueryL(DataSource()->TagDef(), aObjectIds, EImageVideoQuery); } @@ -558,14 +602,14 @@ // void CGlxDataSourceTaskMde::QueueAlbumObjectQueryL(const RArray& aObjectIds) { - TRACER("CGlxDataSourceTaskMde::QueueAlbumObjectQueryL()") + TRACER("CGlxDataSourceTaskMde::QueueAlbumObjectQueryL()"); QueueObjectQueryL(DataSource()->AlbumDef(), aObjectIds, EImageVideoQuery); } void CGlxDataSourceTaskMde::QueueMonthObjectQueryL(const RArray& aObjectIds) { - TRACER("CGlxDataSourceTaskMde::QueueMonthObjectQueryL()") + TRACER("CGlxDataSourceTaskMde::QueueMonthObjectQueryL()"); QueueObjectQueryL(DataSource()->MonthDef(), aObjectIds, EImageVideoQuery); } @@ -576,14 +620,15 @@ void CGlxDataSourceTaskMde::QueueObjectQueryL(CMdEObjectDef& aObjectDef, const RArray& 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 +641,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 +663,7 @@ // void CGlxDataSourceTaskMde::ExecuteQueryL() { - TRACER("CGlxDataSourceTaskMde::ExecuteQueryL()") + TRACER("CGlxDataSourceTaskMde::ExecuteQueryL()"); __ASSERT_DEBUG(iQueries.Count(), Panic(EGlxPanicQueryLogicError)); iQueries[0]->FindL(); } @@ -629,9 +674,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 +699,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 diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -57,7 +57,7 @@ #include #include #include - +#include #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(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(iRequest), Panic(EGlxPanicLogicError)); - CGlxGetRequest* request = static_cast(iRequest); - - QueueImageVideoObjectQueriesL(request->MediaIds(), iFilterProperties); - QueueAlbumObjectQueryL(request->MediaIds()); - QueueTagObjectQueryL(request->MediaIds()); - QueueMonthObjectQueryL(request->MediaIds()); - - if (LocationAttributeRequested()) - { - QueueLocaitonQueryL(); - } - - */ - __ASSERT_DEBUG(dynamic_cast(iRequest), Panic(EGlxPanicLogicError)); CGlxGetRequest* request = static_cast(iRequest); -// Not used anywhere, commenting out this line to avoid BAD warning -// const RArray& mediaIds = reinterpret_cast&>(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(KMPXMediaGeneralId, (TMPXItemId)request->CollectionPluginUid().iUid); + aEntry->SetTObjectValueL(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(iRequest), Panic(EGlxPanicLogicError)); CGlxGetRequest* request = static_cast(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(KMPXMediaGeneralId, (TMPXItemId)aContainer->Id()); + aEntry->SetTObjectValueL(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(title)->Value()); + aEntry->SetTextValueL(KMPXMediaGeneralTitle, static_cast + (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(albumType)->Value(); + TUint16 albumTypeValue = + static_cast(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(time)->Value()); + aEntry->SetTObjectValueL(KGlxMediaCollectionInternalStartDate, + static_cast(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(time)->Value()); + aEntry->SetTObjectValueL(KMPXMediaGeneralDate, + static_cast(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(mimeType)->Value()); + aEntry->SetTextValueL(KMPXMediaGeneralMimeType, + static_cast(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(albumType)->Value(); - - if( (albumTypeValue == MdeConstants::Album::EAlbumSystemCamera) || (albumTypeValue == MdeConstants::Album::EAlbumSystemFavourite ) ) + TInt albumTypeValue = + static_cast(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(time)->Value()); + aEntry->SetTObjectValueL(KGlxMediaGeneralLastModifiedDate, + static_cast(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(iRequest), Panic(EGlxPanicLogicError)); CGlxGetRequest* request = static_cast(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(KMPXMediaGeneralId, (TMPXItemId)aItem->Id()); + aEntry->SetTObjectValueL(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(title)->Value()); + aEntry->SetTextValueL(KMPXMediaGeneralTitle, + static_cast(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(time)->Value()); + aEntry->SetTObjectValueL(KMPXMediaGeneralDate, + static_cast(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(time)->Value()); + aEntry->SetTObjectValueL(KGlxMediaGeneralLastModifiedDate, + static_cast(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(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(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(duration)->Value()); + if(durationIndex == KErrNotFound) + { + aEntry->SetTObjectValueL(KMPXMediaGeneralDuration,0); + } + else + { + aEntry->SetTObjectValueL(KMPXMediaGeneralDuration, + static_cast(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(comment)->Value()); + aEntry->SetTextValueL(KMPXMediaGeneralComment, + static_cast(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(drmProtected)->Value()); + aEntry->SetTObjectValueL(KMPXMediaDrmProtected, + static_cast(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(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(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(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(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(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(iQueries[0]->ResultItem(queryResultsPos)); + CMdERelation& relation = static_cast( + 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(query->ResultItem(0)); @@ -1188,10 +1300,11 @@ for (TInt i = 0; i < queryResultsCount; i++) { CMdEObject& object = static_cast(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(iRequest), Panic(EGlxPanicLogicError)); CGlxGetRequest* request = static_cast(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)); diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp Thu Jul 22 16:33:32 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(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(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& aSourceIds, const RArray& aTargetContainers) +void CGlxDataSourceTaskMdeCommand::AddToContainerL(const RArray& aSourceIds, + const RArray& aTargetContainers) { - TRACER("CGlxDataSourceTaskMdeCommand::AddToContainerL(const RArray& aSourceIds, const RArray& aTargetContainers)") - __ASSERT_DEBUG(aSourceIds.Count() && aTargetContainers.Count(), Panic(EGlxPanicEmptyArray)); + TRACER("CGlxDataSourceTaskMdeCommand::AddToContainerL(const RArray& aSourceIds,const RArray& 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& aSourceIds, const TDesC& aDrive) +void CGlxDataSourceTaskMdeCommand::CopyL(const RArray& 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& aSourceIds, const TDesC& aDrive) +void CGlxDataSourceTaskMdeCommand::MoveL(const RArray& 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& aItemIds, const TGlxMediaId& aContainerId) +void CGlxDataSourceTaskMdeCommand::RemoveFromContainerL( + const RArray& 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& 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& aItemIds, const TDesC& aDescription) +void CGlxDataSourceTaskMdeCommand::SetDescriptionL(const RArray& 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& aItemIds, const TCoordinate& aCoordinate) +void CGlxDataSourceTaskMdeCommand::SetCaptureLocationL(const RArray& 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& aSourceIds, const TDesC& aDrive, TFileOperation aFileOperation) +void CGlxDataSourceTaskMdeCommand::FileOperationL(const TArray& 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(iRequest)->DataSourceUpdateObserver(); + TRACER("CGlxDataSourceTaskMdeCommand::SendProgressMessageL()"); + MGlxDataSourceUpdateObserver& observer = + static_cast(iRequest)->DataSourceUpdateObserver(); const CMPXCommand& command = static_cast(iRequest)->Command(); - __ASSERT_DEBUG(command.IsSupported(KMPXCommandGeneralSessionId), Panic(EGlxPanicCommandHasNoGeneralSessionId)); + __ASSERT_DEBUG(command.IsSupported(KMPXCommandGeneralSessionId), Panic( + EGlxPanicCommandHasNoGeneralSessionId)); TAny* sessionId = command.ValueTObjectL(KMPXCommandGeneralSessionId); CMPXMessage* progressMessage = CMPXMessage::NewL(); CleanupStack::PushL(progressMessage); progressMessage->SetTObjectValueL(KMPXMessageGeneralId, KMPXMessageContentIdProgress); - progressMessage->SetTObjectValueL(TMPXAttribute(KMPXMessageContentIdProgress, EMPXMessageProgressCurrentCount), aCurrentStep); - progressMessage->SetTObjectValueL(TMPXAttribute(KMPXMessageContentIdProgress, EMPXMessageProgressTotalCount), aStepCount); + progressMessage->SetTObjectValueL(TMPXAttribute(KMPXMessageContentIdProgress, + EMPXMessageProgressCurrentCount), aCurrentStep); + progressMessage->SetTObjectValueL(TMPXAttribute(KMPXMessageContentIdProgress, + EMPXMessageProgressTotalCount), aStepCount); progressMessage->SetTObjectValueL(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 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(KMPXMediaGeneralId, id); iResponse->SetTObjectValueL(KMPXMessageMediaGeneralId, id); - iResponse->SetTObjectValueL(KMPXMessageChangeEventType, EMPXItemInserted); + iResponse->SetTObjectValueL(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 objectsForRemoval; @@ -928,8 +963,8 @@ if (KErrNotFound != albumTypeIndex) { TInt albumTypeValue = static_cast(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(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(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(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(); + } + } diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsidlist.cpp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsidlist.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsidlist.cpp Thu Jul 22 16:33:32 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(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(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); } diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp --- a/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -156,14 +156,17 @@ void CGlxDataSourceTaskMdeThumbnail::ExecuteRequestL() { TRACER("CGlxDataSourceTaskMdeThumbnail::ExecuteRequestL()") +#ifdef _DEBUG + iStartTime.HomeTime(); +#endif CGlxThumbnailRequest* request = static_cast(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(iRequest), Panic(EGlxPanicLogicError)); + CGlxThumbnailRequest* req = static_cast(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(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(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 { diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/group/bld.inf --- a/engine/collectionframework/group/bld.inf Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/group/bld.inf Thu Jul 22 16:33:32 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 - - diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/Test/albumcollectionplugin/group/glxalbumcollectionplugin.mmp --- a/engine/collectionframework/plugins/Test/albumcollectionplugin/group/glxalbumcollectionplugin.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/Test/albumcollectionplugin/group/glxalbumcollectionplugin.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -59,5 +59,5 @@ LIBRARY mpxcommon.lib LIBRARY glxthumbnailcreator.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/Test/glxmedialiststestcollectionplugin/group/glxmedialiststestcollectionplugin.mmp --- a/engine/collectionframework/plugins/Test/glxmedialiststestcollectionplugin/group/glxmedialiststestcollectionplugin.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/Test/glxmedialiststestcollectionplugin/group/glxmedialiststestcollectionplugin.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -59,4 +59,5 @@ LIBRARY glxthumbnailcreator.lib +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/Test/glxtestcollectionplugin/group/glxtestcollectionplugin.mmp --- a/engine/collectionframework/plugins/Test/glxtestcollectionplugin/group/glxtestcollectionplugin.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/Test/glxtestcollectionplugin/group/glxtestcollectionplugin.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -63,5 +63,5 @@ LIBRARY glxthumbnailcreator.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/Test/testtagcollectionplugin/group/glxtagcollectionplugin.mmp --- a/engine/collectionframework/plugins/Test/testtagcollectionplugin/group/glxtagcollectionplugin.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/Test/testtagcollectionplugin/group/glxtagcollectionplugin.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -66,5 +66,5 @@ LIBRARY glxthumbnailcreator.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginalbums/group/glxcollectionpluginalbums.mmp --- a/engine/collectionframework/plugins/glxcollectionpluginalbums/group/glxcollectionpluginalbums.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginalbums/group/glxcollectionpluginalbums.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -69,5 +69,5 @@ LIBRARY glxdatasourcemanager.lib LIBRARY mpxcommon.lib LIBRARY flogger.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginalbums/src/glxcollectionpluginalbums.cpp --- a/engine/collectionframework/plugins/glxcollectionpluginalbums/src/glxcollectionpluginalbums.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginalbums/src/glxcollectionpluginalbums.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -45,6 +45,8 @@ #include #include +#include "glxsymbianlocalisationstrings.h" + // CONSTANTS const TInt KFavoriteAlbumId = 1 ; const TInt KCapturedAlbumId = 2 ; @@ -214,7 +216,8 @@ { if(0 == usageCount) { - tempTitle = LoadLocalizedStringLC(KResourceFile, R_ALBUM_ITEM_SUB_TITLE_EMPTY); + tempTitle = LoadLocalizedStringLC(KNoImages); + // Set the title in the response. aResponse->SetTextValueL(attr, *tempTitle); @@ -276,14 +279,12 @@ { if( TGlxMediaId(KCapturedAlbumId) == aMediaId ) { - _LIT(KCameraText,"txt_photos_dblist_my_camera"); HBufC* title = LoadLocalizedStringLC(KCameraText); aResponse->SetTextValueL(attr, *title); CleanupStack::PopAndDestroy(title); } else if (TGlxMediaId(KFavoriteAlbumId) == aMediaId ) { - _LIT(KMyFavText,"txt_photos_dblist_my_favorites"); HBufC* title = LoadLocalizedStringLC(KMyFavText); aResponse->SetTextValueL(attr, *title); CleanupStack::PopAndDestroy(title); diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginall/group/glxcollectionpluginall.mmp --- a/engine/collectionframework/plugins/glxcollectionpluginall/group/glxcollectionpluginall.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginall/group/glxcollectionpluginall.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -72,5 +72,5 @@ LIBRARY mpxcommon.lib LIBRARY glxcommon.lib LIBRARY flogger.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionplugincamera/group/glxcollectionplugincamera.mmp --- a/engine/collectionframework/plugins/glxcollectionplugincamera/group/glxcollectionplugincamera.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionplugincamera/group/glxcollectionplugincamera.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -74,5 +74,5 @@ LIBRARY mpxcommon.lib LIBRARY glxcommon.lib LIBRARY flogger.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionplugindownloads/group/glxcollectionplugindownloads.mmp --- a/engine/collectionframework/plugins/glxcollectionplugindownloads/group/glxcollectionplugindownloads.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionplugindownloads/group/glxcollectionplugindownloads.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -75,5 +75,5 @@ LIBRARY mpxcommon.lib LIBRARY glxcommon.lib LIBRARY flogger.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginimageviewer/group/glxcollectionpluginimageviewer.mmp --- a/engine/collectionframework/plugins/glxcollectionpluginimageviewer/group/glxcollectionpluginimageviewer.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginimageviewer/group/glxcollectionpluginimageviewer.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -68,5 +68,5 @@ LIBRARY glxdatasourcemanager.lib LIBRARY mpxcommon.lib LIBRARY flogger.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginimageviewer/src/glxcollectionpluginimageviewer.cpp --- a/engine/collectionframework/plugins/glxcollectionpluginimageviewer/src/glxcollectionpluginimageviewer.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginimageviewer/src/glxcollectionpluginimageviewer.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -92,8 +92,8 @@ } void CGlxCollectionPluginImageViewer::CpiAttributeAdditionalAttributes( - const TMPXAttribute& aCpiAttribute, - RArray& aAttributeArray) + const TMPXAttribute& /*aCpiAttribute*/, + RArray& /*aAttributeArray*/) { // Nothing to be shared apart from the ones that are commonly loaded. } @@ -146,8 +146,8 @@ } void CGlxCollectionPluginImageViewer::HandleCpiAttributeResponseL( - CMPXMedia* aResponse, TArray aCpiAttributes, - TGlxMediaId aMediaId) + CMPXMedia* /*aResponse*/, TArray aCpiAttributes, + TGlxMediaId /*aMediaId*/) { const TInt attribCount = aCpiAttributes.Count(); diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginmonths/group/glxcollectionpluginmonths.mmp --- a/engine/collectionframework/plugins/glxcollectionpluginmonths/group/glxcollectionpluginmonths.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginmonths/group/glxcollectionpluginmonths.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -73,5 +73,5 @@ LIBRARY glxcommon.lib LIBRARY flogger.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginmonths/inc/glxcollectionpluginmonths.h --- a/engine/collectionframework/plugins/glxcollectionpluginmonths/inc/glxcollectionpluginmonths.h Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginmonths/inc/glxcollectionpluginmonths.h Thu Jul 22 16:33:32 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& aAttributeArray); + void CpiAttributeAdditionalAttributes(const TMPXAttribute& aCpiAttribute, + RArray& 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 aCpiAttributes, TArray aMediaIds); + void HandleCpiAttributeResponseL(CMPXMedia* aResponse, + TArray aCpiAttributes, TArray 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 aCpiAttributes, TGlxMediaId aMediaId); + void HandleCpiAttributeResponseL(CMPXMedia* aResponse, + TArray aCpiAttributes, TGlxMediaId aMediaId); TBool IsUpdateMessageIgnored(CMPXMessage& aMessage); diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp --- a/engine/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp Thu Jul 22 16:33:32 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& aAttributeArray) +void CGlxCollectionPluginMonths::CpiAttributeAdditionalAttributes( + const TMPXAttribute& aCpiAttribute, RArray& 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 aCpiAttributes, TArray aMediaIds) +void CGlxCollectionPluginMonths::HandleCpiAttributeResponseL(CMPXMedia* aResponse, + TArray aCpiAttributes, TArray aMediaIds) { TRACER("CGlxCollectionPluginMonths::HandleCpiAttributeResponseL"); @@ -211,7 +220,8 @@ User::Leave(KErrNotSupported); } - CMPXMediaArray* mediaArray = aResponse->ValueCObjectL(KMPXMediaArrayContents); + CMPXMediaArray* mediaArray = + aResponse->ValueCObjectL(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 aCpiAttributes, TGlxMediaId aMediaId) +void CGlxCollectionPluginMonths::HandleCpiAttributeResponseL(CMPXMedia* aResponse, + TArray 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 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(KGlxMediaCollectionInternalUsageCount); + usageCount = + aResponse->ValueTObjectL(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(KGlxMediaCollectionInternalStartDate); + TTime month = + aResponse->ValueTObjectL(KGlxMediaCollectionInternalStartDate); _LIT(KGlxTempMonthYearTitleFormat, "%F%Y"); - TBuf<8> yearTitle; + TBuf 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); diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/tagcollectionplugin/group/glxcollectionplugintags.mmp --- a/engine/collectionframework/plugins/tagcollectionplugin/group/glxcollectionplugintags.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/tagcollectionplugin/group/glxcollectionplugintags.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -74,5 +74,5 @@ LIBRARY glxdatasourcemanager.lib //DataSource Request LIBRARY glxcommon.lib //Filters LIBRARY flogger.lib - +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/tagcollectionplugin/src/glxcollectionplugintags.cpp --- a/engine/collectionframework/plugins/tagcollectionplugin/src/glxcollectionplugintags.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/tagcollectionplugin/src/glxcollectionplugintags.cpp Thu Jul 22 16:33:32 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 { diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/plugins/tagcollectionplugin/test/ut_cglxcollectionplugintags.mmp --- a/engine/collectionframework/plugins/tagcollectionplugin/test/ut_cglxcollectionplugintags.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/plugins/tagcollectionplugin/test/ut_cglxcollectionplugintags.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -62,5 +62,5 @@ LIBRARY glxdatasourcemanager.lib //DataSource Request LIBRARY glxcommon.lib //Filters - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/thumbnailcreator/group/glxthumbnailcreator.mmp --- a/engine/collectionframework/thumbnailcreator/group/glxthumbnailcreator.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/thumbnailcreator/group/glxthumbnailcreator.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -89,4 +89,5 @@ LIBRARY tneengine.lib #endif +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/thumbnailcreator/test/group/ut_cglxtndeletethumbnailstask.mmp --- a/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtndeletethumbnailstask.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtndeletethumbnailstask.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -48,5 +48,5 @@ LIBRARY EUnit.lib LIBRARY EUnitUtil.lib LIBRARY euser.lib - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnfilteravailabletask.mmp --- a/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnfilteravailabletask.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnfilteravailabletask.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -49,5 +49,5 @@ LIBRARY EUnitUtil.lib LIBRARY euser.lib - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/thumbnailcreator/test/group/ut_cglxtngeneratethumbnailtask.mmp --- a/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtngeneratethumbnailtask.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtngeneratethumbnailtask.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -72,5 +72,5 @@ #else LIBRARY tneengine.lib #endif - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnquickthumbnailtask.mmp --- a/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnquickthumbnailtask.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnquickthumbnailtask.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -73,5 +73,5 @@ #else LIBRARY tneengine.lib #endif - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnzoomedimagetask.mmp --- a/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnzoomedimagetask.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/thumbnailcreator/test/group/ut_cglxtnzoomedimagetask.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -63,5 +63,5 @@ LIBRARY ecom.lib LIBRARY flogger.lib // for logging to file - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db engine/collectionframework/thumbnailcreator/thumbnailcomposerplugin/glxthumbnailcomposerplugin.mmp --- a/engine/collectionframework/thumbnailcreator/thumbnailcomposerplugin/glxthumbnailcomposerplugin.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/engine/collectionframework/thumbnailcreator/thumbnailcomposerplugin/glxthumbnailcomposerplugin.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -59,3 +59,4 @@ LIBRARY MdEClient.lib LIBRARY flogger.lib // For Logging Tracer +SMPSAFE diff -r c9962d0368d9 -r 525c140ec8db gallery/gallery.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gallery/gallery.pro Thu Jul 22 16:33:32 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 " +BLD_INF_RULES.prj_platforms += myextension diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/bld_stub.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gallery/sis/bld_stub.inf Thu Jul 22 16:33:32 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 + diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/createsis.bat --- a/gallery/sis/createsis.bat Wed Jun 16 13:08:54 2010 +0100 +++ b/gallery/sis/createsis.bat Thu Jul 22 16:33:32 2010 +0100 @@ -15,6 +15,7 @@ rem +call makesis -v -s 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 diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/createsis_udeb.bat --- a/gallery/sis/createsis_udeb.bat Wed Jun 16 13:08:54 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 diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/glxgallery.pkg --- a/gallery/sis/glxgallery.pkg Wed Jun 16 13:08:54 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" diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/glxgallery.sis Binary file gallery/sis/glxgallery.sis has changed diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/glxgallery.sisx Binary file gallery/sis/glxgallery.sisx has changed diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/glxgallery_stub.mk --- a/gallery/sis/glxgallery_stub.mk Wed Jun 16 13:08:54 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 ============================================================= diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/glxgallery_stub.pkg --- a/gallery/sis/glxgallery_stub.pkg Wed Jun 16 13:08:54 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" diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/glxgallery_stub.sis Binary file gallery/sis/glxgallery_stub.sis has changed diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/glxgallery_udeb.pkg --- a/gallery/sis/glxgallery_udeb.pkg Wed Jun 16 13:08:54 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" diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/photos.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gallery/sis/photos.pkg Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,130 @@ +; +; 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\glxdrmutilitywrapper.dll" -"!:\sys\bin\glxdrmutilitywrapper.dll" +"\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" +"\epoc32\release\armv5\urel\detailsnamelabel.dll" -"!:\sys\bin\detailsnamelabel.dll" +"\epoc32\release\armv5\urel\detailsnamelabelplugin.dll" -"!:\sys\bin\detailsnamelabelplugin.dll" +"\epoc32\release\armv5\urel\detailsdescriptionedit.dll" -"!:\sys\bin\detailsdescriptionedit.dll" +"\epoc32\release\armv5\urel\detailsdescriptioneditplugin.dll" -"!:\sys\bin\detailsdescriptioneditplugin.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" +"\epoc32\data\Z\private\10202BE9\20007193.txt" -"!:\private\10202BE9\20007193.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" + diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/photos.sis Binary file gallery/sis/photos.sis has changed diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/photos.sisx Binary file gallery/sis/photos.sisx has changed diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/photos_stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gallery/sis/photos_stub.pkg Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,117 @@ +; +; 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\glxdrmutilitywrapper.dll" +"" - "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:\sys\bin\detailsnamelabel.dll" +"" - "z:\sys\bin\detailsnamelabelplugin.dll" +"" - "z:\sys\bin\detailsdescriptionedit.dll" +"" - "z:\sys\bin\detailsdescriptioneditplugin.dll" + +"" - "z:\private\10202BE9\20007194.txt" +"" - "z:\private\10202BE9\20007193.txt" + +"" - "z:\resource\qt\translations\photos.qm" + + +;splashscreen +"" - "z:\resource\hb\splashml\photos.splashml" +"" - "z:\resource\hb\splashml\photos.docml" diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/photos_stub.sis Binary file gallery/sis/photos_stub.sis has changed diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/photosqt_stub.pkg --- a/gallery/sis/photosqt_stub.pkg Wed Jun 16 13:08:54 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" diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/photosqt_stub.sis Binary file gallery/sis/photosqt_stub.sis has changed diff -r c9962d0368d9 -r 525c140ec8db gallery/sis/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gallery/sis/readme.txt Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db inc/glxfiltergeneraldefs.h --- a/inc/glxfiltergeneraldefs.h Wed Jun 16 13:08:54 2010 +0100 +++ b/inc/glxfiltergeneraldefs.h Thu Jul 22 16:33:32 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__ diff -r c9962d0368d9 -r 525c140ec8db inc/glxfilterproperties.h --- a/inc/glxfilterproperties.h Wed Jun 16 13:08:54 2010 +0100 +++ b/inc/glxfilterproperties.h Thu Jul 22 16:33:32 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; diff -r c9962d0368d9 -r 525c140ec8db inc/glxlocalisationstrings.h --- a/inc/glxlocalisationstrings.h Wed Jun 16 13:08:54 2010 +0100 +++ b/inc/glxlocalisationstrings.h Thu Jul 22 16:33:32 2010 +0100 @@ -18,6 +18,7 @@ #ifndef GLXLOCALISATIONSTRINGS_H_ #define GLXLOCALISATIONSTRINGS_H_ +#include "hbglobal.h" //OPTIONS MENU //Options list item @@ -74,21 +75,23 @@ // #define GLX_MENU_RENAME hbTrId("txt_common_menu_rename_item") +#define GLX_DIALOG_NAME_PROMPT hbTrId("txt_photos_title_enter_name") +#define GLX_DIALOG_ALBUM_NAME_DEFAULT hbTrId("txt_photos_dialog_enter_name_entry_album") +#define GLX_DIALOG_DELETE_ONE_ITEM hbTrId("txt_photos_info_deleting_1") //TITLE RELATED and DEFAULT STRINGS #define GLX_CAPTION hbTrId("txt_short_caption_photos") #define GLX_TITLE hbTrId("txt_photos_title_photos") -#define GLX_CAMERA "txt_photos_dblist_my_camera" -#define GLX_MYFAV "txt_photos_dblist_my_favorites" #define GLX_PLACES "txt_photos_dblist_places_ln" #define GLX_ITEMS_CAMERA "txt_photos_dblist_val_ln_items" #define GLX_ITEMS_MYFAV "txt_photos_subtitle_ln_items" #define GLX_SUBTITLE_CAM_GRIDVIEW hbTrId("txt_photos_subtitle_my_camera") #define GLX_SUBTITLE_MYFAV_GRIDVIEW hbTrId("txt_photos_subtitle_my_favorites") #define GLX_SUBTITLE_NOITEMS hbTrId("txt_photos_subtitle_no_image_or_videos_to_display") - - +#define GLX_FETCHER_TITLE QString("Select Image") +#define GLX_GRID_NO_IMAGE QString("(No Images)\n") +#define GLX_GRID_OPEN_CAMERA QString("To capture images Open") //VIEW RELATED STRINGS AND COMMON DIALOGS //comments lable for photos flip view @@ -106,5 +109,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_ */ diff -r c9962d0368d9 -r 525c140ec8db inc/glxsymbianlocalisationstrings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/glxsymbianlocalisationstrings.h Thu Jul 22 16:33:32 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: Localisation strings +* +*/ + +#ifndef GLXSYMBIANLOCALISATIONSTRINGS_H_ +#define GLXSYMBIANLOCALISATIONSTRINGS_H_ + +//SYMBIAN RELATED LOCALISATION STRINGS +_LIT(KNoImages,"txt_photos_grid_no_images"); +_LIT(KCameraText,"txt_photos_dblist_my_camera"); +_LIT(KMyFavText,"txt_photos_dblist_my_favorites"); + +#endif /* GLXSYMBIANLOCALISATIONSTRINGS_H_*/ \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db inc/glxtvconstants.h --- a/inc/glxtvconstants.h Wed Jun 16 13:08:54 2010 +0100 +++ b/inc/glxtvconstants.h Thu Jul 22 16:33:32 2010 +0100 @@ -30,7 +30,8 @@ { ETvConnectionChanged = 0, ETvDisplayIsVisible, - ETvDisplayNotVisible + ETvDisplayNotVisible, + EDisconnected }; /** TV size constants */ diff -r c9962d0368d9 -r 525c140ec8db loggers/loggerqt/loggerqt.pro --- a/loggers/loggerqt/loggerqt.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/loggers/loggerqt/loggerqt.pro Thu Jul 22 16:33:32 2010 +0100 @@ -30,7 +30,8 @@ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE TARGET.UID3 = 0x20000A15 TARGET.EPOCALLOWDLLDATA = 1 -TARGET.CAPABILITY = ALL -TCB \ +TARGET.CAPABILITY = ALL -TCB +MMP_RULES += SMPSAFE } @@ -40,4 +41,13 @@ SOURCES += src/glxperformancelog.cpp +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxloggerqt.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxloggerqt.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + # Directories diff -r c9962d0368d9 -r 525c140ec8db loggers/logging/app/group/glxloggingapp.mmp --- a/loggers/logging/app/group/glxloggingapp.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/loggers/logging/app/group/glxloggingapp.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -70,3 +70,5 @@ TARGETPATH /resource/apps LANGUAGE_IDS END + +SMPSAFE \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db loggers/logging/client/group/glxlogging.mmp --- a/loggers/logging/client/group/glxlogging.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/loggers/logging/client/group/glxlogging.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -44,3 +44,5 @@ #ifndef WINSCW EPOCALLOWDLLDATA #endif + +SMPSAFE \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db loggers/logging/client/test/group/t_glxlogging.mmp --- a/loggers/logging/client/test/group/t_glxlogging.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/loggers/logging/client/test/group/t_glxlogging.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -55,5 +55,5 @@ #ifndef WINSCW EPOCALLOWDLLDATA #endif - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db main/glxaiwservicehandler.cpp --- a/main/glxaiwservicehandler.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/main/glxaiwservicehandler.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,7 @@ #include #include "glxlocalisationstrings.h" #include +#include #define IMAGE_FETCHER_SERVICE_NAME QLatin1String("photos.com.nokia.symbian.IImageFetch") #define IMAGE_FETCHER_SERVICE_DEPINTERFACE_NAME QLatin1String("photos.Image") @@ -65,11 +67,22 @@ mDSDIService(NULL), mImageViewerService(NULL) { - mFetcherService = new GlxGetImageService(this); - mNSDIService = new GlxGetImageServiceNSDI(this); - mDSDIService = new GlxGetImageServiceDSDI(this); - - mImageViewerService = new GlxImageViewerService(this); + QString currentInterfaceName = XQServiceUtil::interfaceName(); + if( 0 == currentInterfaceName.compare(QLatin1String("com.nokia.symbian.IImageFetch"))) + { + mFetcherService = new GlxGetImageService(this); + } + else if( 0 == currentInterfaceName.compare(QLatin1String("Image"))) + { + mNSDIService = new GlxGetImageServiceNSDI(this); + mDSDIService = new GlxGetImageServiceDSDI(this); + } + else if( 0 == currentInterfaceName.compare(QLatin1String("com.nokia.symbian.IFileView"))) + { + viewport()->setAttribute(Qt::WA_AcceptTouchEvents); + viewport()->grabGesture(Qt::PinchGesture); + mImageViewerService = new GlxImageViewerService(this); + } #ifdef _DEBUG QString t; @@ -117,7 +130,7 @@ { qDebug() << "GlxFetcher::itemSelected"; - if (mFetcherService->isActive()) + if (mFetcherService && mFetcherService->isActive()) { qDebug() << "GlxFetcher::itemSelected mFetcherService->isActive()"; QVariant variant = mModel->data(index, GlxUriRole); @@ -129,7 +142,7 @@ } } - if (mNSDIService->isActive()) + else if (mNSDIService && mNSDIService->isActive()) { qDebug() << "GlxFetcher::itemSelected mNSDIService->isActive()"; QVariant variant = mModel->data(index, GlxUriRole); @@ -141,7 +154,7 @@ } } - if (mDSDIService->isActive()) + else if (mDSDIService && mDSDIService->isActive()) { qDebug() << "GlxFetcher::itemSelected mDSDIService->isActive()"; QVariant variant = mModel->data(index, GlxUriRole); @@ -156,18 +169,19 @@ -void GlxAiwServiceHandler::launchFetcher() +void GlxAiwServiceHandler::launchFetcher(QString viewTitle) { qDebug() << "GlxAiwServiceHandler::launchFetcher START"; + qApp->setApplicationName(viewTitle); HbStyleLoader::registerFilePath(":/data/photos.css"); GlxModelParm modelParm(KGlxCollectionPluginAllImplementationUid, 0); 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); @@ -184,15 +198,16 @@ } void GlxAiwServiceHandler::itemSpecificMenuTriggered(qint32 viewId,QPointF pos) - { +{ mFetcherContextMenu = new HbMenu(); HbAction *action = mFetcherContextMenu->addAction(GLX_MENU_OPEN); + action->setObjectName( "Menu Open" ); connect(action, SIGNAL(triggered()), this, SLOT(openFSView())); connect(this, SIGNAL(aboutToChangeOrientation ()), mFetcherContextMenu, SLOT(close())); connect( mFetcherContextMenu, SIGNAL( aboutToClose () ), this, SLOT( closeContextMenu() ) ); mFetcherContextMenu->setPreferredPos( pos ); mFetcherContextMenu->show(); - } +} void GlxAiwServiceHandler::closeContextMenu() { @@ -204,7 +219,15 @@ 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); + selectAction->setObjectName( "FS Select" ); + connect(selectAction, SIGNAL(triggered()), this, SLOT(handleFSSelect())); HbToolBar* toolBar = new HbToolBar(); toolBar->setOrientation( Qt::Horizontal ); @@ -317,7 +340,11 @@ void GlxGetImageService::fetch() { mImageRequestIndex = setCurrentRequestAsync(); - mServiceApp->launchFetcher(); + QString title = requestInfo().info("WindowTitle").toString(); + if(title.isNull()){ + title = QString("Image Fetcher"); + } + mServiceApp->launchFetcher(title); } // ---------------------------------------------------------------------------- @@ -406,7 +433,11 @@ { qDebug() << "GlxGetImageServiceNSDI::fetch START"; mImageRequestIndex = setCurrentRequestAsync(); - mServiceApp->launchFetcher(); + QString title = requestInfo().info("WindowTitle").toString(); + if(title.isNull()){ + title = QString("Image Fetcher"); + } + mServiceApp->launchFetcher(title); qDebug() << "GlxGetImageServiceNSDI::fetch END"; } @@ -485,7 +516,11 @@ Q_UNUSED(filter) Q_UNUSED(flag) mImageRequestIndex = setCurrentRequestAsync(); - mServiceApp->launchFetcher(); + QString title = requestInfo().info("WindowTitle").toString(); + if(title.isNull()){ + title = QString("Image Fetcher"); + } + mServiceApp->launchFetcher(title); } // ----------GlxImageViewerService--------------- @@ -518,13 +553,27 @@ bool GlxImageViewerService::view(QString file) { + XQApplicationManager appmgr; + QFile tempfile(file); + QVariantList attrValues; + QList attrNames; + attrNames.append(XQApplicationManager::IsProtected); + bool ok = appmgr.getDrmAttributes(tempfile, attrNames, attrValues); + if(attrValues.at(0).toBool()){ + HbNotificationDialog::launchDialog("NOT SUPPORTED"); + connect(this, SIGNAL(returnValueDelivered()), mServiceApp, + SLOT(handleAnswerDelivered())); + complete(true); + return false; + } + XQRequestInfo info = requestInfo(); mAsyncRequest = !info.isSynchronous(); if (!mImageViewerInstance) { mImageViewerInstance = CGlxImageViewerManager::InstanceL(); } - QString filepath(QDir::toNativeSeparators(file.at(0))); + QString filepath(QDir::toNativeSeparators(file)); TPtrC16 str(reinterpret_cast (filepath.utf16())); HBufC* uri = str.Alloc(); diff -r c9962d0368d9 -r 525c140ec8db main/glxaiwservicehandler.h --- a/main/glxaiwservicehandler.h Wed Jun 16 13:08:54 2010 +0100 +++ b/main/glxaiwservicehandler.h Thu Jul 22 16:33:32 2010 +0100 @@ -54,7 +54,7 @@ * Destructor. */ ~GlxAiwServiceHandler(); - void launchFetcher(); + void launchFetcher(QString viewTitle); void launchImageViewer(); public slots: void itemSelected(const QModelIndex & index); diff -r c9962d0368d9 -r 525c140ec8db main/glxapplication.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main/glxapplication.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,55 @@ +/* +* 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 +#include +#include +#include + +//userinclude +#include "glxapplication.h" +#include "mglxcache.h" + +GlxApplication::GlxApplication( int &argc, char *argv[ ], Hb::ApplicationFlags flags ) + : HbApplication( argc, argv, flags ) +{ +} + +GlxApplication::GlxApplication( QApplication::QS60MainApplicationFactory factory, int &argc, char *argv[], Hb::ApplicationFlags flags ) + : HbApplication( factory, argc, argv, flags ) +{ +} + +bool GlxApplication::symbianEventFilter(const QSymbianEvent *aQSEvent) +{ + if ( aQSEvent->type( ) == QSymbianEvent::WindowServerEvent ) { + const TWsEvent *aEvent = aQSEvent->windowServerEvent(); + if ( aEvent && aEvent->Type() == KAppOomMonitor_FreeRam ) { + cleanUpCache(); + } + } + return HbApplication::symbianEventFilter( aQSEvent ); +} + +void GlxApplication::cleanUpCache() +{ + qDebug("GlxApplication::cleanUpCache()"); + MGlxCache* cacheManager = MGlxCache::InstanceL(); + cacheManager->ReleaseRAML(true); + cacheManager->Close(); +} + diff -r c9962d0368d9 -r 525c140ec8db main/glxapplication.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main/glxapplication.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,45 @@ +/* +* 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 GLXAPPLICATION_H_ +#define GLXAPPLICATION_H_ + +#include + +class QSymbianEvent; + +class GlxApplication: public HbApplication +{ + +public: + + GlxApplication( int &argc, char *argv[], + Hb::ApplicationFlags flags = Hb::DefaultApplicationFlags ); + + GlxApplication( QApplication::QS60MainApplicationFactory factory, + int &argc, + char *argv[], + Hb::ApplicationFlags flags = Hb::DefaultApplicationFlags ); + + bool symbianEventFilter( const QSymbianEvent *aQSEvent ); + +private : + void cleanUpCache(); + +}; + +#endif // GLXAPPLICATION_H_ diff -r c9962d0368d9 -r 525c140ec8db main/main.cpp --- a/main/main.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/main/main.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -16,9 +16,6 @@ */ - -#include -#include #include #include @@ -26,8 +23,12 @@ #include #include #include -#include +#include "glxstatemanager.h" +#include "glxaiwservicehandler.h" +#include "glxapplication.h" +#include "glxlocalisationstrings.h" +#include "hbsplashscreen.h" #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "mainTraces.h" @@ -42,18 +43,15 @@ OstTraceExt3( TRACE_NORMAL, DUP1__MAIN, "::main Time at Launch HHMMSS =%d::%d::%d", localTime.hour(), localTime.minute(), localTime.second() ); - HbApplication app(argc, argv); - - bool loaded(false); - + GlxApplication app(argc, argv, Hb::NoSplash); + bool loaded(false); QTranslator translator; QString path = "Z:/resource/qt/translations/"; + loaded = translator.load("photos_" + QLocale::system().name(), path); - if(loaded) - { + if(loaded) { qApp->installTranslator(&translator); - } - + } GlxStateManager* stateMgr = NULL; GlxAiwServiceHandler* mainWindow = NULL; @@ -61,13 +59,13 @@ OstTraceEventStart0( EVENT_DUP1__MAIN_START, "launch" ); if(!XQServiceUtil::isService()){ - stateMgr = new GlxStateManager(); - app.setApplicationName("Photos"); + HbSplashScreen::start(); + stateMgr = new GlxStateManager(); + app.setApplicationName(GLX_TITLE); stateMgr->launchApplication(); } - else - { - mainWindow = new GlxAiwServiceHandler(); + else { + mainWindow = new GlxAiwServiceHandler(); mainWindow->show(); } OstTraceEventStop( EVENT_DUP1__MAIN_STOP, "launch", EVENT_DUP1__MAIN_START ); diff -r c9962d0368d9 -r 525c140ec8db main/main.pro --- a/main/main.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/main/main.pro Thu Jul 22 16:33:32 2010 +0100 @@ -24,26 +24,29 @@ ../ui/inc \ ../ui/uiengine/model/mediamodel/inc \ ../ui/uiengine/medialistwrapper/inc \ + ../ui/uiengine/medialists/inc \ ../loggers/loggerqt/inc \ ../ui/views/viewsfactory/inc \ ../ui/views/viewbase/inc \ ../ui/views/gridview/inc \ - ../engine/collectionframework/plugins/glxcollectionpluginall/inc \ + ../engine/collectionframework/plugins/glxcollectionpluginall/inc \ ../traces +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + CONFIG += HB DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT - symbian: { TARGET.UID3 = 0x20000A14 - ICON = ../data/qgn_menu_ovi_photos.svg + SKINICON = qtg_large_photos isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000 isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 20480 \ 41943040 TARGET.CAPABILITY = ALL \ -TCB + MMP_RULES += SMPSAFE } LIBS += -lglxstatehandler.dll \ @@ -51,13 +54,17 @@ -lglxviews.dll \ -lglxmediamodel.dll \ -lglxexternalutility.dll \ - -lglximageviewermanager.dll + -lglximageviewermanager.dll \ + -lglxmedialists.dll # Input SOURCES += main.cpp \ - glxaiwservicehandler.cpp -HEADERS +=glxaiwservicehandler.h + glxaiwservicehandler.cpp \ + glxapplication.cpp + +HEADERS += glxaiwservicehandler.h \ + glxapplication.h RESOURCES += ../photos.qrc TRANSLATIONS= photos.ts diff -r c9962d0368d9 -r 525c140ec8db photos.pro --- a/photos.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/photos.pro Thu Jul 22 16:33:32 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 " \ "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" \ diff -r c9962d0368d9 -r 525c140ec8db photos.qrc --- a/photos.qrc Wed Jun 16 13:08:54 2010 +0100 +++ b/photos.qrc Thu Jul 22 16:33:32 2010 +0100 @@ -7,8 +7,14 @@ data/transitiondown.fxml data/opacity_activate.fxml data/opacity_deactivate.fxml + data/zoomin.fxml + data/zoomout.fxml data/view_flip_hide.fxml - data/view_flip_show.fxml + data/view_flip_show.fxml + data/helix.fxml + data/fadein.fxml + data/uphide.fxml + data/downshow.fxml data/fullscreentogrid.fxml data/gridtofullscreenhide.fxml data/gridtofullscreenshow.fxml @@ -17,13 +23,20 @@ data/albumlisttogrid.fxml data/albumlisttogridshow.fxml data/photos.css - data/transitionrotate0.fxml - data/transitionrotate90.fxml - data/transitionrotate180.fxml - data/transitionrotate270.fxml data/grid.docml data/listview.docml data/fullscreen.docml data/slideshow.docml - + data/detailsview.docml + data/Image1.jpg + data/Image2.jpg + data/Image3.jpg + data/Image4.jpg + data/Image5.jpg + data/Image6.jpg + data/Image7.jpg + data/Image8.jpg + data/Image9.jpg + data/Image10.jpg + diff -r c9962d0368d9 -r 525c140ec8db rom/photos.iby --- a/rom/photos.iby Wed Jun 16 13:08:54 2010 +0100 +++ b/rom/photos.iby Thu Jul 22 16:33:32 2010 +0100 @@ -20,17 +20,15 @@ #include #include -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,49 @@ 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 + +// 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 -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 +// 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 + +// 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/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 - -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/glxdrmutilitywrapper.dll SHARED_LIB_DIR/glxdrmutilitywrapper.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/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 +file=ABI_DIR/BUILD_DIR/detailsnamelabel.dll SHARED_LIB_DIR/detailsnamelabel.dll +file=ABI_DIR/BUILD_DIR/detailsnamelabelplugin.dll SHARED_LIB_DIR/detailsnamelabelplugin.dll +file=ABI_DIR/BUILD_DIR/detailsdescriptionedit.dll SHARED_LIB_DIR/detailsdescriptionedit.dll +file=ABI_DIR/BUILD_DIR/detailsdescriptioneditplugin.dll SHARED_LIB_DIR/detailsdescriptioneditplugin.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/private/10202BE9/20007193.txt private/10202BE9/20007193.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 diff -r c9962d0368d9 -r 525c140ec8db traces/OstTraceDefinitions.h --- a/traces/OstTraceDefinitions.h Wed Jun 16 13:08:54 2010 +0100 +++ b/traces/OstTraceDefinitions.h Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db tsrc/unittest/unittest_imagedecoderwrapper/unittest_imagedecoderwrapper.pro --- a/tsrc/unittest/unittest_imagedecoderwrapper/unittest_imagedecoderwrapper.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/tsrc/unittest/unittest_imagedecoderwrapper/unittest_imagedecoderwrapper.pro Thu Jul 22 16:33:32 2010 +0100 @@ -21,6 +21,7 @@ INCLUDEPATH += . INCLUDEPATH += ../../../commonutilities/imagedecoderwrapper/inc INCLUDEPATH += /epoc32/include/mw/QtTest +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE CONFIG += qtestlib \ Hb @@ -37,6 +38,7 @@ TARGET.CAPABILITY = ALL -TCB TARGET.EPOCHEAPSIZE = 0x20000 0x1600000 TARGET.UID3 = 0x20000A05 + MMP_RULES += SMPSAFE } #BLD_INF_RULES.prj_exports += "../../../gallery/data/Battle.jpg c:/data/images/Battle.jpg" diff -r c9962d0368d9 -r 525c140ec8db tsrc/unittest/unittest_medialistwrapper/unittest_medialistwrapper.pro --- a/tsrc/unittest/unittest_medialistwrapper/unittest_medialistwrapper.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/tsrc/unittest/unittest_medialistwrapper/unittest_medialistwrapper.pro Thu Jul 22 16:33:32 2010 +0100 @@ -43,4 +43,5 @@ TARGET.CAPABILITY = ALL -TCB TARGET.EPOCHEAPSIZE = 0x20000 0x1600000 TARGET.UID3 = 0x20000A0E + MMP_RULES += SMPSAFE } \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db tsrc/unittest/unittest_statehandler/unittest_statehandler.pro --- a/tsrc/unittest/unittest_statehandler/unittest_statehandler.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/tsrc/unittest/unittest_statehandler/unittest_statehandler.pro Thu Jul 22 16:33:32 2010 +0100 @@ -35,6 +35,7 @@ TARGET.CAPABILITY = ALL -TCB TARGET.EPOCHEAPSIZE = 0x20000 0x1600000 TARGET.UID3 = 0x2000A773 + MMP_RULES += SMPSAFE } LIBS += -lflogger.dll diff -r c9962d0368d9 -r 525c140ec8db tvout/bwins/glxtvoutwrapperu.def --- a/tvout/bwins/glxtvoutwrapperu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/bwins/glxtvoutwrapperu.def Thu Jul 22 16:33:32 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) diff -r c9962d0368d9 -r 525c140ec8db tvout/eabi/glxtvoutwrapperu.def --- a/tvout/eabi/glxtvoutwrapperu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/eabi/glxtvoutwrapperu.def Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/bwins/glxtvoutu.def --- a/tvout/tvoutengine/bwins/glxtvoutu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/bwins/glxtvoutu.def Thu Jul 22 16:33:32 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) diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/eabi/glxtvoutu.def --- a/tvout/tvoutengine/eabi/glxtvoutu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/eabi/glxtvoutu.def Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/group/bld.inf --- a/tvout/tvoutengine/group/bld.inf Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/group/bld.inf Thu Jul 22 16:33:32 2010 +0100 @@ -23,11 +23,5 @@ #include -PRJ_EXPORTS -../rom/glxtvout.iby CORE_APP_LAYER_IBY_EXPORT_PATH(glxtvout.iby) - PRJ_MMPFILES glxtvout.mmp - -PRJ_TESTMMPFILES -//../tsrc/group/t_glxtvout.mmp diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/group/glxtvout.mmp --- a/tvout/tvoutengine/group/glxtvout.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/group/glxtvout.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -64,9 +64,12 @@ 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 LIBRARY GSServerEngine.lib // FOr AspectRatio #endif + +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/inc/glxhdmicontainer.h --- a/tvout/tvoutengine/inc/glxhdmicontainer.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/inc/glxhdmicontainer.h Thu Jul 22 16:33:32 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; diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/inc/glxhdmicontroller.h --- a/tvout/tvoutengine/inc/glxhdmicontroller.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/inc/glxhdmicontroller.h Thu Jul 22 16:33:32 2010 +0100 @@ -19,24 +19,21 @@ #define GLXHDMICONTROLLER_H_ // Internal includes -#include // 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_ */ diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/inc/glxhdmisurfaceupdater.h --- a/tvout/tvoutengine/inc/glxhdmisurfaceupdater.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/inc/glxhdmisurfaceupdater.h Thu Jul 22 16:33:32 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; diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/inc/glxtv.h --- a/tvout/tvoutengine/inc/glxtv.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/inc/glxtv.h Thu Jul 22 16:33:32 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 /** diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/inc/glxtvconnectionmonitor.h --- a/tvout/tvoutengine/inc/glxtvconnectionmonitor.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/inc/glxtvconnectionmonitor.h Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/rom/glxtvout.iby --- a/tvout/tvoutengine/rom/glxtvout.iby Wed Jun 16 13:08:54 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 diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/src/glxhdmicontainer.cpp --- a/tvout/tvoutengine/src/glxhdmicontainer.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/src/glxhdmicontainer.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -75,7 +75,7 @@ RWindow* CGlxHdmiContainer::GetWindow() { TRACER("CGlxHdmiContainer::GetWindow()"); - return &Window(); + return &iWsWindow; } // ----------------------------------------------------------------------------- diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/src/glxhdmicontroller.cpp --- a/tvout/tvoutengine/src/glxhdmicontroller.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/src/glxhdmicontroller.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -19,7 +19,7 @@ #include #include #include -#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(); - } - } - } - diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/src/glxhdmisurfaceupdater.cpp --- a/tvout/tvoutengine/src/glxhdmisurfaceupdater.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/src/glxhdmisurfaceupdater.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -18,8 +18,10 @@ #include #include #include +#include #include #include +#include "alf/alfcompositionclient.h" #include #include @@ -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); + } } // ----------------------------------------------------------------------------- @@ -820,10 +886,96 @@ iSurfBufferAO->iStatus = KRequestPending; iSurfBufferAO->SetActive(); iSurfUpdateSession.NotifyWhenAvailable(iSurfBufferAO->iStatus); - TInt err = iSurfUpdateSession.SubmitUpdate(1, iSurfId, 0, NULL); + TInt err = iSurfUpdateSession.SubmitUpdate(KAllScreens, iSurfId, 0, NULL); GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ProcessTvImage() Surfaceupdatesession error %d",err); } } +// ----------------------------------------------------------------------------- +// 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 (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(); + } + } + diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/src/glxtv.cpp --- a/tvout/tvoutengine/src/glxtv.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/src/glxtv.cpp Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutengine/src/glxtvconnectionmonitor.cpp --- a/tvout/tvoutengine/src/glxtvconnectionmonitor.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutengine/src/glxtvconnectionmonitor.cpp Thu Jul 22 16:33:32 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 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); } diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutwrapper/inc/glxtvconnectionobserver.h --- a/tvout/tvoutwrapper/inc/glxtvconnectionobserver.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutwrapper/inc/glxtvconnectionobserver.h Thu Jul 22 16:33:32 2010 +0100 @@ -38,6 +38,12 @@ * destructor */ ~CGlxConnectionObserver(); + + /* + * IsHdmiConnected() + */ + TBool IsHdmiConnected(); + private: /* * ConstructL diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutwrapper/inc/glxtvoutwrapper.h --- a/tvout/tvoutwrapper/inc/glxtvoutwrapper.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutwrapper/inc/glxtvoutwrapper.h Thu Jul 22 16:33:32 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; }; diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutwrapper/inc/glxtvoutwrapper_p.h --- a/tvout/tvoutwrapper/inc/glxtvoutwrapper_p.h Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutwrapper/inc/glxtvoutwrapper_p.h Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutwrapper/src/glxtvconnectionobserver.cpp --- a/tvout/tvoutwrapper/src/glxtvconnectionobserver.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutwrapper/src/glxtvconnectionobserver.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -19,12 +19,15 @@ #include "glxtvconnectionobserver.h" #include "glxtvoutwrapper_p.h" +#include +#include // ----------------------------------------------------------------------------- // 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(); + } diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutwrapper/src/glxtvoutwrapper.cpp --- a/tvout/tvoutwrapper/src/glxtvoutwrapper.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutwrapper/src/glxtvoutwrapper.cpp Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutwrapper/src/glxtvoutwrapper_p.cpp --- a/tvout/tvoutwrapper/src/glxtvoutwrapper_p.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutwrapper/src/glxtvoutwrapper_p.cpp Thu Jul 22 16:33:32 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()) { focusIndex = (focusVariant.value()); + 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(); 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() diff -r c9962d0368d9 -r 525c140ec8db tvout/tvoutwrapper/tvoutwrapper.pro --- a/tvout/tvoutwrapper/tvoutwrapper.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/tvout/tvoutwrapper/tvoutwrapper.pro Thu Jul 22 16:33:32 2010 +0100 @@ -24,6 +24,7 @@ CONFIG += hb LIBS += -lglxtvout.dll \ + -lglxlogging.dll \ DEFINES += BUILD_TVOUTWRAPPER @@ -32,6 +33,7 @@ TARGET.UID3 = 0x2000A772 TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } # Input HEADERS += inc/glxtvoutwrapper.h \ @@ -42,4 +44,13 @@ src/glxtvoutwrapper_p.cpp \ src/glxtvconnectionobserver.cpp -DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT \ No newline at end of file +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxtvoutwrapper.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxtvoutwrapper.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/bwins/glxviewsu.def --- a/ui/bwins/glxviewsu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/bwins/glxviewsu.def Thu Jul 22 16:33:32 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 &, 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 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 &, 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 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 const &) - ?deregistertransitionEffect@GlxSlideShowEffectEngine@@QAEXXZ @ 35 NONAME ; void GlxSlideShowEffectEngine::deregistertransitionEffect(void) + ?createView@GlxViewsFactory@@SAPAVGlxView@@HPAVHbMainWindow@@@Z @ 1 NONAME ; class GlxView * GlxViewsFactory::createView(int, class HbMainWindow *) diff -r c9962d0368d9 -r 525c140ec8db ui/bwins/glxviewutilitiesu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/bwins/glxviewutilitiesu.def Thu Jul 22 16:33:32 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 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 &, 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 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 &, 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 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 *) + diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/bwins/glxcommoncommandhandlersu.def --- a/ui/commandhandlers/bwins/glxcommoncommandhandlersu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/bwins/glxcommoncommandhandlersu.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,66 +1,81 @@ EXPORTS - ??_EGlxCommandHandlerRemoveFrom@@UAE@I@Z @ 1 NONAME ; GlxCommandHandlerRemoveFrom::~GlxCommandHandlerRemoveFrom(unsigned int) - ?iSelectionCount@GlxCommandHandlerAddToContainer@@0HA @ 2 NONAME ; int GlxCommandHandlerAddToContainer::iSelectionCount - ?RotateImageL@GlxCommandHandlerRotate@@AAEXV?$TBuf@$0BAA@@@@Z @ 3 NONAME ; void GlxCommandHandlerRotate::RotateImageL(class TBuf<256>) - ?qt_metacall@GlxCommandHandlerNewMedia@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4 NONAME ; int GlxCommandHandlerNewMedia::qt_metacall(enum QMetaObject::Call, int, void * *) - ?ProgressTextL@GlxCommandHandlerRemoveFrom@@EBE?AVQString@@XZ @ 5 NONAME ; class QString GlxCommandHandlerRemoveFrom::ProgressTextL(void) const - ??0GlxCommandHandlerRename@@QAE@XZ @ 6 NONAME ; GlxCommandHandlerRename::GlxCommandHandlerRename(void) - ??1GlxCommandHandlerAddToContainer@@UAE@XZ @ 7 NONAME ; GlxCommandHandlerAddToContainer::~GlxCommandHandlerAddToContainer(void) - ?getStaticMetaObject@GlxCommandHandlerNewMedia@@SAABUQMetaObject@@XZ @ 8 NONAME ; struct QMetaObject const & GlxCommandHandlerNewMedia::getStaticMetaObject(void) - ?SetImageOrientationL@GlxCommandHandlerRotate@@AAEXG@Z @ 9 NONAME ; void GlxCommandHandlerRotate::SetImageOrientationL(unsigned short) - ?ConfirmationTextL@GlxCommandHandlerDelete@@EBE?AVQString@@_N@Z @ 10 NONAME ; class QString GlxCommandHandlerDelete::ConfirmationTextL(bool) const - ??_EGlxCommandHandlerSend@@UAE@I@Z @ 11 NONAME ; GlxCommandHandlerSend::~GlxCommandHandlerSend(unsigned int) - ?trUtf8@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString GlxCommandHandlerNewMedia::trUtf8(char const *, char const *) - ?HandleErrorL@GlxCommandHandlerNewMedia@@MAEXH@Z @ 13 NONAME ; void GlxCommandHandlerNewMedia::HandleErrorL(int) - ?GetName@GlxCommandHandlerRename@@ABE?AVQString@@AAVMGlxMediaList@@@Z @ 14 NONAME ; class QString GlxCommandHandlerRename::GetName(class MGlxMediaList &) const - ?tr@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0H@Z @ 15 NONAME ; class QString GlxCommandHandlerNewMedia::tr(char const *, char const *, int) - ?DoExecuteCommandL@GlxCommandHandlerRotate@@UAEXHAAVMGlxMediaList@@AAH@Z @ 16 NONAME ; void GlxCommandHandlerRotate::DoExecuteCommandL(int, class MGlxMediaList &, int &) - ?metaObject@GlxCommandHandlerNewMedia@@UBEPBUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const * GlxCommandHandlerNewMedia::metaObject(void) const - ?CreateCommandL@GlxCommandHandlerDelete@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 18 NONAME ; class CMPXMedia * GlxCommandHandlerDelete::CreateCommandL(int, class MGlxMediaList &, int &) const - ?CreateCommandL@GlxCommandHandlerAddToContainer@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 19 NONAME ; class CMPXMedia * GlxCommandHandlerAddToContainer::CreateCommandL(int, class MGlxMediaList &, int &) const - ?CompletionTextL@GlxCommandHandlerDelete@@EBE?AVQString@@XZ @ 20 NONAME ; class QString GlxCommandHandlerDelete::CompletionTextL(void) const - ?DoHandleCommandCompleteL@GlxCommandHandlerNewMedia@@MAEXPAXPAVCMPXMedia@@HPAVMGlxMediaList@@@Z @ 21 NONAME ; void GlxCommandHandlerNewMedia::DoHandleCommandCompleteL(void *, class CMPXMedia *, int, class MGlxMediaList *) - ?GenerateNewMediaItemTitleL@GlxCommandHandlerNewMedia@@ABE?AVQString@@V2@AAVMGlxMediaList@@@Z @ 22 NONAME ; class QString GlxCommandHandlerNewMedia::GenerateNewMediaItemTitleL(class QString, class MGlxMediaList &) const - ??1GlxCommandHandlerRemoveFrom@@UAE@XZ @ 23 NONAME ; GlxCommandHandlerRemoveFrom::~GlxCommandHandlerRemoveFrom(void) - ?qt_metacast@GlxCommandHandlerNewMedia@@UAEPAXPBD@Z @ 24 NONAME ; void * GlxCommandHandlerNewMedia::qt_metacast(char const *) - ??0GlxCommandHandlerRemoveFrom@@QAE@XZ @ 25 NONAME ; GlxCommandHandlerRemoveFrom::GlxCommandHandlerRemoveFrom(void) - ?HandleItemAddedL@GlxCommandHandlerNewMedia@@MAEXHHPAVMGlxMediaList@@@Z @ 26 NONAME ; void GlxCommandHandlerNewMedia::HandleItemAddedL(int, int, class MGlxMediaList *) - ?tr@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0@Z @ 27 NONAME ; class QString GlxCommandHandlerNewMedia::tr(char const *, char const *) - ?createNewMedia@GlxCommandHandlerAddToContainer@@ABEXXZ @ 28 NONAME ; void GlxCommandHandlerAddToContainer::createNewMedia(void) const - ?ReadImageOrientationL@GlxCommandHandlerRotate@@AAEGXZ @ 29 NONAME ; unsigned short GlxCommandHandlerRotate::ReadImageOrientationL(void) - ??1GlxCommandHandlerRotate@@UAE@XZ @ 30 NONAME ; GlxCommandHandlerRotate::~GlxCommandHandlerRotate(void) - ?CreateCommandL@GlxCommandHandlerRename@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 31 NONAME ; class CMPXMedia * GlxCommandHandlerRename::CreateCommandL(int, class MGlxMediaList &, int &) const - ??1GlxCommandHandlerNewMedia@@UAE@XZ @ 32 NONAME ; GlxCommandHandlerNewMedia::~GlxCommandHandlerNewMedia(void) - ??_EGlxCommandHandlerNewMedia@@UAE@I@Z @ 33 NONAME ; GlxCommandHandlerNewMedia::~GlxCommandHandlerNewMedia(unsigned int) - ?CompletionTextL@GlxCommandHandlerRemoveFrom@@EBE?AVQString@@XZ @ 34 NONAME ; class QString GlxCommandHandlerRemoveFrom::CompletionTextL(void) const - ??_EGlxCommandHandlerDelete@@UAE@I@Z @ 35 NONAME ; GlxCommandHandlerDelete::~GlxCommandHandlerDelete(unsigned int) - ?ProgressTextL@GlxCommandHandlerDelete@@EBE?AVQString@@XZ @ 36 NONAME ; class QString GlxCommandHandlerDelete::ProgressTextL(void) const - ?CompletionTextL@GlxCommandHandlerRename@@EBE?AVQString@@XZ @ 37 NONAME ; class QString GlxCommandHandlerRename::CompletionTextL(void) const - ?staticMetaObject@GlxCommandHandlerNewMedia@@2UQMetaObject@@B @ 38 NONAME ; struct QMetaObject const GlxCommandHandlerNewMedia::staticMetaObject - ?DestroyExifWriter@GlxCommandHandlerRotate@@AAEXXZ @ 39 NONAME ; void GlxCommandHandlerRotate::DestroyExifWriter(void) - ??0GlxCommandHandlerDelete@@QAE@XZ @ 40 NONAME ; GlxCommandHandlerDelete::GlxCommandHandlerDelete(void) - ??1GlxCommandHandlerRename@@UAE@XZ @ 41 NONAME ; GlxCommandHandlerRename::~GlxCommandHandlerRename(void) - ??0GlxCommandHandlerSend@@QAE@XZ @ 42 NONAME ; GlxCommandHandlerSend::GlxCommandHandlerSend(void) - ?HandleError@GlxCommandHandlerNewMedia@@MAEXH@Z @ 43 NONAME ; void GlxCommandHandlerNewMedia::HandleError(int) - ??0GlxCommandHandlerAddToContainer@@QAE@XZ @ 44 NONAME ; GlxCommandHandlerAddToContainer::GlxCommandHandlerAddToContainer(void) - ??_EGlxCommandHandlerRename@@UAE@I@Z @ 45 NONAME ; GlxCommandHandlerRename::~GlxCommandHandlerRename(unsigned int) - ?HandleErrorL@GlxCommandHandlerRename@@EAEXH@Z @ 46 NONAME ; void GlxCommandHandlerRename::HandleErrorL(int) - ??_EGlxCommandHandlerRotate@@UAE@I@Z @ 47 NONAME ; GlxCommandHandlerRotate::~GlxCommandHandlerRotate(unsigned int) - ?ProgressTextL@GlxCommandHandlerAddToContainer@@EBE?AVQString@@XZ @ 48 NONAME ; class QString GlxCommandHandlerAddToContainer::ProgressTextL(void) const - ??1GlxCommandHandlerSend@@UAE@XZ @ 49 NONAME ; GlxCommandHandlerSend::~GlxCommandHandlerSend(void) - ?CompletionTextL@GlxCommandHandlerAddToContainer@@EBE?AVQString@@XZ @ 50 NONAME ; class QString GlxCommandHandlerAddToContainer::CompletionTextL(void) const - ??0GlxCommandHandlerNewMedia@@QAE@XZ @ 51 NONAME ; GlxCommandHandlerNewMedia::GlxCommandHandlerNewMedia(void) - ?trUtf8@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0H@Z @ 52 NONAME ; class QString GlxCommandHandlerNewMedia::trUtf8(char const *, char const *, int) - ?doHandleUserAction@GlxCommandHandlerSend@@UBEXPAVGlxMediaModel@@V?$QList@VQModelIndex@@@@@Z @ 53 NONAME ; void GlxCommandHandlerSend::doHandleUserAction(class GlxMediaModel *, class QList) const - ??_EGlxCommandHandlerAddToContainer@@UAE@I@Z @ 54 NONAME ; GlxCommandHandlerAddToContainer::~GlxCommandHandlerAddToContainer(unsigned int) - ?ProgressTextL@GlxCommandHandlerNewMedia@@EBE?AVQString@@XZ @ 55 NONAME ; class QString GlxCommandHandlerNewMedia::ProgressTextL(void) const - ?ExecuteLD@GlxCommandHandlerNewMedia@@QAEHAAVTGlxMediaId@@@Z @ 56 NONAME ; int GlxCommandHandlerNewMedia::ExecuteLD(class TGlxMediaId &) - ?CreateCommandL@GlxCommandHandlerRotate@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 57 NONAME ; class CMPXMedia * GlxCommandHandlerRotate::CreateCommandL(int, class MGlxMediaList &, int &) const - ?CompletionTextL@GlxCommandHandlerNewMedia@@EBE?AVQString@@XZ @ 58 NONAME ; class QString GlxCommandHandlerNewMedia::CompletionTextL(void) const - ?CreateCommandL@GlxCommandHandlerRemoveFrom@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 59 NONAME ; class CMPXMedia * GlxCommandHandlerRemoveFrom::CreateCommandL(int, class MGlxMediaList &, int &) const - ?CalculateFinalOrientationL@GlxCommandHandlerRotate@@AAEGG@Z @ 60 NONAME ; unsigned short GlxCommandHandlerRotate::CalculateFinalOrientationL(unsigned short) - ?InitializeExifWriterL@GlxCommandHandlerRotate@@AAEXV?$TBuf@$0BAA@@@@Z @ 61 NONAME ; void GlxCommandHandlerRotate::InitializeExifWriterL(class TBuf<256>) - ?CreateCommandL@GlxCommandHandlerNewMedia@@MBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 62 NONAME ; class CMPXMedia * GlxCommandHandlerNewMedia::CreateCommandL(int, class MGlxMediaList &, int &) const - ??1GlxCommandHandlerDelete@@UAE@XZ @ 63 NONAME ; GlxCommandHandlerDelete::~GlxCommandHandlerDelete(void) - ??0GlxCommandHandlerRotate@@QAE@XZ @ 64 NONAME ; GlxCommandHandlerRotate::GlxCommandHandlerRotate(void) + ?doHandleUserAction@GlxCommandHandlerRotateImage@@UBEXPAVGlxMediaModel@@V?$QList@VQModelIndex@@@@@Z @ 1 NONAME ; void GlxCommandHandlerRotateImage::doHandleUserAction(class GlxMediaModel *, class QList) const + ??_EGlxCommandHandlerRemoveFrom@@UAE@I@Z @ 2 NONAME ; GlxCommandHandlerRemoveFrom::~GlxCommandHandlerRemoveFrom(unsigned int) + ?iSelectionCount@GlxCommandHandlerAddToContainer@@0HA @ 3 NONAME ; int GlxCommandHandlerAddToContainer::iSelectionCount + ?RotateImageL@GlxCommandHandlerRotate@@AAEXV?$TBuf@$0BAA@@@@Z @ 4 NONAME ; void GlxCommandHandlerRotate::RotateImageL(class TBuf<256>) + ?qt_metacall@GlxCommandHandlerNewMedia@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 5 NONAME ; int GlxCommandHandlerNewMedia::qt_metacall(enum QMetaObject::Call, int, void * *) + ?doHandleUserAction@GlxCommandHandlerCropImage@@UBEXPAVGlxMediaModel@@V?$QList@VQModelIndex@@@@@Z @ 6 NONAME ; void GlxCommandHandlerCropImage::doHandleUserAction(class GlxMediaModel *, class QList) const + ?ProgressTextL@GlxCommandHandlerRemoveFrom@@EBE?AVQString@@XZ @ 7 NONAME ; class QString GlxCommandHandlerRemoveFrom::ProgressTextL(void) const + ??0GlxCommandHandlerRename@@QAE@XZ @ 8 NONAME ; GlxCommandHandlerRename::GlxCommandHandlerRename(void) + ??1GlxCommandHandlerAddToContainer@@UAE@XZ @ 9 NONAME ; GlxCommandHandlerAddToContainer::~GlxCommandHandlerAddToContainer(void) + ?getStaticMetaObject@GlxCommandHandlerNewMedia@@SAABUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const & GlxCommandHandlerNewMedia::getStaticMetaObject(void) + ?SetImageOrientationL@GlxCommandHandlerRotate@@AAEXG@Z @ 11 NONAME ; void GlxCommandHandlerRotate::SetImageOrientationL(unsigned short) + ?ConfirmationTextL@GlxCommandHandlerDelete@@EBE?AVQString@@_N@Z @ 12 NONAME ; class QString GlxCommandHandlerDelete::ConfirmationTextL(bool) const + ??_EGlxCommandHandlerSend@@UAE@I@Z @ 13 NONAME ; GlxCommandHandlerSend::~GlxCommandHandlerSend(unsigned int) + ?trUtf8@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString GlxCommandHandlerNewMedia::trUtf8(char const *, char const *) + ?HandleErrorL@GlxCommandHandlerNewMedia@@MAEXH@Z @ 15 NONAME ; void GlxCommandHandlerNewMedia::HandleErrorL(int) + ??1GlxCommandHandlerCropImage@@UAE@XZ @ 16 NONAME ; GlxCommandHandlerCropImage::~GlxCommandHandlerCropImage(void) + ?GetName@GlxCommandHandlerRename@@ABE?AVQString@@AAVMGlxMediaList@@@Z @ 17 NONAME ; class QString GlxCommandHandlerRename::GetName(class MGlxMediaList &) const + ?tr@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString GlxCommandHandlerNewMedia::tr(char const *, char const *, int) + ?DoExecuteCommandL@GlxCommandHandlerRotate@@UAEXHAAVMGlxMediaList@@AAH@Z @ 19 NONAME ; void GlxCommandHandlerRotate::DoExecuteCommandL(int, class MGlxMediaList &, int &) + ?CompletionTextL@GlxCommandHandlerComment@@EBE?AVQString@@XZ @ 20 NONAME ; class QString GlxCommandHandlerComment::CompletionTextL(void) const + ?metaObject@GlxCommandHandlerNewMedia@@UBEPBUQMetaObject@@XZ @ 21 NONAME ; struct QMetaObject const * GlxCommandHandlerNewMedia::metaObject(void) const + ?CreateCommandL@GlxCommandHandlerDelete@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 22 NONAME ; class CMPXMedia * GlxCommandHandlerDelete::CreateCommandL(int, class MGlxMediaList &, int &) const + ?CreateCommandL@GlxCommandHandlerAddToContainer@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 23 NONAME ; class CMPXMedia * GlxCommandHandlerAddToContainer::CreateCommandL(int, class MGlxMediaList &, int &) const + ?CompletionTextL@GlxCommandHandlerDelete@@EBE?AVQString@@XZ @ 24 NONAME ; class QString GlxCommandHandlerDelete::CompletionTextL(void) const + ?DoHandleCommandCompleteL@GlxCommandHandlerNewMedia@@MAEXPAXPAVCMPXMedia@@HPAVMGlxMediaList@@@Z @ 25 NONAME ; void GlxCommandHandlerNewMedia::DoHandleCommandCompleteL(void *, class CMPXMedia *, int, class MGlxMediaList *) + ??0GlxCommandHandlerComment@@QAE@XZ @ 26 NONAME ; GlxCommandHandlerComment::GlxCommandHandlerComment(void) + ?GenerateNewMediaItemTitleL@GlxCommandHandlerNewMedia@@ABE?AVQString@@V2@AAVMGlxMediaList@@@Z @ 27 NONAME ; class QString GlxCommandHandlerNewMedia::GenerateNewMediaItemTitleL(class QString, class MGlxMediaList &) const + ??1GlxCommandHandlerRemoveFrom@@UAE@XZ @ 28 NONAME ; GlxCommandHandlerRemoveFrom::~GlxCommandHandlerRemoveFrom(void) + ?qt_metacast@GlxCommandHandlerNewMedia@@UAEPAXPBD@Z @ 29 NONAME ; void * GlxCommandHandlerNewMedia::qt_metacast(char const *) + ??0GlxCommandHandlerRemoveFrom@@QAE@XZ @ 30 NONAME ; GlxCommandHandlerRemoveFrom::GlxCommandHandlerRemoveFrom(void) + ?HandleItemAddedL@GlxCommandHandlerNewMedia@@MAEXHHPAVMGlxMediaList@@@Z @ 31 NONAME ; void GlxCommandHandlerNewMedia::HandleItemAddedL(int, int, class MGlxMediaList *) + ?tr@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0@Z @ 32 NONAME ; class QString GlxCommandHandlerNewMedia::tr(char const *, char const *) + ?createNewMedia@GlxCommandHandlerAddToContainer@@ABEXXZ @ 33 NONAME ; void GlxCommandHandlerAddToContainer::createNewMedia(void) const + ?ReadImageOrientationL@GlxCommandHandlerRotate@@AAEGXZ @ 34 NONAME ; unsigned short GlxCommandHandlerRotate::ReadImageOrientationL(void) + ??_EGlxCommandHandlerComment@@UAE@I@Z @ 35 NONAME ; GlxCommandHandlerComment::~GlxCommandHandlerComment(unsigned int) + ??1GlxCommandHandlerRotate@@UAE@XZ @ 36 NONAME ; GlxCommandHandlerRotate::~GlxCommandHandlerRotate(void) + ?CreateCommandL@GlxCommandHandlerRename@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 37 NONAME ; class CMPXMedia * GlxCommandHandlerRename::CreateCommandL(int, class MGlxMediaList &, int &) const + ??1GlxCommandHandlerNewMedia@@UAE@XZ @ 38 NONAME ; GlxCommandHandlerNewMedia::~GlxCommandHandlerNewMedia(void) + ??_EGlxCommandHandlerNewMedia@@UAE@I@Z @ 39 NONAME ; GlxCommandHandlerNewMedia::~GlxCommandHandlerNewMedia(unsigned int) + ?CompletionTextL@GlxCommandHandlerRemoveFrom@@EBE?AVQString@@XZ @ 40 NONAME ; class QString GlxCommandHandlerRemoveFrom::CompletionTextL(void) const + ??_EGlxCommandHandlerDelete@@UAE@I@Z @ 41 NONAME ; GlxCommandHandlerDelete::~GlxCommandHandlerDelete(unsigned int) + ?ProgressTextL@GlxCommandHandlerDelete@@EBE?AVQString@@XZ @ 42 NONAME ; class QString GlxCommandHandlerDelete::ProgressTextL(void) const + ?CompletionTextL@GlxCommandHandlerRename@@EBE?AVQString@@XZ @ 43 NONAME ; class QString GlxCommandHandlerRename::CompletionTextL(void) const + ?staticMetaObject@GlxCommandHandlerNewMedia@@2UQMetaObject@@B @ 44 NONAME ; struct QMetaObject const GlxCommandHandlerNewMedia::staticMetaObject + ?DestroyExifWriter@GlxCommandHandlerRotate@@AAEXXZ @ 45 NONAME ; void GlxCommandHandlerRotate::DestroyExifWriter(void) + ??0GlxCommandHandlerDelete@@QAE@XZ @ 46 NONAME ; GlxCommandHandlerDelete::GlxCommandHandlerDelete(void) + ??1GlxCommandHandlerRename@@UAE@XZ @ 47 NONAME ; GlxCommandHandlerRename::~GlxCommandHandlerRename(void) + ??0GlxCommandHandlerSend@@QAE@XZ @ 48 NONAME ; GlxCommandHandlerSend::GlxCommandHandlerSend(void) + ?HandleError@GlxCommandHandlerNewMedia@@MAEXH@Z @ 49 NONAME ; void GlxCommandHandlerNewMedia::HandleError(int) + ??0GlxCommandHandlerAddToContainer@@QAE@XZ @ 50 NONAME ; GlxCommandHandlerAddToContainer::GlxCommandHandlerAddToContainer(void) + ??_EGlxCommandHandlerRename@@UAE@I@Z @ 51 NONAME ; GlxCommandHandlerRename::~GlxCommandHandlerRename(unsigned int) + ?GetName@GlxCommandHandlerComment@@ABE?AVQString@@AAVMGlxMediaList@@@Z @ 52 NONAME ; class QString GlxCommandHandlerComment::GetName(class MGlxMediaList &) const + ?HandleErrorL@GlxCommandHandlerRename@@EAEXH@Z @ 53 NONAME ; void GlxCommandHandlerRename::HandleErrorL(int) + ??1GlxCommandHandlerRotateImage@@UAE@XZ @ 54 NONAME ; GlxCommandHandlerRotateImage::~GlxCommandHandlerRotateImage(void) + ??0GlxCommandHandlerRotateImage@@QAE@XZ @ 55 NONAME ; GlxCommandHandlerRotateImage::GlxCommandHandlerRotateImage(void) + ??_EGlxCommandHandlerRotate@@UAE@I@Z @ 56 NONAME ; GlxCommandHandlerRotate::~GlxCommandHandlerRotate(unsigned int) + ??_EGlxCommandHandlerCropImage@@UAE@I@Z @ 57 NONAME ; GlxCommandHandlerCropImage::~GlxCommandHandlerCropImage(unsigned int) + ?ProgressTextL@GlxCommandHandlerAddToContainer@@EBE?AVQString@@XZ @ 58 NONAME ; class QString GlxCommandHandlerAddToContainer::ProgressTextL(void) const + ??1GlxCommandHandlerComment@@UAE@XZ @ 59 NONAME ; GlxCommandHandlerComment::~GlxCommandHandlerComment(void) + ??1GlxCommandHandlerSend@@UAE@XZ @ 60 NONAME ; GlxCommandHandlerSend::~GlxCommandHandlerSend(void) + ?CompletionTextL@GlxCommandHandlerAddToContainer@@EBE?AVQString@@XZ @ 61 NONAME ; class QString GlxCommandHandlerAddToContainer::CompletionTextL(void) const + ??0GlxCommandHandlerNewMedia@@QAE@XZ @ 62 NONAME ; GlxCommandHandlerNewMedia::GlxCommandHandlerNewMedia(void) + ?trUtf8@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0H@Z @ 63 NONAME ; class QString GlxCommandHandlerNewMedia::trUtf8(char const *, char const *, int) + ?doHandleUserAction@GlxCommandHandlerSend@@UBEXPAVGlxMediaModel@@V?$QList@VQModelIndex@@@@@Z @ 64 NONAME ; void GlxCommandHandlerSend::doHandleUserAction(class GlxMediaModel *, class QList) const + ??_EGlxCommandHandlerAddToContainer@@UAE@I@Z @ 65 NONAME ; GlxCommandHandlerAddToContainer::~GlxCommandHandlerAddToContainer(unsigned int) + ?ProgressTextL@GlxCommandHandlerNewMedia@@EBE?AVQString@@XZ @ 66 NONAME ; class QString GlxCommandHandlerNewMedia::ProgressTextL(void) const + ?ExecuteLD@GlxCommandHandlerNewMedia@@QAEHAAVTGlxMediaId@@@Z @ 67 NONAME ; int GlxCommandHandlerNewMedia::ExecuteLD(class TGlxMediaId &) + ?CreateCommandL@GlxCommandHandlerRotate@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 68 NONAME ; class CMPXMedia * GlxCommandHandlerRotate::CreateCommandL(int, class MGlxMediaList &, int &) const + ?CreateCommandL@GlxCommandHandlerComment@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 69 NONAME ; class CMPXMedia * GlxCommandHandlerComment::CreateCommandL(int, class MGlxMediaList &, int &) const + ?CompletionTextL@GlxCommandHandlerNewMedia@@EBE?AVQString@@XZ @ 70 NONAME ; class QString GlxCommandHandlerNewMedia::CompletionTextL(void) const + ?executeCommand@GlxCommandHandlerRotateImage@@UAEXHHV?$QList@VQModelIndex@@@@@Z @ 71 NONAME ; void GlxCommandHandlerRotateImage::executeCommand(int, int, class QList) + ??_EGlxCommandHandlerRotateImage@@UAE@I@Z @ 72 NONAME ; GlxCommandHandlerRotateImage::~GlxCommandHandlerRotateImage(unsigned int) + ?CreateCommandL@GlxCommandHandlerRemoveFrom@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 73 NONAME ; class CMPXMedia * GlxCommandHandlerRemoveFrom::CreateCommandL(int, class MGlxMediaList &, int &) const + ?CalculateFinalOrientationL@GlxCommandHandlerRotate@@AAEGG@Z @ 74 NONAME ; unsigned short GlxCommandHandlerRotate::CalculateFinalOrientationL(unsigned short) + ?InitializeExifWriterL@GlxCommandHandlerRotate@@AAEXV?$TBuf@$0BAA@@@@Z @ 75 NONAME ; void GlxCommandHandlerRotate::InitializeExifWriterL(class TBuf<256>) + ??1GlxCommandHandlerDelete@@UAE@XZ @ 76 NONAME ; GlxCommandHandlerDelete::~GlxCommandHandlerDelete(void) + ?CreateCommandL@GlxCommandHandlerNewMedia@@MBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 77 NONAME ; class CMPXMedia * GlxCommandHandlerNewMedia::CreateCommandL(int, class MGlxMediaList &, int &) const + ??0GlxCommandHandlerCropImage@@QAE@XZ @ 78 NONAME ; GlxCommandHandlerCropImage::GlxCommandHandlerCropImage(void) + ??0GlxCommandHandlerRotate@@QAE@XZ @ 79 NONAME ; GlxCommandHandlerRotate::GlxCommandHandlerRotate(void) diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commandhandlerbase/commandhandlerbase.pro --- a/ui/commandhandlers/commandhandlerbase/commandhandlerbase.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commandhandlerbase/commandhandlerbase.pro Thu Jul 22 16:33:32 2010 +0100 @@ -45,8 +45,10 @@ TARGET.UID3 = 0x20000A11 TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } + # Input HEADERS += inc/glxcommandhandler.h HEADERS += inc/glxmpxcommandhandler.h @@ -57,3 +59,12 @@ SOURCES += src/glxmodelcommandhandler.cpp DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxcommandhandlerbase.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxcommandhandlerbase.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commandhandlerbase/src/glxmodelcommandhandler.cpp --- a/ui/commandhandlers/commandhandlerbase/src/glxmodelcommandhandler.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commandhandlerbase/src/glxmodelcommandhandler.cpp Thu Jul 22 16:33:32 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 #include #include diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp --- a/ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -64,6 +64,7 @@ void GlxMpxCommandHandler::executeCommand(int commandId, int collectionId,QList indexList) { OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_EXECUTECOMMAND_ENTRY ); + Q_UNUSED(indexList); int aHierarchyId = 0; TGlxFilterItemType aFilterType = EGlxFilterImage; @@ -349,7 +350,8 @@ // @todo error received. Close progress note DismissProgressNoteL(); iMediaList->RemoveMediaListObserver(this); - + iMediaList->Close(); + iMediaList = NULL; // handle error HandleErrorL(aErrorCode); } @@ -357,6 +359,8 @@ { DismissProgressNoteL(); iMediaList->RemoveMediaListObserver(this); + iMediaList->Close(); + iMediaList = NULL; CompletionNoteL(); iProgressComplete = EFalse; } @@ -478,7 +482,8 @@ // noteText has a place for a title string in it const TDesC& itemName = media->ValueText(KMPXMediaGeneralTitle); QString qtItemName = QString::fromUtf16(itemName.Ptr(),itemName.Length()); - qtText.append(QString("%1").arg(qtItemName)); + QString localisedString = qtText.arg(qtItemName); + qtText = localisedString; } // (else) If error, assume confirmed anyway CleanupStack::PopAndDestroy(attributeContext); diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/commoncommandhandlers.pro --- a/ui/commandhandlers/commoncommandhandlers/commoncommandhandlers.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commoncommandhandlers/commoncommandhandlers.pro Thu Jul 22 16:33:32 2010 +0100 @@ -40,6 +40,7 @@ TARGET.UID3 = 0x20000A0D TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } LIBS += -lglxcommandhandlerbase.dll \ @@ -52,7 +53,13 @@ -lshareui.dll \ -lexiflib.dll \ -lfbscli.dll \ - -lbafl.dll + -lbafl.dll \ + -lefsrv.dll \ + -lcaf.dll \ + -lxqservice.dll \ + -lxqserviceutil.dll \ + -lglxmediamodel.dll + # Input HEADERS += inc/glxcommandhandlerdelete.h @@ -63,6 +70,9 @@ HEADERS += inc/glxcommandhandlerremovefrom.h HEADERS += inc/glxcommandhandlerrename.h HEADERS += inc/glxcommondialogs.h +HEADERS += inc/glxcommandhandlercomment.h +HEADERS += inc/glxcommandhandlercropimage.h +HEADERS += inc/glxcommandhandlerrotateimage.h SOURCES += src/glxcommandhandlerdelete.cpp SOURCES += src/glxcommandhandleraddtocontainer.cpp @@ -72,6 +82,18 @@ SOURCES += src/glxcommandhandlerremovefrom.cpp SOURCES += src/glxcommandhandlerrename.cpp SOURCES += src/glxcommondialogs.cpp +SOURCES += src/glxcommandhandlercomment.cpp +SOURCES += src/glxcommandhandlercropimage.cpp +SOURCES += src/glxcommandhandlerrotateimage.cpp DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxcommoncommandhandlers.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxcommoncommandhandlers.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlercomment.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlercomment.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,42 @@ +/* +* 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 GLXCOMMANDHANDLERCOMMENT_H +#define GLXCOMMANDHANDLERCOMMENT_H + +#include + +#ifdef BUILD_COMMONCOMMANDHANDLERS +#define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_EXPORT +#else +#define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_IMPORT +#endif + + +class GLX_COMMONCOMMANDHANDLERS_EXPORT GlxCommandHandlerComment : public GlxMpxCommandHandler + { +public: + GlxCommandHandlerComment(); + ~GlxCommandHandlerComment(); + CMPXCommand* CreateCommandL(TInt aCommandId, MGlxMediaList& aMediaList, TBool& aConsume) const ; +private: + QString CompletionTextL() const; + QString GetName(MGlxMediaList& aMediaList) const; + + }; + +#endif // GLXCOMMANDHANDLERCOMMENT_H diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlercropimage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlercropimage.h Thu Jul 22 16:33:32 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: +* +*/ + +#ifndef GLXCOMMANDHANDLERCROPIMAGE_H_ +#define GLXCOMMANDHANDLERCROPIMAGE_H_ + + +#include "glxmodelcommandhandler.h" +#include // for XQApplicationManager + +#ifdef BUILD_COMMONCOMMANDHANDLERS +#define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_EXPORT +#else +#define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_IMPORT +#endif + +//Forward Declaration +class XQAiwRequest; + +class GLX_COMMONCOMMANDHANDLERS_EXPORT GlxCommandHandlerCropImage : public GlxModelCommandHandler +{ + +public: + GlxCommandHandlerCropImage(); + ~GlxCommandHandlerCropImage(); + void doHandleUserAction(GlxMediaModel* model,QList indexList) const ; + +private: + mutable XQAiwRequest* mReq; + mutable XQApplicationManager mAppmgr; +}; + + +#endif /* GLXCOMMANDHANDLERCROPIMAGE_H_ */ diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlerrotateimage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlerrotateimage.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,49 @@ +/* +* 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 GLXCOMMANDHANDLERROTATEIMAGE_H_ +#define GLXCOMMANDHANDLERROTATEIMAGE_H_ + + +#include +#include // for XQApplicationManager + +#ifdef BUILD_COMMONCOMMANDHANDLERS +#define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_EXPORT +#else +#define GLX_COMMONCOMMANDHANDLERS_EXPORT Q_DECL_IMPORT +#endif + +//Forward Declaration +class XQAiwRequest; + +class GLX_COMMONCOMMANDHANDLERS_EXPORT GlxCommandHandlerRotateImage : public GlxModelCommandHandler +{ + +public: + GlxCommandHandlerRotateImage(); + ~GlxCommandHandlerRotateImage(); + void executeCommand(int commandId,int collectionId, QList indexList = QList() ); + void doHandleUserAction(GlxMediaModel* model,QList indexList) const ; + +private: + XQAiwRequest* mReq; + XQApplicationManager mAppmgr; +}; + + +#endif /* GLXCOMMANDHANDLERROTATEIMAGE_H_ */ diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlersend.h --- a/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlersend.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlersend.h Thu Jul 22 16:33:32 2010 +0100 @@ -21,6 +21,7 @@ #include "glxmodelcommandhandler.h" #include #include +class ShareUi; #ifdef BUILD_COMMONCOMMANDHANDLERS @@ -36,5 +37,7 @@ GlxCommandHandlerSend(); ~GlxCommandHandlerSend(); void doHandleUserAction(GlxMediaModel* model,QList indexList)const ; +private: + ShareUi *mSendUiDialog; }; #endif // GLXCOMMANDHANDLERSEND_H diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -88,9 +88,11 @@ connect( mSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection& ) ), this, SLOT( changeButtonText() ) ); HbAction *primary = new HbAction( "New" ); + primary->setObjectName( "Cmd New" ); popup.addAction( primary ) ; HbAction *secondary = new HbAction( GLX_BUTTON_CANCEL ); + secondary->setObjectName( "Cmd Cancel" ); popup.addAction( secondary ); popup.setContentWidget( listview ); //ownership transfer diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlercomment.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlercomment.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,150 @@ +/* +* 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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include "glxlocalisationstrings.h" + +GlxCommandHandlerComment::GlxCommandHandlerComment() + { + } + +GlxCommandHandlerComment::~GlxCommandHandlerComment() + { + } + +CMPXCommand* GlxCommandHandlerComment::CreateCommandL(TInt aCommandId, + MGlxMediaList& aMediaList, TBool& aConsume) const + { + Q_UNUSED(aCommandId); + Q_UNUSED(aConsume); + + CMPXCommand* command = NULL; + QString mainPane = GetName(aMediaList); + QString title(GLX_DETAILS_DESCRIPTION); + QString mediaTitle = NULL; + bool ok = false; + GlxTextInputDialog* dlg = new GlxTextInputDialog(); + mediaTitle = dlg->getText(title, mainPane, &ok); + delete dlg; + + if(ok == true) + { + TPtrC16 newMediaItemTitleDes + = (reinterpret_cast (mediaTitle.utf16())); + + HBufC* newMediaItemTitle = newMediaItemTitleDes.Alloc(); + CleanupStack::PushL(newMediaItemTitle); + + CMPXCollectionPath* path = aMediaList.PathLC( + NGlxListDefs::EPathFocusOrSelection); + command = + TGlxCommandFactory::SetDescriptionCommandLC(*newMediaItemTitle,*path); + CleanupStack::Pop(command); + CleanupStack::PopAndDestroy(path); + CleanupStack::PopAndDestroy(newMediaItemTitle); + } + return command; + } + +QString GlxCommandHandlerComment::CompletionTextL() const + { + //return command completion text + return QString(); + } + +QString GlxCommandHandlerComment::GetName(MGlxMediaList& aMediaList) const + { + // Create an iterator to retrieve the relevant attribute + TGlxSelectionIterator iterator; + // only want the title of one item + iterator.SetRange( 1 ); + CGlxAttributeContext* context = new( ELeave ) + CGlxAttributeContext( &iterator ); + CleanupStack::PushL( context ); + + // Want to read the title attribute + // Configure the context + context->AddAttributeL( KMPXMediaGeneralComment ); + + // Add the context to the media list + aMediaList.AddContextL( context, KGlxFetchContextPriorityBlocking ); + + // TGlxContextRemover will remove the context when it goes out of scope + // Used here to avoid a trap and still have safe cleanup + TGlxFetchContextRemover contextRemover( context, aMediaList ); + // put to cleanupstack as cleanupstack is emptied before stack objects + // are deleted + CleanupClosePushL( contextRemover ); + // Yuck - a leave and a return code! + // EFalse => don't show a progress dialog + TInt err = GlxAttributeRetriever::RetrieveL( *context, aMediaList, EFalse ); + // Using a distinct error value as "LeaveIfError( FuncL() );" looks bad + User::LeaveIfError( err ); + // context off the list + CleanupStack::PopAndDestroy( &contextRemover ); + + // Now get the title of the relevant item: if *an* item is selected use its + // title, otherwise use the item with focus + // Get the index of the item to rename + TInt index = KErrNotFound; + QString title = NULL; + // first see if there's a selected item... + if ( aMediaList.SelectionCount() == 1 ) + { + // Find the index of the selected item + index = aMediaList.Count(); + do + { + --index; + } + while ( !aMediaList.IsSelected( index ) && index > 0 ); + } + else + { + // Use the index of the item with focus + index = aMediaList.FocusIndex(); + } + + if ( index != KErrNotFound ) + { + // use iterator to get the right item + iterator.SetToFirst( &aMediaList ); + const CGlxMedia* media = aMediaList.Item( iterator++ ).Properties(); + if( media ) + { + // found the item's media properties, extract the title + const TDesC& titleDesc = media->ValueText(KMPXMediaGeneralComment); + title = QString::fromUtf16(titleDesc.Ptr(), + titleDesc.Length()); + } + } + CleanupStack::PopAndDestroy( context ); + + return title; + } + + diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlercropimage.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlercropimage.cpp Thu Jul 22 16:33:32 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: +* +*/ + +#include "glxcommandhandlercropimage.h" + +#include +#include +#include +#include +#include +#include +#include + + +GlxCommandHandlerCropImage::GlxCommandHandlerCropImage() : mReq(NULL) + { + //Nothing to do here for now + } + +GlxCommandHandlerCropImage::~GlxCommandHandlerCropImage() + { + delete mReq; + mReq = NULL; + } + +void GlxCommandHandlerCropImage::doHandleUserAction(GlxMediaModel* model, + QList /*indexList*/) const + { + const QString interface = QLatin1String("com.nokia.symbian.imageeditor"); + const QString operation = QLatin1String("view(QString,int)"); + const QString service = QLatin1String("PhotoEditor"); + + if(mReq == NULL) + { + //Connect to service provider + mReq = mAppmgr.create(service, interface, operation, true); + mReq->setEmbedded(true); + mReq->setSynchronous(true); + } + + if(mReq == NULL) + { + qDebug("QtSamplePhotos::launchPhotoEditor request not Created"); + return; + } + + //Get the file path for the item selected + QString imagePath = (model->data(model->index(model->data(model->index(0,0),GlxFocusIndexRole).value(),0),GlxUriRole)).value(); + + QList args; + args << imagePath; + args << EEditorHighwayFreeCrop; + mReq->setArguments(args); + + // Send the request + bool res = mReq->send(); + if (!res) + { + // Request failed. + qDebug("QtSamplePhotos::launchPhotoEditor request cannot be send"); + } + + } diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -15,10 +15,13 @@ * */ +#include "glxlocalisationstrings.h" + #include #include #include #include + #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "glxcommandhandlerdeleteTraces.h" @@ -71,7 +74,8 @@ } else { - retString = QString("Delete "); + + retString = GLX_DIALOG_DELETE_ONE_ITEM ; } return retString; } diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -28,6 +28,8 @@ #include #include #include + +#include "glxlocalisationstrings.h" #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "glxcommandhandlernewmediaTraces.h" @@ -61,12 +63,11 @@ CMPXCollectionPath* path = aMediaList.PathLC(NGlxListDefs::EPathParent); CMPXCommand* command = NULL; - QString title("NEW MEDIA"); - QString mainPane = GenerateNewMediaItemTitleL("Album",aMediaList); + QString mainPane = GenerateNewMediaItemTitleL(GLX_DIALOG_ALBUM_NAME_DEFAULT,aMediaList); bool ok = false; QString mediaTitle = NULL; GlxTextInputDialog* dlg = new GlxTextInputDialog(); - mediaTitle = dlg->getText(title, mainPane, &ok); + mediaTitle = dlg->getText(GLX_DIALOG_NAME_PROMPT, mainPane, &ok); delete dlg; iNewMediaCreationError = KErrNone; if (ok == true) diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -26,6 +26,7 @@ #include #include #include +#include "glxlocalisationstrings.h" GlxCommandHandlerRename::GlxCommandHandlerRename() { @@ -43,11 +44,10 @@ CMPXCommand* command = NULL; QString mainPane = GetName(aMediaList); - QString title("Rename"); QString mediaTitle = NULL; bool ok = false; GlxTextInputDialog* dlg = new GlxTextInputDialog(); - mediaTitle = dlg->getText(title, mainPane, &ok); + mediaTitle = dlg->getText(GLX_DIALOG_NAME_PROMPT, mainPane, &ok); delete dlg; if(ok == true) diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrotateimage.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrotateimage.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,91 @@ +/* +* 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 +#include +#include "glxcommandhandlerrotateimage.h" +#include +#include +#include +#include +#include + +GlxCommandHandlerRotateImage::GlxCommandHandlerRotateImage() : mReq(NULL) + { + //Nothing to do here + } + +GlxCommandHandlerRotateImage::~GlxCommandHandlerRotateImage() + { + delete mReq; + mReq = NULL; + } + +void GlxCommandHandlerRotateImage::executeCommand(int commandId,int collectionId, QList /*indexList*/) +//void GlxCommandHandlerRotateImage::doHandleUserAction(GlxMediaModel* model,QList indexList) const + { + const QString service = QLatin1String("PhotoEditor"); + const QString interface = QLatin1String("com.nokia.symbian.imageeditor"); + const QString operation = QLatin1String("view(QString,int)"); + + //Connect to service provider + if(mReq == NULL) + { + mReq = mAppmgr.create(service, interface, operation, true); + mReq->setEmbedded(true); + mReq->setSynchronous(true); + } + + if(mReq == NULL) + { + return; + } + + GlxModelParm modelParm (collectionId, 0); + GlxMediaModel* mediaModel = new GlxMediaModel (modelParm); + + //Get the file path for the item selected + QString imagePath = (mediaModel->data(mediaModel->index(mediaModel->data(mediaModel->index(0,0),GlxFocusIndexRole).value(),0),GlxUriRole)).value(); + delete mediaModel; + + QList args; + args << imagePath; + if(EGlxCmdRotateImgCW == commandId) + { + args << EEditorHighwayRotateCW; + } + else // if(EGlxCmdRotateImgCCW == aCommandId) + { + args << EEditorHighwayRotateCCW; + } + mReq->setArguments(args); + + // Send the request + bool res = mReq->send(); + if (!res) + { + // Request failed. + qDebug("QtSamplePhotos::launchPhotoEditor request cannot be send"); + } + } + +void GlxCommandHandlerRotateImage::doHandleUserAction(GlxMediaModel* /*model*/,QList /*indexList*/) const + { + //Dummy, to keepup with compiler errore + } diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -24,35 +24,35 @@ GlxCommandHandlerSend::GlxCommandHandlerSend() { - + mSendUiDialog = new ShareUi(); } GlxCommandHandlerSend::~GlxCommandHandlerSend() { - + delete mSendUiDialog; + mSendUiDialog =NULL; } void GlxCommandHandlerSend::doHandleUserAction(GlxMediaModel* model,QList indexList) const { - QList 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(),0),GlxUriRole)).value(); - fileList.append(QVariant(imagePath)); + fileList.append(imagePath); } else { for ( int i = 0; i < indexList.count(); i++) { imagePath = (model->data(indexList[i],GlxUriRole)).value(); - fileList.append(QVariant(imagePath)); + fileList.append(imagePath); } - } - ShareUi dialog; - dialog.init(fileList,true); + } + mSendUiDialog->send(fileList,true); } diff -r c9962d0368d9 -r 525c140ec8db ui/commandhandlers/eabi/glxcommoncommandhandlersu.def --- a/ui/commandhandlers/eabi/glxcommoncommandhandlersu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/commandhandlers/eabi/glxcommoncommandhandlersu.def Thu Jul 22 16:33:32 2010 +0100 @@ -27,66 +27,93 @@ _ZN23GlxCommandHandlerRotateD0Ev @ 26 NONAME _ZN23GlxCommandHandlerRotateD1Ev @ 27 NONAME _ZN23GlxCommandHandlerRotateD2Ev @ 28 NONAME - _ZN25GlxCommandHandlerNewMedia11HandleErrorEi @ 29 NONAME - _ZN25GlxCommandHandlerNewMedia11qt_metacallEN11QMetaObject4CallEiPPv @ 30 NONAME - _ZN25GlxCommandHandlerNewMedia11qt_metacastEPKc @ 31 NONAME - _ZN25GlxCommandHandlerNewMedia12HandleErrorLEi @ 32 NONAME - _ZN25GlxCommandHandlerNewMedia16HandleItemAddedLEiiP13MGlxMediaList @ 33 NONAME - _ZN25GlxCommandHandlerNewMedia16staticMetaObjectE @ 34 NONAME DATA 16 - _ZN25GlxCommandHandlerNewMedia19getStaticMetaObjectEv @ 35 NONAME - _ZN25GlxCommandHandlerNewMedia24DoHandleCommandCompleteLEPvP9CMPXMediaiP13MGlxMediaList @ 36 NONAME - _ZN25GlxCommandHandlerNewMedia9ExecuteLDER11TGlxMediaId @ 37 NONAME - _ZN25GlxCommandHandlerNewMediaC1Ev @ 38 NONAME - _ZN25GlxCommandHandlerNewMediaC2Ev @ 39 NONAME - _ZN25GlxCommandHandlerNewMediaD0Ev @ 40 NONAME - _ZN25GlxCommandHandlerNewMediaD1Ev @ 41 NONAME - _ZN25GlxCommandHandlerNewMediaD2Ev @ 42 NONAME - _ZN27GlxCommandHandlerRemoveFromC1Ev @ 43 NONAME - _ZN27GlxCommandHandlerRemoveFromC2Ev @ 44 NONAME - _ZN27GlxCommandHandlerRemoveFromD0Ev @ 45 NONAME - _ZN27GlxCommandHandlerRemoveFromD1Ev @ 46 NONAME - _ZN27GlxCommandHandlerRemoveFromD2Ev @ 47 NONAME - _ZN31GlxCommandHandlerAddToContainer15iSelectionCountE @ 48 NONAME DATA 4 - _ZN31GlxCommandHandlerAddToContainerC1Ev @ 49 NONAME - _ZN31GlxCommandHandlerAddToContainerC2Ev @ 50 NONAME - _ZN31GlxCommandHandlerAddToContainerD0Ev @ 51 NONAME - _ZN31GlxCommandHandlerAddToContainerD1Ev @ 52 NONAME - _ZN31GlxCommandHandlerAddToContainerD2Ev @ 53 NONAME - _ZNK21GlxCommandHandlerSend18doHandleUserActionEP13GlxMediaModel5QListI11QModelIndexE @ 54 NONAME - _ZNK23GlxCommandHandlerDelete13ProgressTextLEv @ 55 NONAME - _ZNK23GlxCommandHandlerDelete14CreateCommandLEiR13MGlxMediaListRi @ 56 NONAME - _ZNK23GlxCommandHandlerDelete15CompletionTextLEv @ 57 NONAME - _ZNK23GlxCommandHandlerDelete17ConfirmationTextLEb @ 58 NONAME - _ZNK23GlxCommandHandlerRename14CreateCommandLEiR13MGlxMediaListRi @ 59 NONAME - _ZNK23GlxCommandHandlerRename15CompletionTextLEv @ 60 NONAME - _ZNK23GlxCommandHandlerRename7GetNameER13MGlxMediaList @ 61 NONAME - _ZNK23GlxCommandHandlerRotate14CreateCommandLEiR13MGlxMediaListRi @ 62 NONAME - _ZNK25GlxCommandHandlerNewMedia10metaObjectEv @ 63 NONAME - _ZNK25GlxCommandHandlerNewMedia13ProgressTextLEv @ 64 NONAME - _ZNK25GlxCommandHandlerNewMedia14CreateCommandLEiR13MGlxMediaListRi @ 65 NONAME - _ZNK25GlxCommandHandlerNewMedia15CompletionTextLEv @ 66 NONAME - _ZNK25GlxCommandHandlerNewMedia26GenerateNewMediaItemTitleLE7QStringR13MGlxMediaList @ 67 NONAME - _ZNK27GlxCommandHandlerRemoveFrom13ProgressTextLEv @ 68 NONAME - _ZNK27GlxCommandHandlerRemoveFrom14CreateCommandLEiR13MGlxMediaListRi @ 69 NONAME - _ZNK27GlxCommandHandlerRemoveFrom15CompletionTextLEv @ 70 NONAME - _ZNK31GlxCommandHandlerAddToContainer13ProgressTextLEv @ 71 NONAME - _ZNK31GlxCommandHandlerAddToContainer14CreateCommandLEiR13MGlxMediaListRi @ 72 NONAME - _ZNK31GlxCommandHandlerAddToContainer14createNewMediaEv @ 73 NONAME - _ZNK31GlxCommandHandlerAddToContainer15CompletionTextLEv @ 74 NONAME - _ZTI21GlxCommandHandlerSend @ 75 NONAME - _ZTI23GlxCommandHandlerDelete @ 76 NONAME - _ZTI23GlxCommandHandlerRename @ 77 NONAME - _ZTI23GlxCommandHandlerRotate @ 78 NONAME - _ZTI25GlxCommandHandlerNewMedia @ 79 NONAME - _ZTI27GlxCommandHandlerRemoveFrom @ 80 NONAME - _ZTI31GlxCommandHandlerAddToContainer @ 81 NONAME - _ZTV21GlxCommandHandlerSend @ 82 NONAME - _ZTV23GlxCommandHandlerDelete @ 83 NONAME - _ZTV23GlxCommandHandlerRename @ 84 NONAME - _ZTV23GlxCommandHandlerRotate @ 85 NONAME - _ZTV25GlxCommandHandlerNewMedia @ 86 NONAME - _ZTV27GlxCommandHandlerRemoveFrom @ 87 NONAME - _ZTV31GlxCommandHandlerAddToContainer @ 88 NONAME - _ZThn8_N25GlxCommandHandlerNewMedia11HandleErrorEi @ 89 NONAME - _ZThn8_N25GlxCommandHandlerNewMedia16HandleItemAddedLEiiP13MGlxMediaList @ 90 NONAME + _ZN24GlxCommandHandlerCommentC1Ev @ 29 NONAME + _ZN24GlxCommandHandlerCommentC2Ev @ 30 NONAME + _ZN24GlxCommandHandlerCommentD0Ev @ 31 NONAME + _ZN24GlxCommandHandlerCommentD1Ev @ 32 NONAME + _ZN24GlxCommandHandlerCommentD2Ev @ 33 NONAME + _ZN25GlxCommandHandlerNewMedia11HandleErrorEi @ 34 NONAME + _ZN25GlxCommandHandlerNewMedia11qt_metacallEN11QMetaObject4CallEiPPv @ 35 NONAME + _ZN25GlxCommandHandlerNewMedia11qt_metacastEPKc @ 36 NONAME + _ZN25GlxCommandHandlerNewMedia12HandleErrorLEi @ 37 NONAME + _ZN25GlxCommandHandlerNewMedia16HandleItemAddedLEiiP13MGlxMediaList @ 38 NONAME + _ZN25GlxCommandHandlerNewMedia16staticMetaObjectE @ 39 NONAME DATA 16 + _ZN25GlxCommandHandlerNewMedia19getStaticMetaObjectEv @ 40 NONAME + _ZN25GlxCommandHandlerNewMedia24DoHandleCommandCompleteLEPvP9CMPXMediaiP13MGlxMediaList @ 41 NONAME + _ZN25GlxCommandHandlerNewMedia9ExecuteLDER11TGlxMediaId @ 42 NONAME + _ZN25GlxCommandHandlerNewMediaC1Ev @ 43 NONAME + _ZN25GlxCommandHandlerNewMediaC2Ev @ 44 NONAME + _ZN25GlxCommandHandlerNewMediaD0Ev @ 45 NONAME + _ZN25GlxCommandHandlerNewMediaD1Ev @ 46 NONAME + _ZN25GlxCommandHandlerNewMediaD2Ev @ 47 NONAME + _ZN26GlxCommandHandlerCropImageC1Ev @ 48 NONAME + _ZN26GlxCommandHandlerCropImageC2Ev @ 49 NONAME + _ZN26GlxCommandHandlerCropImageD0Ev @ 50 NONAME + _ZN26GlxCommandHandlerCropImageD1Ev @ 51 NONAME + _ZN26GlxCommandHandlerCropImageD2Ev @ 52 NONAME + _ZN27GlxCommandHandlerRemoveFromC1Ev @ 53 NONAME + _ZN27GlxCommandHandlerRemoveFromC2Ev @ 54 NONAME + _ZN27GlxCommandHandlerRemoveFromD0Ev @ 55 NONAME + _ZN27GlxCommandHandlerRemoveFromD1Ev @ 56 NONAME + _ZN27GlxCommandHandlerRemoveFromD2Ev @ 57 NONAME + _ZN28GlxCommandHandlerRotateImage14executeCommandEii5QListI11QModelIndexE @ 58 NONAME + _ZN28GlxCommandHandlerRotateImageC1Ev @ 59 NONAME + _ZN28GlxCommandHandlerRotateImageC2Ev @ 60 NONAME + _ZN28GlxCommandHandlerRotateImageD0Ev @ 61 NONAME + _ZN28GlxCommandHandlerRotateImageD1Ev @ 62 NONAME + _ZN28GlxCommandHandlerRotateImageD2Ev @ 63 NONAME + _ZN31GlxCommandHandlerAddToContainer15iSelectionCountE @ 64 NONAME DATA 4 + _ZN31GlxCommandHandlerAddToContainerC1Ev @ 65 NONAME + _ZN31GlxCommandHandlerAddToContainerC2Ev @ 66 NONAME + _ZN31GlxCommandHandlerAddToContainerD0Ev @ 67 NONAME + _ZN31GlxCommandHandlerAddToContainerD1Ev @ 68 NONAME + _ZN31GlxCommandHandlerAddToContainerD2Ev @ 69 NONAME + _ZNK21GlxCommandHandlerSend18doHandleUserActionEP13GlxMediaModel5QListI11QModelIndexE @ 70 NONAME + _ZNK23GlxCommandHandlerDelete13ProgressTextLEv @ 71 NONAME + _ZNK23GlxCommandHandlerDelete14CreateCommandLEiR13MGlxMediaListRi @ 72 NONAME + _ZNK23GlxCommandHandlerDelete15CompletionTextLEv @ 73 NONAME + _ZNK23GlxCommandHandlerDelete17ConfirmationTextLEb @ 74 NONAME + _ZNK23GlxCommandHandlerRename14CreateCommandLEiR13MGlxMediaListRi @ 75 NONAME + _ZNK23GlxCommandHandlerRename15CompletionTextLEv @ 76 NONAME + _ZNK23GlxCommandHandlerRename7GetNameER13MGlxMediaList @ 77 NONAME + _ZNK23GlxCommandHandlerRotate14CreateCommandLEiR13MGlxMediaListRi @ 78 NONAME + _ZNK24GlxCommandHandlerComment14CreateCommandLEiR13MGlxMediaListRi @ 79 NONAME + _ZNK24GlxCommandHandlerComment15CompletionTextLEv @ 80 NONAME + _ZNK24GlxCommandHandlerComment7GetNameER13MGlxMediaList @ 81 NONAME + _ZNK25GlxCommandHandlerNewMedia10metaObjectEv @ 82 NONAME + _ZNK25GlxCommandHandlerNewMedia13ProgressTextLEv @ 83 NONAME + _ZNK25GlxCommandHandlerNewMedia14CreateCommandLEiR13MGlxMediaListRi @ 84 NONAME + _ZNK25GlxCommandHandlerNewMedia15CompletionTextLEv @ 85 NONAME + _ZNK25GlxCommandHandlerNewMedia26GenerateNewMediaItemTitleLE7QStringR13MGlxMediaList @ 86 NONAME + _ZNK26GlxCommandHandlerCropImage18doHandleUserActionEP13GlxMediaModel5QListI11QModelIndexE @ 87 NONAME + _ZNK27GlxCommandHandlerRemoveFrom13ProgressTextLEv @ 88 NONAME + _ZNK27GlxCommandHandlerRemoveFrom14CreateCommandLEiR13MGlxMediaListRi @ 89 NONAME + _ZNK27GlxCommandHandlerRemoveFrom15CompletionTextLEv @ 90 NONAME + _ZNK28GlxCommandHandlerRotateImage18doHandleUserActionEP13GlxMediaModel5QListI11QModelIndexE @ 91 NONAME + _ZNK31GlxCommandHandlerAddToContainer13ProgressTextLEv @ 92 NONAME + _ZNK31GlxCommandHandlerAddToContainer14CreateCommandLEiR13MGlxMediaListRi @ 93 NONAME + _ZNK31GlxCommandHandlerAddToContainer14createNewMediaEv @ 94 NONAME + _ZNK31GlxCommandHandlerAddToContainer15CompletionTextLEv @ 95 NONAME + _ZTI21GlxCommandHandlerSend @ 96 NONAME + _ZTI23GlxCommandHandlerDelete @ 97 NONAME + _ZTI23GlxCommandHandlerRename @ 98 NONAME + _ZTI23GlxCommandHandlerRotate @ 99 NONAME + _ZTI24GlxCommandHandlerComment @ 100 NONAME + _ZTI25GlxCommandHandlerNewMedia @ 101 NONAME + _ZTI26GlxCommandHandlerCropImage @ 102 NONAME + _ZTI27GlxCommandHandlerRemoveFrom @ 103 NONAME + _ZTI28GlxCommandHandlerRotateImage @ 104 NONAME + _ZTI31GlxCommandHandlerAddToContainer @ 105 NONAME + _ZTV21GlxCommandHandlerSend @ 106 NONAME + _ZTV23GlxCommandHandlerDelete @ 107 NONAME + _ZTV23GlxCommandHandlerRename @ 108 NONAME + _ZTV23GlxCommandHandlerRotate @ 109 NONAME + _ZTV24GlxCommandHandlerComment @ 110 NONAME + _ZTV25GlxCommandHandlerNewMedia @ 111 NONAME + _ZTV26GlxCommandHandlerCropImage @ 112 NONAME + _ZTV27GlxCommandHandlerRemoveFrom @ 113 NONAME + _ZTV28GlxCommandHandlerRotateImage @ 114 NONAME + _ZTV31GlxCommandHandlerAddToContainer @ 115 NONAME + _ZThn8_N25GlxCommandHandlerNewMedia11HandleErrorEi @ 116 NONAME + _ZThn8_N25GlxCommandHandlerNewMedia16HandleItemAddedLEiiP13MGlxMediaList @ 117 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/bwins/detailsdescriptioneditu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/bwins/detailsdescriptioneditu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,18 @@ +EXPORTS + ?qt_metacall@GlxDetailsDescriptionEdit@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1 NONAME ; int GlxDetailsDescriptionEdit::qt_metacall(enum QMetaObject::Call, int, void * *) + ?qt_metacast@GlxDetailsDescriptionEdit@@UAEPAXPBD@Z @ 2 NONAME ; void * GlxDetailsDescriptionEdit::qt_metacast(char const *) + ??1GlxDetailsDescriptionEdit@@UAE@XZ @ 3 NONAME ; GlxDetailsDescriptionEdit::~GlxDetailsDescriptionEdit(void) + ?staticMetaObject@GlxDetailsDescriptionEdit@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const GlxDetailsDescriptionEdit::staticMetaObject + ??0GlxDetailsDescriptionEdit@@QAE@PAVQGraphicsItem@@@Z @ 5 NONAME ; GlxDetailsDescriptionEdit::GlxDetailsDescriptionEdit(class QGraphicsItem *) + ?tr@GlxDetailsDescriptionEdit@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString GlxDetailsDescriptionEdit::tr(char const *, char const *, int) + ??_EGlxDetailsDescriptionEdit@@UAE@I@Z @ 7 NONAME ; GlxDetailsDescriptionEdit::~GlxDetailsDescriptionEdit(unsigned int) + ?labelPressed@GlxDetailsDescriptionEdit@@IAEXXZ @ 8 NONAME ; void GlxDetailsDescriptionEdit::labelPressed(void) + ?metaObject@GlxDetailsDescriptionEdit@@UBEPBUQMetaObject@@XZ @ 9 NONAME ; struct QMetaObject const * GlxDetailsDescriptionEdit::metaObject(void) const + ?focusInEvent@GlxDetailsDescriptionEdit@@MAEXPAVQFocusEvent@@@Z @ 10 NONAME ; void GlxDetailsDescriptionEdit::focusInEvent(class QFocusEvent *) + ?trUtf8@GlxDetailsDescriptionEdit@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString GlxDetailsDescriptionEdit::trUtf8(char const *, char const *, int) + ?focusOutEvent@GlxDetailsDescriptionEdit@@MAEXPAVQFocusEvent@@@Z @ 12 NONAME ; void GlxDetailsDescriptionEdit::focusOutEvent(class QFocusEvent *) + ?tr@GlxDetailsDescriptionEdit@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString GlxDetailsDescriptionEdit::tr(char const *, char const *) + ?getStaticMetaObject@GlxDetailsDescriptionEdit@@SAABUQMetaObject@@XZ @ 14 NONAME ; struct QMetaObject const & GlxDetailsDescriptionEdit::getStaticMetaObject(void) + ?setItemText@GlxDetailsDescriptionEdit@@QAEXABVQString@@@Z @ 15 NONAME ; void GlxDetailsDescriptionEdit::setItemText(class QString const &) + ?trUtf8@GlxDetailsDescriptionEdit@@SA?AVQString@@PBD0@Z @ 16 NONAME ; class QString GlxDetailsDescriptionEdit::trUtf8(char const *, char const *) + diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/bwins/detailsnamelabelu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/bwins/detailsnamelabelu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,18 @@ +EXPORTS + ??_EGlxDetailsNameLabel@@UAE@I@Z @ 1 NONAME ; GlxDetailsNameLabel::~GlxDetailsNameLabel(unsigned int) + ??1GlxDetailsNameLabel@@UAE@XZ @ 2 NONAME ; GlxDetailsNameLabel::~GlxDetailsNameLabel(void) + ?tr@GlxDetailsNameLabel@@SA?AVQString@@PBD0@Z @ 3 NONAME ; class QString GlxDetailsNameLabel::tr(char const *, char const *) + ?mousePressEvent@GlxDetailsNameLabel@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 4 NONAME ; void GlxDetailsNameLabel::mousePressEvent(class QGraphicsSceneMouseEvent *) + ?metaObject@GlxDetailsNameLabel@@UBEPBUQMetaObject@@XZ @ 5 NONAME ; struct QMetaObject const * GlxDetailsNameLabel::metaObject(void) const + ?getStaticMetaObject@GlxDetailsNameLabel@@SAABUQMetaObject@@XZ @ 6 NONAME ; struct QMetaObject const & GlxDetailsNameLabel::getStaticMetaObject(void) + ?staticMetaObject@GlxDetailsNameLabel@@2UQMetaObject@@B @ 7 NONAME ; struct QMetaObject const GlxDetailsNameLabel::staticMetaObject + ?qt_metacall@GlxDetailsNameLabel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 8 NONAME ; int GlxDetailsNameLabel::qt_metacall(enum QMetaObject::Call, int, void * *) + ??0GlxDetailsNameLabel@@QAE@PAVQGraphicsItem@@@Z @ 9 NONAME ; GlxDetailsNameLabel::GlxDetailsNameLabel(class QGraphicsItem *) + ?labelPressed@GlxDetailsNameLabel@@IAEXXZ @ 10 NONAME ; void GlxDetailsNameLabel::labelPressed(void) + ?setItemText@GlxDetailsNameLabel@@QAEXABVQString@@@Z @ 11 NONAME ; void GlxDetailsNameLabel::setItemText(class QString const &) + ?mouseReleaseEvent@GlxDetailsNameLabel@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 12 NONAME ; void GlxDetailsNameLabel::mouseReleaseEvent(class QGraphicsSceneMouseEvent *) + ?trUtf8@GlxDetailsNameLabel@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString GlxDetailsNameLabel::trUtf8(char const *, char const *, int) + ?trUtf8@GlxDetailsNameLabel@@SA?AVQString@@PBD0@Z @ 14 NONAME ; class QString GlxDetailsNameLabel::trUtf8(char const *, char const *) + ?tr@GlxDetailsNameLabel@@SA?AVQString@@PBD0H@Z @ 15 NONAME ; class QString GlxDetailsNameLabel::tr(char const *, char const *, int) + ?qt_metacast@GlxDetailsNameLabel@@UAEPAXPBD@Z @ 16 NONAME ; void * GlxDetailsNameLabel::qt_metacast(char const *) + diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailscustomwidget.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailscustomwidget.pro Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,24 @@ +#/* +#* 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 +SUBDIRS += detailsnamelabel +SUBDIRS += detailsnamelabelplugin +SUBDIRS += detailsdescriptionedit +SUBDIRS += detailsdescriptioneditplugin +CONFIG += ordered \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsdescriptionedit/detailsdescriptionedit.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsdescriptionedit/detailsdescriptionedit.pro Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,61 @@ +#/* +#* 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 = detailsdescriptionedit +CONFIG += hb +DEFINES += BUILD_DESCEDIT + +win32{ +CONFIG(release, debug|release){ + TARGET = detailsdescriptionedit + DESTDIR = ../release # for easy plugin loading +}else{ + TARGET = detailsdescriptioneditd + DESTDIR = ../debug # for easy plugin loading + } +} + +DEPENDPATH += ./inc \ + ./src + +INCLUDEPATH += ./inc + +SOURCES += \ + glxdetailsdescriptionedit.cpp + +HEADERS += \ + glxdetailsdescriptionedit.h + +symbian { + TARGET.UID3 = 0x200071B9 + TARGET.EPOCALLOWDLLDATA = 1 + TARGET.CAPABILITY = CAP_GENERAL_DLL + MMP_RULES += SMPSAFE + LIBS += -lbafl +} + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/detailsdescriptionedit.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/detailsdescriptionedit.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock +# End of file --Don't remove this diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsdescriptionedit/inc/glxdetailsdescriptionedit.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsdescriptionedit/inc/glxdetailsdescriptionedit.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,50 @@ +/* +* 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: This is custom widget for details view in photos for displaying the description of image . +* +*/ + +#ifndef GlXDETAILSDESCEDIT_H +#define GlXDETAILSDESCEDIT_H + +#include + +#ifdef BUILD_DESCEDIT +#define MY_EXPORT Q_DECL_EXPORT +#else +#define MY_EXPORT Q_DECL_IMPORT +#endif + +class HbEditorInterface; +class MY_EXPORT GlxDetailsDescriptionEdit : public HbTextEdit +{ + Q_OBJECT + +public: + GlxDetailsDescriptionEdit(QGraphicsItem *parent = NULL); + ~GlxDetailsDescriptionEdit(); + void setItemText( const QString &text ); + +protected: + void focusInEvent (QFocusEvent *event) ; + void focusOutEvent (QFocusEvent *event) ; + + +signals : + void labelPressed(); +private: + HbEditorInterface *mDesc; +}; + +#endif // GlXDETAILSDESCEDIT_H diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsdescriptionedit/src/glxdetailsdescriptionedit.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsdescriptionedit/src/glxdetailsdescriptionedit.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,66 @@ +/* +* 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: This is custom widget for details view in photos for displaying the description of image . +* +*/ + + + +#include "glxdetailsdescriptionedit.h" +#include +#include + + + +void GlxDetailsDescriptionEdit::focusInEvent (QFocusEvent *event) + { + if(event->reason() == Qt::MouseFocusReason ) + { + event->setAccepted(TRUE); + emit labelPressed(); + } + + } +void GlxDetailsDescriptionEdit::focusOutEvent (QFocusEvent *event) + { + event->setAccepted(TRUE); + } + + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//GlxDetailsDescLabel +//-------------------------------------------------------------------------------------------------------------------------------------------- +GlxDetailsDescriptionEdit::GlxDetailsDescriptionEdit(QGraphicsItem *parent) : HbTextEdit( parent ) +{ + setAlignment(Qt::AlignLeft); + mDesc = new HbEditorInterface(this); + mDesc->setInputConstraints (HbEditorConstraintIgnoreFocus); +} + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//~GlxDetailsDescLabel +//-------------------------------------------------------------------------------------------------------------------------------------------- +GlxDetailsDescriptionEdit::~GlxDetailsDescriptionEdit() +{ + delete mDesc; + mDesc = NULL; +} + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//setItemText +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsDescriptionEdit::setItemText( const QString &text ) +{ + setPlainText( text ); +} diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsdescriptioneditplugin/detailsdescriptioneditplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsdescriptioneditplugin/detailsdescriptioneditplugin.pro Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,69 @@ +#/* +#* 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 = detailsdescriptioneditplugin + +win32{ +CONFIG(release, debug|release){ + TARGET = detailsdescriptioneditplugin + } else { + TARGET = detailsdescriptioneditplugind + } +} + +CONFIG += hb plugin + +win32{ +CONFIG(release, debug|release){ + DESTDIR = ../release # for easy plugin loading + LIBS += -L../release -ldetailsdescriptionedit + } else { + DESTDIR = ../debug # for easy plugin loading + LIBS += -L../debug -ldetailsdescriptioneditd + } +} + +SOURCES += \ + main.cpp + +INCLUDEPATH += \ + ../detailsdescriptionedit \ + ../detailsdescriptionedit/inc + +symbian: { + TARGET.UID3 = 0x2000A774 + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = CAP_GENERAL_DLL + MMP_RULES += SMPSAFE + + + LIBS += \ + -ldetailsdescriptionedit.dll + + pluginstub.sources = detailsdescriptioneditplugin.dll + pluginstub.path = /resource/plugins + DEPLOYMENT += pluginstub + DESTDIR = $$HB_PLUGINS_DIR +} + +!local { + target.path = $$HB_PLUGINS_DIR + INSTALLS += target +} + +# End of file --Don't remove this. diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsdescriptioneditplugin/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsdescriptioneditplugin/main.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,49 @@ +/* +* 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 "glxdetailsdescriptionedit.h" +#include +#include + +class GlxDetailsDescriptionEditPlugin : public HbDocumentLoaderPlugin +{ +public: + QObject *createObject(const QString& type, const QString &name); + QList supportedObjects(); +}; +Q_EXPORT_PLUGIN(GlxDetailsDescriptionEditPlugin) + +QObject *GlxDetailsDescriptionEditPlugin::createObject(const QString& type, const QString &name ) +{ + if( type == GlxDetailsDescriptionEdit::staticMetaObject.className() ) { + QObject *object = new GlxDetailsDescriptionEdit(); + object->setObjectName(name); + return object; + } + return 0; +} + +QList GlxDetailsDescriptionEditPlugin::supportedObjects() +{ + QList result; + result.append( &GlxDetailsDescriptionEdit::staticMetaObject ); + return result; +} + +// end of file + diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsnamelabel/detailsnamelabel.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsnamelabel/detailsnamelabel.pro Thu Jul 22 16:33:32 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: +#* +#*/ + +TEMPLATE = lib +TARGET = detailsnamelabel +CONFIG += hb +DEFINES += BUILD_NAMELABEL + +win32{ +CONFIG(release, debug|release){ + TARGET = detailsnamelabel + DESTDIR = ../release # for easy plugin loading +}else{ + TARGET = detailsnamelabeld + DESTDIR = ../debug # for easy plugin loading + } +} + +DEPENDPATH += ./inc \ + ./src + +INCLUDEPATH += ./inc + +SOURCES += \ + glxdetailsnamelabel.cpp + +HEADERS += \ + glxdetailsnamelabel.h + +symbian { + TARGET.UID3 = 0x2000A7BC + TARGET.EPOCALLOWDLLDATA = 1 + TARGET.CAPABILITY = CAP_GENERAL_DLL + MMP_RULES += SMPSAFE + + LIBS += -lbafl +} + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/detailsnamelabel.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/detailsnamelabel.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + +# End of file --Don't remove this diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsnamelabel/inc/glxdetailsnamelabel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsnamelabel/inc/glxdetailsnamelabel.h Thu Jul 22 16:33:32 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: ?Description +* +*/ + +#ifndef GlXDETAILSNAMELABEL_H +#define GlXDETAILSNAMELABEL_H + +#include + +#ifdef BUILD_NAMELABEL +#define MY_EXPORT Q_DECL_EXPORT +#else +#define MY_EXPORT Q_DECL_IMPORT +#endif + + +class MY_EXPORT GlxDetailsNameLabel : public HbLabel +{ + Q_OBJECT + +public: + GlxDetailsNameLabel(QGraphicsItem *parent = NULL); + ~GlxDetailsNameLabel(); + void setItemText( const QString &text ); + +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent (QGraphicsSceneMouseEvent *event); + +signals : + void labelPressed(); + +}; + +#endif // GlXDETAILSNAMELABEL_H diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsnamelabel/src/glxdetailsnamelabel.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsnamelabel/src/glxdetailsnamelabel.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,67 @@ +/* +* 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 +#include "glxdetailsnamelabel.h" +#include +#include + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//mousePressEvent +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsNameLabel::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Q_UNUSED(event) +} + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//mouseReleaseEvent +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsNameLabel::mouseReleaseEvent (QGraphicsSceneMouseEvent *event) +{ + qDebug("GlxDetailsNameLabel::mouseReleaseEvent"); + Q_UNUSED(event) + emit labelPressed(); +} + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//GlxDetailsNameLabel +//-------------------------------------------------------------------------------------------------------------------------------------------- +GlxDetailsNameLabel::GlxDetailsNameLabel(QGraphicsItem *parent) : HbLabel( parent ) +{ + qDebug("GlxDetailsNameLabel::GlxDetailsNameLabel"); + setTextWrapping(Hb::TextWordWrap); + setAlignment(Qt::AlignHCenter); +} + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//~GlxDetailsCustomLabel +//-------------------------------------------------------------------------------------------------------------------------------------------- +GlxDetailsNameLabel::~GlxDetailsNameLabel() +{ + +} + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//setItemText +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsNameLabel::setItemText( const QString &text ) +{ + qDebug("GlxDetailsNameLabel::setItemText"); + setHtml(text); +} diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsnamelabelplugin/detailsnamelabelplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsnamelabelplugin/detailsnamelabelplugin.pro Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,69 @@ +#/* +#* 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 = detailsnamelabelplugin + +win32{ +CONFIG(release, debug|release){ + TARGET = detailsnamelabelplugin + } else { + TARGET = detailsnamelabelplugind + } +} + +CONFIG += hb plugin + +win32{ +CONFIG(release, debug|release){ + DESTDIR = ../release # for easy plugin loading + LIBS += -L../release -ldetailsnamelabel + } else { + DESTDIR = ../debug # for easy plugin loading + LIBS += -L../debug -ldetailsnamelabeld + } +} + +SOURCES += \ + main.cpp + +INCLUDEPATH += \ + ../detailsnamelabel \ + ../detailsnamelabel/inc + +symbian: { + TARGET.UID3 = 0x200071B7 + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = CAP_GENERAL_DLL + MMP_RULES += SMPSAFE + + + LIBS += \ + -ldetailsnamelabel.dll + + pluginstub.sources = detailsnamelabelplugin.dll + pluginstub.path = /resource/plugins + DEPLOYMENT += pluginstub + DESTDIR = $$HB_PLUGINS_DIR +} + +!local { + target.path = $$HB_PLUGINS_DIR + INSTALLS += target +} + +# End of file --Don't remove this. diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/detailsnamelabelplugin/main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/detailsnamelabelplugin/main.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,54 @@ +/* +* 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 "glxdetailsnamelabel.h" +#include +#include +#include + +class GlxDetailsNameLabelPlugin : public HbDocumentLoaderPlugin +{ +public: + QObject *createObject(const QString& type, const QString &name); + QList supportedObjects(); +}; +Q_EXPORT_PLUGIN(GlxDetailsNameLabelPlugin) + +QObject *GlxDetailsNameLabelPlugin::createObject(const QString& type, const QString &name ) +{ + qDebug("GlxDetailsNameLabelPlugin::createObject"); + if( type == GlxDetailsNameLabel::staticMetaObject.className() ) { + + qDebug("GlxDetailsNameLabelPlugin::createObject created"); + QObject *object = new GlxDetailsNameLabel(); + object->setObjectName(name); + return object; + } + return 0; +} + +QList GlxDetailsNameLabelPlugin::supportedObjects() +{ + qDebug("GlxDetailsNameLabelPlugin::supportedObjects"); + QList result; + result.append( &GlxDetailsNameLabel::staticMetaObject ); + return result; +} + +// end of file + diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/eabi/detailsdescriptioneditu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/eabi/detailsdescriptioneditu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,24 @@ +EXPORTS + _ZN25GlxDetailsDescriptionEdit11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME + _ZN25GlxDetailsDescriptionEdit11qt_metacastEPKc @ 2 NONAME + _ZN25GlxDetailsDescriptionEdit11setItemTextERK7QString @ 3 NONAME + _ZN25GlxDetailsDescriptionEdit12focusInEventEP11QFocusEvent @ 4 NONAME + _ZN25GlxDetailsDescriptionEdit12labelPressedEv @ 5 NONAME + _ZN25GlxDetailsDescriptionEdit13focusOutEventEP11QFocusEvent @ 6 NONAME + _ZN25GlxDetailsDescriptionEdit16staticMetaObjectE @ 7 NONAME DATA 16 + _ZN25GlxDetailsDescriptionEdit19getStaticMetaObjectEv @ 8 NONAME + _ZN25GlxDetailsDescriptionEditC1EP13QGraphicsItem @ 9 NONAME + _ZN25GlxDetailsDescriptionEditC2EP13QGraphicsItem @ 10 NONAME + _ZN25GlxDetailsDescriptionEditD0Ev @ 11 NONAME + _ZN25GlxDetailsDescriptionEditD1Ev @ 12 NONAME + _ZN25GlxDetailsDescriptionEditD2Ev @ 13 NONAME + _ZNK25GlxDetailsDescriptionEdit10metaObjectEv @ 14 NONAME + _ZTI25GlxDetailsDescriptionEdit @ 15 NONAME + _ZTV25GlxDetailsDescriptionEdit @ 16 NONAME + _ZThn16_N25GlxDetailsDescriptionEditD0Ev @ 17 NONAME + _ZThn16_N25GlxDetailsDescriptionEditD1Ev @ 18 NONAME + _ZThn8_N25GlxDetailsDescriptionEdit12focusInEventEP11QFocusEvent @ 19 NONAME + _ZThn8_N25GlxDetailsDescriptionEdit13focusOutEventEP11QFocusEvent @ 20 NONAME + _ZThn8_N25GlxDetailsDescriptionEditD0Ev @ 21 NONAME + _ZThn8_N25GlxDetailsDescriptionEditD1Ev @ 22 NONAME + diff -r c9962d0368d9 -r 525c140ec8db ui/detailscustomwidget/eabi/detailsnamelabelu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/detailscustomwidget/eabi/detailsnamelabelu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,24 @@ +EXPORTS + _ZN19GlxDetailsNameLabel11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME + _ZN19GlxDetailsNameLabel11qt_metacastEPKc @ 2 NONAME + _ZN19GlxDetailsNameLabel11setItemTextERK7QString @ 3 NONAME + _ZN19GlxDetailsNameLabel12labelPressedEv @ 4 NONAME + _ZN19GlxDetailsNameLabel15mousePressEventEP24QGraphicsSceneMouseEvent @ 5 NONAME + _ZN19GlxDetailsNameLabel16staticMetaObjectE @ 6 NONAME DATA 16 + _ZN19GlxDetailsNameLabel17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 7 NONAME + _ZN19GlxDetailsNameLabel19getStaticMetaObjectEv @ 8 NONAME + _ZN19GlxDetailsNameLabelC1EP13QGraphicsItem @ 9 NONAME + _ZN19GlxDetailsNameLabelC2EP13QGraphicsItem @ 10 NONAME + _ZN19GlxDetailsNameLabelD0Ev @ 11 NONAME + _ZN19GlxDetailsNameLabelD1Ev @ 12 NONAME + _ZN19GlxDetailsNameLabelD2Ev @ 13 NONAME + _ZNK19GlxDetailsNameLabel10metaObjectEv @ 14 NONAME + _ZTI19GlxDetailsNameLabel @ 15 NONAME + _ZTV19GlxDetailsNameLabel @ 16 NONAME + _ZThn16_N19GlxDetailsNameLabelD0Ev @ 17 NONAME + _ZThn16_N19GlxDetailsNameLabelD1Ev @ 18 NONAME + _ZThn8_N19GlxDetailsNameLabel15mousePressEventEP24QGraphicsSceneMouseEvent @ 19 NONAME + _ZThn8_N19GlxDetailsNameLabel17mouseReleaseEventEP24QGraphicsSceneMouseEvent @ 20 NONAME + _ZThn8_N19GlxDetailsNameLabelD0Ev @ 21 NONAME + _ZThn8_N19GlxDetailsNameLabelD1Ev @ 22 NONAME + diff -r c9962d0368d9 -r 525c140ec8db ui/eabi/glxviewsu.def --- a/ui/eabi/glxviewsu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/eabi/glxviewsu.def Thu Jul 22 16:33:32 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 diff -r c9962d0368d9 -r 525c140ec8db ui/eabi/glxviewutilitiesu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/eabi/glxviewutilitiesu.def Thu Jul 22 16:33:32 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 + diff -r c9962d0368d9 -r 525c140ec8db ui/inc/glxcommandhandlers.hrh --- a/ui/inc/glxcommandhandlers.hrh Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/inc/glxcommandhandlers.hrh Thu Jul 22 16:33:32 2010 +0100 @@ -115,6 +115,10 @@ EGlxCmdContextSend, EGlxCmdContextRename, EGlxCmdSetupItem, + EGlxCmdComment, + EGlxCmdRotateImgCW, + EGlxCmdRotateImgCCW, + EGlxCmdRotateImgCrop, EGlxCmdAiwBase = 0x6000 }; diff -r c9962d0368d9 -r 525c140ec8db ui/inc/glxdocloaderdefs.h --- a/ui/inc/glxdocloaderdefs.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/inc/glxdocloaderdefs.h Thu Jul 22 16:33:32 2010 +0100 @@ -27,8 +27,10 @@ #define GLXFULLSCREEN_TOOLBAR "toolBar" #define GLXFULLSCREENLSSECTION "landscape" #define GLXFULLSCREENPTSECTION "portrait" +#define GLXFULLSCREENZOOMWIDGET "glxZoomWidget" #define GLXFULLSCREENDOCMLPATH ":/data/fullscreen.docml" + //SLIDE SHOW #define GLXSLIDESHOW_VIEW "mglxslideshow" #define GLXSLIDESHOW_WIDGET "mslideshowwidget" @@ -47,4 +49,19 @@ #define GLX_LISTVIEW_LIST "listview" #define GLX_LISTVIEW_DOCMLPATH ":/data/listview.docml" +//DETAILS VIEW +#define GLX_DETAILSVIEW_DOCMLPATH ":/data/detailsview.docml" +#define GLX_DETAILSVIEW_VIEW "view" +#define GLX_DETAILSVIEW_IMAGE "ImageIcon" +#define GLX_DETAILSVIEW_FAVICON "FavIcon" +#define GLX_DETAILSVIEW_IMGNAME "ImageName" +#define GLX_DETAILSVIEW_DATETEXT "DateText" +#define GLX_DETAILSVIEW_SIZETEXT "SizeText" +#define GLX_DETAILSVIEW_TIMETEXT "TimeText" +#define GLX_DETAILSVIEW_DESCRPTION "Descriptions" +#define GLX_DETAILSVIEW_DESCRPTIONTEXT "DescriptionsText" +#define GLX_DETAILSVIEW_LSSECTION "landscape" +#define GLX_DETAILSVIEW_PTSECTION "portrait" + + #endif /* GLXDOCLOADERDEFS_H */ diff -r c9962d0368d9 -r 525c140ec8db ui/inc/glxicondefs.h --- a/ui/inc/glxicondefs.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/inc/glxicondefs.h Thu Jul 22 16:33:32 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 */ diff -r c9962d0368d9 -r 525c140ec8db ui/inc/glxmodelparm.h --- a/ui/inc/glxmodelparm.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/inc/glxmodelparm.h Thu Jul 22 16:33:32 2010 +0100 @@ -22,29 +22,7 @@ #include #include - -enum -{ - GlxHgVisibilityRole = Qt::UserRole + 1, // VisibilityRole For MediaWall , Dont Change This Value - Depedency To HgWidget - GlxFsImageRole, //to get the fullscreen image - GlxContextRole, //to get and set the context - GlxFocusIndexRole, //to get and set the selected item index - GlxVisualWindowIndex, //to set the visual window index in media list - GlxUriRole, //to get the URI of the image - GlxDimensionsRole, - GlxSelectedIndexRole, //to get and set the seleceted item list - GlxDateRole, //to get the image created or modified date - GlxFrameCount, //to get the number of frame in an image - GlxSubStateRole, //to publish the sub state of a SM states - GlxHdmiBitmap, //to get the pre decoded thumbnail for HDMI - GlxListItemCount, //to get the number of item in the album list - GlxSystemItemRole, //to get the item is system item or not - 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 -}; - +#include class GlxModelParm { diff -r c9962d0368d9 -r 525c140ec8db ui/inc/glxmodelroles.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/inc/glxmodelroles.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,52 @@ +/* +* 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 GLXMODELROLES_H +#define GLXMODELROLES_H +enum +{ + GlxHgVisibilityRole = Qt::UserRole + 1, // VisibilityRole For MediaWall , Dont Change This Value - Depedency To HgWidget + GlxFsImageRole, //to get the fullscreen image + GlxContextRole, //to get and set the context + GlxFocusIndexRole, //to get and set the selected item index + GlxVisualWindowIndex, //to set the visual window index in media list + GlxUriRole, //to get the URI of the image + GlxDimensionsRole, + GlxSelectedIndexRole, //to get and set the seleceted item list + GlxDateRole, //to get the image created or modified date + GlxFrameCount, //to get the number of frame in an image + GlxSubStateRole, //to publish the sub state of a SM states + GlxHdmiBitmap, //to get the pre decoded thumbnail for HDMI + GlxListItemCount, //to get the number of item in the album list + GlxSystemItemRole, //to get the item is system item or not + 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 + GlxViewTitle, + GlxPopulated, + GlxTimeRole, //to get the time image was modified + GlxSizeRole, //to get the size of the image + GlxDescRole, //to get the description of the images + GlxRemoveContextRole, //to remove the context + GlxTempVisualWindowIndex //to store the visual index obtained from AM temporarily +}; + + +#endif diff -r c9962d0368d9 -r 525c140ec8db ui/inc/glxuistd.h --- a/ui/inc/glxuistd.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/inc/glxuistd.h Thu Jul 22 16:33:32 2010 +0100 @@ -41,7 +41,8 @@ GlxContextLsList, GlxContextPtList, GlxContextSelectionList, - GlxContextFavorite + GlxContextFavorite, + GlxContextComment //to fetch the description }; enum GlxTBContextType @@ -56,9 +57,10 @@ typedef enum { NO_EFFECT, - WAVE_EFFECT, + FLIP_EFFECT, SMOOTH_FADE, ZOOM_TO_FACE, + HELIX_EFFECT, TRANSITION_EFFECT, FADE_EFFECT, GRID_TO_FULLSCREEN, @@ -127,5 +129,9 @@ // video playback view UID const TInt KGlxVideoPlaybackviewPlugin = 0x2000A7B3; +//Constants for ci_photos.confml +const TUint32 KGlxCi_UidGallery = 0x20007193; +const TInt KGlxOperatorLink = 0x1; +const TInt KGlxOvi = 0x2; #endif // GLXUISTD_H diff -r c9962d0368d9 -r 525c140ec8db ui/inc/glxviewids.h --- a/ui/inc/glxviewids.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/inc/glxviewids.h Thu Jul 22 16:33:32 2010 +0100 @@ -28,26 +28,42 @@ #define GLX_SLIDESHOWSETTINGSVIEW_ID 0x12121217 +/* + * For the non ui component, only sub state is expose in the model + * so it is required to have unique substrate of states + * Add the new sub state in between NO and Max + * and take care uniqueness of all these substrate + */ typedef enum { - NO_GRID_S, + NO_GRID_S = 0, ALL_ITEM_S, - ALBUM_ITEM_S, + ALBUM_ITEM_S, + MAX_GRID_S } GridState; typedef enum { - NO_FULLSCREEN_S, + NO_FULLSCREEN_S = MAX_GRID_S + 1, EXTERNAL_S, IMAGEVIEWER_S, - FETCHER_S + FETCHER_S, + MAX_FULLSCREEN_S } FullScreenState; typedef enum { - NO_SLIDESHOW_S, + NO_SLIDESHOW_S = MAX_FULLSCREEN_S + 1, SLIDESHOW_GRID_ITEM_S, SLIDESHOW_ALBUM_ITEM_S, + MAX_SLIDESHOW_S } SlideShowState; +typedef enum +{ + NO_DETAIL_S = MAX_SLIDESHOW_S + 1, + IMAGEVIEWER_DETAIL_S, + MAX_DETAIL_S +} DetailState; + #endif /* GLXVIEWIDS_H */ diff -r c9962d0368d9 -r 525c140ec8db ui/ui.pro --- a/ui/ui.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/ui.pro Thu Jul 22 16:33:32 2010 +0100 @@ -16,8 +16,15 @@ #*/ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS = uiengine \ + +exportfile += "inc/glxmodelroles.h APP_LAYER_PLATFORM_EXPORT_PATH(glxmodelroles.h)" +BLD_INF_RULES.prj_exports += exportfile + +SUBDIRS = detailscustomwidget \ + uiengine \ commandhandlers \ + viewutilities \ + widgets \ views \ viewmanagement \ # viewplugins diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/bwins/glxdrmutilitywrapperu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/bwins/glxdrmutilitywrapperu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,7 @@ +EXPORTS + ??1GlxDRMUtilityWrapper@@QAE@XZ @ 1 NONAME ; GlxDRMUtilityWrapper::~GlxDRMUtilityWrapper(void) + ?ItemRightsValidityCheck@GlxDRMUtilityWrapper@@QAE_NVQString@@_N@Z @ 2 NONAME ; bool GlxDRMUtilityWrapper::ItemRightsValidityCheck(class QString, bool) + ??0GlxDRMUtilityWrapper@@QAE@XZ @ 3 NONAME ; GlxDRMUtilityWrapper::GlxDRMUtilityWrapper(void) + ?ConsumeRights@GlxDRMUtilityWrapper@@QAE_NVQString@@@Z @ 4 NONAME ; bool GlxDRMUtilityWrapper::ConsumeRights(class QString) + ?ShowRightsInfo@GlxDRMUtilityWrapper@@QAEXVQString@@@Z @ 5 NONAME ; void GlxDRMUtilityWrapper::ShowRightsInfo(class QString) + diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/bwins/glxmedialistwrapperu.def --- a/ui/uiengine/bwins/glxmedialistwrapperu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/bwins/glxmedialistwrapperu.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,43 +1,60 @@ 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) + ?retrieveItemSize@GlxMLWrapper@@QAEHH@Z @ 50 NONAME ; int GlxMLWrapper::retrieveItemSize(int) + ?retrieveItemTime@GlxMLWrapper@@QAE?AVQTime@@H@Z @ 51 NONAME ; class QTime GlxMLWrapper::retrieveItemTime(int) + ?retrieveListDesc@GlxMLWrapper@@QAE?AVQString@@H@Z @ 52 NONAME ; class QString GlxMLWrapper::retrieveListDesc(int) + ?removeContextMode@GlxMLWrapper@@QAEXW4GlxContextMode@@@Z @ 53 NONAME ; void GlxMLWrapper::removeContextMode(enum GlxContextMode) + ?updateDetails@GlxMLWrapper@@IAEXXZ @ 54 NONAME ; void GlxMLWrapper::updateDetails(void) + ?handleDetailsItemAvailable@GlxMLWrapper@@QAEXH@Z @ 55 NONAME ; void GlxMLWrapper::handleDetailsItemAvailable(int) + ?setDrmValid@GlxMLWrapper@@QAEXH_N@Z @ 56 NONAME ; void GlxMLWrapper::setDrmValid(int, bool) + ?IsDrmProtected@GlxMLWrapper@@QAE_NH@Z @ 57 NONAME ; bool GlxMLWrapper::IsDrmProtected(int) + ?IsDrmValid@GlxMLWrapper@@QAE_NH@Z @ 58 NONAME ; bool GlxMLWrapper::IsDrmValid(int) diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutility/bwins/glxdrmutilityu.def --- a/ui/uiengine/drmutility/bwins/glxdrmutilityu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/drmutility/bwins/glxdrmutilityu.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,15 +1,21 @@ EXPORTS - ?CanSetAsAutomatedL@CGlxDRMUtility@@QAEHABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 1 NONAME ; int CGlxDRMUtility::CanSetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType) - ?CanShowInfoOnlineL@CGlxDRMUtility@@QAEHAAVTDesC16@@@Z @ 2 NONAME ; int CGlxDRMUtility::CanShowInfoOnlineL(class TDesC16 &) - ?CheckDisplayRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@H@Z @ 3 NONAME ; int CGlxDRMUtility::CheckDisplayRightsL(class TDesC16 const &, int) - ?CheckOpenRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@H@Z @ 4 NONAME ; int CGlxDRMUtility::CheckOpenRightsL(class TDesC16 const &, int) - ?Close@CGlxDRMUtility@@QAEXXZ @ 5 NONAME ; void CGlxDRMUtility::Close(void) - ?ConsumeRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 6 NONAME ; int CGlxDRMUtility::ConsumeRightsL(class TDesC16 const &) - ?DRMThumbnailSize@CGlxDRMUtility@@QAE?AVTSize@@AAV2@@Z @ 7 NONAME ; class TSize CGlxDRMUtility::DRMThumbnailSize(class TSize &) - ?InstanceL@CGlxDRMUtility@@SAPAV1@XZ @ 8 NONAME ; class CGlxDRMUtility * CGlxDRMUtility::InstanceL(void) - ?IsForwardLockedL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 9 NONAME ; int CGlxDRMUtility::IsForwardLockedL(class TDesC16 const &) - ?SetAsAutomatedL@CGlxDRMUtility@@QAEXABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 10 NONAME ; void CGlxDRMUtility::SetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType) - ?ShowDRMDetailsPaneL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 11 NONAME ; void CGlxDRMUtility::ShowDRMDetailsPaneL(class TDesC16 const &) - ?ShowInfoOnlineL@CGlxDRMUtility@@QAEXAAVTDesC16@@@Z @ 12 NONAME ; void CGlxDRMUtility::ShowInfoOnlineL(class TDesC16 &) - ?ShowRightsInfoL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 13 NONAME ; void CGlxDRMUtility::ShowRightsInfoL(class TDesC16 const &) + ?InstanceL@CGlxDRMUtility@@SAPAV1@XZ @ 1 NONAME ; class CGlxDRMUtility * CGlxDRMUtility::InstanceL(void) + ?ShowDRMDetailsPaneL@CGlxDRMUtility@@QAEXAAVRFile@@@Z @ 2 NONAME ; void CGlxDRMUtility::ShowDRMDetailsPaneL(class RFile &) + ?ShowRightsInfoL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 3 NONAME ; void CGlxDRMUtility::ShowRightsInfoL(class TDesC16 const &) + ?DRMThumbnailSize@CGlxDRMUtility@@QAE?AVTSize@@AAV2@@Z @ 4 NONAME ; class TSize CGlxDRMUtility::DRMThumbnailSize(class TSize &) + ?ItemRightsValidityCheckL@CGlxDRMUtility@@QAEHABVTDesC16@@H@Z @ 5 NONAME ; int CGlxDRMUtility::ItemRightsValidityCheckL(class TDesC16 const &, int) + ?ClearLastConsumedItemUriL@CGlxDRMUtility@@QAEXXZ @ 6 NONAME ; void CGlxDRMUtility::ClearLastConsumedItemUriL(void) + ?DisplayItemRightsCheckL@CGlxDRMUtility@@QAEHAAVRFile@@H@Z @ 7 NONAME ; int CGlxDRMUtility::DisplayItemRightsCheckL(class RFile &, int) + ?ShowRightsInfoL@CGlxDRMUtility@@QAEXAAVRFile@@@Z @ 8 NONAME ; void CGlxDRMUtility::ShowRightsInfoL(class RFile &) + ?CanShowInfoOnlineL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 9 NONAME ; int CGlxDRMUtility::CanShowInfoOnlineL(class TDesC16 const &) + ?Close@CGlxDRMUtility@@QAEXXZ @ 10 NONAME ; void CGlxDRMUtility::Close(void) + ?SetAsAutomatedL@CGlxDRMUtility@@QAEXABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 11 NONAME ; void CGlxDRMUtility::SetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType) + ?CanSetAsAutomatedL@CGlxDRMUtility@@QAEHABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 12 NONAME ; int CGlxDRMUtility::CanSetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType) + ?ConsumeRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 13 NONAME ; int CGlxDRMUtility::ConsumeRightsL(class TDesC16 const &) + ?IsForwardLockedL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 14 NONAME ; int CGlxDRMUtility::IsForwardLockedL(class TDesC16 const &) + ?DisplayItemRightsCheckL@CGlxDRMUtility@@QAEHABVTDesC16@@H@Z @ 15 NONAME ; int CGlxDRMUtility::DisplayItemRightsCheckL(class TDesC16 const &, int) + ?ItemRightsValidityCheckL@CGlxDRMUtility@@QAEHAAVRFile@@H@Z @ 16 NONAME ; int CGlxDRMUtility::ItemRightsValidityCheckL(class RFile &, int) + ?ShowDRMDetailsPaneL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 17 NONAME ; void CGlxDRMUtility::ShowDRMDetailsPaneL(class TDesC16 const &) + ?ShowInfoOnlineL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 18 NONAME ; void CGlxDRMUtility::ShowInfoOnlineL(class TDesC16 const &) + ?ConsumeRightsL@CGlxDRMUtility@@QAEHAAVRFile@@@Z @ 19 NONAME ; int CGlxDRMUtility::ConsumeRightsL(class RFile &) diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutility/eabi/glxdrmutilityu.def --- a/ui/uiengine/drmutility/eabi/glxdrmutilityu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/drmutility/eabi/glxdrmutilityu.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,15 +1,21 @@ EXPORTS - _ZN14CGlxDRMUtility14ConsumeRightsLERK7TDesC16 @ 1 NONAME - _ZN14CGlxDRMUtility15SetAsAutomatedLERK7TDesC1620TGlxDrmAutomatedType @ 2 NONAME - _ZN14CGlxDRMUtility15ShowInfoOnlineLER7TDesC16 @ 3 NONAME - _ZN14CGlxDRMUtility15ShowRightsInfoLERK7TDesC16 @ 4 NONAME - _ZN14CGlxDRMUtility16CheckOpenRightsLERK7TDesC16i @ 5 NONAME - _ZN14CGlxDRMUtility16DRMThumbnailSizeER5TSize @ 6 NONAME - _ZN14CGlxDRMUtility16IsForwardLockedLERK7TDesC16 @ 7 NONAME - _ZN14CGlxDRMUtility18CanSetAsAutomatedLERK7TDesC1620TGlxDrmAutomatedType @ 8 NONAME - _ZN14CGlxDRMUtility18CanShowInfoOnlineLER7TDesC16 @ 9 NONAME - _ZN14CGlxDRMUtility19CheckDisplayRightsLERK7TDesC16i @ 10 NONAME - _ZN14CGlxDRMUtility19ShowDRMDetailsPaneLERK7TDesC16 @ 11 NONAME - _ZN14CGlxDRMUtility5CloseEv @ 12 NONAME - _ZN14CGlxDRMUtility9InstanceLEv @ 13 NONAME + _ZN14CGlxDRMUtility14ConsumeRightsLER5RFile @ 1 NONAME + _ZN14CGlxDRMUtility14ConsumeRightsLERK7TDesC16 @ 2 NONAME + _ZN14CGlxDRMUtility15SetAsAutomatedLERK7TDesC1620TGlxDrmAutomatedType @ 3 NONAME + _ZN14CGlxDRMUtility15ShowInfoOnlineLERK7TDesC16 @ 4 NONAME + _ZN14CGlxDRMUtility15ShowRightsInfoLER5RFile @ 5 NONAME + _ZN14CGlxDRMUtility15ShowRightsInfoLERK7TDesC16 @ 6 NONAME + _ZN14CGlxDRMUtility16DRMThumbnailSizeER5TSize @ 7 NONAME + _ZN14CGlxDRMUtility16IsForwardLockedLERK7TDesC16 @ 8 NONAME + _ZN14CGlxDRMUtility18CanSetAsAutomatedLERK7TDesC1620TGlxDrmAutomatedType @ 9 NONAME + _ZN14CGlxDRMUtility18CanShowInfoOnlineLERK7TDesC16 @ 10 NONAME + _ZN14CGlxDRMUtility19ShowDRMDetailsPaneLER5RFile @ 11 NONAME + _ZN14CGlxDRMUtility19ShowDRMDetailsPaneLERK7TDesC16 @ 12 NONAME + _ZN14CGlxDRMUtility23DisplayItemRightsCheckLER5RFilei @ 13 NONAME + _ZN14CGlxDRMUtility23DisplayItemRightsCheckLERK7TDesC16i @ 14 NONAME + _ZN14CGlxDRMUtility24ItemRightsValidityCheckLER5RFilei @ 15 NONAME + _ZN14CGlxDRMUtility24ItemRightsValidityCheckLERK7TDesC16i @ 16 NONAME + _ZN14CGlxDRMUtility25ClearLastConsumedItemUriLEv @ 17 NONAME + _ZN14CGlxDRMUtility5CloseEv @ 18 NONAME + _ZN14CGlxDRMUtility9InstanceLEv @ 19 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutility/group/glxdrmutility.mmp --- a/ui/uiengine/drmutility/group/glxdrmutility.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/drmutility/group/glxdrmutility.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -44,4 +44,5 @@ LIBRARY caf.lib LIBRARY cafutils.lib +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutility/inc/glxdrmutility.h --- a/ui/uiengine/drmutility/inc/glxdrmutility.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/drmutility/inc/glxdrmutility.h Thu Jul 22 16:33:32 2010 +0100 @@ -11,7 +11,7 @@ * * Contributors: * -* Description: DRM utility implementation +* Description: DRM utility implementation * */ @@ -28,7 +28,7 @@ // INCLUDES #include - +#include // FORWARD DECLARATIONS class CDRMHelper; @@ -82,23 +82,47 @@ /** * Check whether DRM rights are valid for specified item - * + * is called before right is consumed and for all items (focused or unfocused). + * * @param aUri URI of the media item. * @param aCheckViewRights, check view rights if true, play if false * @return ETrue if valid rights exist for the media item. */ - IMPORT_C TBool CheckOpenRightsL(const TDesC& aUri, TBool aCheckViewRights); + IMPORT_C TBool ItemRightsValidityCheckL(const TDesC& aUri, TBool aCheckViewRights); + + /** + * Check whether DRM rights are valid for specified item + * is called before right is consumed and for all items (focused or unfocused). + * + * @param filehandle of the media item. + * @param aCheckViewRights, check view rights if true, play if false + * @return ETrue if valid rights exist for the media item. + */ + IMPORT_C TBool ItemRightsValidityCheckL(RFile& aFileHandle, TBool aCheckViewRights); /** * Check whether DRM rights are valid for specified item * If the rights were just consumed, then allow to display * Otherwise, obtain current rights - * + * is called after right is consumed and for only focused/displayed item. + * * @param aUri URI of the media item. * @param aCheckViewRights, check view rights if true, play if false * @return ETrue if valid rights exist for the media item. */ - IMPORT_C TBool CheckDisplayRightsL(const TDesC& aUri, TBool aCheckViewRights); + IMPORT_C TBool DisplayItemRightsCheckL(const TDesC& aUri, TBool aCheckViewRights); + + /** + * Check whether DRM rights are valid for specified item + * If the rights were just consumed, then allow to display + * Otherwise, obtain current rights + * is called after right is consumed and for only focused/displayed item. + * + * @param filehandle of the media item. + * @param aCheckViewRights, check view rights if true, play if false + * @return ETrue if valid rights exist for the media item. + */ + IMPORT_C TBool DisplayItemRightsCheckL(RFile& aFileHandle, TBool aCheckViewRights); /** * Consume rights for specified item @@ -109,7 +133,19 @@ */ IMPORT_C TBool ConsumeRightsL(const TDesC& aUri); - + /** + * Consume rights for specified item + * Caches item so that a client has right to display the item + * + * @param Filehandle for item + * @return ETrue to no error in rights consumption + */ + IMPORT_C TBool ConsumeRightsL(RFile& aFileHandle); + + /** + * Clears Last Consumed Uri + */ + IMPORT_C void ClearLastConsumedItemUriL(); /** * Test whether a media item is OMA DRM 2.0 protected and has an associated @@ -117,13 +153,13 @@ * @param aUri URI of the media item. * @return ETrue if it does. */ - IMPORT_C TBool CanShowInfoOnlineL(TDesC& aUri); + IMPORT_C TBool CanShowInfoOnlineL(const TDesC& aUri); /** * Open the associated info URL for a media item in the browser. * @param aUri URI of the media item. */ - IMPORT_C void ShowInfoOnlineL(TDesC& aUri); + IMPORT_C void ShowInfoOnlineL(const TDesC& aUri); /** * Test whether a media item can be set as automated content. * @@ -147,6 +183,12 @@ IMPORT_C void ShowDRMDetailsPaneL(const TDesC& aUri); /** + * Show DRM details for specified item. + * @param Filehandle of the media item. + */ + IMPORT_C void ShowDRMDetailsPaneL(RFile& aFileHandle); + + /** * Ask DRM manager if file is forward locked */ IMPORT_C TBool IsForwardLockedL(const TDesC& aUri); @@ -158,6 +200,12 @@ IMPORT_C void ShowRightsInfoL(const TDesC& aUri); /** + * Show rights info + * @param filehandle of the media item. + */ + IMPORT_C void ShowRightsInfoL(RFile& aFileHandle); + + /** * Get size of thumbnail to be requested for DRM invalid item * @param aSize size of image * @return suggested thumbnail size (1/4 of original size) diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutility/src/glxdrmutility.cpp --- a/ui/uiengine/drmutility/src/glxdrmutility.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/drmutility/src/glxdrmutility.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -34,6 +34,7 @@ #include #include #include +#include "glxtracer.h" const TInt KGlxDRMThumbnailHeight = 120; const TInt KGlxDRMThumbnailWidth = 90; @@ -63,9 +64,10 @@ //============================================================================ EXPORT_C CGlxDRMUtility* CGlxDRMUtility::InstanceL() { + TRACER("CGlxDRMUtility::InstanceL()"); CGlxDrmTls* tls = reinterpret_cast(Dll::Tls()); - if(tls==NULL) + if ( !tls ) { CGlxDRMUtility* drmutil = new(ELeave)CGlxDRMUtility(); CleanupStack::PushL(drmutil); @@ -88,9 +90,10 @@ //============================================================================ EXPORT_C void CGlxDRMUtility::Close() { + TRACER("CGlxDRMUtility::Close()"); CGlxDrmTls* tls = reinterpret_cast(Dll::Tls()); - if (tls != NULL) + if ( tls ) { tls->iRefCount--; @@ -110,23 +113,34 @@ //============================================================================ CGlxDRMUtility::~CGlxDRMUtility() { + TRACER("CGlxDRMUtility::~CGlxDRMUtility()"); delete iCManager; delete iDrmHelper; delete iLastConsumedItemUri; } //============================================================================ -// CheckOpenRightsL -//============================================================================ -EXPORT_C TBool CGlxDRMUtility::CheckOpenRightsL( const TDesC& aUri, +// ItemRightsValidityCheckL +// for checking DRM rights validity for item. +// is called before right is consumed and for all items (focused or unfocused). +//============================================================================ +EXPORT_C TBool CGlxDRMUtility::ItemRightsValidityCheckL( const TDesC& aUri, TBool aCheckViewRights ) { - // When checking current rights for a URI, clear stored URI - TPtr ptr = iLastConsumedItemUri->Des(); - ptr.Zero(); - iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( 0 ); + TRACER("CGlxDRMUtility::ItemRightsValidityCheckL()"); + // When checking current rights for a URI - TBool rightsValid = EFalse; + //Allow to Open if rights for a URI was just consumed (i.e. same as stored URI) + if ( iLastConsumedItemUri->Length() > 0 ) + { + if ( aUri.CompareF( *iLastConsumedItemUri ) == 0 ) + { + return ETrue; + } + } + + //Else for uri of non-focused uri, just check validity rights + TInt rightsValid = 0; TVirtualPathPtr path( aUri, KDefaultContentObject() ); ContentAccess::TAttribute attr = @@ -139,11 +153,31 @@ } //============================================================================ -// CheckDisplayRightsL -//============================================================================ -EXPORT_C TBool CGlxDRMUtility::CheckDisplayRightsL( const TDesC& aUri, +// ItemRightsValidityCheckL +// for checking DRM rights validity for item. +// is called before right is consumed and for all items (focused or unfocused). +//============================================================================ +EXPORT_C TBool CGlxDRMUtility::ItemRightsValidityCheckL( RFile& aFileHandle, + TBool /*aCheckViewRights*/ ) + { + TRACER("CGlxDRMUtility::ItemRightsValidityCheckL()"); + TBool rightsValid = EFalse; + + ContentAccess::CContent* content = ContentAccess::CContent::NewLC( aFileHandle ); + content->GetAttribute( ContentAccess::ECanView, rightsValid ); + CleanupStack::PopAndDestroy( content ); + return rightsValid; + } + +//============================================================================ +// DisplayItemRightsCheckL +// is called after right is consumed and for only focused/displayed item. +//============================================================================ +EXPORT_C TBool CGlxDRMUtility::DisplayItemRightsCheckL( const TDesC& aUri, TBool aCheckViewRights ) { + TRACER("CGlxDRMUtility::DisplayItemRightsCheckL()"); + // Allow to display if rights for a URI was just consumed (i.e. same as stored URI) if ( iLastConsumedItemUri->Length() > 0 ) { @@ -153,32 +187,48 @@ } } - // Otherwise, check current rights for the URI - return CheckOpenRightsL( aUri, aCheckViewRights ); + //Clear the stored uri since focus has changed + ClearLastConsumedItemUriL(); + + // Otherwise, check current rights for the URI of newly focused item + return ItemRightsValidityCheckL( aUri, aCheckViewRights ); } //============================================================================ +// DisplayItemRightsCheckL +// is called after right is consumed and for only focused/displayed item. +//============================================================================ +EXPORT_C TBool CGlxDRMUtility::DisplayItemRightsCheckL( RFile& aFileHandle, + TBool aCheckViewRights ) + { + TRACER("CGlxDRMUtility::DisplayItemRightsCheckL()"); + // Otherwise, check current rights for the URI of newly focused item + return ItemRightsValidityCheckL( aFileHandle, aCheckViewRights ); + } + + +//============================================================================ // ConsumeRightsL //============================================================================ EXPORT_C TBool CGlxDRMUtility::ConsumeRightsL(const TDesC& aUri) { + TRACER("CGlxDRMUtility::ConsumeRightsL()"); TVirtualPathPtr path( aUri, KDefaultContentObject() ); // Create a CData object to read the content // Tell the agent we are planning to display the content CData* data = CData::NewLC(path, ContentAccess::EView, EContentShareReadOnly); - // When consuming rights for a URI, clear stored URI - TPtr oldPtr = iLastConsumedItemUri->Des(); - oldPtr.Zero(); - iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( aUri.Length() ); + //When consuming rights for a URI, clear stored URI + ClearLastConsumedItemUriL(); // Execute the intent, tell the agent that we plan to display the content // It is at this point that any stateful rights will be decremented TInt err = data->ExecuteIntent(ContentAccess::EView); if ( err == KErrNone ) { - // Update stored URI + //Update stored URI + iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( aUri.Length() ); TPtr newPtr = iLastConsumedItemUri->Des(); newPtr.Copy( aUri ); } @@ -188,16 +238,41 @@ return (err == KErrNone); } + +//============================================================================ +// ConsumeRightsL +//============================================================================ +EXPORT_C TBool CGlxDRMUtility::ConsumeRightsL(RFile& aFileHandle) + { + TRACER("CGlxDRMUtility::ConsumeRightsL(RFile& aFileHandle)"); + CData* data = CData::NewLC( aFileHandle, KDefaultContentObject(), EPeek ); + TInt err = data->ExecuteIntent(ContentAccess::EView); + CleanupStack::PopAndDestroy( data ); + return (err == KErrNone); + } + +//============================================================================ +//Clears Last Consumed Uri +//============================================================================ +EXPORT_C void CGlxDRMUtility::ClearLastConsumedItemUriL() + { + //clears the stored uri + TPtr ptr = iLastConsumedItemUri->Des(); + ptr.Zero(); + iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( 0 ); + } + //============================================================================ // Test whether a media item is OMA DRM 2.0 protected and has an associated // info URL. //============================================================================ -EXPORT_C TBool CGlxDRMUtility::CanShowInfoOnlineL(TDesC& aUri) +EXPORT_C TBool CGlxDRMUtility::CanShowInfoOnlineL(const TDesC& aUri) { + TRACER("CGlxDRMUtility::CanShowInfoOnlineL()"); TBool canShowInfoOnline = EFalse; HBufC8* urlBuf = NULL; - canShowInfoOnline = iDrmHelper->HasInfoUrlL(aUri, urlBuf); + canShowInfoOnline = iDrmHelper->HasInfoUrlL( const_cast(aUri) , urlBuf); // discard buf we don't need it delete urlBuf; @@ -208,9 +283,10 @@ //============================================================================ // Open the associated info URL for a media item in the browser. //============================================================================ -EXPORT_C void CGlxDRMUtility::ShowInfoOnlineL(TDesC& aUri) +EXPORT_C void CGlxDRMUtility::ShowInfoOnlineL(const TDesC& aUri) { - iDrmHelper->OpenInfoUrlL(aUri); + TRACER("CGlxDRMUtility::ShowInfoOnlineL()"); + iDrmHelper->OpenInfoUrlL( const_cast(aUri) ); } //============================================================================ @@ -219,6 +295,7 @@ EXPORT_C TBool CGlxDRMUtility::CanSetAsAutomatedL(const TDesC& aUri, TGlxDrmAutomatedType aType) { + TRACER("CGlxDRMUtility::CanSetAsAutomatedL()"); TBool canSetAutomated = EFalse; switch(aType) { @@ -240,6 +317,7 @@ EXPORT_C void CGlxDRMUtility::SetAsAutomatedL(const TDesC& aUri, TGlxDrmAutomatedType aType) { + TRACER("CGlxDRMUtility::SetAsAutomatedL()"); switch(aType) { case EGlxDrmAutomatedTypeWallpaper: @@ -266,8 +344,9 @@ //============================================================================ EXPORT_C void CGlxDRMUtility::ShowDRMDetailsPaneL( const TDesC& aUri ) { + TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL()"); TRAPD( err, iDrmHelper->LaunchDetailsViewEmbeddedL( aUri ) ); - // if no rights ask user to re-activate? + // if no rights ask user to re-activate if( err == KErrCANoRights ) { HBufC* buf = aUri.AllocLC(); @@ -278,10 +357,26 @@ } //============================================================================ +// ShowDRMDetailsPane +//============================================================================ +EXPORT_C void CGlxDRMUtility::ShowDRMDetailsPaneL(RFile& aFileHandle) + { + TRACER("CGlxDRMUtility::ShowDRMDetailsPaneL()"); + TRAPD( err, iDrmHelper->LaunchDetailsViewEmbeddedL( aFileHandle ) ); + // if no rights ask user to re-activate + if( err == KErrCANoRights ) + { + //need to check if we need to handle. + } + + } + +//============================================================================ // IsForwardLockedL //============================================================================ EXPORT_C TBool CGlxDRMUtility::IsForwardLockedL(const TDesC& aUri) { + TRACER("CGlxDRMUtility::IsForwardLockedL()"); TBool forwardLocked = EFalse; TVirtualPathPtr path( aUri, KDefaultContentObject() ); @@ -296,14 +391,25 @@ //============================================================================ EXPORT_C void CGlxDRMUtility::ShowRightsInfoL(const TDesC& aUri) { + TRACER("CGlxDRMUtility::ShowRightsInfoL()"); iDrmHelper->CheckRightsAmountL( aUri ); } //============================================================================ +// ShowRightsInfoL +//============================================================================ +EXPORT_C void CGlxDRMUtility::ShowRightsInfoL(RFile& aFileHandle) + { + TRACER("CGlxDRMUtility::ShowRightsInfoL(aFileHandle)"); + iDrmHelper->CheckRightsAmountL( aFileHandle ); + } + +//============================================================================ // Return size for DRM thumbnail request. //============================================================================ EXPORT_C TSize CGlxDRMUtility::DRMThumbnailSize(TSize& aSize) { + TRACER("CGlxDRMUtility::DRMThumbnailSize()"); TSize thumbnailSize(KGlxDRMThumbnailWidth, KGlxDRMThumbnailHeight); if((aSize.iWidth*aSize.iHeight)/4 < @@ -321,7 +427,7 @@ */ CGlxDRMUtility::CGlxDRMUtility() { - + TRACER("CGlxDRMUtility::CGlxDRMUtility()"); } /** @@ -329,6 +435,7 @@ */ void CGlxDRMUtility::ConstructL() { + TRACER("CGlxDRMUtility::ConstructL()"); iCManager = ContentAccess::CManager::NewL(); iDrmHelper = CDRMHelper::NewL(); iLastConsumedItemUri = HBufC::NewL(0); diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutilitywrapper/drmutilitywrapper.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/drmutilitywrapper/drmutilitywrapper.pro Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,55 @@ +#/* +#* 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: Qt wrapper for DRM utility +#* +#*/ +TEMPLATE = lib +TARGET = glxdrmutilitywrapper +DEPENDPATH += . inc src +INCLUDEPATH += . ../../inc \ + ../../../inc \ + ../drmutility/inc \ + ./inc + +CONFIG += hb +LIBS += -lglxdrmutility.dll \ + -lglxlogging.dll \ + +DEFINES += BUILD_DRMUTILITYWRAPPER + +symbian: { +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +TARGET.UID3 = 0x2000A7BC +TARGET.CAPABILITY = ALL -TCB +TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE + +} +# Input +HEADERS += inc/glxdrmutilitywrapper.h \ + inc/glxdrmutilitywrapper_p.h + +SOURCES += src/glxdrmutilitywrapper.cpp \ + src/glxdrmutilitywrapper_p.cpp + +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxdrmutilitywrapper.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxdrmutilitywrapper.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutilitywrapper/inc/glxdrmutilitywrapper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/drmutilitywrapper/inc/glxdrmutilitywrapper.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,53 @@ +/* +* 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: +* +*/ + +#ifndef GLXDRMUTILITYWRAPPER_H +#define GLXDRMUTILITYWRAPPER_H + +#include +// forward decleration +class GlxDRMUtilityWrapperPrivate; + +#ifdef BUILD_DRMUTILITYWRAPPER +#define GLX_DRMUTILITYWRAPPER_EXPORT Q_DECL_EXPORT +#else +#define GLX_DRMUTILITYWRAPPER_EXPORT Q_DECL_IMPORT +#endif + +class GLX_DRMUTILITYWRAPPER_EXPORT GlxDRMUtilityWrapper +{ +public: + /* + * Constructor + */ + GlxDRMUtilityWrapper(); + + /* + * Destructor + */ + ~GlxDRMUtilityWrapper(); + + bool ItemRightsValidityCheck(QString aUri, bool aCheckViewRights); + bool ConsumeRights(QString aUri); + void ShowRightsInfo(QString aUri); + +private: + GlxDRMUtilityWrapperPrivate* mDRMUtilityWrapperPrivate; +}; + +#endif //GLXDRMUTILITYWRAPPER_H +// End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutilitywrapper/inc/glxdrmutilitywrapper_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/drmutilitywrapper/inc/glxdrmutilitywrapper_p.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,178 @@ +/* +* 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: +* +*/ + +#ifndef GLXDRMUTILITYWRAPPERPRIVATE_H +#define GLXDRMUTILITYWRAPPERPRIVATE_H + + +// forward decleration +class GlxDRMUtilityWrapper; +class CGlxDRMUtility; +class QString; + +class GlxDRMUtilityWrapperPrivate +{ +public: + /* + * Constructor + */ + GlxDRMUtilityWrapperPrivate(GlxDRMUtilityWrapper* DRMUtilityWrapper); + + /* + * Destructor + */ + ~GlxDRMUtilityWrapperPrivate(); + + /** + * Check whether DRM rights are valid for specified item + * is called before right is consumed and for all items (focused or unfocused). + * + * @param aUri URI of the media item. + * @param aCheckViewRights, check view rights if true, play if false + * @return ETrue if valid rights exist for the media item. + */ + bool ItemRightsValidityCheck(QString aUri, bool aCheckViewRights); + +// /** +// * Check whether DRM rights are valid for specified item +// * is called before right is consumed and for all items (focused or unfocused). +// * +// * @param filehandle of the media item. +// * @param aCheckViewRights, check view rights if true, play if false +// * @return ETrue if valid rights exist for the media item. +// */ +// bool ItemRightsValidityCheckL(RFile& aFileHandle, TBool aCheckViewRights); +// +// /** +// * Check whether DRM rights are valid for specified item +// * If the rights were just consumed, then allow to display +// * Otherwise, obtain current rights +// * is called after right is consumed and for only focused/displayed item. +// * +// * @param aUri URI of the media item. +// * @param aCheckViewRights, check view rights if true, play if false +// * @return ETrue if valid rights exist for the media item. +// */ +// bool DisplayItemRightsCheckL(const TDesC& aUri, TBool aCheckViewRights); +// +// /** +// * Check whether DRM rights are valid for specified item +// * If the rights were just consumed, then allow to display +// * Otherwise, obtain current rights +// * is called after right is consumed and for only focused/displayed item. +// * +// * @param filehandle of the media item. +// * @param aCheckViewRights, check view rights if true, play if false +// * @return ETrue if valid rights exist for the media item. +// */ +// bool DisplayItemRightsCheckL(RFile& aFileHandle, TBool aCheckViewRights); +// + /** + * Consume rights for specified item + * Caches item so that a client has right to display the item + * + * @param aUri URI for item + * @return ETrue to no error in rights consumption + */ + bool ConsumeRights(QString aUri); +// +// /** +// * Consume rights for specified item +// * Caches item so that a client has right to display the item +// * +// * @param Filehandle for item +// * @return ETrue to no error in rights consumption +// */ +// bool ConsumeRightsL(RFile& aFileHandle); +// +// /** +// * Clears Last Consumed Uri +// */ +// void ClearLastConsumedItemUriL(); +// +// /** +// * Test whether a media item is OMA DRM 2.0 protected and has an associated +// * info URL. +// * @param aUri URI of the media item. +// * @return ETrue if it does. +// */ +// bool CanShowInfoOnlineL(const TDesC& aUri); +// +// /** +// * Open the associated info URL for a media item in the browser. +// * @param aUri URI of the media item. +// */ +// void ShowInfoOnlineL(const TDesC& aUri); +// +// /** +// * Test whether a media item can be set as automated content. * +// * @param aUri URI of the media item. +// * @param aType Automated content type, eg. wallpaper. +// * @return ETrue if it can. +// */ +// bool CanSetAsAutomatedL(const TDesC& aUri, TGlxDrmAutomatedType aType); +// +// /** +// * Set a media item as automated content. +// * @param aUri URI of the media item. +// * @param aType Automated content type, eg. wallpaper. +// */ +// void SetAsAutomatedL(const TDesC& aUri, TGlxDrmAutomatedType aType); +// +// /** +// * Show DRM details for specified item. +// * @param aUri URI of the media item. +// */ +// void ShowDRMDetailsPaneL(const TDesC& aUri); +// +// /** +// * Show DRM details for specified item. +// * @param Filehandle of the media item. +// */ +// void ShowDRMDetailsPaneL(RFile& aFileHandle); +// +// /** +// * Ask DRM manager if file is forward locked +// */ +// bool IsForwardLockedL(const TDesC& aUri); +// + /** + * Show rights info + * @param aUri URI of the media item. + */ + void ShowRightsInfo(QString aUri); + +// /** +// * Show rights info +// * @param filehandle of the media item. +// */ +// void ShowRightsInfoL(RFile& aFileHandle); +// +// /** +// * Get size of thumbnail to be requested for DRM invalid item +// * @param aSize size of image +// * @return suggested thumbnail size (1/4 of original size) +// */ +// TSize DRMThumbnailSize(TSize& aSize); + +private: + GlxDRMUtilityWrapper* iDRMUtilityWrapper; + CGlxDRMUtility* iDRMUtility; +}; + +#endif //GLXDRMUTILITYWRAPPERPRIVATE_H +// End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutilitywrapper/src/glxdrmutilitywrapper.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/drmutilitywrapper/src/glxdrmutilitywrapper.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,44 @@ +/* +* 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"glxdrmutilitywrapper_p.h" +#include"glxdrmutilitywrapper.h" + +GlxDRMUtilityWrapper::GlxDRMUtilityWrapper() + { + mDRMUtilityWrapperPrivate = new GlxDRMUtilityWrapperPrivate(this); + } +GlxDRMUtilityWrapper::~GlxDRMUtilityWrapper() + { + delete mDRMUtilityWrapperPrivate; + } +bool GlxDRMUtilityWrapper::ItemRightsValidityCheck(QString aUri, bool aCheckViewRights) + { + bool ret = mDRMUtilityWrapperPrivate->ItemRightsValidityCheck(aUri,aCheckViewRights); + return ret; + } + +bool GlxDRMUtilityWrapper::ConsumeRights(QString aUri) + { + bool ret = mDRMUtilityWrapperPrivate->ConsumeRights(aUri); + return ret; + } + +void GlxDRMUtilityWrapper::ShowRightsInfo(QString aUri) + { + mDRMUtilityWrapperPrivate->ShowRightsInfo(aUri); + } diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/drmutilitywrapper/src/glxdrmutilitywrapper_p.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/drmutilitywrapper/src/glxdrmutilitywrapper_p.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,197 @@ +/* +* 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"glxdrmutilitywrapper_p.h" +#include"glxdrmutility.h" + +#include +#include + +GlxDRMUtilityWrapperPrivate::GlxDRMUtilityWrapperPrivate(GlxDRMUtilityWrapper* DRMUtilityWrapper) + { + iDRMUtilityWrapper = DRMUtilityWrapper; + iDRMUtility = CGlxDRMUtility::InstanceL(); + } +/* + * Destructor + */ +GlxDRMUtilityWrapperPrivate::~GlxDRMUtilityWrapperPrivate() + { + if(iDRMUtility) + { + iDRMUtility->Close(); + } + } + +/** + * Check whether DRM rights are valid for specified item + * is called before right is consumed and for all items (focused or unfocused). + */ +bool GlxDRMUtilityWrapperPrivate::ItemRightsValidityCheck(QString aUri, bool aCheckViewRights) + { + QString filepath(QDir::toNativeSeparators(aUri)); + TPtrC16 str(reinterpret_cast (filepath.utf16())); + HBufC* uri = str.Alloc(); + TBool checkViewRight = aCheckViewRights?ETrue:EFalse; + bool ret = iDRMUtility->ItemRightsValidityCheckL(*uri,checkViewRight); + return ret; + } + +///** +// * Check whether DRM rights are valid for specified item +// * is called before right is consumed and for all items (focused or unfocused). +// */ +//bool GlxDRMUtilityWrapperPrivate::ItemRightsValidityCheckL(RFile& aFileHandle, TBool aCheckViewRights) +// { +// +// } +// +///** +// * Check whether DRM rights are valid for specified item +// * If the rights were just consumed, then allow to display +// * Otherwise, obtain current rights +// * is called after right is consumed and for only focused/displayed item. +// */ +//bool GlxDRMUtilityWrapperPrivate::DisplayItemRightsCheckL(const TDesC& aUri, TBool aCheckViewRights) +// { +// +// } +// +///** +// * Check whether DRM rights are valid for specified item +// * If the rights were just consumed, then allow to display +// * Otherwise, obtain current rights +// * is called after right is consumed and for only focused/displayed item. +// */ +//bool GlxDRMUtilityWrapperPrivate::DisplayItemRightsCheckL(RFile& aFileHandle, TBool aCheckViewRights) +// { +// +// } +// +/** + * Consume rights for specified item + * Caches item so that a client has right to display the item + */ +bool GlxDRMUtilityWrapperPrivate::ConsumeRights(QString aUri) + { + QString filepath(QDir::toNativeSeparators(aUri)); + TPtrC16 str(reinterpret_cast (filepath.utf16())); + HBufC* uri = str.Alloc(); + bool ret = iDRMUtility->ConsumeRightsL(*uri); + return ret; + } +// +///** +// * Consume rights for specified item +// * Caches item so that a client has right to display the item +// */ +//bool GlxDRMUtilityWrapperPrivate::ConsumeRightsL(RFile& aFileHandle) +// { +// +// } +// +///** +// * Clears Last Consumed Uri +// */ +//void GlxDRMUtilityWrapperPrivate::ClearLastConsumedItemUriL() +// { +// +// } +// +///** +// * Test whether a media item is OMA DRM 2.0 protected and has an associated +// * info URL. +// */ +//bool GlxDRMUtilityWrapperPrivate::CanShowInfoOnlineL(const TDesC& aUri) +// { +// +// } +// +///** +// * Open the associated info URL for a media item in the browser. +// */ +//void GlxDRMUtilityWrapperPrivate::ShowInfoOnlineL(const TDesC& aUri) +// { +// +// } +// +///** +// * Test whether a media item can be set as automated content. * +// */ +//bool GlxDRMUtilityWrapperPrivate::CanSetAsAutomatedL(const TDesC& aUri, TGlxDrmAutomatedType aType) +// { +// +// } +// +///** +// * Set a media item as automated content. +// */ +//void GlxDRMUtilityWrapperPrivate::SetAsAutomatedL(const TDesC& aUri, TGlxDrmAutomatedType aType) +// { +// +// } +// +///** +// * Show DRM details for specified item. +// */ +//void GlxDRMUtilityWrapperPrivate::ShowDRMDetailsPaneL(const TDesC& aUri) +// { +// +// } +// +///** +// * Show DRM details for specified item. +// */ +//void GlxDRMUtilityWrapperPrivate::ShowDRMDetailsPaneL(RFile& aFileHandle) +// { +// +// } +// +///** +// * Ask DRM manager if file is forward locked +// */ +//bool GlxDRMUtilityWrapperPrivate::IsForwardLockedL(const TDesC& aUri) +// { +// +// } +// +/** + * Show rights info + */ +void GlxDRMUtilityWrapperPrivate::ShowRightsInfo(QString aUri) + { + QString filepath(QDir::toNativeSeparators(aUri)); + TPtrC16 str(reinterpret_cast (filepath.utf16())); + HBufC* uri = str.Alloc(); + iDRMUtility->ShowRightsInfoL(*uri); + } + +///** +// * Show rights info +// */ +//void GlxDRMUtilityWrapperPrivate::ShowRightsInfoL(RFile& aFileHandle) +// { +// +// } +// +///** +// * Get size of thumbnail to be requested for DRM invalid item +// */ +//TSize GlxDRMUtilityWrapperPrivate::DRMThumbnailSize(TSize& aSize) +// { +// +// } diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/eabi/glxdrmutilitywrapperu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/eabi/glxdrmutilitywrapperu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,9 @@ +EXPORTS + _ZN20GlxDRMUtilityWrapper23ItemRightsValidityCheckE7QStringb @ 1 NONAME + _ZN20GlxDRMUtilityWrapperC1Ev @ 2 NONAME + _ZN20GlxDRMUtilityWrapperC2Ev @ 3 NONAME + _ZN20GlxDRMUtilityWrapperD1Ev @ 4 NONAME + _ZN20GlxDRMUtilityWrapperD2Ev @ 5 NONAME + _ZN20GlxDRMUtilityWrapper13ConsumeRightsE7QString @ 6 NONAME + _ZN20GlxDRMUtilityWrapper14ShowRightsInfoE7QString @ 7 NONAME + diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/eabi/glxmedialistwrapperu.def --- a/ui/uiengine/eabi/glxmedialistwrapperu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/eabi/glxmedialistwrapperu.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,42 +1,57 @@ 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 + _ZN12GlxMLWrapper16retrieveItemSizeEi @ 47 NONAME + _ZN12GlxMLWrapper16retrieveItemTimeEi @ 48 NONAME + _ZN12GlxMLWrapper16retrieveListDescEi @ 49 NONAME + _ZN12GlxMLWrapper17removeContextModeE14GlxContextMode @ 50 NONAME + _ZN12GlxMLWrapper13updateDetailsEv @ 51 NONAME + _ZN12GlxMLWrapper26handleDetailsItemAvailableEi @ 52 NONAME + _ZN12GlxMLWrapper10IsDrmValidEi @ 53 NONAME + _ZN12GlxMLWrapper11setDrmValidEib @ 54 NONAME + _ZN12GlxMLWrapper14IsDrmProtectedEi @ 55 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/group/glxmedialists.mmp --- a/ui/uiengine/medialists/group/glxmedialists.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/group/glxmedialists.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -103,5 +103,6 @@ LIBRARY bitgdi.lib #endif +SMPSAFE // End of File diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/src/glxmedia.cpp --- a/ui/uiengine/medialists/src/glxmedia.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/src/glxmedia.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -273,7 +273,7 @@ { TRACER("TGlxMedia::IsDrmProtected"); - TBool isDrmProtected = ETrue; + TBool isDrmProtected = EFalse; if ( iItem ) { // ignore return value. Failure leaves isDrmProtected unchanged as ETrue diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/src/glxmedialist.cpp --- a/ui/uiengine/medialists/src/glxmedialist.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/src/glxmedialist.cpp Thu Jul 22 16:33:32 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. } } diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/src/glxthumbnailcontext.cpp --- a/ui/uiengine/medialists/src/glxthumbnailcontext.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/src/glxthumbnailcontext.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -590,7 +590,7 @@ const TDesC& uri = item.Uri(); if ( uri.Length() && cat != EMPXNoCategory ) { - valid = iDrmUtility->CheckOpenRightsL( uri, ( cat == EMPXImage ) ); + valid = iDrmUtility->ItemRightsValidityCheckL( uri, ( cat == EMPXImage ) ); CGlxMedia* properties = const_cast(item.Properties()); if( valid ) { diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/t_cglxcache.mmp --- a/ui/uiengine/medialists/test/group/t_cglxcache.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/t_cglxcache.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -78,5 +78,5 @@ LIBRARY glxlogging.lib EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/t_cglxfetcherrorarray.mmp --- a/ui/uiengine/medialists/test/group/t_cglxfetcherrorarray.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/t_cglxfetcherrorarray.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -51,5 +51,5 @@ LIBRARY mpxcommon.lib EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/t_cglxgarbagecollector.mmp --- a/ui/uiengine/medialists/test/group/t_cglxgarbagecollector.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/t_cglxgarbagecollector.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -78,5 +78,5 @@ LIBRARY glxlogging.lib EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/t_cglxmedia.mmp --- a/ui/uiengine/medialists/test/group/t_cglxmedia.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/t_cglxmedia.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -54,5 +54,5 @@ LIBRARY glxlogging.lib EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/t_glxfromfocusoutwarditerator.mmp --- a/ui/uiengine/medialists/test/group/t_glxfromfocusoutwarditerator.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/t_glxfromfocusoutwarditerator.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -44,5 +44,5 @@ LIBRARY lbs.lib // TCoordinate EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/t_glxlistwindow.mmp --- a/ui/uiengine/medialists/test/group/t_glxlistwindow.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/t_glxlistwindow.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -55,4 +55,5 @@ // Libraries required by the tested code EXPORTUNFROZEN +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/t_tglxexclusioniterator.mmp --- a/ui/uiengine/medialists/test/group/t_tglxexclusioniterator.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/t_tglxexclusioniterator.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -49,5 +49,5 @@ //LIBRARY glxmedialists.lib EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/ut_cglxattributecontext.mmp --- a/ui/uiengine/medialists/test/group/ut_cglxattributecontext.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/ut_cglxattributecontext.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -87,5 +87,5 @@ LIBRARY lbs.lib // TCoordinate EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/ut_cglxitemlist.mmp --- a/ui/uiengine/medialists/test/group/ut_cglxitemlist.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/ut_cglxitemlist.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -67,5 +67,5 @@ LIBRARY Lbs.lib EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/ut_cglxmedialist.mmp --- a/ui/uiengine/medialists/test/group/ut_cglxmedialist.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/ut_cglxmedialist.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -79,4 +79,5 @@ LIBRARY lbs.lib // TCoordinate EXPORTUNFROZEN +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/ut_cglxnavigablelist.mmp --- a/ui/uiengine/medialists/test/group/ut_cglxnavigablelist.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/ut_cglxnavigablelist.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -70,4 +70,5 @@ LIBRARY Lbs.lib EXPORTUNFROZEN +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/ut_cglxstaticitemlist.mmp --- a/ui/uiengine/medialists/test/group/ut_cglxstaticitemlist.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/ut_cglxstaticitemlist.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -68,5 +68,5 @@ LIBRARY mpxcommon.lib EXPORTUNFROZEN - +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/ut_glxerrormanager.mmp --- a/ui/uiengine/medialists/test/group/ut_glxerrormanager.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/ut_glxerrormanager.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -86,4 +86,5 @@ LIBRARY lbs.lib // TCoordinate EXPORTUNFROZEN +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/group/ut_tglxselectioniterator.mmp --- a/ui/uiengine/medialists/test/group/ut_tglxselectioniterator.mmp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/group/ut_tglxselectioniterator.mmp Thu Jul 22 16:33:32 2010 +0100 @@ -44,5 +44,6 @@ LIBRARY mpxcommon.lib EXPORTUNFROZEN +SMPSAFE // End of file diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/ut_cglxattributecontext/ut_cglxattributecontext.cpp --- a/ui/uiengine/medialists/test/ut_cglxattributecontext/ut_cglxattributecontext.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/ut_cglxattributecontext/ut_cglxattributecontext.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -45,7 +45,7 @@ delete this; } -TBool CGlxDRMUtility::CheckOpenRightsL(const TDesC&, TBool) +TBool CGlxDRMUtility::ItemRightsValidityCheckL(const TDesC&, TBool) { return ETrue; } diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/ut_cglxmedialist/ut_cglxmedialist.cpp --- a/ui/uiengine/medialists/test/ut_cglxmedialist/ut_cglxmedialist.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/ut_cglxmedialist/ut_cglxmedialist.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -51,7 +51,7 @@ delete this; } -TBool CGlxDRMUtility::CheckOpenRightsL(const TDesC&, TBool) +TBool CGlxDRMUtility::ItemRightsValidityCheckL(const TDesC&, TBool) { return ETrue; } diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialists/test/ut_glxerrormanager/ut_glxerrormanager.cpp --- a/ui/uiengine/medialists/test/ut_glxerrormanager/ut_glxerrormanager.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialists/test/ut_glxerrormanager/ut_glxerrormanager.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -47,7 +47,7 @@ delete this; } -TBool CGlxDRMUtility::CheckOpenRightsL(const TDesC&, TBool) +TBool CGlxDRMUtility::ItemRightsValidityCheckL(const TDesC&, TBool) { return ETrue; } diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/inc/glxmlgenericobserver.h --- a/ui/uiengine/medialistwrapper/inc/glxmlgenericobserver.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialistwrapper/inc/glxmlgenericobserver.h Thu Jul 22 16:33:32 2010 +0100 @@ -61,6 +61,7 @@ MGlxMediaList* aList ); void HandleMediaL( TInt aListIndex, MGlxMediaList* aList ); void HandleItemModifiedL( const RArray& aItemIndexes, MGlxMediaList* aList ); + void HandlePopulatedL(MGlxMediaList* aList); private: diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/inc/glxmlwrapper.h --- a/ui/uiengine/medialistwrapper/inc/glxmlwrapper.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialistwrapper/inc/glxmlwrapper.h Thu Jul 22 16:33:32 2010 +0100 @@ -61,6 +61,11 @@ * for setting the attribute context mode will be used mainly for retreiving thumbnail of different sizes. */ void setContextMode(GlxContextMode contextMode); + /** + * for removing the contect once it is not rquired anymore + */ + void removeContextMode(GlxContextMode contextMode); + /** * for retreiving the data Count. */ @@ -76,6 +81,7 @@ void handleIconCorrupt(int itemIndex); void handleGeneralError(int error); void handleListItemAvailable(int itemIndex); + void handleDetailsItemAvailable(int itemIndex); int getFocusIndex() const; void setFocusIndex(int itemIndex); @@ -83,12 +89,33 @@ QString retrieveListTitle(int index); QString retrieveListSubTitle(int index); + /* + * fetches the comments entered for the image + */ + QString retrieveListDesc(int index); int getVisibleWindowIndex(); void setVisibleWindowIndex(int itemIndex); QString retrieveItemUri(int index); QSize retrieveItemDimension(int index); + /* + * fetches the size for the image + */ + int retrieveItemSize(int index); + /* + * fetches the date for the image + */ QDate retrieveItemDate(int index); + /* + * fetches the time for the image + */ + QTime retrieveItemTime(int index); int retrieveItemFrameCount(int index); + QString retrieveViewTitle(); + void handlepopulated(); + bool IsPopulated(); + bool IsDrmProtected(int index = -1); + bool IsDrmValid(int index); + void setDrmValid(int index,bool valid); /* * retriveBitmap helps to retrive the bitmap @@ -105,12 +132,19 @@ * @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(); + /* + * emits the signal to update details view + */ + void updateDetails(); private: GlxMLWrapperPrivate* mMLWrapperPrivate; diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h --- a/ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h Thu Jul 22 16:33:32 2010 +0100 @@ -26,6 +26,9 @@ #include #include "glxmedialistiterator.h" #include "glxmlwrapper.h" +#include +#include "mglxtitlefetcherobserver.h" + //Forward Declarations class MGlxMediaList; class CGlxMLGenericObserver; @@ -35,10 +38,11 @@ class CGlxDefaultAttributeContext; class CGlxDefaultThumbnailContext; class CGlxDefaultListAttributeContext; - +class CGlxTitleFetcher; +class CGlxDRMUtility; //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: @@ -56,6 +60,12 @@ * for setting the attribute context mode will be used mainly for retreiving thumbnail of different sizes. */ void SetContextMode(GlxContextMode aContextMode); + + /* + * For removing the contect used + */ + void RemoveContextMode(GlxContextMode aContextMode); + /** * for retreiving the Media List Count. */ @@ -83,6 +93,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 +109,7 @@ //todo remove comment void HandleCommandCompleteL( CMPXCommand* aCommandResult, TInt aError,MGlxMediaList* aList ); void HandleMediaL( TInt aListIndex, MGlxMediaList* aList ); void HandleItemModifiedL( const RArray& aItemIndexes, MGlxMediaList* aList ); + void HandlePopulatedL(MGlxMediaList* aList); public: /** @@ -103,15 +118,26 @@ HbIcon* RetrieveItemIcon(int index, GlxTBContextType aTBContextType); QImage RetrieveItemImage(int index, GlxTBContextType aTBContextType); QString RetrieveListTitle(int index); + QString RetrieveListDesc(int index); QString RetrieveListSubTitle(int index); QString RetrieveItemUri(int index); QSize RetrieveItemDimension(int index); + int RetrieveItemSize(int index); QDate RetrieveItemDate(int index); + QTime RetrieveItemTime(int index); int RetrieveItemFrameCount(int aItemIndex); CFbsBitmap* RetrieveBitmap(int aItemIndex); int RetrieveListItemCount( int aItemIndex ); bool isSystemItem( int aItemIndex ); - + /* + *Sets the context for fetcing comments + */ + void SetDescontextL(); + QString RetrieveViewTitle(); + bool IsPopulated(); + bool IsDrmProtected(int index ); + bool IsDrmValid(int index); + void setDrmValid(int index,bool valid); private: /** @@ -142,6 +168,7 @@ void RemovePtFsContext(); void RemoveListContext(); void RemoveFavouriteContext(); + void RemoveDescContext(); //for the attribute filtering TInt CheckTBAttributesPresenceandSanity(TInt aItemIndex, const RArray& aAttributes, TMPXAttribute aThumbnailAttribute ); @@ -150,6 +177,10 @@ void CheckLsFsTBAttribute(TInt aItemIndex, const RArray& aAttributes); void CheckListAttributes(TInt aItemIndex, const RArray& aAttributes); /* + * to check the attributes returned for details view is present + */ + void CheckDetailsAttributes(TInt aItemIndex, const RArray& aAttributes); + /* * convert the CFbsbitmap to HbIcon */ HbIcon *convertFBSBitmapToHbIcon(CFbsBitmap* aBitmap); @@ -175,7 +206,6 @@ CGlxDefaultThumbnailContext* iLsFsThumbnailContext; CGlxDefaultThumbnailContext* iFocusFsThumbnailContext; CGlxDefaultThumbnailContext* iFocusGridThumbnailContext; - CGlxThumbnailContext* iFilmStripThumbnailContext; //List related contexts // Fetch context for retrieving title attribute @@ -187,6 +217,9 @@ //to find if the image is in favorites or not CGlxDefaultAttributeContext *iFavouriteContext; + //To fetch the details + CGlxDefaultAttributeContext *iDescContext; + CGlxThumbnailContext* iListThumbnailContext; // for thumbnail context TGlxFromVisibleIndexOutwardListIterator iThumbnailIterator; @@ -202,7 +235,11 @@ TBool iPtFsContextActivated; TBool iLsListContextActivated; //currently not used as we have not implemented the logic for 3 thumbnails TBool iPtListContextActivated; + TBool iDetailsContextActivated; //this is to fetch the comments attributes TBool iSelectionListContextActivated; - + CGlxTitleFetcher* iTitleFetcher; + QImage iCorruptImage; + QString iViewTitle; + CGlxDRMUtility * iDrmUtility; }; #endif //GLXMLWRAPPER_P_H diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/inc/glxtitlefetcher.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/medialistwrapper/inc/glxtitlefetcher.h Thu Jul 22 16:33:32 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 +#include +#include +#include +#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& /*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& 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 diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/inc/mglxtitlefetcherobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/medialistwrapper/inc/mglxtitlefetcherobserver.h Thu Jul 22 16:33:32 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 +//#include +//#include + +/** + * MGlxTitleFetcherObserver + * + * Title fetcher interface + */ +class MGlxTitleFetcherObserver + { +public: + /** + * Handle the title + * @param aTitle The title + */ + virtual void HandleTitleAvailableL(const TDesC& aTitle) = 0; + + }; + + + + +#endif // MGLXTITLEFETCHEROBSERVER_H diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/medialistwrapper.pro --- a/ui/uiengine/medialistwrapper/medialistwrapper.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialistwrapper/medialistwrapper.pro Thu Jul 22 16:33:32 2010 +0100 @@ -42,12 +42,24 @@ TARGET.UID3 = 0x20000A0B TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE + } # 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 -DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT \ No newline at end of file +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxmedialistwrapper.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxmedialistwrapper.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/src/glxmlgenericobserver.cpp --- a/ui/uiengine/medialistwrapper/src/glxmlgenericobserver.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialistwrapper/src/glxmlgenericobserver.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -206,3 +206,10 @@ iMLWrapperPrivate->HandleItemModifiedL(aItemIndexes, aList); } +void CGlxMLGenericObserver::HandlePopulatedL(MGlxMediaList* aList) + { + TRACER("CGlxMLGenericObserver::HandlePopulatedL()"); + iMLWrapperPrivate->HandlePopulatedL(aList); + } + + diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp --- a/ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -52,6 +52,17 @@ } // --------------------------------------------------------------------------- +// removeContextMode. +// --------------------------------------------------------------------------- +// +void GlxMLWrapper::removeContextMode(GlxContextMode contextMode) +{ + mMLWrapperPrivate->RemoveContextMode(contextMode); +} + + + +// --------------------------------------------------------------------------- // getItemCount. // --------------------------------------------------------------------------- // @@ -92,6 +103,16 @@ { return (mMLWrapperPrivate->RetrieveListSubTitle(index)); } + +// --------------------------------------------------------------------------- +// retrieveListDesc. +// --------------------------------------------------------------------------- +// +QString GlxMLWrapper::retrieveListDesc(int index) +{ + return (mMLWrapperPrivate->RetrieveListDesc(index)); +} + // --------------------------------------------------------------------------- // retrieveItemUri. // --------------------------------------------------------------------------- @@ -109,16 +130,68 @@ return (mMLWrapperPrivate->RetrieveItemDimension(index)); } +// --------------------------------------------------------------------------- +// retrieveItemSize. +// --------------------------------------------------------------------------- +// +int GlxMLWrapper::retrieveItemSize(int index) +{ + return (mMLWrapperPrivate->RetrieveItemSize(index)); +} + +// --------------------------------------------------------------------------- +// retrieveItemDate. +// --------------------------------------------------------------------------- +// QDate GlxMLWrapper::retrieveItemDate(int index) { return (mMLWrapperPrivate->RetrieveItemDate(index)); } +// --------------------------------------------------------------------------- +// retrieveItemTime. +// --------------------------------------------------------------------------- +// +QTime GlxMLWrapper::retrieveItemTime(int index) +{ + return (mMLWrapperPrivate->RetrieveItemTime(index)); +} + + int GlxMLWrapper::retrieveItemFrameCount(int index) { return (mMLWrapperPrivate->RetrieveItemFrameCount(index)); } +QString GlxMLWrapper::retrieveViewTitle() +{ + return (mMLWrapperPrivate->RetrieveViewTitle()); +} + +void GlxMLWrapper::handlepopulated() +{ + emit populated(); +} + +bool GlxMLWrapper::IsPopulated() +{ + return mMLWrapperPrivate->IsPopulated(); +} + +bool GlxMLWrapper::IsDrmProtected(int index) + { + return mMLWrapperPrivate->IsDrmProtected(index); + } +bool GlxMLWrapper::IsDrmValid(int index) + { + return mMLWrapperPrivate->IsDrmValid(index); + } + +void GlxMLWrapper::setDrmValid(int index,bool valid) + { + mMLWrapperPrivate->setDrmValid(index,valid); + } + QVariant GlxMLWrapper::RetrieveBitmap(int index) { QVariant var; @@ -230,6 +303,16 @@ // --------------------------------------------------------------------------- +// handleDetailsItemAvailable. +// --------------------------------------------------------------------------- +// +void GlxMLWrapper::handleDetailsItemAvailable(int itemIndex) +{ + + emit updateDetails(); +} + +// --------------------------------------------------------------------------- // handleGeneralError. // --------------------------------------------------------------------------- // @@ -238,4 +321,12 @@ Q_UNUSED(aError); } +// --------------------------------------------------------------------------- +// handleTitleAvailable. +// --------------------------------------------------------------------------- +// +void GlxMLWrapper::handleTitleAvailable(QString aTitle) +{ + emit updateAlbumTitle(aTitle); +} diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp --- a/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #include //internal includes @@ -46,6 +44,8 @@ //#define GLXPERFORMANCE_LOG #include +#include "glxtitlefetcher.h" +#include"glxdrmutility.h" //constant declaration const TInt KTBAttributeAvailable(1); @@ -88,11 +88,15 @@ // might leave. // --------------------------------------------------------------------------- // -GlxMLWrapperPrivate::GlxMLWrapperPrivate(GlxMLWrapper* aMLWrapper): iMLWrapper(aMLWrapper), - iGridContextActivated(EFalse), iLsFsContextActivated(EFalse), - iPtFsContextActivated(EFalse), iPtListContextActivated(EFalse), - iSelectionListContextActivated(EFalse) - { +GlxMLWrapperPrivate::GlxMLWrapperPrivate(GlxMLWrapper* aMLWrapper) + : iMLWrapper(aMLWrapper), + iGridContextActivated(EFalse), + iLsFsContextActivated(EFalse), + iPtFsContextActivated(EFalse), + iPtListContextActivated(EFalse), + iSelectionListContextActivated(EFalse), + iDetailsContextActivated(EFalse) +{ TRACER("GlxMLWrapperPrivate::GlxMLWrapperPrivate"); iGridThumbnailContext = NULL; iPtFsThumbnailContext = NULL; @@ -102,8 +106,9 @@ iListThumbnailContext = NULL; iFocusGridThumbnailContext = NULL; iFocusFsThumbnailContext = NULL; - iFilmStripThumbnailContext = NULL; - iFavouriteContext = NULL; + iFavouriteContext = NULL; + iTitleFetcher = NULL; + iViewTitle = QString(); } // --------------------------------------------------------------------------- @@ -128,6 +133,7 @@ } iMLGenericObserver = CGlxMLGenericObserver::NewL(*iMediaList,this); iBlockyIteratorForFilmStrip.SetRangeOffsets(0,0); + iDrmUtility = CGlxDRMUtility::InstanceL(); } // --------------------------------------------------------------------------- @@ -137,6 +143,10 @@ GlxMLWrapperPrivate::~GlxMLWrapperPrivate() { TRACER("GlxMLWrapperPrivate::~GlxMLWrapperPrivate"); + if ( iDrmUtility ) + { + iDrmUtility->Close(); + } RemoveGridContext(); RemovePtFsContext(); RemoveLsFsContext(); @@ -161,9 +171,13 @@ { TRAP(err, SetThumbnailContextL(aContextMode) ); //todo add a trap here } - else if(aContextMode == GlxContextFavorite) + else if(aContextMode == GlxContextFavorite) + { + TRAP(err,SetFavouriteContextL()); + } + else if(aContextMode == GlxContextComment) { - TRAP(err,SetFavouriteContextL()); + TRAP(err,SetDescontextL()); } else { @@ -175,6 +189,17 @@ } // --------------------------------------------------------------------------- +// RemoveContextMode +// --------------------------------------------------------------------------- +// +void GlxMLWrapperPrivate::RemoveContextMode(GlxContextMode aContextMode) +{ + if(aContextMode == GlxContextComment) + { + RemoveDescContext(); + } +} +// --------------------------------------------------------------------------- // SetFavouriteContextL // --------------------------------------------------------------------------- // @@ -277,9 +302,9 @@ } if(aContextMode == GlxContextLsFs && !iLsFsContextActivated) { - if(iGridContextActivated) { - RemoveGridContext(); - } + if(!iGridContextActivated) { + CreateGridContextL(); + } if(iPtFsContextActivated) { RemovePtFsContext(); } @@ -287,9 +312,9 @@ } if(aContextMode == GlxContextPtFs && !iPtFsContextActivated) { - if(iGridContextActivated) { - RemoveGridContext(); - } + if(!iGridContextActivated) { + CreateGridContextL(); + } if(iLsFsContextActivated) { RemoveLsFsContext(); } @@ -318,7 +343,11 @@ iMediaList->AddContextL(iGridThumbnailContext, KGlxFetchContextPriorityNormal ); iGridContextActivated = ETrue; } - + + CMPXCollectionPath* path = iMediaList->PathLC( NGlxListDefs::EPathParent ); + iTitleFetcher = CGlxTitleFetcher::NewL(*this, path); + CleanupStack::PopAndDestroy(path); + } // --------------------------------------------------------------------------- @@ -352,18 +381,11 @@ iFocusGridThumbnailContext->SetDefaultSpec( KGridTNWIdth, KGridTNHeight ); //todo get these image sizes from the layout. } - if(!iFilmStripThumbnailContext) - { - iFilmStripThumbnailContext = CGlxThumbnailContext::NewL( &iBlockyIteratorForFilmStrip ); // set the thumbnail context for Focus Grid - iFilmStripThumbnailContext->SetDefaultSpec( KGridTNWIdth, KGridTNHeight ); //todo get these image sizes from the layout. - } - // show static items if required iMediaList->SetStaticItemsEnabled(EFalse); - iMediaList->AddContextL(iFocusFsThumbnailContext, 8 ); // Temp will change this number - iMediaList->AddContextL(iFocusGridThumbnailContext, 9 ); // Temp will change this number - iMediaList->AddContextL(iFilmStripThumbnailContext, 7 ); // Temp will change this number - iMediaList->AddContextL(iLsFsThumbnailContext, KGlxFetchContextPriorityGridViewFullscreenVisibleThumbnail ); + iMediaList->AddContextL(iFocusFsThumbnailContext, KGlxFetchContextPriorityNormal ); // Temp will change this number + iMediaList->AddContextL(iFocusGridThumbnailContext, KGlxFetchContextPriorityNormal ); // Temp will change this number + iMediaList->AddContextL(iLsFsThumbnailContext, KGlxFetchContextPriorityNormal ); iLsFsContextActivated = ETrue; } } @@ -399,18 +421,11 @@ iFocusGridThumbnailContext->SetDefaultSpec( KGridTNWIdth, KGridTNHeight ); //todo get these image sizes from the layout. } - if(!iFilmStripThumbnailContext) - { - iFilmStripThumbnailContext = CGlxThumbnailContext::NewL( &iBlockyIteratorForFilmStrip ); // set the thumbnail context for Focus Grid - iFilmStripThumbnailContext->SetDefaultSpec( KGridTNPTWIdth, KGridTNPTHeight ); //todo get these image sizes from the layout. - } - // show static items if required iMediaList->SetStaticItemsEnabled(EFalse); - iMediaList->AddContextL(iFocusFsThumbnailContext, 8 ); // Temp will change this number - iMediaList->AddContextL(iFocusGridThumbnailContext, 9 ); // Temp will change this number - iMediaList->AddContextL(iFilmStripThumbnailContext, 7 ); // Temp will change this number - iMediaList->AddContextL(iPtFsThumbnailContext, KGlxFetchContextPriorityGridViewFullscreenVisibleThumbnail ); + iMediaList->AddContextL(iFocusFsThumbnailContext, KGlxFetchContextPriorityNormal ); // Temp will change this number + iMediaList->AddContextL(iFocusGridThumbnailContext, KGlxFetchContextPriorityNormal ); // Temp will change this number + iMediaList->AddContextL(iPtFsThumbnailContext, KGlxFetchContextPriorityNormal ); iPtFsContextActivated = ETrue; } } @@ -428,6 +443,8 @@ iGridThumbnailContext = NULL; iGridContextActivated = EFalse; } + delete iTitleFetcher; + iTitleFetcher = NULL; } // --------------------------------------------------------------------------- @@ -455,12 +472,6 @@ delete iFocusGridThumbnailContext; iFocusGridThumbnailContext = NULL; } - if(iFilmStripThumbnailContext) - { - iMediaList->RemoveContext(iFilmStripThumbnailContext); - delete iFilmStripThumbnailContext; - iFilmStripThumbnailContext = NULL; - } iLsFsContextActivated = EFalse; } @@ -491,12 +502,6 @@ delete iFocusGridThumbnailContext; iFocusGridThumbnailContext = NULL; } - if(iFilmStripThumbnailContext) - { - iMediaList->RemoveContext(iFilmStripThumbnailContext); - delete iFilmStripThumbnailContext; - iFilmStripThumbnailContext = NULL; - } iPtFsContextActivated = EFalse; } @@ -592,7 +597,12 @@ filter = TGlxFilterFactory::CreateCameraAlbumExclusionFilterL(); CleanupStack::PushL(filter); } - else + else if(EGlxFilterImage == aFilterType) + { + filter = TGlxFilterFactory::CreateExcludeDrmImageTypeFilterL(aFilterType); + CleanupStack::PushL(filter); + } + else { filter = TGlxFilterFactory::CreateItemTypeFilterL(aFilterType); //todo take actual filter type CleanupStack::PushL(filter); @@ -617,6 +627,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 +761,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(); @@ -779,6 +802,18 @@ } // --------------------------------------------------------------------------- +// RetrieveListDesc +// --------------------------------------------------------------------------- +// +QString GlxMLWrapperPrivate::RetrieveListDesc(int aItemIndex) +{ + const TGlxMedia& item = iMediaList->Item( aItemIndex ); + const TDesC &commentstring = item.Comment(); + QString descstring = QString::fromUtf16(commentstring.Ptr(), commentstring.Length()); + return descstring; +} + +// --------------------------------------------------------------------------- // Retrieve number of image contained by album list // --------------------------------------------------------------------------- // @@ -843,6 +878,18 @@ } // --------------------------------------------------------------------------- +// RetrieveItemSize +// --------------------------------------------------------------------------- +// +int GlxMLWrapperPrivate::RetrieveItemSize(int aItemIndex) +{ + const TGlxMedia& item = iMediaList->Item( aItemIndex ); + int itemSize ; + item.GetSize(itemSize); + return itemSize; + } + +// --------------------------------------------------------------------------- // RetrieveItemDate // --------------------------------------------------------------------------- // @@ -861,6 +908,29 @@ } return date; } + +// --------------------------------------------------------------------------- +// RetrieveItemTime +// --------------------------------------------------------------------------- +// +QTime GlxMLWrapperPrivate::RetrieveItemTime(int index) + { + GLX_LOG_INFO1("GlxMLWrapperPrivate::RetrieveItemTime %d",index); + const TGlxMedia& item = iMediaList->Item( index ); + TTime TimeValue; + QTime time = QTime(); + TBool returnValue =item.GetDate(TimeValue); + + if(returnValue) + { + GLX_LOG_INFO1("GlxMLWrapperPrivate::RetrieveItemDate %d",returnValue); + TDateTime dateTime = TimeValue.DateTime(); + time = QTime(dateTime.Hour(),dateTime.Minute()); + } + return time; + } + + // --------------------------------------------------------------------------- // RetrieveFsBitmap @@ -870,9 +940,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 +1011,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 @@ -951,7 +1046,9 @@ CheckLsFsTBAttribute(aItemIndex, aAttributes); if (iPtListContextActivated || iSelectionListContextActivated) CheckListAttributes(aItemIndex, aAttributes); - // } + if( iDetailsContextActivated && aItemIndex == iMediaList->FocusIndex() ) + CheckDetailsAttributes(aItemIndex, aAttributes); + } // --------------------------------------------------------------------------- // CheckGridTBAttribute @@ -1082,6 +1179,29 @@ return searchStatus; } + +// --------------------------------------------------------------------------- +// CheckDetailsAttributes +// --------------------------------------------------------------------------- +// +void GlxMLWrapperPrivate::CheckDetailsAttributes(TInt aItemIndex, const RArray& aAttributes) +{ + qDebug("GlxMLWrapperPrivate::CheckDetailsAttributes"); + TBool attribPresent = EFalse; + TMPXAttribute titleAttrib(KMPXMediaGeneralComment); + TIdentityRelation< TMPXAttribute > match ( &TMPXAttribute::Match ); + + const TGlxMedia& item = iMediaList->Item(aItemIndex); + + if (KErrNotFound != aAttributes.Find(titleAttrib, match)) + { + qDebug("GlxMLWrapperPrivate::CheckDetailsAttributes TRUE"); + attribPresent = ETrue; + iMLWrapper->handleDetailsItemAvailable(aItemIndex); + GLX_LOG_INFO1("### GlxMLWrapperPrivate::CheckDetailsAttributes title present %d",aItemIndex); + } +} + // --------------------------------------------------------------------------- // GetItemCount // --------------------------------------------------------------------------- @@ -1119,6 +1239,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 +1283,12 @@ Q_UNUSED(aList); } +void GlxMLWrapperPrivate::HandlePopulatedL(MGlxMediaList* aList) +{ + Q_UNUSED(aList); + iMLWrapper->handlepopulated(); +} + // --------------------------------------------------------------------------- // GetItemCount // --------------------------------------------------------------------------- @@ -1243,3 +1370,113 @@ { iMediaList->SetVisibleWindowIndexL(aItemIndex); } + +// ----------------------------------------------------------------------------- +// HandleTitleAvailableL +// ----------------------------------------------------------------------------- +// +void GlxMLWrapperPrivate::HandleTitleAvailableL( + const TDesC& aTitle) + { + iViewTitle = QString::fromUtf16(aTitle.Ptr(), aTitle.Length()); + iMLWrapper->handleTitleAvailable(iViewTitle); + } + +QString GlxMLWrapperPrivate::RetrieveViewTitle() + { + return iViewTitle; + } + +bool GlxMLWrapperPrivate::IsPopulated() + { + return iMediaList->IsPopulated(); + } + +// --------------------------------------------------------------------------- +// SetDescontextL +// --------------------------------------------------------------------------- +// +void GlxMLWrapperPrivate::SetDescontextL() + { + iDescContext = CGlxDefaultAttributeContext::NewL(); + iDescContext->AddAttributeL( KMPXMediaGeneralComment ); + iMediaList->AddContextL( iDescContext, KGlxFetchContextPriorityLow ); + iDetailsContextActivated = ETrue; + } + +// --------------------------------------------------------------------------- +// RemoveDescContext +// --------------------------------------------------------------------------- +// +void GlxMLWrapperPrivate::RemoveDescContext() + { + if(iDescContext ) + { + iMediaList->RemoveContext(iDescContext); + delete iDescContext; + iDescContext = NULL; + iDetailsContextActivated = EFalse; + } + } + +bool GlxMLWrapperPrivate::IsDrmProtected(int index) + { + TInt itemIndex = index; + if(-1 == itemIndex) + { + itemIndex = iMediaList->FocusIndex(); + } + const TGlxMedia& media = iMediaList->Item(itemIndex); + return media.IsDrmProtected(); + } + +bool GlxMLWrapperPrivate::IsDrmValid(int index) + { + TInt itemIndex = index; + if(-1 == itemIndex) + { + itemIndex = iMediaList->FocusIndex(); + } + + const TGlxMedia& media = iMediaList->Item(itemIndex); + TGlxMediaGeneralRightsValidity isValid = EGlxDrmRightsValidityUnknown; + TBool ret = media.GetDrmValidity(isValid); + if(ret && EGlxDrmRightsValidityUnknown == isValid ) + { + // check rights + TMPXGeneralCategory cat = media.Category(); + const TDesC& uri = media.Uri(); + if ( uri.Length() && cat != EMPXNoCategory ) + { + TBool valid = iDrmUtility->ItemRightsValidityCheckL( uri, ( cat == EMPXImage ) ); + CGlxMedia* properties = const_cast(media.Properties()); + if( valid ) + { + + isValid = EGlxDrmRightsValid; + } + else + { + + isValid = EGlxDrmRightsInvalid; + } + properties->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid, isValid); + } + } + return ( EGlxDrmRightsValid == isValid ); + } + +void GlxMLWrapperPrivate::setDrmValid(int index,bool valid) + { + const TGlxMedia& media = iMediaList->Item(index); + CGlxMedia* properties = const_cast(media.Properties()); + if(valid) + { + properties->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid, EGlxDrmRightsValid); + } + else + { + properties->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid, EGlxDrmRightsInvalid); + } + } + diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/medialistwrapper/src/glxtitlefetcher.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/uiengine/medialistwrapper/src/glxtitlefetcher.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,207 @@ +/* +* 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 +#include +#include +#include +#include +#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 ) + { + //For This Level, Opening a collection is nothing but open EGlxCollectionPluginShowInMainListView + //We dont need this in 10.1 + 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& /*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 diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/bwins/glxlistmodelu.def --- a/ui/uiengine/model/bwins/glxlistmodelu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/bwins/glxlistmodelu.def Thu Jul 22 16:33:32 2010 +0100 @@ -27,4 +27,6 @@ ?data@GlxAlbumModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 26 NONAME ; class QVariant GlxAlbumModel::data(class QModelIndex const &, int) const ?metaObject@GlxAlbumModel@@UBEPBUQMetaObject@@XZ @ 27 NONAME ; struct QMetaObject const * GlxAlbumModel::metaObject(void) const ?setData@GlxAlbumModel@@UAE_NABVQModelIndex@@ABVQVariant@@H@Z @ 28 NONAME ; bool GlxAlbumModel::setData(class QModelIndex const &, class QVariant const &, int) + ?listPopulated@GlxAlbumModel@@IAEXXZ @ 29 NONAME ; void GlxAlbumModel::listPopulated(void) + ?modelPopulated@GlxAlbumModel@@QAEXXZ @ 30 NONAME ; void GlxAlbumModel::modelPopulated(void) diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/bwins/glxmediamodelu.def --- a/ui/uiengine/model/bwins/glxmediamodelu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/bwins/glxmediamodelu.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,35 +1,42 @@ EXPORTS - ?addExternalItems@GlxMediaModel@@QAEXPAV?$QList@UGlxInterfaceParams@@@@@Z @ 1 NONAME ; void GlxMediaModel::addExternalItems(class QList *) - ?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 *) + ?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) + ?updateDetailsView@GlxMediaModel@@IAEXXZ @ 38 NONAME ; void GlxMediaModel::updateDetailsView(void) + ?removeContextMode@GlxMediaModel@@AAEXW4GlxContextMode@@@Z @ 39 NONAME ; void GlxMediaModel::removeContextMode(enum GlxContextMode) + ?updateDetailItems@GlxMediaModel@@QAEXXZ @ 40 NONAME ; void GlxMediaModel::updateDetailItems(void) diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/bwins/glxmodelwrapperu.def --- a/ui/uiengine/model/bwins/glxmodelwrapperu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/bwins/glxmodelwrapperu.def Thu Jul 22 16:33:32 2010 +0100 @@ -11,24 +11,24 @@ ?getStaticMetaObject@GlxModelWrapper@@SAABUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const & GlxModelWrapper::getStaticMetaObject(void) ?index@GlxModelWrapper@@UBE?AVQModelIndex@@HHABV2@@Z @ 11 NONAME ; class QModelIndex GlxModelWrapper::index(int, int, class QModelIndex const &) const ?rowsAboutToBeInserted@GlxModelWrapper@@IAEXABVQModelIndex@@HH@Z @ 12 NONAME ; void GlxModelWrapper::rowsAboutToBeInserted(class QModelIndex const &, int, int) - ?data@GlxModelWrapper@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 13 NONAME ; class QVariant GlxModelWrapper::data(class QModelIndex const &, int) const - ?staticMetaObject@GlxModelWrapper@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const GlxModelWrapper::staticMetaObject - ?scrollingEnded@GlxModelWrapper@@QAEXXZ @ 15 NONAME ; void GlxModelWrapper::scrollingEnded(void) - ?rowsRemoved@GlxModelWrapper@@IAEXABVQModelIndex@@HH@Z @ 16 NONAME ; void GlxModelWrapper::rowsRemoved(class QModelIndex const &, int, int) - ?basemodelindex@GlxModelWrapper@@QBE?AVQModelIndex@@HHABV2@@Z @ 17 NONAME ; class QModelIndex GlxModelWrapper::basemodelindex(int, int, class QModelIndex const &) const - ?columnCount@GlxModelWrapper@@UBEHABVQModelIndex@@@Z @ 18 NONAME ; int GlxModelWrapper::columnCount(class QModelIndex const &) const - ?parent@GlxModelWrapper@@UBE?AVQModelIndex@@ABV2@@Z @ 19 NONAME ; class QModelIndex GlxModelWrapper::parent(class QModelIndex const &) const - ?rowsInserted@GlxModelWrapper@@IAEXABVQModelIndex@@HH@Z @ 20 NONAME ; void GlxModelWrapper::rowsInserted(class QModelIndex const &, int, int) - ?disConnectFromModel@GlxModelWrapper@@AAEXXZ @ 21 NONAME ; void GlxModelWrapper::disConnectFromModel(void) - ?metaObject@GlxModelWrapper@@UBEPBUQMetaObject@@XZ @ 22 NONAME ; struct QMetaObject const * GlxModelWrapper::metaObject(void) const - ??1GlxModelWrapper@@UAE@XZ @ 23 NONAME ; GlxModelWrapper::~GlxModelWrapper(void) - ?connectToModel@GlxModelWrapper@@AAEXXZ @ 24 NONAME ; void GlxModelWrapper::connectToModel(void) - ?setModel@GlxModelWrapper@@QAEXPAVQAbstractItemModel@@@Z @ 25 NONAME ; void GlxModelWrapper::setModel(class QAbstractItemModel *) - ?tr@GlxModelWrapper@@SA?AVQString@@PBD0H@Z @ 26 NONAME ; class QString GlxModelWrapper::tr(char const *, char const *, int) - ?qt_metacall@GlxModelWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 27 NONAME ; int GlxModelWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) - ?setRoles@GlxModelWrapper@@QAEXHH@Z @ 28 NONAME ; void GlxModelWrapper::setRoles(int, int) - ?scrollingStarted@GlxModelWrapper@@QAEXXZ @ 29 NONAME ; void GlxModelWrapper::scrollingStarted(void) - ?trUtf8@GlxModelWrapper@@SA?AVQString@@PBD0H@Z @ 30 NONAME ; class QString GlxModelWrapper::trUtf8(char const *, char const *, int) - ?qt_metacast@GlxModelWrapper@@UAEPAXPBD@Z @ 31 NONAME ; void * GlxModelWrapper::qt_metacast(char const *) - ?resetTheModel@GlxModelWrapper@@AAEXXZ @ 32 NONAME ; void GlxModelWrapper::resetTheModel(void) + ?resetTheModel@GlxModelWrapper@@AAEXXZ @ 13 NONAME ; void GlxModelWrapper::resetTheModel(void) + ?data@GlxModelWrapper@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 14 NONAME ; class QVariant GlxModelWrapper::data(class QModelIndex const &, int) const + ?staticMetaObject@GlxModelWrapper@@2UQMetaObject@@B @ 15 NONAME ; struct QMetaObject const GlxModelWrapper::staticMetaObject + ?scrollingEnded@GlxModelWrapper@@QAEXXZ @ 16 NONAME ; void GlxModelWrapper::scrollingEnded(void) + ?rowsRemoved@GlxModelWrapper@@IAEXABVQModelIndex@@HH@Z @ 17 NONAME ; void GlxModelWrapper::rowsRemoved(class QModelIndex const &, int, int) + ?basemodelindex@GlxModelWrapper@@QBE?AVQModelIndex@@HHABV2@@Z @ 18 NONAME ; class QModelIndex GlxModelWrapper::basemodelindex(int, int, class QModelIndex const &) const + ?columnCount@GlxModelWrapper@@UBEHABVQModelIndex@@@Z @ 19 NONAME ; int GlxModelWrapper::columnCount(class QModelIndex const &) const + ?parent@GlxModelWrapper@@UBE?AVQModelIndex@@ABV2@@Z @ 20 NONAME ; class QModelIndex GlxModelWrapper::parent(class QModelIndex const &) const + ?rowsInserted@GlxModelWrapper@@IAEXABVQModelIndex@@HH@Z @ 21 NONAME ; void GlxModelWrapper::rowsInserted(class QModelIndex const &, int, int) + ?disConnectFromModel@GlxModelWrapper@@AAEXXZ @ 22 NONAME ; void GlxModelWrapper::disConnectFromModel(void) + ?metaObject@GlxModelWrapper@@UBEPBUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const * GlxModelWrapper::metaObject(void) const + ??1GlxModelWrapper@@UAE@XZ @ 24 NONAME ; GlxModelWrapper::~GlxModelWrapper(void) + ?connectToModel@GlxModelWrapper@@AAEXXZ @ 25 NONAME ; void GlxModelWrapper::connectToModel(void) + ?setModel@GlxModelWrapper@@QAEXPAVQAbstractItemModel@@@Z @ 26 NONAME ; void GlxModelWrapper::setModel(class QAbstractItemModel *) + ?tr@GlxModelWrapper@@SA?AVQString@@PBD0H@Z @ 27 NONAME ; class QString GlxModelWrapper::tr(char const *, char const *, int) + ?qt_metacall@GlxModelWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 28 NONAME ; int GlxModelWrapper::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setRoles@GlxModelWrapper@@QAEXHH@Z @ 29 NONAME ; void GlxModelWrapper::setRoles(int, int) + ?scrollingStarted@GlxModelWrapper@@QAEXXZ @ 30 NONAME ; void GlxModelWrapper::scrollingStarted(void) + ?trUtf8@GlxModelWrapper@@SA?AVQString@@PBD0H@Z @ 31 NONAME ; class QString GlxModelWrapper::trUtf8(char const *, char const *, int) + ?qt_metacast@GlxModelWrapper@@UAEPAXPBD@Z @ 32 NONAME ; void * GlxModelWrapper::qt_metacast(char const *) diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/eabi/glxlistmodelu.def --- a/ui/uiengine/model/eabi/glxlistmodelu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/eabi/glxlistmodelu.def Thu Jul 22 16:33:32 2010 +0100 @@ -27,4 +27,6 @@ _ZNK13GlxAlbumModel8rowCountERK11QModelIndex @ 26 NONAME _ZTI13GlxAlbumModel @ 27 NONAME _ZTV13GlxAlbumModel @ 28 NONAME + _ZN13GlxAlbumModel13listPopulatedEv @ 29 NONAME + _ZN13GlxAlbumModel14modelPopulatedEv @ 30 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/eabi/glxmediamodelu.def --- a/ui/uiengine/model/eabi/glxmediamodelu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/eabi/glxmediamodelu.def Thu Jul 22 16:33:32 2010 +0100 @@ -4,32 +4,39 @@ _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 + _ZN13GlxMediaModel17removeContextModeE14GlxContextMode @ 38 NONAME + _ZN13GlxMediaModel17updateDetailItemsEv @ 39 NONAME + _ZN13GlxMediaModel17updateDetailsViewEv @ 40 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/eabi/glxmodelwrapperu.def --- a/ui/uiengine/model/eabi/glxmodelwrapperu.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/eabi/glxmodelwrapperu.def Thu Jul 22 16:33:32 2010 +0100 @@ -3,32 +3,32 @@ _ZN15GlxModelWrapper11qt_metacastEPKc @ 2 NONAME _ZN15GlxModelWrapper11rowsRemovedERK11QModelIndexii @ 3 NONAME _ZN15GlxModelWrapper12rowsInsertedERK11QModelIndexii @ 4 NONAME - _ZN15GlxModelWrapper14connectToModelEv @ 5 NONAME - _ZN15GlxModelWrapper14modelDestroyedEv @ 6 NONAME - _ZN15GlxModelWrapper14scrollingEndedEv @ 7 NONAME - _ZN15GlxModelWrapper16scrollingStartedEv @ 8 NONAME - _ZN15GlxModelWrapper16staticMetaObjectE @ 9 NONAME DATA 16 - _ZN15GlxModelWrapper18dataChangedinModelE11QModelIndexS0_ @ 10 NONAME - _ZN15GlxModelWrapper19disConnectFromModelEv @ 11 NONAME - _ZN15GlxModelWrapper19getStaticMetaObjectEv @ 12 NONAME - _ZN15GlxModelWrapper20rowsAboutToBeRemovedERK11QModelIndexii @ 13 NONAME - _ZN15GlxModelWrapper21rowsAboutToBeInsertedERK11QModelIndexii @ 14 NONAME - _ZN15GlxModelWrapper7setDataERK11QModelIndexRK8QVarianti @ 15 NONAME - _ZN15GlxModelWrapper8setModelEP18QAbstractItemModel @ 16 NONAME - _ZN15GlxModelWrapper8setRolesEii @ 17 NONAME - _ZN15GlxModelWrapperC1Ev @ 18 NONAME - _ZN15GlxModelWrapperC2Ev @ 19 NONAME - _ZN15GlxModelWrapperD0Ev @ 20 NONAME - _ZN15GlxModelWrapperD1Ev @ 21 NONAME - _ZN15GlxModelWrapperD2Ev @ 22 NONAME - _ZNK15GlxModelWrapper10metaObjectEv @ 23 NONAME - _ZNK15GlxModelWrapper11columnCountERK11QModelIndex @ 24 NONAME - _ZNK15GlxModelWrapper14basemodelindexEiiRK11QModelIndex @ 25 NONAME - _ZNK15GlxModelWrapper4dataERK11QModelIndexi @ 26 NONAME - _ZNK15GlxModelWrapper5indexEiiRK11QModelIndex @ 27 NONAME - _ZNK15GlxModelWrapper6parentERK11QModelIndex @ 28 NONAME - _ZNK15GlxModelWrapper8rowCountERK11QModelIndex @ 29 NONAME - _ZTI15GlxModelWrapper @ 30 NONAME - _ZTV15GlxModelWrapper @ 31 NONAME - _ZN15GlxModelWrapper13resetTheModelEv @ 32 NONAME + _ZN15GlxModelWrapper13resetTheModelEv @ 5 NONAME + _ZN15GlxModelWrapper14connectToModelEv @ 6 NONAME + _ZN15GlxModelWrapper14modelDestroyedEv @ 7 NONAME + _ZN15GlxModelWrapper14scrollingEndedEv @ 8 NONAME + _ZN15GlxModelWrapper16scrollingStartedEv @ 9 NONAME + _ZN15GlxModelWrapper16staticMetaObjectE @ 10 NONAME DATA 16 + _ZN15GlxModelWrapper18dataChangedinModelE11QModelIndexS0_ @ 11 NONAME + _ZN15GlxModelWrapper19disConnectFromModelEv @ 12 NONAME + _ZN15GlxModelWrapper19getStaticMetaObjectEv @ 13 NONAME + _ZN15GlxModelWrapper20rowsAboutToBeRemovedERK11QModelIndexii @ 14 NONAME + _ZN15GlxModelWrapper21rowsAboutToBeInsertedERK11QModelIndexii @ 15 NONAME + _ZN15GlxModelWrapper7setDataERK11QModelIndexRK8QVarianti @ 16 NONAME + _ZN15GlxModelWrapper8setModelEP18QAbstractItemModel @ 17 NONAME + _ZN15GlxModelWrapper8setRolesEii @ 18 NONAME + _ZN15GlxModelWrapperC1Ev @ 19 NONAME + _ZN15GlxModelWrapperC2Ev @ 20 NONAME + _ZN15GlxModelWrapperD0Ev @ 21 NONAME + _ZN15GlxModelWrapperD1Ev @ 22 NONAME + _ZN15GlxModelWrapperD2Ev @ 23 NONAME + _ZNK15GlxModelWrapper10metaObjectEv @ 24 NONAME + _ZNK15GlxModelWrapper11columnCountERK11QModelIndex @ 25 NONAME + _ZNK15GlxModelWrapper14basemodelindexEiiRK11QModelIndex @ 26 NONAME + _ZNK15GlxModelWrapper4dataERK11QModelIndexi @ 27 NONAME + _ZNK15GlxModelWrapper5indexEiiRK11QModelIndex @ 28 NONAME + _ZNK15GlxModelWrapper6parentERK11QModelIndex @ 29 NONAME + _ZNK15GlxModelWrapper8rowCountERK11QModelIndex @ 30 NONAME + _ZTI15GlxModelWrapper @ 31 NONAME + _ZTV15GlxModelWrapper @ 32 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/favmediamodel/favmediamodel.pro --- a/ui/uiengine/model/favmediamodel/favmediamodel.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/favmediamodel/favmediamodel.pro Thu Jul 22 16:33:32 2010 +0100 @@ -35,6 +35,8 @@ TARGET.UID3 = 0x20000A06 TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE + } # Input HEADERS += inc/glxfavmediamodel.h @@ -43,3 +45,12 @@ SOURCES += src/glxfavmediamodel.cpp DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxfavmediamodel.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxfavmediamodel.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/listmodel/inc/glxalbummodel.h --- a/ui/uiengine/model/listmodel/inc/glxalbummodel.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/listmodel/inc/glxalbummodel.h Thu Jul 22 16:33:32 2010 +0100 @@ -67,10 +67,12 @@ signals : void iconAvailable(int itemIndex, HbIcon* itemIcon, GlxTBContextType tbContextType) const; + void listPopulated(); public slots: void itemUpdated1(int mlIndex, GlxTBContextType tbContextType); void itemsAdded(int startIndex, int endIndex); void itemsRemoved(int startIndex, int endIndex); + void modelPopulated(); protected: private slots: @@ -80,6 +82,7 @@ GlxContextMode mContextMode; HbIcon* mDefaultIcon; QCache itemIconCache; + int mTempVisibleWindowIndex; }; #endif /* GLXALBUMMODEL_H */ diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/listmodel/listmodel.pro --- a/ui/uiengine/model/listmodel/listmodel.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/listmodel/listmodel.pro Thu Jul 22 16:33:32 2010 +0100 @@ -32,9 +32,19 @@ TARGET.UID3 = 0x20000A0A TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } # Input HEADERS += inc/glxalbummodel.h SOURCES += src/glxalbummodel.cpp -DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT \ No newline at end of file +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxlistmodel.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxlistmodel.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/listmodel/src/glxalbummodel.cpp --- a/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -48,8 +48,11 @@ qDebug("insertItems() connection status %d", err); err = connect(mMLWrapper, SIGNAL(removeItems(int, int)), this, SLOT(itemsRemoved(int, int))); qDebug("removeItems() connection status %d", err); + err = connect(mMLWrapper, SIGNAL(populated()), this, SLOT(modelPopulated())); + qDebug("populated() connection status %d", err); err = connect(this, SIGNAL(iconAvailable(int, HbIcon*, GlxTBContextType)), this, SLOT(updateItemIcon(int, HbIcon*, GlxTBContextType))); qDebug("iconAvailable() connection status %d", err); + mTempVisibleWindowIndex = 0; itemIconCache.setMaxCost(50); } @@ -62,6 +65,7 @@ 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(populated()), this, SLOT(modelPopulated())); delete mMLWrapper; mMLWrapper = NULL; itemIconCache.clear(); @@ -149,6 +153,8 @@ case GlxSystemItemRole : return mMLWrapper->isSystemItem( getFocusIndex().row() ); + case GlxVisualWindowIndex : + return mMLWrapper->getVisibleWindowIndex(); default : return QVariant(); @@ -186,6 +192,12 @@ return TRUE; } } + if ( GlxTempVisualWindowIndex == role ) { + if ( value.isValid() && value.canConvert () ) { + mTempVisibleWindowIndex = value.value (); + return TRUE; + } + } return FALSE; } @@ -232,6 +244,14 @@ return index(mMLWrapper->getFocusIndex(), 0); } +void GlxAlbumModel::modelPopulated() +{ + if ( mTempVisibleWindowIndex!=-1) { + mMLWrapper->setVisibleWindowIndex(mTempVisibleWindowIndex); + mTempVisibleWindowIndex = -1; + emit listPopulated(); + } +} void GlxAlbumModel::itemUpdated1(int mlIndex,GlxTBContextType tbContextType ) { Q_UNUSED(tbContextType); diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/mediamodel/inc/glxmediamodel.h --- a/ui/uiengine/model/mediamodel/inc/glxmediamodel.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/mediamodel/inc/glxmediamodel.h Thu Jul 22 16:33:32 2010 +0100 @@ -35,6 +35,7 @@ class HbIcon; class GlxModelParm; class GlxMLWrapper; +class GlxDRMUtilityWrapper; #include #include @@ -64,6 +65,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; @@ -72,6 +77,10 @@ * for setting the attribute context mode will be used mainly for retreiving thumbnail of different sizes. */ void setContextMode(GlxContextMode contextMode); + /* + *Removes the context + */ + void removeContextMode(GlxContextMode contextMode); void setFocusIndex(const QModelIndex &index); QModelIndex getFocusIndex() const; void setSelectedIndex(const QModelIndex &index); @@ -80,11 +89,21 @@ signals : void iconAvailable(int itemIndex, HbIcon* itemIcon, GlxTBContextType tbContextType) const; + /* + *signal to update the details view + */ + void updateDetailsView(); public slots: void itemUpdated1(int mlIndex, GlxTBContextType tbContextType); void itemsAdded(int startIndex, int endIndex); void itemsRemoved(int startIndex, int endIndex); void itemCorrupted(int itemIndex); + void albumTitleUpdated(QString aTitle); + void modelpopulated(); + /* + *Emits signal to update the details view + */ + void updateDetailItems(); protected: private slots: @@ -101,6 +120,8 @@ int externalDataCount; int mFocusIndex; int mSubState; + GlxDRMUtilityWrapper* mDRMUtilityWrapper; + int mTempVisibleWindowIndex; }; diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/mediamodel/mediamodel.pro --- a/ui/uiengine/model/mediamodel/mediamodel.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/mediamodel/mediamodel.pro Thu Jul 22 16:33:32 2010 +0100 @@ -20,12 +20,15 @@ INCLUDEPATH += . ../../../inc \ ../../../../inc \ ../../../../loggers\loggerqt\inc \ - ../../medialistwrapper/inc + ../../medialistwrapper/inc \ + ../../drmutilitywrapper/inc CONFIG += hb LIBS += -lglxmedialistwrapper.dll \ - -lglxloggerqt.dll + -lglxdrmutilitywrapper.dll \ + -lglxloggerqt.dll \ + -lglximageviewermanager.dll DEFINES += BUILD_MEDIAMODEL @@ -35,6 +38,7 @@ TARGET.UID3 = 0x20000A08 TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } # Input HEADERS += inc/glxmediamodel.h @@ -43,3 +47,13 @@ SOURCES += src/glxmediamodel.cpp DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxmediamodel.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxmediamodel.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/mediamodel/src/glxmediamodel.cpp --- a/ui/uiengine/model/mediamodel/src/glxmediamodel.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/mediamodel/src/glxmediamodel.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -23,16 +23,17 @@ #include #include #include -#include -#include #include +#include"glxdrmutilitywrapper.h" #include +#include //#define GLXPERFORMANCE_LOG #include #include "glxicondefs.h" //Contains the icon names/Ids +#include GlxMediaModel::GlxMediaModel(GlxModelParm & modelParm) { @@ -41,7 +42,7 @@ mMLWrapper = new GlxMLWrapper(modelParm.collection(),0,EGlxFilterImage); mMLWrapper->setContextMode( modelParm.contextMode() ); mContextMode = modelParm.contextMode( ) ; - + mDRMUtilityWrapper = new GlxDRMUtilityWrapper(); int err = connect(mMLWrapper, SIGNAL(updateItem(int, GlxTBContextType)), this, SLOT(itemUpdated1(int, GlxTBContextType))); qDebug("updateItem() connection status %d", err); err = connect(mMLWrapper, SIGNAL(itemCorrupted(int)), this, SLOT(itemCorrupted(int))); @@ -52,7 +53,10 @@ 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); - //itemadded.resize(mMLWrapper->getItemCount()); + err = connect( mMLWrapper, SIGNAL(updateAlbumTitle(QString)), this, SLOT(albumTitleUpdated(QString))); + qDebug("updateAlbumTitle() connection status %d", err); + err = connect(mMLWrapper, SIGNAL(populated()), this, SLOT(modelpopulated())); + err = connect(mMLWrapper, SIGNAL(updateDetails()), this, SLOT(updateDetailItems())); itemIconCache.setMaxCost(20); //Changed While Doing Media Wall itemFsIconCache.setMaxCost(5); @@ -64,44 +68,62 @@ externalDataCount = 0; mFocusIndex = -1; mSubState = -1; + mTempVisibleWindowIndex = 0; } GlxMediaModel::~GlxMediaModel() { //itemadded.clear(); qDebug("GlxMediaModel::~GlxMediaModel"); - int freeMemory = 0; - int err1 = HAL::Get( HALData::EMemoryRAMFree, freeMemory ); - qDebug("####mediaModel : Memory available before cache cleanup = %d and error is = %d ", freeMemory , err1 ); itemIconCache.clear(); itemFsIconCache.clear(); delete m_DefaultIcon; m_DefaultIcon = NULL; 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())); + err = disconnect(mMLWrapper, SIGNAL(updateDetails()), this, SLOT(updateDetailItems())); delete mMLWrapper; - + delete mDRMUtilityWrapper; } +//------------------------------------------------------------------------------------------------------------ +//setContextMode +//------------------------------------------------------------------------------------------------------------ void GlxMediaModel::setContextMode(GlxContextMode contextMode) { - if(mContextMode != contextMode) { + if(contextMode == GlxContextComment) + { + mMLWrapper->setContextMode(contextMode); + } + else + { + if(mContextMode != contextMode) { + itemFsIconCache.clear(); mMLWrapper->setContextMode(contextMode); mContextMode = contextMode; if ( mContextMode == GlxContextLsGrid || mContextMode == GlxContextPtGrid ) { itemIconCache.clear(); //emit dataChanged( index( 0, 0), index( rowCount() - 1, 0) ); // Not Needed for HgWidget - } - } + } + } + } } +//------------------------------------------------------------------------------------------------------------ +//removeContextMode +//------------------------------------------------------------------------------------------------------------ +void GlxMediaModel::removeContextMode(GlxContextMode contextMode) + { + mMLWrapper->removeContextMode(contextMode); + } + //to add external data to the model void GlxMediaModel::addExternalItems(GlxExternalData* externalItems) { @@ -157,6 +179,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 +201,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; @@ -292,7 +331,18 @@ if (role == GlxHdmiBitmap) { return mMLWrapper->RetrieveBitmap(itemIndex); } - + + if (role == GlxTimeRole) { + return mMLWrapper->retrieveItemTime(itemIndex); + } + + if (role == GlxSizeRole) { + return mMLWrapper->retrieveItemSize(itemIndex); + } + + if (role == GlxDescRole) { + return mMLWrapper->retrieveListDesc(itemIndex); + } return QVariant(); } @@ -314,8 +364,30 @@ HbIcon* GlxMediaModel::GetFsIconItem(int itemIndex, GlxTBContextType tbContextType) const { - HbIcon* itemIcon = itemFsIconCache[itemIndex]; //Initialize icon from the Cache will be NULL if Item not present - if (!itemIcon) { + HbIcon* itemIcon = NULL; //Initialize icon from the Cache will be NULL if Item not present + + bool drmProtected = mMLWrapper->IsDrmProtected(itemIndex); + if(drmProtected) + { + QString imagePath = mMLWrapper->retrieveItemUri(itemIndex); + bool rightValid = mMLWrapper->IsDrmValid(itemIndex); + if(!rightValid) + { + //show error note here + if(itemIndex == mFocusIndex ) + mDRMUtilityWrapper->ShowRightsInfo(imagePath); + return itemIcon; + } + else + { + //consumeDrmRights(imagePath); + mDRMUtilityWrapper->ConsumeRights(imagePath); + bool rightValid = mDRMUtilityWrapper->ItemRightsValidityCheck(imagePath,true); + mMLWrapper->setDrmValid(itemIndex,rightValid); + } + } + itemIcon = itemFsIconCache[itemIndex]; //Initialize icon from the Cache will be NULL if Item not present + if (!itemIcon) { itemIcon = mMLWrapper->retrieveItemIcon(itemIndex, tbContextType); if(itemIcon){ emit iconAvailable(itemIndex,itemIcon, tbContextType); @@ -359,6 +431,24 @@ emit dataChanged(index(itemIndex+externalDataCount,0),index(itemIndex+externalDataCount,0)); } +void GlxMediaModel::modelpopulated() +{ + if ( mTempVisibleWindowIndex!=-1) { + mMLWrapper->setVisibleWindowIndex(mTempVisibleWindowIndex); + mTempVisibleWindowIndex = -1; + } + emit populated(); +} + +//------------------------------------------------------------------------------------------------------------ +//updateDetailItems +//------------------------------------------------------------------------------------------------------------ +void GlxMediaModel::updateDetailItems() +{ + qDebug("GlxMediaModel::updateDetailItems"); + emit updateDetailsView(); +} + void GlxMediaModel::itemsAdded(int startIndex, int endIndex) { qDebug("GlxMediaModel::itemsAdded %d %d", startIndex, endIndex); @@ -401,15 +491,19 @@ } } +void GlxMediaModel::albumTitleUpdated(QString aTitle) +{ + emit albumTitleAvailable(aTitle); +} void GlxMediaModel::setFocusIndex(const QModelIndex &index) { qDebug("GlxMediaModel::setFocusIndex%d", index.row()); int itemIndex = index.row(); - + int mlIndex = -1; if(itemIndex >=externalDataCount) { - int mlIndex = itemIndex - externalDataCount; + mlIndex = itemIndex - externalDataCount; mMLWrapper->setFocusIndex(mlIndex); mFocusIndex = -1; } @@ -417,10 +511,22 @@ mFocusIndex = itemIndex; if(rowCount() > externalDataCount) { mMLWrapper->setFocusIndex(0); + mlIndex = 0; } } - + if(mSubState != IMAGEVIEWER_S ){ + if( mMLWrapper->IsDrmProtected(mlIndex) && (!mMLWrapper->IsDrmValid(mlIndex)) ) + { + QString imagePath = mMLWrapper->retrieveItemUri(mlIndex); + mDRMUtilityWrapper->ShowRightsInfo(imagePath); + } + }else { + CGlxImageViewerManager* CGlxImageViewerManager = CGlxImageViewerManager::InstanceL(); + const TDesC& title = CGlxImageViewerManager->ImageUri()->Des(); + QString imagePath = QString::fromUtf16(title.Ptr(),title.Length()); + mDRMUtilityWrapper->ShowRightsInfo(imagePath); + } } QModelIndex GlxMediaModel::getFocusIndex() const @@ -455,6 +561,14 @@ } } + if ( GlxRemoveContextRole == role ) { + if ( value.isValid() && value.canConvert () ) { + removeContextMode( (GlxContextMode) value.value () ); + return TRUE; + } + } + + if ( GlxFocusIndexRole == role ) { if ( value.isValid() && value.canConvert () ) { setFocusIndex( index( value.value (), 0) ); @@ -482,6 +596,12 @@ mSubState = value.value () ; return TRUE; } + if ( GlxTempVisualWindowIndex == role ) { + if ( value.isValid() && value.canConvert () ) { + mTempVisibleWindowIndex = value.value (); + return TRUE; + } + } return FALSE; } diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/model/modelwrapper/modelwrapper.pro --- a/ui/uiengine/model/modelwrapper/modelwrapper.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/model/modelwrapper/modelwrapper.pro Thu Jul 22 16:33:32 2010 +0100 @@ -30,9 +30,19 @@ TARGET.UID3 = 0x2000718C TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } # Input HEADERS += inc/glxmodelwrapper.h SOURCES += src/glxmodelwrapper.cpp -DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT \ No newline at end of file +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxmodelwrapper.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxmodelwrapper.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/uiengine/uiengine.pro --- a/ui/uiengine/uiengine.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/uiengine/uiengine.pro Thu Jul 22 16:33:32 2010 +0100 @@ -16,5 +16,6 @@ #*/ TEMPLATE = subdirs CONFIG += ordered -SUBDIRS = medialistwrapper \ +SUBDIRS = drmutilitywrapper \ + medialistwrapper \ model diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/bwins/glxstatehandleru.def --- a/ui/viewmanagement/bwins/glxstatehandleru.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/bwins/glxstatehandleru.def Thu Jul 22 16:33:32 2010 +0100 @@ -3,33 +3,40 @@ ?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) + ?eventFilter@GlxStateManager@@UAE_NPAVQObject@@PAVQEvent@@@Z @ 36 NONAME ; bool GlxStateManager::eventFilter(class QObject *, class QEvent *) + ?vanishProgressDialog@GlxStateManager@@AAEXXZ @ 37 NONAME ; void GlxStateManager::vanishProgressDialog(void) + ?launchProgressDialog@GlxStateManager@@AAEXXZ @ 38 NONAME ; void GlxStateManager::launchProgressDialog(void) + ?saveData@GlxStateManager@@QAEXXZ @ 39 NONAME ; void GlxStateManager::saveData(void) + ?launchActivity@GlxStateManager@@AAE_NXZ @ 40 NONAME ; bool GlxStateManager::launchActivity(void) diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/bwins/glxviewmanageru.def --- a/ui/viewmanagement/bwins/glxviewmanageru.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/bwins/glxviewmanageru.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,47 +1,52 @@ 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) + ?applicationReady@GlxViewManager@@IAEXXZ @ 49 NONAME ; void GlxViewManager::applicationReady(void) + ?handleReadyView@GlxViewManager@@QAEXXZ @ 50 NONAME ; void GlxViewManager::handleReadyView(void) diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/eabi/glxstatehandleru.def --- a/ui/viewmanagement/eabi/glxstatehandleru.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/eabi/glxstatehandleru.def Thu Jul 22 16:33:32 2010 +0100 @@ -6,30 +6,37 @@ _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 + _ZN15GlxStateManager11eventFilterEP7QObjectP6QEvent @ 36 NONAME + _ZN15GlxStateManager20launchProgressDialogEv @ 37 NONAME + _ZN15GlxStateManager20vanishProgressDialogEv @ 38 NONAME + _ZN15GlxStateManager14launchActivityEv @ 39 NONAME + _ZN15GlxStateManager8saveDataEv @ 40 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/eabi/glxviewmanageru.def --- a/ui/viewmanagement/eabi/glxviewmanageru.def Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/eabi/glxviewmanageru.def Thu Jul 22 16:33:32 2010 +0100 @@ -1,46 +1,52 @@ 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 + _ZN14GlxViewManager15handleReadyViewEv @ 49 NONAME + _ZN14GlxViewManager16applicationReadyEv @ 50 NONAME diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/statehandler/inc/glxstatemanager.h --- a/ui/viewmanagement/statehandler/inc/glxstatemanager.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/statehandler/inc/glxstatemanager.h Thu Jul 22 16:33:32 2010 +0100 @@ -24,6 +24,7 @@ #include #include #include +#include class GlxState; class GlxViewManager; @@ -31,6 +32,7 @@ class GlxAlbumModel; class QAbstractItemModel; class GlxActionHandler; +class GlxTNObserver; #ifdef BUILD_STATEMANAGER #define GLX_STATEMANAGER_EXPORT Q_DECL_EXPORT @@ -44,79 +46,165 @@ friend class TestGlxStateManager; public : + /* + * Constructor + */ GlxStateManager(); + + /* + * Destructor + */ virtual ~GlxStateManager(); + + /* + * Fuction to launch the application from some external world + */ void launchFromExternal(); + + /* + * Clean the all externel data + */ void cleanupExternal(); - //internal exposed function + /* + * Move the views to the multiple item selection state + */ void enterMarkingMode(); + + /* + * Exit from the multiselection state + */ void exitMarkingMode(); + + /* + * Execute the commant on multiple selected item + */ bool executeCommand(qint32 commandId); + + /* + * when application goes into background or come back to foreground + * set and reset the background thumbnail generation property + */ + bool eventFilter(QObject *obj, QEvent *ev); -signals : +signals : + /* + * Send the user activities ( command ) to the external world + */ void externalCommand(int cmdId); + + /* + * TO send the signal to initialise the rest of items + * which is not created in the launch sequence + */ void setupItemsSignal(); public slots: + /* + * To launch the application + */ void launchApplication(); + + /* + * To handle the user action, view switching etc + */ void actionTriggered(qint32 id); + + /* + * To create the items which is not created in the aluch sequence + */ void setupItems(); + + /* + * call back function to monitor the change in thumbnail manager + */ + void updateTNProgress( int count); + void saveData(); public : -/* - * It will create a new state and replace the current state with new state in the stack. - * It will use in the case of state switching. - * use -1 if state does not have internal state - */ + /* + * It will create a new state and replace the current state with new state in the stack. + * It will use in the case of state switching. + * use -1 if state does not have internal state + */ void changeState(qint32 newStateId, int internalState ); -/* - * Go back to previous state - */ + + /* + * Go back to previous state + */ void previousState(); -/* - * Go back to a state in hierarchy and pop all the state upto that level. - * if state is not found, then all the state from the hierachy is removed and create a new state on level 0 - * This function will be use in the case when more then one back is required in single event. - */ + /* + * Go back to a state in hierarchy and pop all the state upto that level. + * if state is not found, then all the state from the hierachy is removed and create a new state on level 0 + * This function will be use in the case when more then one back is required in single event. + */ void goBack(qint32 stateId, int internalState); -/* - * Create a new state and current state should be pushed into stack. - * use -1 if state does not have internal state - */ + /* + * Create a new state and current state should be pushed into stack. + * use -1 if state does not have internal state + */ void nextState(qint32 newStateId, int internalState ); -/* - * It will delete the current model - */ + /* + * It will delete the current model + */ void removeCurrentModel(); + /* + * It will delete the all model used by state manager + */ + void cleanAllModel(); + private: -/* - * Factory function to create the state. - */ + + /* + * Launch the harvesting and TN generation progress bar dialog + */ + void launchProgressDialog(); + + /* + * remove the harvesting and TN generation progress bar dialog + */ + void vanishProgressDialog(); + + /* + * Factory function to create the state. + */ GlxState * createState(qint32 state); -/* - * Factory function to create the model. - */ + + /* + * Factory function to create the model. + */ void createModel(qint32 stateId, NavigationDir dir = NO_DIR); -/* - * Factory function to create the grid model. - */ + + /* + * Factory function to create the grid model. + */ void createGridModel(int internalState, NavigationDir dir = NO_DIR); -/* - * To set the fullscreen context based on the currrent orientation - */ + + /* + * To set the fullscreen context based on the currrent orientation + */ void setFullScreenContext(); + + /* + * Apllication event handler function + */ void eventHandler(qint32 &id); -/* - * A function to care the exit for application, in the case when application launch from internal and external - */ + + /* + * A function to care the exit for application, in the case when application launch from internal and external + */ void exitApplication(); + /*Launch Application as an acitivyt. + * Return Value @0 : If launching an activity fails + * @1 : If launch activity passes + */ + bool launchActivity(); private: GlxViewManager *mViewManager; GlxMediaModel *mAllMediaModel; // for all grid @@ -126,7 +214,10 @@ QAbstractItemModel *mCurrentModel; // no owner ship GlxState *mCurrentState; GlxActionHandler *mActionHandler; + GlxTNObserver *mTNObserver; int mCollectionId; + bool isProgressbarRunning; + QMap mSaveActivity; }; diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/statehandler/inc/glxtnobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewmanagement/statehandler/inc/glxtnobserver.h Thu Jul 22 16:33:32 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 +#include + +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 */ diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/statehandler/src/glxactionhandler.cpp --- a/ui/viewmanagement/statehandler/src/glxactionhandler.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/statehandler/src/glxactionhandler.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -28,8 +28,7 @@ GlxActionHandler::~GlxActionHandler() { - foreach( GlxCommandHandler *cmdhandler, mCommandHandlerList) - delete cmdhandler; + qDeleteAll( mCommandHandlerList ); mCommandHandlerList.clear(); } diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/statehandler/src/glxcommandhandlerfactory.cpp --- a/ui/viewmanagement/statehandler/src/glxcommandhandlerfactory.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/statehandler/src/glxcommandhandlerfactory.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -21,10 +21,13 @@ #include #include #include +#include +#include #include #include #include #include +#include GlxCommandHandler* GlxCommandHandlerFactory::CreateCommandHandler(int commandId) @@ -52,7 +55,15 @@ case EGlxCmdRename: cmdHandler = new GlxCommandHandlerRename(); break; - + + case EGlxCmdComment: cmdHandler = new GlxCommandHandlerComment(); + break; + case EGlxCmdRotateImgCW: + case EGlxCmdRotateImgCCW: + cmdHandler = new GlxCommandHandlerRotateImage(); + break; + case EGlxCmdRotateImgCrop: cmdHandler = new GlxCommandHandlerCropImage(); + break; default: break; } diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/statehandler/src/glxstatemanager.cpp --- a/ui/viewmanagement/statehandler/src/glxstatemanager.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/statehandler/src/glxstatemanager.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -15,43 +15,66 @@ * */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +//include #include -#include #include #include #include #include +#include +#include +#include -GlxStateManager::GlxStateManager() : mAllMediaModel(NULL), mAlbumGridMediaModel(NULL), - mAlbumMediaModel(NULL),mImageviewerMediaModel(NULL), mCurrentModel (NULL), mCurrentState (NULL), mActionHandler (NULL) +//user includes +#include "glxstatemanager.h" +#include "glxviewmanager.h" +#include "glxviewids.h" +#include "glxmediamodel.h" +#include "glxgridstate.h" +#include "glxliststate.h" +#include "glxfullscreenstate.h" +#include "glxdetailstate.h" +#include "glxslideshowsettingsstate.h" +#include "glxslideshowstate.h" +#include "glxtnobserver.h" +#include "glxmodelparm.h" +#include "glxcollectionpluginall.hrh" +#include "glxcollectionplugincamera.hrh" +#include "glxcollectionpluginalbums.hrh" +#include "glxcollectionpluginimageviewer.hrh" +#include "glxexternalutility.h" +#include "glxalbummodel.h" +#include "glxloggerenabler.h" +#include "glxmediaid.h" +#include "glxactionhandler.h" +#include "glxcommandhandlers.hrh" +#include "glxplugincommandid.hrh" +#include "glxlog.h" +#include "glxtracer.h" + + +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(); + mSaveActivity.clear(); + 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 ) ) ); + connect ( qobject_cast(qApp), SIGNAL (aboutToQuit()), this, SLOT(saveData())); //TO:DO TBD through exception when it is null } @@ -85,21 +108,79 @@ return TRUE; } +bool GlxStateManager::eventFilter(QObject *obj, QEvent *event) +{ + TRACER("GlxStateManager::eventFilter() "); + GLX_LOG_INFO1("GlxStateManager::eventFilter() %d event type", event->type()); + + if ( event->type() == QEvent::ApplicationActivate ) { + mTNObserver->startTNMDaemon(); + } + if ( event->type() == QEvent::ApplicationDeactivate ) { + mTNObserver->stopTNMDaemon(); + } + return QObject::eventFilter(obj, event); +} + 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"); + bool activitySuccess = false; + //To:Do use it in future once performance code is removed nextState(GLX_GRIDVIEW_ID, ALL_ITEM_S) + HbApplication* app = qobject_cast(qApp); + if(app->activateReason() == Hb::ActivationReasonActivity) { + activitySuccess = launchActivity(); + } + if( !activitySuccess ) { + mCurrentState = createState( GLX_GRIDVIEW_ID ); + mCurrentState->setState( ALL_ITEM_S ); + + int leftCount = mTNObserver->getTNLeftCount() ; + if ( leftCount > 0 ) { + mViewManager->launchApplication( GLX_GRIDVIEW_ID, mCurrentModel); + launchProgressDialog(); + } + else { + createModel( GLX_GRIDVIEW_ID ); + mViewManager->launchApplication( GLX_GRIDVIEW_ID, mCurrentModel); + } + + mTNObserver->startTNObserving() ; + } + //Remove the previous activity + HbActivityManager* activityManager = app->activityManager(); + bool ok = activityManager->removeActivity("PhotosMainView"); + if ( !ok ) + { + qDebug("launchapplication::Remove activity failed" ); + } +} +bool GlxStateManager::launchActivity() +{ + HbApplication* app = qobject_cast(qApp); + bool ok = app->activityManager()->waitActivity(); + if ( !ok ) + { + qDebug("subscribing to activity manager failed" ); + //return false; TBD: waitActivity is always returning false. Could be some issue with AM. + } + QVariant data = app->activityManager()->activityData( "PhotosMainView" ); + QByteArray serializedModel = data.toByteArray(); + QDataStream stream(&serializedModel, QIODevice::ReadOnly); + //Fetch the data from the activity Manager + QMap fetchActivity; + stream >> fetchActivity; + qint32 stateId = fetchActivity.value("ID"); + mCurrentState = createState(stateId); + mCurrentState->setState( fetchActivity.value("InternalState") ); + createModel( stateId); + /*Model might not be populated yet to set the visibleWindowIndex right away. + *So, let us store the visible index as a temporary Variable, so that visible Window Index + *is set once the model is populated. + */ + mCurrentModel->setData(QModelIndex(), fetchActivity.value("VisibleIndex") , GlxTempVisualWindowIndex ); + mViewManager->launchApplication(stateId, mCurrentModel); + return true; } void GlxStateManager::launchFromExternal() @@ -132,6 +213,69 @@ mViewManager->updateToolBarIcon(GLX_ALL_ACTION_ID); } +void GlxStateManager::updateTNProgress( int count) +{ + TRACER("GlxStateManager::updateTNProgress() "); +// mCurrentModel ------------this is case when progress bar is not showing +// count > 5 ----------------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 +// count == KErrNotReady ----A case when memory card is inserted but it is not harvest so it is given an error +// In that case also user should be block to browse the images + if ( mCurrentModel && ( count > 5 ) ) { + goBack( GLX_GRIDVIEW_ID, ALL_ITEM_S ) ; + cleanAllModel(); + launchProgressDialog(); + } + + if ( isProgressbarRunning ){ + if ( count == 0 ) { + createModel( mCurrentState->id() ); + mViewManager->setModel( mCurrentModel ); + vanishProgressDialog(); + } + else { + mViewManager->updateProgressDialog( count ); + } + } +} + +void GlxStateManager::saveData() +{ + if( (mCurrentState->id() == GLX_GRIDVIEW_ID && mCurrentState->state() == ALL_ITEM_S) || mCurrentState->id() == GLX_LISTVIEW_ID ) { + mSaveActivity.insert("ID",mCurrentState->id()); + mSaveActivity.insert("InternalState",mCurrentState->state()); + + //Store the visual Index + if(mCurrentModel) + { + QVariant variant = mCurrentModel->data( mCurrentModel->index(0,0), GlxVisualWindowIndex ); + if ( variant.isValid() && variant.canConvert () ) { + mSaveActivity.insert("VisibleIndex",variant.value()); + } + } + else + mSaveActivity.insert("VisibleIndex",0); + + HbActivityManager* activityManager = qobject_cast(qApp)->activityManager(); + + //Take a screenshot + QVariantHash metadata; + HbMainWindow *window = hbInstance->allMainWindows().first(); + metadata.insert("screenshot", QPixmap::grabWidget(window, window->rect())); + + QByteArray serializedModel; + QDataStream stream(&serializedModel, QIODevice::WriteOnly | QIODevice::Append); + stream << mSaveActivity; + //Add the activity + bool ok = activityManager->addActivity("PhotosMainView", serializedModel, metadata); + if ( !ok ) + { + qDebug("SaveData::Add activity failed" ); + } + } +} + + void GlxStateManager::nextState(qint32 state, int internalState) { qDebug("GlxStateManager::nextState next state = %u", state); @@ -166,7 +310,7 @@ if ( mCurrentState->previousState() == NULL ) { //In the case only one state in stack then exit from the application exitApplication() ; - mCurrentState = NULL; + return ; } else { //effect parameter should be set here other wise there is no way to know from where it come from @@ -187,14 +331,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 ) { @@ -233,6 +386,7 @@ void GlxStateManager::removeCurrentModel() { + TRACER("GlxStateManager::removeCurrentModel() "); if ( mCurrentModel == mAllMediaModel ) { qDebug("GlxStateManager::removeCurrentModel() remove all media model"); delete mAllMediaModel ; @@ -257,6 +411,42 @@ } } +void GlxStateManager::cleanAllModel() +{ + TRACER("GlxStateManager::cleanAllModel() "); + delete mAllMediaModel ; + mAllMediaModel = NULL ; + delete mAlbumMediaModel ; + mAlbumMediaModel = NULL ; + delete mAlbumGridMediaModel ; + mAlbumGridMediaModel = NULL ; + delete mImageviewerMediaModel ; + mImageviewerMediaModel = NULL ; + mCurrentModel = NULL ; +} + +void GlxStateManager::launchProgressDialog() +{ + TRACER("GlxStateManager::launchProgressDialog() "); + //HbMainWindow *window = hbInstance->allMainWindows().first(); + //window->setAutomaticOrientationEffectEnabled( true ); + + QCoreApplication::instance()->installEventFilter( this ); + mViewManager->launchProgressDialog( mTNObserver->getTNLeftCount() ); + isProgressbarRunning = true ; +} + +void GlxStateManager::vanishProgressDialog() +{ + TRACER("GlxStateManager::vanishProgressDialog() "); + //HbMainWindow *window = hbInstance->allMainWindows().first(); + //window->setAutomaticOrientationEffectEnabled( false ); + + QCoreApplication::instance()->removeEventFilter( this ); + isProgressbarRunning = false; + mViewManager->updateProgressDialog( 0 ); +} + GlxState * GlxStateManager::createState(qint32 stateId) { qDebug("GlxStateManager::createState state id = %d", stateId); @@ -436,16 +626,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(); @@ -505,37 +702,37 @@ void GlxStateManager::exitApplication() { - if ( mCurrentState->id( ) == GLX_FULLSCREENVIEW_ID && mCurrentState->state() == EXTERNAL_S ) { - emit externalCommand(EGlxPluginCmdBack); - } - else { + + //To:Do memory cleanup QApplication::quit(); - } + } 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() ) ); + disconnect ( qobject_cast(qApp), SIGNAL (aboutToQuit()), this, SLOT(saveData())); + + 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"); } diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/statehandler/src/glxtnobserver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewmanagement/statehandler/src/glxtnobserver.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,71 @@ +/* +* 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 +#include + +#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() "); + RProperty::Set( KTAGDPSNotification, KForceBackgroundGeneration, EFalse ); + delete mTNMonitor; +} diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/statehandler/statehandler.pro --- a/ui/viewmanagement/statehandler/statehandler.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/statehandler/statehandler.pro Thu Jul 22 16:33:32 2010 +0100 @@ -24,6 +24,7 @@ ../../inc \ ../../../inc \ ../../../loggers/loggerqt/inc \ + ../../../commonutilities/common/inc \ ../../uiengine/medialists/inc \ ../../uiengine/medialistwrapper/inc \ ../../uiengine/model/mediamodel/inc \ @@ -39,6 +40,7 @@ TARGET.UID3 = 0x20000A07 TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } LIBS += -lglxviewmanager.dll \ @@ -47,7 +49,8 @@ -lglxexternalutility.dll \ -lglxloggerqt.dll \ -lglxcommoncommandhandlers.dll \ - -lglxlogging.dll + -lglxlogging.dll \ + -lglxcommon.dll # Input HEADERS += inc/glxbasestate.h \ @@ -59,7 +62,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 +74,17 @@ 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 + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxstatehandler.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxstatehandler.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/viewmanager/inc/glxmainwindoweventfilter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewmanagement/viewmanager/inc/glxmainwindoweventfilter.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,26 @@ +#ifndef GLXMAINWINDOWEVENTFILTER_H +#define GLXMAINWINDOWEVENTFILTER_H +#include +#include +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 diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/viewmanager/inc/glxviewmanager.h --- a/ui/viewmanagement/viewmanager/inc/glxviewmanager.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/viewmanager/inc/glxviewmanager.h Thu Jul 22 16:33:32 2010 +0100 @@ -19,7 +19,7 @@ #ifndef GLXVIEWMANAGER_H #define GLXVIEWMANAGER_H - #include + #include #include #include @@ -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 : /* @@ -99,6 +105,7 @@ */ void actionTriggered(qint32 id); void externalCommand(int cmdId); + void applicationReady(); public slots: /* @@ -109,6 +116,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. @@ -137,11 +147,14 @@ */ void itemSpecificMenuTriggered(qint32,QPointF ); + void handleReadyView(); protected: private slots: void checkMarked(); + void hideProgressDialog(); + private: /* * It will create and return the view @@ -189,15 +202,17 @@ 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 mActionList; //Tool bar action list QList mMarkingActionList; //marking mode tool bar action list HbToolBar *mViewToolBar; //view tool bar HbToolBar *mMarkingToolBar; //marking mode tool bar - HbMenu *mMenu; GlxView *mView; QAbstractItemModel *mModel; //no ownership - QItemSelectionModel * mSelectionModel; + QItemSelectionModel * mSelectionModel; + HbProgressDialog *mProgressDialog; + GlxMainWindowEventFilter* mWindowEventFilter; + }; diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/viewmanager/src/glxmenumanager.cpp --- a/ui/viewmanagement/viewmanager/src/glxmenumanager.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/viewmanager/src/glxmenumanager.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -20,7 +20,8 @@ #include #include #include - +#include +#include //user include #include "glxviewids.h" #include "glxmenumanager.h" @@ -29,7 +30,6 @@ #include "glxlocalisationstrings.h" - GlxMenuManager::GlxMenuManager(HbMainWindow* mainWindow) : mModel( 0), mMainWindow( mainWindow ), @@ -48,11 +48,13 @@ action = menu->addAction(GLX_OPTION_MARK_ALL); action->setData(EGlxCmdMarkAll); + action->setObjectName( "Menu MarkAll" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); action = menu->addAction(GLX_OPTION_UN_MARK_ALL); action->setDisabled(true); //Dim UnMarkAll when no images are marked action->setData(EGlxCmdUnMarkAll); + action->setObjectName( "Menu UnMarkAll" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } @@ -61,11 +63,12 @@ QList actionList = menu->actions(); for ( int i = 0 ; i < actionList.count(); i++) { if(actionList.at(i)->data()==EGlxCmdUnMarkAll) { - actionList.at(i)->setDisabled(disable); - break; + actionList.at(i)->setDisabled(disable); + break; } } } + void GlxMenuManager::addMenu(qint32 viewId, HbMenu* menu) { switch(viewId) { @@ -108,29 +111,39 @@ { qDebug()<<"GlxMenuManager::CreateGridMenu"; HbAction *action = NULL; + menu->setObjectName( "GridMenu" ); action = menu->addAction(GLX_OPTION_SHARE); action->setData(EGlxCmdSend); + action->setObjectName( "GridMenu Send" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); mSubMenu = menu->addMenu(GLX_OPTION_SLIDESHOW); + mSubMenu->setObjectName( "GridMenu SlideShow" ); + action = mSubMenu->addAction(GLX_OPTION_SS_PLAY); action->setData(EGlxCmdFirstSlideshow); + action->setObjectName( "GridMenu Play" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); action = mSubMenu->addAction(GLX_OPTION_SS_SETTINGS); action->setData(EGlxCmdSlideshowSettings); + action->setObjectName( "GridMenu Setting" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + action = menu->addAction(GLX_OPTION_ADD_TO_ALBUM); action->setData(EGlxCmdAddToAlbum); + action->setObjectName( "GridMenu AddToAlbum" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); action = menu->addAction(GLX_OPTION_REMOVE_FROM_ALBUM); action->setData(EGlxCmdRemoveFrom); + action->setObjectName( "GridMenu RemoveAlbum" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); action = menu->addAction(GLX_OPTION_DELETE); action->setData(EGlxCmdDelete); + action->setObjectName( "GridMenu Delete" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } @@ -138,9 +151,11 @@ { qDebug()<<"GlxMenuManager::CreateListMenu"; HbAction *action = NULL; + menu->setObjectName( "Listmenu" ); action = menu->addAction(GLX_OPTION_NEW_ALBUM); action->setData(EGlxCmdAddMedia); + action->setObjectName( "ListMenu NewAlbum" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } @@ -148,21 +163,47 @@ { qDebug()<<"GlxMenuManager::CreateFullscreenMenu"; HbAction *action = NULL; + menu->setObjectName( "FSMenu" ); action = menu->addAction(GLX_OPTION_SHARE); action->setData(EGlxCmdSend); + action->setObjectName( "FSMenu Share" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); mSubMenu = menu->addMenu(GLX_OPTION_SLIDESHOW); - action = mSubMenu->addAction(GLX_OPTION_SS_PLAY); + mSubMenu->setObjectName( "FSMenu SlideShow" ); + + action = mSubMenu->addAction(GLX_OPTION_SS_PLAY); action->setData(EGlxCmdSelectSlideshow); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + action->setObjectName( "FSMenu Play" ); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + action = mSubMenu->addAction(GLX_OPTION_SS_SETTINGS); action->setData(EGlxCmdSlideshowSettings); + action->setObjectName( "FSMenu Setting" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); +#ifndef __WINSCW__ + CFeatureDiscovery* featManager = CFeatureDiscovery::NewL(); + if(featManager->IsFeatureSupportedL(KFeatureIdFfImageEditor)) + { + mSubMenu = menu->addMenu(QString("Rotate")); + action = mSubMenu->addAction(QString("90 CW")); + action->setData(EGlxCmdRotateImgCW); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + action = mSubMenu->addAction(QString("90 CCW")); + action->setData(EGlxCmdRotateImgCCW); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + + action = menu->addAction(QString("Crop")); + action->setData(EGlxCmdRotateImgCrop); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + } + delete featManager; +#endif //__WINSCW__ action = menu->addAction(GLX_OPTION_ADD_TO_ALBUM); action->setData(EGlxCmdAddToAlbum); + action->setObjectName( "FSMenu AddToAlbum" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } @@ -249,30 +290,36 @@ { qDebug("GlxMenuManager::showContextMenu " ); mContextMenu = new HbMenu(); + mContextMenu->setObjectName( "ContextMenu" ); HbAction *action = NULL; switch ( viewId ) { case GLX_GRIDVIEW_ID : action = mContextMenu->addAction(GLX_MENU_SHARE); action->setData(EGlxCmdContextSend); + action->setObjectName( "CM Send" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); action = mContextMenu->addAction(GLX_MENU_SLIDESHOW); action->setData(EGlxCmdSelectSlideshow); + action->setObjectName( "CM SlideShow" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); if ( viewSubState() == ALBUM_ITEM_S ) { - action = mContextMenu->addAction(GLX_OPTION_REMOVE_FROM_ALBUM); - action->setData(EGlxCmdContextRemoveFrom); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + action = mContextMenu->addAction(GLX_OPTION_REMOVE_FROM_ALBUM); + action->setData(EGlxCmdContextRemoveFrom); + action->setObjectName( "CM RemoveAlbum" ); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } action = mContextMenu->addAction(GLX_MENU_ADD_TO_ALBUM); action->setData(EGlxCmdContextAddToAlbum); + action->setObjectName( "CM AddToAlbum" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); action = mContextMenu->addAction(GLX_MENU_DELETE); action->setData(EGlxCmdContextDelete); + action->setObjectName( "CM Delete" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); break; @@ -286,6 +333,7 @@ if ( count ) { action = mContextMenu->addAction(GLX_MENU_SLIDESHOW); action->setData(EGlxCmdAlbumSlideShow); + action->setObjectName( "CM Album SlideShow" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } @@ -293,10 +341,12 @@ if ( variant.isValid() && variant.canConvert () && ( variant.value() == false ) ) { action = mContextMenu->addAction(GLX_MENU_RENAME); action->setData(EGlxCmdContextRename); + action->setObjectName( "CM Rename" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); action = mContextMenu->addAction(GLX_MENU_DELETE); action->setData(EGlxCmdContextAlbumDelete); + action->setObjectName( "CM Album Delete" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } } diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/viewmanager/src/glxviewmanager.cpp --- a/ui/viewmanagement/viewmanager/src/glxviewmanager.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/viewmanager/src/glxviewmanager.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -35,6 +35,11 @@ #include #include #include +#include +#include +#include +#include +#include GlxViewManager::GlxViewManager() @@ -42,9 +47,9 @@ mMenuManager( NULL ), mEffectEngine( NULL ), mViewToolBar( NULL ), - mMarkingToolBar( NULL ), - mMenu( NULL ), - mSelectionModel ( NULL ) + mMarkingToolBar( NULL ), + mSelectionModel ( NULL ), + mProgressDialog( NULL ) { qDebug("GlxViewManager::GlxViewManager() "); PERFORMANCE_ADV ( viewMgrD1, "main window creation time" ) { @@ -52,20 +57,29 @@ mMainWindow = GlxExternalUtility::instance()->getMainWindow(); if(mMainWindow == NULL) { mMainWindow = new HbMainWindow(); + connect(mMainWindow, SIGNAL( viewReady() ), this, SLOT( handleReadyView() )); } //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::handleReadyView() +{ + emit actionTriggered( EGlxCmdSetupItem ); + emit applicationReady(); + disconnect(mMainWindow, SIGNAL( viewReady() ), this, SLOT( handleReadyView() )); +} -void GlxViewManager::setupItems(int subState) +void GlxViewManager::setupItems( ) { mMenuManager = new GlxMenuManager(mMainWindow); - addBackSoftKeyAction(); - createToolBar(); - addConnection(); - mView->addToolBar(mViewToolBar); + addBackSoftKeyAction(); + addConnection(); mMenuManager->addMenu( mView->viewId(), mView->menu() ); mMenuManager->setModel( mModel ); } @@ -76,6 +90,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") @@ -105,7 +131,8 @@ //create the back soft key action and set the data mBackAction = new HbAction(Hb::BackNaviAction, this); mBackAction->setData(EGlxCmdBack); - mView->setNavigationAction(mBackAction); + mBackAction->setObjectName( "App Back" ); + mView->setNavigationAction( mBackAction ); } Qt::Orientation GlxViewManager::orientation() const @@ -137,9 +164,9 @@ //create and registered the effect if ( mEffectEngine == NULL ) { - mEffectEngine = new GlxSlideShowEffectEngine(); + mEffectEngine = new GlxEffectEngine(); mEffectEngine->registerTransitionEffect(); - connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinished() ) ); + connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinished() ), Qt::QueuedConnection ); } QList< QGraphicsItem * > itemList; @@ -185,6 +212,94 @@ } } +void GlxViewManager::launchProgressDialog( int maxValue ) +{ + if ( maxValue <= 0 ) { + // TNM return the some error code ( negative value ) until it populated the count + // To show progress dialog 10 is chossen + maxValue = 10; + + } + 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 ; + } + + mProgressDialog->setIcon(icon); + + if ( currentValue < 0 ) { + mProgressDialog->setText( QString( "Refreshing" ) ); //To:Do string will change later + mProgressDialog->setProgressValue( 0 ); + } + else { + int value = max - currentValue; + mProgressDialog->setProgressValue( value ); + mProgressDialog->setText( QString( " %1 " ).arg( currentValue ) ); + } + } +} + //to be called only when the photos plugin was activated by external means void GlxViewManager::deactivateCurrentView() { @@ -226,33 +341,25 @@ 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 ); qDebug("GlxViewManager::enterMarkingMode view ID %d", viewId); - //In the case of first time create the marking mode menu( Mark All, Un Mark All ) - if( mMenu == NULL ) { - mMenu = new HbMenu(); - mMenuManager->createMarkingModeMenu(mMenu); - } - if ( mMarkingToolBar == NULL) { createMarkingModeToolBar(); //Marking mode tool bar is different from normal mode tool bar } if ( view ) { view->enableMarking(); - HbMenu *menu = view->takeMenu(); //Take the owner ship of current menu - view->setMenu(mMenu); //Set the marking mode menu - mMenu = menu; view->takeToolBar(); view->addToolBar(mMarkingToolBar); mSelectionModel = view->getSelectionModel(); @@ -271,9 +378,6 @@ qDebug("GlxViewManager::exitMarkingMode view ID %d", viewId); if ( view ) { view->disableMarking(); - HbMenu *menu = view->takeMenu(); //Take the owner ship of current menu - view->setMenu(mMenu); //Set the view menu option - mMenu = menu; view->takeToolBar(); view->addToolBar(mViewToolBar); if(mSelectionModel) @@ -302,6 +406,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); @@ -319,7 +434,9 @@ if ( mMenuManager ) { mMenuManager->addMenu( id, view->menu()); } - view->setNavigationAction(mBackAction); + if ( mBackAction ) { + view->setNavigationAction( mBackAction ); + } } return view; } @@ -394,30 +511,63 @@ mActionList.clear(); //create the All tool bar button action - HbAction* allAction = new HbAction(this); - allAction->setData(EGlxCmdAllGridOpen); - mActionList.append(allAction); - allAction->setIcon(HbIcon(GLXICON_ALL)) ; + HbAction* allAction = new HbAction( this ); + allAction->setData( EGlxCmdAllGridOpen ); + mActionList.append( allAction ); + allAction->setIcon( HbIcon( GLXICON_ALL ) ) ; + allAction->setObjectName( "All Action" ); //create the Album tool bar button action - HbAction* albumAction = new HbAction(this); - albumAction->setData(EGlxCmdAlbumListOpen); - mActionList.append(albumAction); - albumAction->setIcon(HbIcon(GLXICON_ALBUMS)) ; + HbAction* albumAction = new HbAction( this ); + albumAction->setData( EGlxCmdAlbumListOpen ); + mActionList.append( albumAction ); + albumAction->setIcon( HbIcon( GLXICON_ALBUMS ) ) ; + albumAction->setObjectName( "Album Action" ); //create the album tool bar button action - HbAction* cameraAction = new HbAction(this); - cameraAction->setData(EGlxCmdCameraOpen); - mActionList.append(cameraAction); - cameraAction->setIcon(HbIcon(GLXICON_CAMERA)) ; + HbAction* cameraAction = new HbAction( this ); + cameraAction->setData( EGlxCmdCameraOpen ); + mActionList.append( cameraAction ); + cameraAction->setIcon( HbIcon( GLXICON_CAMERA ) ) ; + cameraAction->setObjectName( "Camera Action" ); + + //Configure the 4 th Action in the tool bar + XQSettingsManager *ciSettingsManager = NULL; + ciSettingsManager = new XQSettingsManager(this); + + + XQSettingsKey* operatorLinkCenrepKey = NULL; + operatorLinkCenrepKey = new XQSettingsKey(XQSettingsKey::TargetCentralRepository, + KGlxCi_UidGallery, KGlxOperatorLink); + QVariant value = ciSettingsManager->readItemValue(*operatorLinkCenrepKey); - //create the ovi tool bar button action - HbAction* oviAction = new HbAction(this); - oviAction->setData(EGlxCmdOviOpen); - mActionList.append(oviAction); - oviAction->setIcon(HbIcon(GLXICON_OVI)) ; + switch(value.toInt()) { + case KGlxOvi: + { + XQSettingsKey* oviCenrepKey = NULL; + oviCenrepKey = new XQSettingsKey(XQSettingsKey::TargetCentralRepository, + KGlxCi_UidGallery, KGlxOvi); + QVariant Ovivalue = ciSettingsManager->readItemValue(*oviCenrepKey, XQSettingsManager::TypeString); + HbAction* configurableAction = new HbAction(this); + configurableAction->setData(EGlxCmdOviOpen); + mActionList.append(configurableAction); + + if ( Ovivalue.isValid() && Ovivalue.canConvert() ) { + configurableAction->setIcon( HbIcon( Ovivalue.toString() ) ); + } + delete oviCenrepKey; + } + break; + + default: + qDebug("GlxViewManager::Configurable Action is empty " ); + break; + } + + delete operatorLinkCenrepKey; + delete ciSettingsManager; } void GlxViewManager::createMarkingModeActions() @@ -427,6 +577,7 @@ //create the ok tool bar button action HbAction* selectAction = new HbAction(GLX_BUTTON_OK, this); selectAction->setData(EGlxCmdSelect); + selectAction->setObjectName( "Select Action" ); mMarkingActionList.append(selectAction); connect( selectAction, SIGNAL(triggered( )), this, SLOT(handleAction( )), Qt::QueuedConnection ); mMarkingToolBar->addAction( selectAction ); @@ -434,6 +585,7 @@ //create the cancel tool bar button action HbAction* cancelAction = new HbAction(GLX_BUTTON_CANCEL, this); cancelAction->setData(EGlxCmdCancel); + cancelAction->setObjectName( "Cancel Action" ); mMarkingActionList.append(cancelAction); connect( cancelAction, SIGNAL(triggered( )), this, SLOT(handleAction( )), Qt::QueuedConnection ); mMarkingToolBar->addAction( cancelAction ); @@ -478,7 +630,7 @@ connect(mBackAction, SIGNAL( triggered() ), this, SLOT( handleAction() )); if ( mEffectEngine ) { - connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinished() ) ); + connect( mEffectEngine, SIGNAL( effectFinished() ), this, SLOT( effectFinished() ), Qt::QueuedConnection ); } } @@ -532,20 +684,21 @@ HbStyleLoader::unregisterFilePath(":/data/photos.css"); removeConnection(); + delete mMenuManager; - qDebug("GlxViewManager::~GlxViewManager deleted menu manager"); + qDebug("GlxViewManager::~GlxViewManager deleted menu manager"); + delete mViewToolBar; + delete mMarkingToolBar; + qDebug("GlxViewManager::~GlxViewManager deleted toolbar"); while( mViewList.isEmpty( ) == FALSE){ delete mViewList.takeLast() ; } - qDebug("GlxViewManager::~GlxViewManager view deleted"); - + qDebug("GlxViewManager::~GlxViewManager view deleted"); delete mBackAction; - delete mViewToolBar; - delete mMarkingToolBar; - delete mMenu; - + delete mProgressDialog; + if ( mEffectEngine ) { mEffectEngine->deregistertransitionEffect(); delete mEffectEngine; @@ -555,6 +708,7 @@ qDebug("GlxViewManager::~GlxViewManager remove view"); delete mMainWindow; } + delete mWindowEventFilter; qDebug("GlxViewManager::~GlxViewManager Exit"); } diff -r c9962d0368d9 -r 525c140ec8db ui/viewmanagement/viewmanager/viewmanager.pro --- a/ui/viewmanagement/viewmanager/viewmanager.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewmanagement/viewmanager/viewmanager.pro Thu Jul 22 16:33:32 2010 +0100 @@ -23,14 +23,17 @@ ../../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 \ + -lfeatdiscovery.dll \ + -lxqsettingsmanager DEFINES += BUILD_VIEWMANAGER symbian: { @@ -38,11 +41,23 @@ TARGET.UID3 = 0x20000A03 TARGET.CAPABILITY = ALL -TCB TARGET.EPOCALLOWDLLDATA = 1 +MMP_RULES += SMPSAFE } # Input HEADERS += inc/glxviewmanager.h \ - inc/glxmenumanager.h + inc/glxmenumanager.h \ + inc/glxmainwindoweventfilter.h SOURCES += src/glxviewmanager.cpp\ src/glxmenumanager.cpp DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxviewmanager.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxviewmanager.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock + diff -r c9962d0368d9 -r 525c140ec8db ui/viewplugins/externalviewplugin/externalviewplugin.pro --- a/ui/viewplugins/externalviewplugin/externalviewplugin.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/viewplugins/externalviewplugin/externalviewplugin.pro Thu Jul 22 16:33:32 2010 +0100 @@ -53,4 +53,5 @@ isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 20480 \ 41943040 TARGET.CAPABILITY = ALL -TCB + MMP_RULES += SMPSAFE } \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db ui/views/detailsview/inc/glxdetailscustomwidgets.h --- a/ui/views/detailsview/inc/glxdetailscustomwidgets.h Wed Jun 16 13:08:54 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +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 GLXDETAILSCUSTOMWIDGETS_H -#define GLXDETAILSCUSTOMWIDGETS_H - -#include -#include - - -class HbIconItem; -class HbLabel; -class HbDataFormModelItem; -enum - { - ImageNameItem = HbDataFormModelItem::CustomItemEnd +1, - DateLabelItem, - LocationTagItem, - DurationItem, - ShareWithItem, - FaceTagItem, - CommentsItem - - }; - -class GlxDetailsCustomWidgets: public HbDataFormViewItem -{ - Q_OBJECT - -public: - GlxDetailsCustomWidgets(QGraphicsItem *parent); - ~GlxDetailsCustomWidgets(); - virtual HbAbstractViewItem* createItem(); - bool canSetModelIndex(const QModelIndex &index) const; - -protected: - virtual HbWidget* createCustomWidget(); - -private: - HbLabel *mLabel; -}; - -#endif // GLXDETAILSCUSTOMWIDGETS_H diff -r c9962d0368d9 -r 525c140ec8db ui/views/detailsview/inc/glxdetailsview.h --- a/ui/views/detailsview/inc/glxdetailsview.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/detailsview/inc/glxdetailsview.h Thu Jul 22 16:33:32 2010 +0100 @@ -20,16 +20,18 @@ #include -class HbDataForm; -class HbDataFormModelItem; -class HbDataFormModel; + class GlxMediaModel; class QAbstractItemModel; class HbIconItem; -class GlxDetailsCustomWidgets; -class GlxDetailsCustomIcon; + class GlxFavMediaModel; - +class HbDocumentLoader; +class HbLabel; +class HbPushButton; +class GlxDetailsNameLabel; +class GlxDetailsDescriptionEdit; +class GlxDetailsViewDocLoader; class GlxDetailsView : public GlxView { @@ -70,9 +72,9 @@ * Sets the model corresponding to this view. */ void setModel (QAbstractItemModel *model); -/* - * return the view item for animation - */ + /* + * return the view item for animation + */ QGraphicsItem * getAnimationItem(GlxEffect transtionEffect); @@ -81,15 +83,11 @@ void rowsRemoved(const QModelIndex &parent, int start, int end); void dataChanged(QModelIndex startIndex, QModelIndex endIndex); void updateFavourites(); + void UpdateDescription(); + void FillDetails(); private: - //Adds the Widget required to show the details - void addWidgets(); - - //Fills the data in the form - void setFormData(); - /* * Retrieves the image from the model and shows the image */ @@ -99,6 +97,8 @@ * Sets the Date to the label recieved from MDS */ void setImageName(); + + void setDesc(); /* * Sets the Date to the label received from MDS @@ -106,6 +106,21 @@ void setDate(); /* + * Sets the time to the label received from MDS + */ + void setTime(); + + /* + * Sets the size to the label received from MDS + */ + void setSize(); + + /* + * create the favourite model + */ + void setFavModel(); + + /* * Add all the model releted connection and data */ void initializeNewModel(); @@ -119,47 +134,53 @@ */ void cleanUp(); + QString sizeinStrings(int size); + /* - * create the favourite model + * connects the items to slot to respective signals */ - void setFavModel(); + void setConnections(); - + /* + * clear the connections + */ + void clearConnections(); + private: //Contains the thumbnail shown in teh details view. - HbIconItem *mDetailsIcon; + HbLabel *mDetailsIcon; //Contains the favourite icon which adds or removes the image to favourite folder - GlxDetailsCustomIcon *mFavIcon; - + HbPushButton *mFavIcon; + //The media Model to acess the attributes; not owned,dont delete. QAbstractItemModel *mModel; //The media Model to acess the attributes whether image is in favourite folder or not;owned by this view - GlxFavMediaModel *mFavModel; - - //The Model for the Form - HbDataFormModel *mDetailModel; - + GlxFavMediaModel *mFavModel; + //The reference to the Main Window HbMainWindow *mWindow; - - //The data form for the detail - HbDataForm * mDataForm; - - //Custom widgets which will contain the widgets not created/supported by data form - GlxDetailsCustomWidgets *mCustomPrototype; - + int mSelIndex; - //Contains the Datelabel item - HbDataFormModelItem *mDateLabelItem; - - //Contains the ImageLabel item - HbDataFormModelItem *mImageLabelitem; - - //Contains the Comments item - HbDataFormModelItem *mCommentsLabelitem; + //Document Loader + GlxDetailsViewDocLoader *mDocLoader; + + //Shows the Images + GlxDetailsNameLabel *mImageName; + + //Shows the descriptions + GlxDetailsDescriptionEdit *mDescriptions; + + //Shows the Date + HbLabel *mDateLabel; + + //Shows the size of the image + HbLabel *mSizeLabel; + + //Shows the time + HbLabel *mTimeLabel; }; #endif //GLXDETAILSVIEW_H diff -r c9962d0368d9 -r 525c140ec8db ui/views/detailsview/src/glxdetailsview.cpp --- a/ui/views/detailsview/src/glxdetailsview.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/detailsview/src/glxdetailsview.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -16,16 +16,22 @@ */ //-------------------------------------------------------------------------------------------------------------------------------------------- + + #include #include +#include +#include +//-------------------------------------------------------------------------------------------------------------------------------------------- -//-------------------------------------------------------------------------------------------------------------------------------------------- #include #include #include #include -#include +#include +#include #include +#include #include #include @@ -36,43 +42,56 @@ #include "glxmediamodel.h" #include "glxdetailsview.h" #include "glxfavmediamodel.h" +#include "glxdocloaderdefs.h" #include -#include "glxdetailscustomicon.h" -#include "glxdetailscustomwidgets.h" +#include "glxdetailsdescriptionedit.h" +#include "glxdetailsnamelabel.h" + + +#include "glxviewdocloader.h" #include +#include "glxlog.h" +#include "glxloggerenabler.h" + #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "glxdetailsviewTraces.h" #endif - //SIZE OF THE IMAGE , LAYOUTS TEAM NEED TO GIVER THE SIZE IN UNITS #define GLX_IMAGE_SIZE 215 +const int KBytesInKB = 1024; +const int KBytesInMB = 1024 * 1024; +const int KBytesInGB = 1024 * 1024 * 1024; //-------------------------------------------------------------------------------------------------------------------------------------------- //GlxDetailsView //-------------------------------------------------------------------------------------------------------------------------------------------- -GlxDetailsView::GlxDetailsView(HbMainWindow *window) : - GlxView ( GLX_DETAILSVIEW_ID), - mDetailsIcon(NULL), - mFavIcon(NULL), - mModel(NULL), - mFavModel(NULL), - mDetailModel(NULL), - mWindow(window), - mDataForm(NULL), - mCustomPrototype(NULL), - mSelIndex(0), - mDateLabelItem(NULL), - mImageLabelitem(NULL), - mCommentsLabelitem(NULL) - { - OstTraceFunctionEntry0( GLXDETAILSVIEW_GLXDETAILSVIEW_ENTRY ); - setContentFullScreen( true );//for smooth transtion between grid to full screen and vice versa +GlxDetailsView::GlxDetailsView(HbMainWindow *window) : +GlxView(GLX_DETAILSVIEW_ID), mDetailsIcon(NULL), mFavIcon(NULL), mModel( + NULL), mFavModel(NULL), mWindow(window), + mSelIndex(0),mDocLoader(NULL),mImageName(NULL),mDescriptions(NULL),mDateLabel(NULL),mSizeLabel(NULL),mTimeLabel(NULL) + { + GLX_LOG_INFO("GlxDetailsView::GlxDetailsView"); + OstTraceFunctionEntry0( GLXDETAILSVIEW_GLXDETAILSVIEW_ENTRY ); + setContentFullScreen(true);//for smooth transtion between grid to full screen and vice versa OstTraceFunctionExit0( GLXDETAILSVIEW_GLXDETAILSVIEW_EXIT ); - } + } + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//~GlxDetailsView +//-------------------------------------------------------------------------------------------------------------------------------------------- +GlxDetailsView::~GlxDetailsView() + { + OstTrace0( TRACE_IMPORTANT, GLXDETAILSVIEW_GLXDETAILSVIEW, "GlxDetailsView::~GlxDetailsView" ); + + delete mDocLoader; + mDocLoader = NULL; + + cleanUp(); + } //-------------------------------------------------------------------------------------------------------------------------------------------- //activate @@ -80,9 +99,21 @@ void GlxDetailsView::activate() { OstTraceFunctionEntry0( GLXDETAILSVIEW_ACTIVATE_ENTRY ); - setFormData(); - connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(updateLayout(Qt::Orientation))); - connect(mFavIcon,SIGNAL(updateFavourites()),this ,SLOT(updateFavourites())); + //create and set the Favourite Model + setFavModel(); + + //fill the data + FillDetails(); + + //Initialze the Model + initializeNewModel(); + + //make the connections + setConnections(); + + //Set context mode to fetch descriptions + mModel->setData(QModelIndex(), (int) GlxContextComment, GlxContextRole); + OstTraceFunctionExit0( GLXDETAILSVIEW_ACTIVATE_EXIT ); } @@ -90,38 +121,63 @@ //initializeView //-------------------------------------------------------------------------------------------------------------------------------------------- void GlxDetailsView::initializeView(QAbstractItemModel *model) - { + { OstTraceFunctionEntry0( GLXDETAILSVIEW_INITIALIZEVIEW_ENTRY ); + bool loaded = false; + + if(!mDocLoader) + { + mDocLoader = new GlxDetailsViewDocLoader(); + } + + //Load the docml + mDocLoader->load(GLX_DETAILSVIEW_DOCMLPATH, &loaded); + + HbView *mView = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_VIEW)); + + HbWidget *mwidget = static_cast (mDocLoader->findWidget( + "MainWidget")); - //To show the thumbnail - if ( mDataForm == NULL) { - mDataForm = new HbDataForm(this); - mDetailModel = new HbDataFormModel(); + mDetailsIcon = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_IMAGE)); + mFavIcon = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_FAVICON)); - //custom prototype - mCustomPrototype = new GlxDetailsCustomWidgets(mDataForm); - QList protos = mDataForm->itemPrototypes(); - protos.append(mCustomPrototype); - mDataForm->setItemPrototypes(protos); + mDescriptions = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_DESCRPTIONTEXT)); + + mImageName = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_IMGNAME)); + + mDateLabel = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_DATETEXT)); + + mTimeLabel = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_TIMETEXT)); + + mSizeLabel = static_cast (mDocLoader->findWidget( + GLX_DETAILSVIEW_SIZETEXT)); - //Add the Widgets according to the mime type - addWidgets(); - } - - if( mDetailsIcon == NULL) { - mDetailsIcon = new HbIconItem(this); - mFavIcon = new GlxDetailsCustomIcon(this); - } + //set the frame graphics to the background of the fav icon + HbFrameItem* frame = new HbFrameItem(this); + frame->frameDrawer().setFrameType(HbFrameDrawer::NinePieces); + frame->frameDrawer().setFrameGraphicsName("qtg_fr_multimedia_trans"); + frame->graphicsItem()->setOpacity(0.2); + mFavIcon->setBackgroundItem(frame->graphicsItem(), -1); + mFavIcon->setBackground(HbIcon("qtg_fr_multimedia_trans")); + mFavIcon->setIcon(HbIcon(GLXICON_REMOVE_FAV)); + + setWidget(mView); //Set the Model - mModel = model; - initializeNewModel(); + mModel = model; //Set the Layout Correspondingly. updateLayout(mWindow->orientation()); //Shows the Image - showImage(); + showImage(); OstTraceFunctionExit0( GLXDETAILSVIEW_INITIALIZEVIEW_EXIT ); } @@ -130,16 +186,23 @@ //-------------------------------------------------------------------------------------------------------------------------------------------- void GlxDetailsView::resetView() { - OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_RESETVIEW, "GlxDetailsView::resetView" ); + GLX_LOG_INFO("GlxDetailsView::resetView"); + OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_RESETVIEW, "GlxDetailsView::resetView" ); } //-------------------------------------------------------------------------------------------------------------------------------------------- //deActivate //-------------------------------------------------------------------------------------------------------------------------------------------- void GlxDetailsView::deActivate() - { + { + GLX_LOG_INFO("GlxDetailsView::deActivate"); OstTraceFunctionEntry0( GLXDETAILSVIEW_DEACTIVATE_ENTRY ); - cleanUp(); + + //Remove the context created to update details + mModel->setData(QModelIndex(), (int) GlxContextComment, + GlxRemoveContextRole); + cleanUp(); + OstTraceFunctionExit0( GLXDETAILSVIEW_DEACTIVATE_EXIT ); } @@ -151,17 +214,7 @@ clearCurrentModel(); //clear the connections - if(mWindow) { - disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(updateLayout(Qt::Orientation))); - } - - if(mFavModel) { - disconnect( mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) ); - } - - if(mFavIcon) { - disconnect(mFavIcon,SIGNAL(updateFavourites()),this ,SLOT(updateFavourites())); - } + clearConnections(); delete mFavModel; mFavModel = NULL; @@ -170,75 +223,7 @@ mFavIcon = NULL; delete mDetailsIcon; - mDetailsIcon = NULL; - } - -//-------------------------------------------------------------------------------------------------------------------------------------------- -//~GlxDetailsView -//-------------------------------------------------------------------------------------------------------------------------------------------- -GlxDetailsView::~GlxDetailsView() - { - OstTrace0( TRACE_IMPORTANT, GLXDETAILSVIEW_GLXDETAILSVIEW, "GlxDetailsView::~GlxDetailsView" ); - - cleanUp(); - - if(mDetailModel) { - delete mDetailModel; - mDataForm->setModel(0); - } - - if(mDataForm) { - delete mDataForm; - mDataForm = NULL; - } - } - -//-------------------------------------------------------------------------------------------------------------------------------------------- -//addWidgets -//-------------------------------------------------------------------------------------------------------------------------------------------- -void GlxDetailsView::addWidgets() - { - OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_ADDWIDGETS, "GlxDetailsView::addWidgets create Form" ); - - //----------------------------START OF CREATION OF WIDGETS---------------------------------// - // To add new widgets in the details view, add it here. - - //---------------------------IMAGE NAME LABEL --------------------------------------------// - OstTrace0( TRACE_NORMAL, DUP1_GLXDETAILSVIEW_ADDWIDGETS, "GlxDetailsView::addWidgets create Image Label" ); - mImageLabelitem = mDetailModel->appendDataFormItem(HbDataFormModelItem::TextItem, QString("Name"), NULL); - - //---------------------------DATE LABEL --------------------------------------------// - OstTrace0( TRACE_NORMAL, DUP2_GLXDETAILSVIEW_ADDWIDGETS, "GlxDetailsView::addWidgets date label" ); - mDateLabelItem = mDetailModel->appendDataFormItem((HbDataFormModelItem::DataItemType)(DateLabelItem), QString("Date"), NULL); - - - //----------------------------COMMENTS TEXT ITEM---------------------------------------------// - OstTrace0( TRACE_NORMAL, DUP5_GLXDETAILSVIEW_ADDWIDGETS, "GlxDetailsView::addWidgets comment text" ); - mCommentsLabelitem = mDetailModel->appendDataFormItem(HbDataFormModelItem::TextItem, QString("Description"), NULL); - - //----------------------------END OF CREATION OF WIDGETS-------------------------------------// - - //Set the model to the Data Form - mDataForm->setModel(mDetailModel); - } - -//-------------------------------------------------------------------------------------------------------------------------------------------- -//setFavModel -//-------------------------------------------------------------------------------------------------------------------------------------------- -void GlxDetailsView::setFavModel() - { - GlxModelParm modelParm; - - QString imagePath = (mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value(),0),GlxUriRole)).value(); - - if(mFavModel == NULL) { - modelParm.setCollection( KGlxCollectionPluginFavoritesAlbumId ); - modelParm.setContextMode(GlxContextFavorite); - modelParm.setPath(imagePath); - mFavModel = new GlxFavMediaModel( modelParm ); - } - QString imageName = imagePath.section('\\',-1); - connect( mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) ); + mDetailsIcon = NULL; } //-------------------------------------------------------------------------------------------------------------------------------------------- @@ -247,25 +232,112 @@ void GlxDetailsView::setModel(QAbstractItemModel *model) { OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_SETMODEL, "GlxDetailsView::setModel" ); - if ( mModel == model ) { - return ; - } + if (mModel == model) + { + return; + } clearCurrentModel(); mModel = model; initializeNewModel(); } //-------------------------------------------------------------------------------------------------------------------------------------------- +//setFavModel +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::setFavModel() +{ + GlxModelParm modelParm; + QString imagePath = (mModel->data(mModel->index(mModel->data( + mModel->index(0, 0), GlxFocusIndexRole).value (), 0), + GlxUriRole)).value (); + + if (mFavModel == NULL) + { + modelParm.setCollection(KGlxCollectionPluginFavoritesAlbumId); + modelParm.setContextMode(GlxContextFavorite); + modelParm.setPath(imagePath); + mFavModel = new GlxFavMediaModel(modelParm); + } +} + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//initializeNewModel +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::initializeNewModel() + { + OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_INITIALIZENEWMODEL, "GlxDetailsView::initializeNewModel" ); + + if (mModel) + { + connect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, + SLOT(rowsRemoved(QModelIndex,int,int))); + } + } + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//clearCurrentModel +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::clearCurrentModel() + { + OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_CLEARCURRENTMODEL, "GlxDetailsView::clearCurrentModel" ); + + if (mModel) + { + disconnect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, + SLOT(rowsRemoved(QModelIndex,int,int))); + mModel = NULL; + } + } + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//setConnections +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::setConnections() + { + connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, + SLOT(updateLayout(Qt::Orientation))); + connect(mFavIcon, SIGNAL(clicked()), this, SLOT(updateFavourites())); + + connect(mDescriptions, SIGNAL(labelPressed()), this, + SLOT(UpdateDescription())); + + connect(mModel, SIGNAL( updateDetailsView() ), this, SLOT( FillDetails() )); + + connect(mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), + this, SLOT( dataChanged(QModelIndex,QModelIndex) )); + } + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//clearConnections +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::clearConnections() + { + disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, + SLOT(updateLayout(Qt::Orientation))); + + disconnect(mFavIcon, SIGNAL(clicked()), this, SLOT(updateFavourites())); + + disconnect(mDescriptions, SIGNAL(labelPressed()), this, + SLOT(UpdateDescription())); + + disconnect(mModel, SIGNAL( updateDetailsView() ), this, SLOT( FillDetails() )); + + disconnect(mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), + this, SLOT( dataChanged(QModelIndex,QModelIndex) )); + } + +//-------------------------------------------------------------------------------------------------------------------------------------------- //getAnimationItem //-------------------------------------------------------------------------------------------------------------------------------------------- QGraphicsItem * GlxDetailsView::getAnimationItem(GlxEffect transtionEffect) { OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_GETANIMATIONITEM, "GlxDetailsView::getAnimationItem" ); - if ( transtionEffect == FULLSCREEN_TO_DETAIL - || transtionEffect == DETAIL_TO_FULLSCREEN ) { + if (transtionEffect == FULLSCREEN_TO_DETAIL || transtionEffect + == DETAIL_TO_FULLSCREEN) + { return this; - } - return NULL; + } + return NULL; } //-------------------------------------------------------------------------------------------------------------------------------------------- @@ -274,98 +346,77 @@ void GlxDetailsView::updateLayout(Qt::Orientation orient) { OstTrace1( TRACE_NORMAL, GLXDETAILSVIEW_UPDATELAYOUT, "GlxDetailsView::updateLayout;orient=%d", orient ); - - qreal IconPosX = 0.0; - qreal IconPosY = 0.0; - qreal FavIconPosX = 0.0; - qreal FavIconPosY = 0.0; - qreal DataFormX = 0.0; - qreal DataFormY = 0.0; - qreal DataFormWidth = 0.0; - qreal DataFormHeight = 0.0; - - - qreal screenWidth = 0.0; - qreal screenHeight = 0.0; - qreal leftMargin = 0.0; - qreal bottomMargin = 0.0; - qreal screenMargin = 0.0; - qreal favIconSize = 0.0; - qreal chromeHeight = 0.0; - qreal middleVerticalMargin = 0.0; - - style()->parameter("hb-param-screen-width", screenWidth); - style()->parameter("hb-param-screen-height", screenHeight); + GLX_LOG_INFO("GlxDetailsView::updateLayout "); + bool loaded = false; + QString section; - style()->parameter("hb-param-margin-gene-middle-vertical", middleVerticalMargin); - style()->parameter("hb-param-margin-gene-left", leftMargin); - style()->parameter("hb-param-margin-gene-bottom", bottomMargin); - style()->parameter("hb-param-margin-gene-screen", screenMargin); - - style()->parameter("hb-param-graphic-size-primary-small", favIconSize); - style()->parameter("hb-param-widget-chrome-height", chromeHeight); - - - if(orient == Qt::Horizontal) + //Load the widgets accroding to the current Orientation + if (orient == Qt::Horizontal) { - OstTrace0( TRACE_NORMAL, DUP1_GLXDETAILSVIEW_UPDATELAYOUT, "GlxDetailsView::updateLayout HORIZONTAL" ); - setGeometry(0,0,640,360); - IconPosX = screenMargin; - IconPosY = (screenMargin + chromeHeight); - FavIconPosX = (IconPosX + GLX_IMAGE_SIZE - (favIconSize +10)); - FavIconPosY = (IconPosY + GLX_IMAGE_SIZE - (favIconSize + 10)); - DataFormX = screenMargin + GLX_IMAGE_SIZE + leftMargin ; - DataFormY = screenMargin + chromeHeight ; - - //This Commented code should be un commented , once the screen width and height size issue is solved and also - //the dataform issue of wrapping issue is solved - // DataFormWidth = screenWidth(640) - DataFormX - screenMargin ; - // DataFormHeight = screenHeight(360) - DataFormY - screenMargin ; - DataFormWidth = screenWidth - (screenMargin + screenMargin) ; - DataFormHeight = screenHeight - DataFormY; - + section = GLX_DETAILSVIEW_LSSECTION; } else { - OstTrace0( TRACE_NORMAL, DUP2_GLXDETAILSVIEW_UPDATELAYOUT, "GlxDetailsView::updateLayout VERTICAL" ); - setGeometry(0,0,screenWidth,screenHeight); - IconPosX = (screenWidth/2) - (GLX_IMAGE_SIZE/2); - IconPosY = (screenMargin + chromeHeight); - FavIconPosX = (IconPosX + GLX_IMAGE_SIZE - (favIconSize +10)); - FavIconPosY = (IconPosY + GLX_IMAGE_SIZE - (favIconSize +10)); - DataFormX = screenMargin; - DataFormY = IconPosY + GLX_IMAGE_SIZE + middleVerticalMargin + bottomMargin ; - DataFormWidth = screenWidth - (screenMargin + screenMargin) ; - DataFormHeight = screenHeight - DataFormY; + section = GLX_DETAILSVIEW_PTSECTION; } - mDetailsIcon->setPos(IconPosX,IconPosY); - //The Numerical should be updated once we get the parameters size from the layouts. - mFavIcon->setItemGeometry(QRect(FavIconPosX-2 ,FavIconPosY-2 ,favIconSize+12,favIconSize + 12)) ; - //Place the FavIcon with respect to the Widget. - mFavIcon->setItemPos(2 ,2 ); - mDataForm->setGeometry(DataFormX,DataFormY,DataFormWidth,DataFormHeight); + //Load the Sections + mDocLoader->load(GLX_DETAILSVIEW_DOCMLPATH, section, &loaded); + + //This is just to over come the bug in docloader,once that is fixed we can remove the + //below lines of code + setImageName(); + setDate(); + + GLX_LOG_INFO1("GlxDetailsView::updateLayout =%d\n",loaded); } //-------------------------------------------------------------------------------------------------------------------------------------------- //rowsRemoved //-------------------------------------------------------------------------------------------------------------------------------------------- -void GlxDetailsView::rowsRemoved(const QModelIndex &parent, int start, int end) +void GlxDetailsView::rowsRemoved(const QModelIndex &parent, int start, + int end) { Q_UNUSED(parent); Q_UNUSED(start); Q_UNUSED(end); OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_ROWSREMOVED, "GlxDetailsView::rowsRemoved" ); - if ( mModel->rowCount() <= 0 ) { - return emit actionTriggered( EGlxCmdEmptyData ); + if (mModel->rowCount() <= 0) + { + return emit actionTriggered(EGlxCmdEmptyData); + } + + if (start <= mSelIndex && end >= mSelIndex) + { + return emit actionTriggered(EGlxCmdBack); + } } - if ( start <= mSelIndex && end >= mSelIndex ) { - return emit actionTriggered( EGlxCmdBack ); +//-------------------------------------------------------------------------------------------------------------------------------------------- +//FillData +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::FillDetails() + { + OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_SETFORMDATA, "GlxDetailsView::setFormData" ); + + qDebug("GlxDetailsView::FillDetails"); + //Call to set the Image Name + setImageName(); + + //Call to set the description + setDesc(); + + //Call to set the date in the from + setDate(); + + //Call to set the time + setTime(); + + //Call to set the size + setSize(); + } - } - //-------------------------------------------------------------------------------------------------------------------------------------------- //showImage //-------------------------------------------------------------------------------------------------------------------------------------------- @@ -373,46 +424,23 @@ { OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_SHOWIMAGE, "GlxDetailsView::showImage" ); - QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); - if ( variant.isValid() && variant.canConvert () ) { - mSelIndex = variant.value(); - } - - variant = mModel->data( mModel->index( mSelIndex ,0), GlxFsImageRole); - if ( variant.isValid() && variant.canConvert () ) + QVariant variant = mModel->data(mModel->index(0, 0), GlxFocusIndexRole); + if (variant.isValid() && variant.canConvert ()) { - QIcon itemIcon = variant.value().qicon(); - QPixmap itemPixmap = itemIcon.pixmap(GLX_IMAGE_SIZE,GLX_IMAGE_SIZE); - QSize sz(GLX_IMAGE_SIZE,GLX_IMAGE_SIZE); - itemPixmap = itemPixmap.scaled(sz, Qt::IgnoreAspectRatio ); - - - HbIcon tmp = HbIcon( QIcon(itemPixmap)) ; - mDetailsIcon->setSize(QSize(GLX_IMAGE_SIZE, GLX_IMAGE_SIZE)); + mSelIndex = variant.value (); + } + + variant = mModel->data(mModel->index(mSelIndex, 0), GlxFsImageRole); + if (variant.isValid() && variant.canConvert ()) + { + QIcon itemIcon = variant.value ().qicon(); + QPixmap itemPixmap = itemIcon.pixmap(GLX_IMAGE_SIZE, GLX_IMAGE_SIZE); + QSize sz(GLX_IMAGE_SIZE, GLX_IMAGE_SIZE); + itemPixmap = itemPixmap.scaled(sz, Qt::IgnoreAspectRatio); + + HbIcon tmp = HbIcon(QIcon(itemPixmap)); mDetailsIcon->setIcon(tmp); - mFavIcon->setItemIcon(HbIcon("qtg_graf_ratingslider_unrated")); - - qreal favIconSize = 0.0; - style()->parameter("hb-param-graphic-size-primary-small", favIconSize); - mFavIcon->setItemSize(QSize(favIconSize+10, favIconSize+10)); - } - } - -//-------------------------------------------------------------------------------------------------------------------------------------------- -//FillData -//-------------------------------------------------------------------------------------------------------------------------------------------- -void GlxDetailsView::setFormData() - { - OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_SETFORMDATA, "GlxDetailsView::setFormData" ); - - //create and set the Favourite Model - setFavModel(); - - //Call to set the Image Name - setImageName(); - - //Call to set the date in the from - setDate(); + } } //-------------------------------------------------------------------------------------------------------------------------------------------- @@ -421,12 +449,27 @@ void GlxDetailsView::setImageName() { OstTraceFunctionEntry0( GLXDETAILSVIEW_SETIMAGENAME_ENTRY ); + QString temp = ""; + QString imagePath = (mModel->data(mModel->index(mModel->data( + mModel->index(0, 0), GlxFocusIndexRole).value (), 0), + GlxUriRole)).value (); + QString imageName = imagePath.section('\\', -1); + + temp.append(imageName); + temp.append(""); + mImageName->setItemText(temp); + OstTraceFunctionExit0( GLXDETAILSVIEW_SETIMAGENAME_EXIT ); + } - QString imagePath = (mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value(),0),GlxUriRole)).value(); - QString imageName = imagePath.section('\\',-1); - - mImageLabelitem->setContentWidgetData("text",imageName); - OstTraceFunctionExit0( GLXDETAILSVIEW_SETIMAGENAME_EXIT ); +//-------------------------------------------------------------------------------------------------------------------------------------------- +//setImageName +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::setDesc() + { + QString description = (mModel->data(mModel->index(mModel->data( + mModel->index(0, 0), GlxFocusIndexRole).value (), 0), + GlxDescRole)).value (); + mDescriptions->setItemText(description); } //-------------------------------------------------------------------------------------------------------------------------------------------- @@ -437,77 +480,101 @@ OstTraceFunctionEntry0( GLXDETAILSVIEW_SETDATE_ENTRY ); QString datestring; - QString str("dd.MM.yyyy"); - QDate date = (mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value(),0),GlxDateRole)).value(); - - if(date.isNull() == FALSE ) + QString dateFormat("dd.MM.yyyy"); + QDate date = (mModel->data(mModel->index(mModel->data( + mModel->index(0, 0), GlxFocusIndexRole).value (), 0), + GlxDateRole)).value (); + + datestring = QString("Date: "); + if (date.isNull() == FALSE) { - OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_SETDATE, "GlxDetailsView::setDate is not NULL" ); - datestring = date.toString(str); + OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_SETDATE, "GlxDetailsView::setDate is not NULL" ); + datestring.append(date.toString(dateFormat)); } - mDateLabelItem->setContentWidgetData("plainText",datestring); + mDateLabel->setPlainText(datestring); OstTraceFunctionExit0( GLXDETAILSVIEW_SETDATE_EXIT ); } //-------------------------------------------------------------------------------------------------------------------------------------------- -//initializeNewModel +//setTime //-------------------------------------------------------------------------------------------------------------------------------------------- -void GlxDetailsView::initializeNewModel() +void GlxDetailsView::setTime() { - OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_INITIALIZENEWMODEL, "GlxDetailsView::initializeNewModel" ); - - if ( mModel ) { - connect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(rowsRemoved(QModelIndex,int,int))); - } + QString timestring; + QString timeFormat("h:m ap"); + QTime timevalue = (mModel->data(mModel->index(mModel->data(mModel->index( + 0, 0), GlxFocusIndexRole).value (), 0), GlxTimeRole)).value< + QTime> (); + timestring = QString("Time: "); + if (timevalue.isNull() == FALSE) + { + OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_SETDATE, "GlxDetailsView::setTime is not NULL" ); + timestring.append(timevalue.toString(timeFormat)); + } + mTimeLabel->setPlainText(timestring); } //-------------------------------------------------------------------------------------------------------------------------------------------- -//clearCurrentModel +//setSize //-------------------------------------------------------------------------------------------------------------------------------------------- -void GlxDetailsView::clearCurrentModel() +void GlxDetailsView::setSize() { - OstTrace0( TRACE_NORMAL, GLXDETAILSVIEW_CLEARCURRENTMODEL, "GlxDetailsView::clearCurrentModel" ); - - if ( mModel ) { - disconnect(mModel, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(rowsRemoved(QModelIndex,int,int))); - mModel = NULL ; - } - } + int size = 0; + size = (mModel->data(mModel->index(mModel->data(mModel->index(0, 0), + GlxFocusIndexRole).value (), 0), GlxSizeRole)).value (); + QString sizelabel; + QString sizestring; + sizelabel = QString("Size : "); + sizestring = sizeinStrings(size); + sizelabel.append(sizestring); + mSizeLabel->setPlainText(sizelabel); + + } //-------------------------------------------------------------------------------------------------------------------------------------------- //dataChanged //-------------------------------------------------------------------------------------------------------------------------------------------- void GlxDetailsView::dataChanged(QModelIndex startIndex, QModelIndex endIndex) { - Q_UNUSED(endIndex); - - QVariant variant = mFavModel->data( startIndex, GlxFavorites ); - if ( variant.isValid() && variant.canConvert () ) + Q_UNUSED(endIndex); + + QVariant variant = mFavModel->data(startIndex, GlxFavorites); + if (variant.isValid() && variant.canConvert ()) { - if(variant.value() ) - { - mFavIcon->setItemIcon(HbIcon(GLXICON_ADD_TO_FAV)); + if (variant.value ()) + { + mFavIcon->setIcon(HbIcon(GLXICON_ADD_TO_FAV)); } - else + else { - mFavIcon->setItemIcon(HbIcon(GLXICON_REMOVE_FAV)); + mFavIcon->setIcon(HbIcon(GLXICON_REMOVE_FAV)); } } } //-------------------------------------------------------------------------------------------------------------------------------------------- +//UpdateDescription +//-------------------------------------------------------------------------------------------------------------------------------------------- +void GlxDetailsView::UpdateDescription() + { + GLX_LOG_INFO("GlxDetailsView::UpdateDescription "); + qDebug("GlxDetailsView::UpdateDescription"); + emit actionTriggered(EGlxCmdComment); + } + +//-------------------------------------------------------------------------------------------------------------------------------------------- //updateFavourites //-------------------------------------------------------------------------------------------------------------------------------------------- void GlxDetailsView::updateFavourites() { - QVariant variant = mFavModel->data(mFavModel->index(0,0), GlxFavorites ); - if ( variant.isValid() && variant.canConvert ()) + QVariant variant = mFavModel->data(mFavModel->index(0, 0), GlxFavorites); + if (variant.isValid() && variant.canConvert ()) { - if(variant.value() ) + if (variant.value ()) { - emit actionTriggered( EGlxCmdRemoveFromFav); + emit actionTriggered(EGlxCmdRemoveFromFav); } else { @@ -515,3 +582,35 @@ } } } + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//sizeinStrings +//-------------------------------------------------------------------------------------------------------------------------------------------- +QString GlxDetailsView::sizeinStrings(int size) + { + QString sizeString; + if (size >= KBytesInGB) + { + int gbSize = size / KBytesInGB; // Size in GB + sizeString.setNum(gbSize); + sizeString.append("GB"); + } + else if (size >= KBytesInMB) + { + int mbSize = size / KBytesInMB; // Size in MB + sizeString.setNum(mbSize); + sizeString.append("MB"); + } + else if (size >= KBytesInKB) + { + TInt kBsize = size / KBytesInKB; // bytes to kB + sizeString.setNum(kBsize); + sizeString.append("KB"); + } + else + { + sizeString.setNum(size); + sizeString.append("Bytes"); + } + return sizeString; + } diff -r c9962d0368d9 -r 525c140ec8db ui/views/docloaders/inc/glxviewdocloader.h --- a/ui/views/docloaders/inc/glxviewdocloader.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/docloaders/inc/glxviewdocloader.h Thu Jul 22 16:33:32 2010 +0100 @@ -44,4 +44,14 @@ private: // }; +//Custom Docloader to load the details view +class GlxDetailsViewDocLoader : public HbDocumentLoader +{ +protected: + //This creates the custom widget for details + QObject* createObject(const QString &type, const QString &name); + + private: // +}; + #endif /* GLXVIEWDOCLOADER_H */ diff -r c9962d0368d9 -r 525c140ec8db ui/views/docloaders/src/glxviewdocloader.cpp --- a/ui/views/docloaders/src/glxviewdocloader.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/docloaders/src/glxviewdocloader.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -29,6 +29,9 @@ #include "glxcoverflow.h" #include "glxslideshowwidget.h" #include "glxslideshowview.h" +#include "glxzoomwidget.h" +#include "glxdetailsnamelabel.h" +#include "glxdetailsdescriptionedit.h" //---------------------------------------------------------------------------------------- // createObject:creates the custom widget and views of fullscreen view @@ -56,6 +59,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); } @@ -88,3 +99,34 @@ } return HbDocumentLoader::createObject(type, name); } + + //---------------------------------------------------------------------------------------- +// createObject:creates the custom widget and views of details view +//---------------------------------------------------------------------------------------- +QObject* GlxDetailsViewDocLoader::createObject(const QString &type, const QString &name) + { + qDebug() <<"GlxDetailsViewDocLoader::createObject -->"; + + + if (GLX_DETAILSVIEW_IMGNAME == name) + { + qDebug() << "GlxDetailsViewDocLoader::createObject:GLX_DETAILSVIEW_IMGNAME -->"; + + QObject *object = new GlxDetailsNameLabel(); + object->setObjectName(name); + return object; + } + + if (GLX_DETAILSVIEW_DESCRPTIONTEXT == name) + { + qDebug() << "GlxDetailsViewDocLoader::createObject:GLX_DETAILSVIEW_DESCRPTIONTEXT -->"; + + QObject *object = new GlxDetailsDescriptionEdit(); + object->setObjectName(name); + return object; + } + + + return HbDocumentLoader::createObject(type, name); + } + diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/effectplugin/inc/glxbackwardtransitionplugin.h --- a/ui/views/effectengine/effectplugin/inc/glxbackwardtransitionplugin.h Wed Jun 16 13:08:54 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 getEffectFileList() { return mEffectFileList ; } - -private : - QList mEffectFileList; -}; - -#endif /*GLXBACKWARDTRANSITIONPLUGIN_H*/ - diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/effectplugin/inc/glxeffectpluginbase.h --- a/ui/views/effectengine/effectplugin/inc/glxeffectpluginbase.h Wed Jun 16 13:08:54 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 -#include -#include - -class GlxEffectPluginBase -{ - -public : - GlxEffectPluginBase() { } - virtual ~GlxEffectPluginBase() {} - virtual QList 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 diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/effectplugin/inc/glxfadeplugin.h --- a/ui/views/effectengine/effectplugin/inc/glxfadeplugin.h Wed Jun 16 13:08:54 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 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 mEffectFileList; - QGraphicsItem *mItem; -}; - -#endif /*GLXFADEPLUGIN_H*/ \ No newline at end of file diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/effectplugin/inc/glxforwardtransitionplugin.h --- a/ui/views/effectengine/effectplugin/inc/glxforwardtransitionplugin.h Wed Jun 16 13:08:54 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 getEffectFileList() { return mEffectFileList; } - -private : - QList mEffectFileList; -}; - -#endif /*GLXFORWARDTRANSITIONPLUGIN_H*/ - diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/effectplugin/src/glxbackwardtransitionplugin.cpp --- a/ui/views/effectengine/effectplugin/src/glxbackwardtransitionplugin.cpp Wed Jun 16 13:08:54 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(); -} - - diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/effectplugin/src/glxfadeplugin.cpp --- a/ui/views/effectengine/effectplugin/src/glxfadeplugin.cpp Wed Jun 16 13:08:54 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(); -} - diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/effectplugin/src/glxforwardtransitionplugin.cpp --- a/ui/views/effectengine/effectplugin/src/glxforwardtransitionplugin.cpp Wed Jun 16 13:08:54 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(); -} - - diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/inc/glxeffectengine.h --- a/ui/views/effectengine/inc/glxeffectengine.h Wed Jun 16 13:08:54 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 -#include -#include -#include -#include -#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 effectFileList() { return mEffectFileList ; } - QList itemType() { return mItemType ; } - QList eventType() { return mEventType ; } - bool isTransitionLater() { return mTransitionLater ; } - QGraphicsItem * animationItem() { return mItem ; } - - void setEffectFileList( QList & effectFileList) { mEffectFileList = effectFileList ; } - void setItemTypes( QList & itemType) { mItemType = itemType; } - void setEventTypes( QList & 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 mEffectFileList; //list of fxml file used for animation - QList mItemType; //list of item type - QList 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 mTransitionEffectList; - GlxEffect mTransitionEffect; -}; - -#endif /*GLXEFFECTENGINE_H*/ diff -r c9962d0368d9 -r 525c140ec8db ui/views/effectengine/src/glxeffectengine.cpp --- a/ui/views/effectengine/src/glxeffectengine.cpp Wed Jun 16 13:08:54 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 -#include "glxeffectpluginbase.h" -#include "glxforwardtransitionplugin.h" -#include "glxbackwardtransitionplugin.h" -#include "glxfadeplugin.h" -#include - -#include -#include -#include -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 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 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(); - -} - diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/inc/glxcoverflow.h --- a/ui/views/fullscreenview/inc/glxcoverflow.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/fullscreenview/inc/glxcoverflow.h Thu Jul 22 16:33:32 2010 +0100 @@ -22,15 +22,15 @@ #define NBR_ICON_ITEM 5 -#include #include +#include //forward declaration class HbIconItem; class HbMainWindow; class QAbstractItemModel; +class QGestureEvent; -class QGestureEvent; typedef enum { NO_MOVE, @@ -62,31 +62,32 @@ 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); void changeSelectedIndex(const QModelIndex &index); void autoLeftMoveSignal(); void autoRightMoveSignal(); + void doubleTapEventReceived(QPointF position); 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); void rowsRemoved(const QModelIndex &parent, int start, int end); + void modelDestroyed(); void autoLeftMove(); void autoRightMove(); protected: void gestureEvent(QGestureEvent *event); - void move(int value); - void setRows() ; void setStripLen(); int calculateIndex(int index); @@ -94,14 +95,53 @@ void loadIconItems (); void updateIconItem (qint16 selIndex, qint16 selIconIndex, qint16 deltaX); - //clear all the model connection + /* + * In the case of animated image, it will play the animation for focus image + */ + void playAnimation(); + + /* + * To stop the animation + */ + void stopAnimation(); + + /* + * clear all the model connection + */ void clearCurrentModel(); - //add the connection to the model + + /* + * add the connection to the model + */ void initializeNewModel(); - //reset all the data of cover flow + + /* + * reset all the data of cover flow + */ void resetCoverFlow(); int getSubState(); + void timerEvent(QTimerEvent *event); + /* + * To get the focus index + */ + int getFocusIndex( ); + + /* + * To get the full screen icon of the image + */ + HbIcon getIcon( int index ); + + /* + * To get the URI of the image + */ + QString getUri( int index ); + + /* + * To get the GIF file info of the image + */ + bool isAnimatedImage( int index ); + private: HbIconItem *mIconItem[NBR_ICON_ITEM]; //at most contain only five item qint16 mSelItemIndex; // current full screen index @@ -116,6 +156,9 @@ QAbstractItemModel *mModel; GlxUserMove mMoveDir; int mSpeed; + bool mZoomOn; + QGraphicsItem* mMultitouchFilter; + int mTimerId; }; #endif /* GLXCOVERFLOW_H_ */ diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/inc/glxfullscreenview.h --- a/ui/views/fullscreenview/inc/glxfullscreenview.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/fullscreenview/inc/glxfullscreenview.h Thu Jul 22 16:33:32 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: /* @@ -108,9 +106,10 @@ void setImageStripModel(); void loadFullScreenToolBar(); - void imageSelectionAnimation(const QModelIndex &index); + void addToolBarAction( int commandId, const QString &iconName, const QString &name) ; + void imageSelectionAnimation( const QModelIndex &index ); int getSubState(); - void setHdmiModel(QAbstractItemModel *model); + void setHdmiModel( QAbstractItemModel *model ); private: QAbstractItemModel *mModel; //no ownership HbMainWindow *mWindow; //no ownership @@ -120,15 +119,8 @@ HbIconItem *mIconItem ; //temporary item for play the image strip select animation GlxTvOutWrapper *mTvOutWrapper; HbToolBar *mFullScreenToolBar; //Fullscreen Toolbar - HbAction *mFlipAction; //Action : it starts activates the details view - HbAction *mSendAction; - HbAction *mDeleteAction; - 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 diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/inc/glxzoomcontrol.h --- a/ui/views/fullscreenview/inc/glxzoomcontrol.h Wed Jun 16 13:08:54 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 - -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 diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/inc/glxzoomslider.h --- a/ui/views/fullscreenview/inc/glxzoomslider.h Wed Jun 16 13:08:54 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 -#include -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 diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/src/glxcoverflow.cpp --- a/ui/views/fullscreenview/src/glxcoverflow.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/fullscreenview/src/glxcoverflow.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -23,14 +23,16 @@ #include #include #include +#include //User Includes #include #include #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 +44,10 @@ mItemSize (QSize(0,0)), mModel ( NULL), mMoveDir(NO_MOVE), - mSpeed ( GLX_COVERFLOW_SPEED ) + mSpeed ( GLX_COVERFLOW_SPEED ), + mZoomOn(false), + mMultitouchFilter(NULL), + mTimerId(0) { //TO:DO through exception qDebug("GlxCoverFlow::GlxCoverFlow"); @@ -52,16 +57,25 @@ 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]->setBrush(QBrush(Qt::black)); - mIconItem[i]->setSize(QSize(0,0)); + 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 ) ); + mIconItem[i]->setAlignment( Qt::AlignCenter ); + mIconItem[i]->setObjectName( QString( "Cover%1" ).arg( i ) ); } + mUiOn = FALSE; - mBounceBackDeltaX = 10; + mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA; } void GlxCoverFlow::setItemSize(QSize &size) @@ -97,44 +111,50 @@ void GlxCoverFlow::gestureEvent(QGestureEvent *event) { - if(QTapGesture *gesture = static_cast(event->gesture(Qt::TapGesture))) { + if(QTapGesture *gesture = static_cast(event->gesture(Qt::TapGesture))) { if (gesture->state() == Qt::GestureFinished) { - emit coverFlowEvent( TAP_EVENT ); - event->accept(gesture); + if(!mTimerId) { + mTimerId = startTimer(500); + } + else { + killTimer(mTimerId); + mTimerId = 0; + emit doubleTapEventReceived(gesture->position()); + } + event->accept(gesture); + } + } + + if (QPanGesture *panningGesture = qobject_cast(event->gesture(Qt::PanGesture))) { + HbPanGesture *hbPanGesture = qobject_cast(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(event->gesture(Qt::PanGesture))) { - HbPanGesture *hbPanGesture = qobject_cast(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 +177,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()); @@ -202,17 +190,13 @@ int index = 0; for (int i = 0; i < NBR_ICON_ITEM ; i++) { - index = calculateIndex( mSelIndex + i - 2); + index = calculateIndex( mSelIndex + i - 2 ); if ( index == startIndex.row() ) { index = ( mSelItemIndex + i - 2 + NBR_ICON_ITEM ) % NBR_ICON_ITEM; qDebug("GlxCoverFlow::dataChanged index = %d mSelItemIndex = %d ", index, mSelItemIndex ); - - QVariant variant = mModel->data( startIndex, GlxFsImageRole ); - if ( variant.isValid() && variant.canConvert () ) { - mIconItem[index]->setIcon ( variant.value() ) ; - } - else { - mIconItem[index]->setIcon( HbIcon() ); + mIconItem[ index ]->setIcon( getIcon( startIndex.row() ) ); + if ( index == mSelItemIndex ) { + playAnimation( ); } } } @@ -244,7 +228,10 @@ } } - +void GlxCoverFlow::modelDestroyed() +{ + mModel = NULL ; +} void GlxCoverFlow::autoLeftMove() { @@ -258,7 +245,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 ; } @@ -282,14 +269,18 @@ } int selIndex = mCurrentPos / width ; if ( mRows == 1 || selIndex != mSelIndex ) { + stopAnimation(); mSelIndex = selIndex; mSelItemIndex = ( ++mSelItemIndex ) % NBR_ICON_ITEM; selIndex = ( mSelItemIndex + 2 ) % NBR_ICON_ITEM; updateIconItem( mSelIndex + 2, selIndex, width * 2 ) ; - emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ; + playAnimation(); + if(!mZoomOn) { + emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ; + } } mMoveDir = NO_MOVE; - mBounceBackDeltaX = 10; + mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA; mSpeed = GLX_COVERFLOW_SPEED; } } @@ -308,7 +299,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 ; } @@ -334,14 +325,18 @@ } int selIndex = mCurrentPos / width ; if ( mRows == 1 || selIndex != mSelIndex ) { + stopAnimation(); mSelIndex = selIndex; mSelItemIndex = ( mSelItemIndex == 0 ) ? NBR_ICON_ITEM -1 : --mSelItemIndex; selIndex = ( mSelItemIndex + 3 ) % NBR_ICON_ITEM; updateIconItem( mSelIndex - 2, selIndex, - width * 2 ) ; - emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ; + playAnimation(); + if(!mZoomOn) { + emit changeSelectedIndex ( mModel->index ( mSelIndex, 0 ) ) ; + } } mMoveDir = NO_MOVE; - mBounceBackDeltaX = 10; + mBounceBackDeltaX = GLX_BOUNCEBACK_DELTA; mSpeed = GLX_COVERFLOW_SPEED; } } @@ -406,71 +401,67 @@ { qDebug("GlxCoverFlow::loadIconItems "); int index = 0; - QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); - if ( variant.isValid() && variant.canConvert () ) { - mSelIndex = variant.value(); - } - + stopAnimation(); + mSelIndex = getFocusIndex(); + qDebug("GlxCoverFlow::loadIconItems index = %d, width = %d", mSelIndex, size().width() ); for ( qint8 i = 0; i < NBR_ICON_ITEM ; i++ ) { - index = calculateIndex ( mSelIndex - 2 + i) ; - QVariant variant = mModel->data( mModel->index(index, 0), GlxFsImageRole ); - if ( variant.isValid() && variant.canConvert () ) { - mIconItem[i]->setIcon ( variant.value() ) ; - } - else { - mIconItem[i]->setIcon( HbIcon() ); - } + index = calculateIndex ( mSelIndex - 2 + i) ; + mIconItem[i]->setIcon( getIcon( index ) ); mIconItem[i]->setSize ( mItemSize ); mIconItem[i]->setPos ( QPointF ( (i - 2) * mItemSize.width(), 0) ); } mSelItemIndex = 2; mCurrentPos = mItemSize.width() * mSelIndex; + playAnimation(); +} + +void GlxCoverFlow::playAnimation() +{ + if ( isAnimatedImage( mSelIndex ) ) { + mIconItem[ mSelItemIndex ]->setIcon( HbIcon( getUri( mSelIndex ) ) ); + mIconItem[ mSelItemIndex ]->animator().startAnimation(); + } +} + +void GlxCoverFlow::stopAnimation() +{ + mIconItem[ mSelItemIndex ]->animator().stopAnimation(); } void GlxCoverFlow::updateIconItem (qint16 selIndex, qint16 selItemIndex, qint16 posX) { qDebug("GlxCoverFlow::updateIconItem selIndex = %d, selIconIndex = %d posX = %d", selIndex, selItemIndex, posX ); - mIconItem[selItemIndex]->setPos(QPointF(posX, 0)); selIndex = calculateIndex( selIndex ); - - QVariant variant = mModel->data( mModel->index(selIndex, 0), GlxFsImageRole ); - if ( variant.isValid() && variant.canConvert () ) { - mIconItem[selItemIndex]->setIcon ( variant.value() ) ; - } - else { - mIconItem[selItemIndex]->setIcon( HbIcon() ); - } - mIconItem[selItemIndex]->setSize ( mItemSize ); + mIconItem[ selItemIndex ]->setPos( QPointF( posX, 0 ) ); + mIconItem[ selItemIndex ]->setIcon( getIcon( selIndex ) ); + mIconItem[ selItemIndex ]->setSize ( mItemSize ); } - void GlxCoverFlow::clearCurrentModel() { qDebug("GlxCoverFlow::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( 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 GlxCoverFlow::initializeNewModel() { qDebug("GlxCoverFlow::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( 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 GlxCoverFlow::resetCoverFlow() @@ -499,28 +490,21 @@ { qDebug("GlxCoverFlow::resetpartiallyCreated"); mIconItem[2]->setSize ( itemSize ); - mIconItem[2]->setPos ( QPointF ( 0, 0) ); - - QVariant variant = model->data( model->index(0,0), GlxFocusIndexRole ); - if ( variant.isValid() && variant.canConvert () ) { - mSelIndex = variant.value(); - qDebug("GlxCoverFlow::partiallyCreated index mSelIndex=%d",mSelIndex); - } - - variant = model->data( model->index(mSelIndex, 0), GlxFsImageRole ); - if ( variant.isValid() && variant.canConvert () ) { - mIconItem[2]->setIcon ( variant.value() ) ; - } + mIconItem[2]->setPos ( QPointF ( 0, 0) ); + mModel = model ; + mSelIndex = getFocusIndex(); + mIconItem[2]->setIcon( getIcon( mSelIndex ) ) ; + mModel = NULL; } GlxCoverFlow::~GlxCoverFlow() { qDebug("GlxCoverFlow::~GlxCoverFlow model " ); + ClearCoverFlow(); disconnect( this, SIGNAL( autoLeftMoveSignal() ), this, SLOT( autoLeftMove() ) ); disconnect( this, SIGNAL( autoRightMoveSignal() ), this, SLOT( autoRightMove() ) ); } - void GlxCoverFlow::ClearCoverFlow() { qDebug("GlxCoverFlow::ClearCoverFlow " ); @@ -542,3 +526,64 @@ } return substate; } + +void GlxCoverFlow::zoomStarted(int index) +{ + Q_UNUSED(index) + stopAnimation(); + mZoomOn = true; +} + +void GlxCoverFlow::zoomFinished(int index) +{ + mZoomOn = false; + playAnimation(); + indexChanged(index); +} + +void GlxCoverFlow::timerEvent(QTimerEvent *event) +{ + if(mTimerId == event->timerId()) + { + killTimer(mTimerId); + mTimerId = 0; + emit coverFlowEvent( TAP_EVENT ); + } +} + +int GlxCoverFlow::getFocusIndex( ) +{ + QVariant variant = mModel->data( mModel->index( 0, 0 ), GlxFocusIndexRole ) ; + if ( variant.isValid() && variant.canConvert< int > () ) { + return variant.value< int > (); + } + return -1; +} + +HbIcon GlxCoverFlow::getIcon( int index ) +{ + QVariant variant = mModel->data( mModel->index( index, 0 ), GlxFsImageRole ); + if ( variant.isValid() && variant.canConvert< HbIcon > () ) { + return variant.value () ; + } + return HbIcon() ; +} + +QString GlxCoverFlow::getUri( int index ) +{ + QVariant variant = mModel->data( mModel->index( index, 0 ), GlxUriRole ); + if ( variant.isValid() && variant.canConvert< QString > () ){ + return variant.value< QString > () ; + } + return QString(); +} + +bool GlxCoverFlow::isAnimatedImage( int index ) +{ + int frameCount = 0; + QVariant variant = mModel->data( mModel->index( index, 0 ), GlxFrameCount ); + if ( variant.isValid() && variant.canConvert< int > () ) { + frameCount = variant.value< int > () ; + } + return frameCount > 1 ? true : false ; +} diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/src/glxfullscreenview.cpp --- a/ui/views/fullscreenview/src/glxfullscreenview.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/fullscreenview/src/glxfullscreenview.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -29,6 +29,7 @@ #include #include #include +#include //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 @@ -62,10 +63,7 @@ mIconItem(NULL), mTvOutWrapper(NULL), mFullScreenToolBar(NULL), - mFlipAction(NULL), - mSendAction(NULL), - mDeleteAction(NULL), - mUseImageAction(NULL) + mZoomWidget(NULL) { OstTraceFunctionEntry0( GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_ENTRY ); @@ -87,15 +85,11 @@ mTvOutWrapper = new GlxTvOutWrapper(); } setHdmiModel(model); - - //Load/Retrieve the Widgets loadWidgets(); - //Initialize the coverflow and partially creates the coverflow with one image - // to make the widget light weight in order to make - // transition smooth - mCoverFlow->partiallyCreate( model, screenSize()); - setItemVisible(Hb::AllItems, FALSE) ; + // Initialize the coverflow and partially creates the coverflow with one image + // to make the widget light weight in order to make transition smooth + mCoverFlow->partiallyCreate( model, screenSize() ); OstTraceFunctionExit0( GLXFULLSCREENVIEW_INITIALIZEVIEW_EXIT ); } @@ -103,20 +97,22 @@ void GlxFullScreenView::loadWidgets() { OstTraceFunctionEntry0( GLXFULLSCREENVIEW_LOADWIDGETS_ENTRY ); + + mCoverFlow = qobject_cast (mDocLoader->findWidget(GLXFULLSCREEN_COVERFLOW)); - //Load the Coverflow and image strip widget - mCoverFlow = qobject_cast (mDocLoader->findWidget(GLXFULLSCREEN_COVERFLOW)); - + mZoomWidget = qobject_cast (mDocLoader->findWidget(GLXFULLSCREENZOOMWIDGET)); + mZoomWidget->connectDecodeRequestToPinchEvent(); + mCoverFlow->setMultitouchFilter(mZoomWidget); + //initialise the cover flow for basic connections and the rest mCoverFlow->setCoverFlow(); - - //Load the IMAGE STRIP & FULLSCREEN TOOLBAR[PUSH BUTTON] - mImageStrip = qobject_cast (mDocLoader->findWidget(GLXFULLSCREEN_FILMSTRIP)); + mImageStrip = qobject_cast (mDocLoader->findWidget(GLXFULLSCREEN_FILMSTRIP)); //When the widget is loaded/retreived the widgets are shown by default. //@to do : hide the widgets by default in docml mImageStrip->hide(); - mImageStrip->setLayoutName( QString( "ImageStrip" ) ); + mImageStrip->setLayoutName( QString( "ImageStrip" ) ); // To distinguish in CSS file + mImageStrip->setEnabledAnimations( HbAbstractItemView::None ); OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADWIDGETS_EXIT ); } @@ -133,59 +129,46 @@ mFullScreenToolBar = qobject_cast (mDocLoader->findObject(QString("toolBar"))); mFullScreenToolBar->clearActions(); - - //create Flip tool bar button action - mFlipAction = new HbAction(this); - mFlipAction->setData(EGlxCmdDetailsOpen); - mFlipAction->setIcon(HbIcon(GLXICON_FLIP)); - mFullScreenToolBar->addAction( mFlipAction); - - //create Send tool bar button action - mSendAction = new HbAction(this); - mSendAction->setData(EGlxCmdSend); - mSendAction->setIcon(HbIcon(GLXICON_SEND)); - mFullScreenToolBar->addAction( mSendAction); + + addToolBarAction( EGlxCmdDetailsOpen, GLXICON_FLIP, "Flip Action" ); //create Flip tool bar button action + addToolBarAction( EGlxCmdSend, GLXICON_SEND, "Send Action" ); //create Send tool bar button action + if( getSubState() != IMAGEVIEWER_S ) { + addToolBarAction( EGlxCmdDelete, GLXICON_DELETE, "Delete Action" ); //create Delete tool bar button action + } + else { + addToolBarAction( EGlxCmdHandled, GLXICON_USEIMAGE, "Use Action" ); //create Use Image tool bar button action + } + + OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADFULLSCREENTOOLBAR_EXIT ); +} - //create Delete tool bar button action - mDeleteAction = new HbAction(this); - mDeleteAction->setData(EGlxCmdDelete); - mDeleteAction->setIcon(HbIcon(GLXICON_DELETE)); - - //create Use Image tool bar button action - mUseImageAction = new HbAction(this); - //mUseImageAction->setData(EGlxCmdDelete); - mUseImageAction->setIcon(HbIcon(GLXICON_USEIMAGE)); - if(getSubState() != IMAGEVIEWER_S){ - mFullScreenToolBar->addAction( mDeleteAction); - }else{ - mFullScreenToolBar->addAction( mUseImageAction); - } - - - connect(mFlipAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); - connect(mSendAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); - connect(mDeleteAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); - connect(mUseImageAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); - - OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADFULLSCREENTOOLBAR_EXIT ); +void GlxFullScreenView::addToolBarAction( int commandId, const QString &iconName, const QString &name ) +{ + HbAction *action = new HbAction( this ); + action->setData( commandId ); + action->setIcon( HbIcon( iconName ) ); + action->setObjectName( name ); + mFullScreenToolBar->addAction( action); + connect(action, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); } void GlxFullScreenView::activate() { OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ACTIVATE_ENTRY ); - - setItemVisible(Hb::AllItems, FALSE) ; - //for zoom might not be required after wk15 release mWindow->viewport()->setAttribute(Qt::WA_AcceptTouchEvents,true); mWindow->viewport()->grabGesture(Qt::PinchGesture); - if(!mCoverFlow){ + QCoreApplication::instance()->installEventFilter(this); + + if( !mCoverFlow ) { loadWidgets(); //retrives the widgets } - //Loads the widgets corresponding to the orientation. - loadViewSection(); + loadViewSection(); + + setStatusBarVisible(FALSE); + setTitleBarVisible(FALSE); mUiOffTimer = new QTimer(); mUiOff = true; @@ -196,7 +179,7 @@ if (!mTvOutWrapper){ mTvOutWrapper = new GlxTvOutWrapper(); - } + } OstTraceFunctionExit0( GLXFULLSCREENVIEW_ACTIVATE_EXIT ); } @@ -236,7 +219,7 @@ //Clean up the rest of the resources allocated cleanUp(); - + QCoreApplication::instance()->removeEventFilter(this); //deletes the iconitems in the coverflow mCoverFlow->ClearCoverFlow(); @@ -270,6 +253,12 @@ delete mTvOutWrapper; mTvOutWrapper = NULL; } + + if(mZoomWidget) + { + mZoomWidget->cleanUp(); + mZoomWidget = NULL; + } OstTraceFunctionExit0( GLXFULLSCREENVIEW_CLEANUP_EXIT ); } @@ -292,27 +281,26 @@ mModel = model; setModelContext(); setHdmiModel(mModel); - + mZoomWidget->setModel(mModel); mCoverFlow->setModel(mModel); setImageStripModel(); - if(getSubState() == IMAGEVIEWER_S) - { + if(getSubState() == IMAGEVIEWER_S) { setTitle("Image Viewer"); - } + } else if(getSubState() == FETCHER_S){ - setItemVisible(Hb::AllItems, TRUE) ; + setStatusBarVisible(TRUE); + setTitleBarVisible(TRUE); } OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETMODEL_EXIT ); } void GlxFullScreenView::setHdmiModel(QAbstractItemModel* model) - { - if (mTvOutWrapper) - mTvOutWrapper->setModel(model); - - // for the first image on screen - mTvOutWrapper->setImagetoHDMI(); - } +{ + if (mTvOutWrapper) { + mTvOutWrapper->setModel(model); + mTvOutWrapper->setImagetoHDMI(); // for the first image on screen + } +} void GlxFullScreenView::setModelContext() { @@ -353,7 +341,7 @@ OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ACTIVATEUI_ENTRY ); if ( mUiOff && getSubState() != FETCHER_S){ - if(!mFullScreenToolBar) { + if( !mFullScreenToolBar ) { loadFullScreenToolBar(); } mUiOff = FALSE; @@ -365,8 +353,9 @@ } mFullScreenToolBar->show(); - setItemVisible(Hb::AllItems, TRUE) ; - + setStatusBarVisible(TRUE); + setTitleBarVisible(TRUE); + if ( mImageStrip && getSubState() != IMAGEVIEWER_S) { mImageStrip->show(); HbEffect::start(mImageStrip, QString("HbGridView"), QString("TapShow"), this, "effectFinished" ); @@ -395,7 +384,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" ); @@ -414,17 +404,24 @@ QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); if ( variant.isValid() && variant.canConvert () && ( index.row() == variant.value() ) ) { - OstTraceFunctionExit0( GLXFULLSCREENVIEW_CHANGESELECTEDINDEX_EXIT ); - if (mTvOutWrapper){ - // for the image changed on deletion - mTvOutWrapper->setImagetoHDMI(); - } - return; - } - mModel->setData( index, index.row(), GlxFocusIndexRole ); + OstTraceFunctionExit0( GLXFULLSCREENVIEW_CHANGESELECTEDINDEX_EXIT ); + if (mTvOutWrapper){ + // for the image changed on deletion + mTvOutWrapper->setImagetoHDMI(); + } + if (mZoomWidget){ + // for the image changed on deletion + mZoomWidget->indexChanged(); + } + return; + } + + mModel->setData( index, index.row(), GlxFocusIndexRole ); + mModel->setData( index, index.row(), GlxVisualWindowIndex ); + mZoomWidget->indexChanged(index.row()); if (mTvOutWrapper){ - // for the image changed on swipe - mTvOutWrapper->setImagetoHDMI(); + // for the image changed on swipe + mTvOutWrapper->setImagetoHDMI(); } OstTraceFunctionExit0( DUP1_GLXFULLSCREENVIEW_CHANGESELECTEDINDEX_EXIT ); } @@ -439,6 +436,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 +585,9 @@ QSize sz = screenSize(); mCoverFlow->setItemSize(sz); - OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETLAYOUT_EXIT ); + mZoomWidget->setWindowSize(sz); + + OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETLAYOUT_EXIT ); } void GlxFullScreenView::addConnection() @@ -611,6 +611,12 @@ 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(mCoverFlow,SIGNAL( doubleTapEventReceived(QPointF) ), mZoomWidget, SLOT( animateZoomIn(QPointF) ) ); + } + connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); OstTraceFunctionExit0( GLXFULLSCREENVIEW_ADDCONNECTION_EXIT ); @@ -640,23 +646,11 @@ GLX_LOG_INFO("GlxFullScreenView::removeConnection() mUiOffTimer " ); disconnect(mUiOffTimer, SIGNAL(timeout()), this, SLOT(hideUi())); } - - if(mFlipAction) { - disconnect(mFlipAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); - } - - if(mSendAction) { - disconnect(mSendAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); - } - - if(mDeleteAction) { - disconnect(mDeleteAction, SIGNAL(triggered( )), this, SLOT(handleToolBarAction( )) ); - } - - 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 +677,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(); @@ -752,27 +734,28 @@ int GlxFullScreenView::getSubState() { - int substate = NO_FULLSCREEN_S; - QVariant variant = mModel->data( mModel->index(0,0), GlxSubStateRole ); - if ( variant.isValid() && variant.canConvert () ) { - substate = variant.value(); + int substate = NO_FULLSCREEN_S; + + if ( mModel ) { + QVariant variant = mModel->data( mModel->index(0,0), GlxSubStateRole ); + if ( variant.isValid() && variant.canConvert () ) { + substate = variant.value(); + } } 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); } diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/src/glxzoomcontrol.cpp --- a/ui/views/fullscreenview/src/glxzoomcontrol.cpp Wed Jun 16 13:08:54 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 -#include -#include -#include -#include -#include - -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"<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(),0),GlxUriRole)).value(); - mImageDecoder->decodeImage(imagePath); - connect(mImageDecoder, SIGNAL(pixmapDecoded()), this, SLOT(decodedImageAvailable())); - QVariant variant = mModel->data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value(),0),GlxFsImageRole); - if ( variant.isValid() && variant.canConvert () ) { - qDebug("@@@GlxZoomControl::initializeZoomControl valid icon"); - QIcon itemIcon = variant.value().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(),0),GlxDimensionsRole)).value(); - 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(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 "<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"< 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()); - } - } - -} diff -r c9962d0368d9 -r 525c140ec8db ui/views/fullscreenview/src/glxzoomslider.cpp --- a/ui/views/fullscreenview/src/glxzoomslider.cpp Wed Jun 16 13:08:54 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 -#include -#include -#include -#include -#include "glxmodelparm.h" -#include - -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(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(),0),GlxDimensionsRole)).value(); - qDebug()<<"GlxZoomSlider::retrieveActualAndDisplayedSize"<data(mModel->index(mModel->data(mModel->index(0,0),GlxFocusIndexRole).value(),0),GlxFsImageRole); - if ( variant.isValid() && variant.canConvert () ) { - QIcon itemIcon = variant.value().qicon(); - QSize windowSize(360,640); - QSize itemSize = itemIcon.actualSize(windowSize); - QPixmap itemPixmap = itemIcon.pixmap(itemSize); - displayedSize = itemPixmap.size(); - qDebug()<<"GlxZoomSlider::retrieveActualAndDisplayedSize Display"<setSliderPosition(sliderPosition); -} - -void GlxZoomSlider::filterandEmitSliderValueChanges(int newValue) -{ - if (mSliderThumbPressed){ - emit valueChanged(newValue); - } - //else { - qDebug()<<"GlxZoomSlider::filterandEmitSliderValueChanges stray signal"< #include #include +#include +#include +#include +#include //User Includes #include "glxviewids.h" #include "glxgridview.h" #include "glxmodelparm.h" #include "glxcommandhandlers.hrh" - +#include "glxicondefs.h" +#include "glxlocalisationstrings.h" #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE #include "glxgridviewTraces.h" #endif -GlxGridView::GlxGridView(HbMainWindow *window) - : GlxView ( GLX_GRIDVIEW_ID ), - mWindow(window), - mModel ( NULL), +GlxGridView::GlxGridView(HbMainWindow *window) + : GlxView ( GLX_GRIDVIEW_ID ), + mWindow(window), + mModel ( NULL), mWidget(NULL), 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(); @@ -60,31 +72,47 @@ void GlxGridView::activate() { OstTraceFunctionEntry0( GLXGRIDVIEW_ACTIVATE_ENTRY ); - if(mUiOnButton == NULL) { - mUiOnButton = new HbPushButton("UI",this); - connect(mUiOnButton, SIGNAL(clicked(bool)), this, SLOT(uiButtonClicked(bool))); - mUiOnButton->setGeometry(QRectF(610,0,15,15)); - mUiOnButton->setZValue(1); - mUiOnButton->hide(); + loadGridView(); + connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation)),Qt::UniqueConnection); + if(mCountItem == NULL) { + mCountItem = new HbLabel(this); + mCountItem->setObjectName( "Count" ); + 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); + mCountItem->hide(); } - loadGridView(); 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(); + } + disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationchanged(Qt::Orientation))); OstTraceFunctionExit0( GLXGRIDVIEW_DEACTIVATE_EXIT ); } @@ -94,19 +122,44 @@ 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 () ) { mWidget->setDefaultImage(variantimage.value()); } mModelWrapper->setModel(mModel); - mWidget->setModel(mModelWrapper); + mWidget->setModel(mModelWrapper); if(!mSelectionModel) { mSelectionModel = new QItemSelectionModel(mModelWrapper, this); @@ -114,6 +167,7 @@ mWidget->setSelectionModel(mSelectionModel); } scrolltofocus(); // Need to do it here ? + showItemCount(); } OstTraceFunctionExit0( GLXGRIDVIEW_SETMODEL_EXIT ); } @@ -130,10 +184,10 @@ } } -void GlxGridView::addToolBar( HbToolBar *toolBar ) +void GlxGridView::addToolBar( HbToolBar *toolBar ) { - OstTraceFunctionEntry0( GLXGRIDVIEW_ADDTOOLBAR_ENTRY ); - setToolBar(toolBar); + OstTraceFunctionEntry0( GLXGRIDVIEW_ADDTOOLBAR_ENTRY ); + setToolBar(toolBar); hideorshowitems(mWindow->orientation()); OstTraceFunctionExit0( GLXGRIDVIEW_ADDTOOLBAR_EXIT ); } @@ -142,12 +196,246 @@ { OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ENABLEMARKING, "GlxGridView::enableMarking" ); mWidget->setSelectionMode(HgWidget::MultiSelection); + if (mMainLabel == NULL) { + mMainLabel = new HbLabel("Select Photos", this); + mMainLabel->setObjectName( "Select Photos"); + 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); + mMarkCheckBox->setObjectName( "CheckB MarkAll" ); + 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); + mCountLabel->setObjectName( "MarkCount" ); + 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() +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(XQServiceUtil::isService()) + { + showAlbumTitle(GLX_FETCHER_TITLE); + } + else 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() ) + { + populated = variant.value(); + } + 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); + mAlbumName->setObjectName( "Album Name" ); + 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 fetcher service set only title text + if((XQServiceUtil::isService() ) && isItemVisible(Hb::TitleBarItem)) { + mAlbumName->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24)); + QString text = QString(aTitle); + mAlbumName->setPlainText( text ); + mAlbumName->show(); + } + else{ //handle album tiltle and count display logic here + 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) { + QString displayText(GLX_GRID_NO_IMAGE); + if(!XQServiceUtil::isService()) + { + displayText.append(GLX_GRID_OPEN_CAMERA); + } + mZeroItemLabel = new HbLabel(displayText, this); + mZeroItemLabel->setObjectName( "No Image" ); + } + 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->setObjectName( "Camera Button" ); + mCameraButton->setIcon(HbIcon(GLXICON_CAMERA)); + mCameraButton->hide(); + connect(mCameraButton, SIGNAL(clicked(bool)), this, SLOT(cameraButtonClicked(bool))); + } + if(!XQServiceUtil::isService()) + { + 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() +{ + QVariant variant = mModelWrapper->data(mModelWrapper->index(0,0), GlxVisualWindowIndex ); + int visualIndex = 0; + if ( variant.isValid() && variant.canConvert () ) { + visualIndex = variant.value(); + } + mWidget->scrollTo(mModelWrapper->index(visualIndex,0)); + showItemCount(); } void GlxGridView::handleUserAction(qint32 commandId) @@ -160,11 +448,11 @@ case EGlxCmdUnMarkAll : mWidget->clearSelection(); - break; + break; default : break; - } + } } QItemSelectionModel * GlxGridView::getSelectionModel() @@ -184,12 +472,12 @@ if ( transitionEffect == GRID_TO_FULLSCREEN ) { - QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); - if ( variant.isValid() && variant.canConvert () ) + QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); + if ( variant.isValid() && variant.canConvert () ) { - selIndex = variant.value(); - } - else + selIndex = variant.value(); + } + else { return mWidget; } @@ -213,7 +501,7 @@ mIconItem->setPos(itemRect.topLeft()); mIconItem->setZValue(mIconItem->zValue() + 20); mIconItem->show(); - return mIconItem; + return mIconItem; } else { @@ -225,7 +513,7 @@ return mWidget; } OstTraceFunctionExit0( GLXGRIDVIEW_GETANIMATIONITEM_EXIT ); - return NULL; + return NULL; } void GlxGridView::loadGridView() @@ -237,12 +525,12 @@ mWindow->viewport()->grabGesture(Qt::TapGesture); mWindow->viewport()->grabGesture(Qt::TapAndHoldGesture); mWidget = new HgGrid(orient); + mWidget->setObjectName( "Media Wall" ); mWidget->setLongPressEnabled(true); - mWidget->setScrollBarPolicy(HgWidget::ScrollBarAutoHide); - //mWidget->setItemSize(QSizeF(120,120)); - setWidget( mWidget ); + mWidget->setScrollBarPolicy(HgWidget::ScrollBarAutoHide); + setWidget( mWidget ); addViewConnection(); - //hideorshowitems(orient); + hideorshowitems(orient); } OstTraceFunctionExit0( GLXGRIDVIEW_LOADGRIDVIEW_EXIT ); } @@ -253,30 +541,56 @@ } void GlxGridView::hideorshowitems(Qt::Orientation orient) { - if(orient == Qt::Horizontal) - { - if (mUiOnButton) - { + if ( mWidget && mWidget->selectionMode() == HgWidget::NoSelection ) { + if( orient == Qt::Horizontal ) { + setItemVisible(Hb::AllItems, FALSE) ; + setViewFlags(viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden); + showItemCount(); + if(mUiOnButton == NULL) { + mUiOnButton = new HbPushButton(this); + connect(mUiOnButton, SIGNAL(clicked(bool)), this, SLOT(uiButtonClicked(bool))); + mUiOnButton->setGeometry(QRectF(590,0,40,40)); + mUiOnButton->setZValue(1); + mUiOnButton->setIcon(HbIcon(GLXICON_WALL_UI_ON)); + mUiOnButton->setObjectName( "UiOn Button" ); + } mUiOnButton->show(); - } - setItemVisible(Hb::AllItems, FALSE) ; + } + else { + showHbItems(); } - else - { - if (mUiOnButton) - { + } + else if (mWidget && mWidget->selectionMode() == HgWidget::MultiSelection) { + setItemVisible(Hb::TitleBarItem, FALSE) ; + 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() { if(mModelWrapper && mWidget) { - QVariant variant = mModelWrapper->data( mModelWrapper->index(0,0), GlxFocusIndexRole ); - if ( variant.isValid() && variant.canConvert () ) + QVariant variant = mModelWrapper->data( mModelWrapper->index(0,0), GlxFocusIndexRole ); + if ( variant.isValid() && variant.canConvert () ) { mWidget->scrollTo( mModelWrapper->index( variant.value(),0) ); mModel->setData(mModel->index(0,0),variant.value(),GlxVisualWindowIndex); @@ -284,21 +598,10 @@ } } -QVariant GlxGridView::itemChange (GraphicsItemChange change, const QVariant &value) - { - OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_ITEMCHANGE, "GlxGridView::itemChange" ); - static bool isEmit = true; - if ( isEmit && change == QGraphicsItem::ItemVisibleHasChanged && value.toBool() ) { - emit actionTriggered( EGlxCmdSetupItem ); - isEmit = false; - } - return HbWidget::itemChange(change, value); - } 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 +615,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 &))); @@ -326,36 +628,49 @@ void GlxGridView::itemSelected(const QModelIndex & index) { OstTrace1( TRACE_NORMAL, GLXGRIDVIEW_ITEMSELECTED, "GlxGridView::itemSelected;index=%d", index.row() ); - if ( mWidget->selectionMode() == HgWidget::MultiSelection ) - { + if ( mWidget->selectionMode() == HgWidget::MultiSelection ) { return ; - } - if(XQServiceUtil::isService()){ + } + if(XQServiceUtil::isService()){ emit gridItemSelected(index); return; - } - OstTraceEventStart0( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START, "Fullscreen Launch Time" ); - if ( mModel ) - { + } + OstTraceEventStart0( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START, "Fullscreen Launch Time" ); + if ( mModel ) { mModel->setData( index, index.row(), GlxFocusIndexRole ); - } - setItemVisible(Hb::AllItems, FALSE); - emit actionTriggered( EGlxCmdFullScreenOpen ); + } + emit actionTriggered( EGlxCmdFullScreenOpen ); OstTraceEventStop( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_STOP, "Fullscreen Launch Time", EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START ); } 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 visibleIndex = mWidget->getVisibleItemIndices(); if (visibleIndex.count() <= 0) { @@ -365,10 +680,11 @@ if ( index.row() < 0 || index.row() >= mModel->rowCount() ) { return; - } + } if(mModel) { mModel->setData( index, index.row(), GlxVisualWindowIndex); + mModel->setData( index, index.row(), GlxFocusIndexRole ); } } @@ -387,34 +703,65 @@ 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 ); } void GlxGridView::indicateLongPress(const QModelIndex& index, QPointF coords) { OstTrace0( TRACE_NORMAL, GLXGRIDVIEW_INDICATELONGPRESS, "GlxGridView::indicateLongPress" ); - + if ( mWidget->selectionMode() == HgWidget::MultiSelection ) - { + { return; - } - if ( mModel ) + } + if ( mModel ) { mModel->setData( index, index.row(), GlxFocusIndexRole ); - } + } emit itemSpecificMenuTriggered(viewId(),coords); } 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 () ) { + substate = variant.value(); + } + return substate; +} + diff -r c9962d0368d9 -r 525c140ec8db ui/views/listview/inc/glxlistview.h --- a/ui/views/listview/inc/glxlistview.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/listview/inc/glxlistview.h Thu Jul 22 16:33:32 2010 +0100 @@ -43,6 +43,7 @@ public slots: void itemSelected(const QModelIndex & index); + void populated(); private slots: void indicateLongPress( HbAbstractViewItem *item, QPointF coords ); diff -r c9962d0368d9 -r 525c140ec8db ui/views/listview/src/glxlistview.cpp --- a/ui/views/listview/src/glxlistview.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/listview/src/glxlistview.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -43,7 +43,6 @@ { qDebug("GlxListView::GlxListView()"); mDocLoader = new HbDocumentLoader(); - setContentFullScreen( true ); } void GlxListView::activate() @@ -64,8 +63,12 @@ void GlxListView::setModel(QAbstractItemModel *model) { qDebug("GlxListView::setModel()"); + if ( mModel ) { + disconnect(mModel, SIGNAL(listPopulated()), this, SLOT( populated())); + } mModel = model ; mListView->setModel(mModel); + connect(mModel, SIGNAL(listPopulated()), this, SLOT( populated())); } void GlxListView::addToolBar( HbToolBar *toolBar ) @@ -137,13 +140,13 @@ mView = static_cast(mDocLoader->findWidget(QString(GLX_LISTVIEW_VIEW))); mListView = static_cast(mDocLoader->findWidget(QString(GLX_LISTVIEW_LIST))); - if(mListView) { + if( mListView ) { //sets the widget setWidget((QGraphicsWidget*) mView); + HbListViewItem *prototype = mListView->listItemPrototype(); + prototype->setStretchingStyle(HbListViewItem::StretchLandscape); } } - HbListViewItem *prototype = mListView->listItemPrototype(); - prototype->setStretchingStyle(HbListViewItem::StretchLandscape); } } @@ -181,6 +184,17 @@ } } +void GlxListView::populated() +{ + QVariant variant = mModel->data(mModel->index(0,0), GlxVisualWindowIndex ); + int visualIndex = 0; + if ( variant.isValid() && variant.canConvert () ) + { + visualIndex = variant.value(); + } + //Scroll To the Visible Index as mentioned in the AM. + mListView->scrollTo(mModel->index(visualIndex, 0), HbAbstractItemView::PositionAtTop ); +} void GlxListView::itemSelected(const QModelIndex & index) { qDebug("GlxListView::itemSelected() index = %d", index.row() ); diff -r c9962d0368d9 -r 525c140ec8db ui/views/slideshowsettingsview/inc/glxslideshowsettingsview.h --- a/ui/views/slideshowsettingsview/inc/glxslideshowsettingsview.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/slideshowsettingsview/inc/glxslideshowsettingsview.h Thu Jul 22 16:33:32 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_ */ diff -r c9962d0368d9 -r 525c140ec8db ui/views/slideshowsettingsview/src/glxslideshowsettingsview.cpp --- a/ui/views/slideshowsettingsview/src/glxslideshowsettingsview.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/slideshowsettingsview/src/glxslideshowsettingsview.cpp Thu Jul 22 16:33:32 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,38 @@ 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 ); + mContextlabel->setObjectName( "SlideShow" ); } if ( mEffectlabel == NULL ) { - mEffectlabel = new HbLabel("Transition effect:", this); + mEffectlabel = new HbLabel( GLX_LABEL_TRANSITION_EFFECT, this ); + mEffectlabel->setObjectName( "Effect" ); } if ( mEffect == NULL ) { mEffect = new HbComboBox(this); QStringList effectList = mSettings->slideShowEffectList(); - mEffect->addItems( effectList ); - + mEffect->addItems( effectList ); + mEffect->setObjectName( "Effect List" ); } if ( mDelaylabel == NULL ) { - mDelaylabel = new HbLabel("Transition delay:", this); + mDelaylabel = new HbLabel( GLX_LABEL_TRANSITION_DELAY, this ); + mDelaylabel->setObjectName( "Delay" ); } if ( mDelay == NULL ) { mDelay = new HbComboBox(this); + mDelay->setObjectName( "Delay List" ); 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 +119,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))); } - - diff -r c9962d0368d9 -r 525c140ec8db ui/views/slideshowview/inc/glxslideshowview.h --- a/ui/views/slideshowview/inc/glxslideshowview.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/slideshowview/inc/glxslideshowview.h Thu Jul 22 16:33:32 2010 +0100 @@ -52,7 +52,7 @@ void modelDestroyed(); protected : - bool event(QEvent *event); + bool eventFilter(QObject *obj, QEvent *ev); private: void loadObjects(); diff -r c9962d0368d9 -r 525c140ec8db ui/views/slideshowview/inc/glxslideshowwidget.h --- a/ui/views/slideshowview/inc/glxslideshowwidget.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/slideshowview/inc/glxslideshowwidget.h Thu Jul 22 16:33:32 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; diff -r c9962d0368d9 -r 525c140ec8db ui/views/slideshowview/src/glxslideshowview.cpp --- a/ui/views/slideshowview/src/glxslideshowview.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/slideshowview/src/glxslideshowview.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -19,6 +19,7 @@ //Includes #include #include +#include #include #include @@ -63,14 +64,17 @@ void GlxSlideShowView::activate() { TRACER("GlxSlideShowView::activate()"); - mWindow->setOrientation(Qt::Horizontal, true); // Actually it is animation false, Hack for Bug in Media wall -todo- need to Address this ASAP + mWindow->setOrientation(Qt::Horizontal, false); //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(); } @@ -79,14 +83,20 @@ void GlxSlideShowView::deActivate() { TRACER("GlxSlideShowView::deActivate()"); - mWindow->unsetOrientation(true); // Actually it is animation false, Hack for Bug in Media wall -todo- need to Address this ASAP + mWindow->unsetOrientation(false); - 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() diff -r c9962d0368d9 -r 525c140ec8db ui/views/slideshowview/src/glxslideshowwidget.cpp --- a/ui/views/slideshowview/src/glxslideshowwidget.cpp Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/slideshowview/src/glxslideshowwidget.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -29,20 +29,21 @@ #include #include - //User Includes #include "glxicondefs.h" //Contains the icon names/Ids #include "glxmodelparm.h" #include "glxeffectengine.h" #include "glxdocloaderdefs.h" #include "glxslideshowwidget.h" -#include -#include +#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,10 @@ 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)); + mIconItems[i]->setAlignment( Qt::AlignCenter ); + mIconItems[i]->setObjectName( QString( "SlideShowIcon%1" ).arg( i ) ); } mSlideTimer = new QTimer(); @@ -81,75 +85,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 +155,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 +166,44 @@ 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()); + mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxVisualWindowIndex ); + 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 +212,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 () ) { - mIconItems[index]->setIcon ( variant.value() ) ; - } - 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 () ) { + mIconItems[index]->setIcon ( variant.value() ) ; + } + 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 +266,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 +309,7 @@ } void GlxSlideShowWidget::leftMoveEffectFinished( const HbEffect::EffectStatus &status ) - { +{ Q_UNUSED(status) TRACER("GlxSlideShowWidget::leftMoveEffectFinished()"); GLX_LOG_INFO1("GlxSlideShowWidget::leftMoveEffectFinished() %d status", status.reason); @@ -331,14 +318,15 @@ mSelIndex = ( ++mSelIndex ) % rowCount; mItemIndex = ( ++mItemIndex ) % NBR_ITEM; mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxFocusIndexRole ); + mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxVisualWindowIndex ); - 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); @@ -347,12 +335,12 @@ mSelIndex = mSelIndex ? --mSelIndex : rowCount - 1; mItemIndex = mItemIndex ? mItemIndex - 1 : NBR_ITEM - 1; mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxFocusIndexRole ); + mModel->setData( mModel->index(mSelIndex, 0), mSelIndex, GlxVisualWindowIndex ); - setIconItems(MOVE_BACKWARD); + setIconItems( MOVE_BACKWARD ); startSlideShow(); emit indexchanged(); // on right swipe - } - +} void GlxSlideShowWidget::gestureEvent(QGestureEvent *event) { @@ -383,160 +371,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 () ) { - mSelIndex = variant.value() ; - GLX_LOG_INFO1("GlxSlideShowWidget::resetSlideShow() selected index %d", mSelIndex ); + mSelIndex = variant.value() ; + GLX_LOG_INFO1("GlxSlideShowWidget::resetSlideShow() selected index %d", mSelIndex ); } variant = mModel->data( mModel->index( mSelIndex, 0 ), GlxFsImageRole ); if ( variant.isValid() && variant.canConvert () ) { - mIconItems[mItemIndex]->setIcon ( variant.value() ) ; + mIconItems[mItemIndex]->setIcon ( variant.value() ) ; } 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 () ) { - mIconItems[itemIndex]->setIcon ( variant.value() ) ; + mIconItems[itemIndex]->setIcon ( variant.value() ) ; } 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) ) ); } - } +} diff -r c9962d0368d9 -r 525c140ec8db ui/views/viewbase/inc/glxview.h --- a/ui/views/viewbase/inc/glxview.h Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/viewbase/inc/glxview.h Thu Jul 22 16:33:32 2010 +0100 @@ -60,6 +60,7 @@ void actionTriggered(qint32 id); void itemSpecificMenuTriggered(qint32,QPointF ); void gridItemSelected(const QModelIndex &); + private : qint32 mId; diff -r c9962d0368d9 -r 525c140ec8db ui/views/views.pro --- a/ui/views/views.pro Wed Jun 16 13:08:54 2010 +0100 +++ b/ui/views/views.pro Thu Jul 22 16:33:32 2010 +0100 @@ -20,10 +20,9 @@ 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 \ + -lglxmediamodel.dll \ + -lglximagedecoderwrapper.dll \ -lglxloggerqt.dll \ -lshareui.dll \ -lglxtvout.dll \ @@ -32,14 +31,19 @@ -lglxlogging.dll \ -lganeswidgets.dll \ -lglxmodelwrapper.dll \ - -lxqsettingsmanager + -lglxviewutilities.dll \ + -lglxzoomwidget.dll \ + -ldetailsnamelabel.dll \ + -ldetailsnamelabelplugin.dll \ + -ldetailsdescriptionedit.dll \ + -ldetailsdescriptioneditplugin.dll DEFINES += BUILD_GLXVIEWS INCLUDEPATH += . ../inc \ ../../inc \ + ../widgets/glxzoomwidget/inc \ ../uiengine/model/mediamodel/inc \ - ../uiengine/model/listmodel/inc \ ../uiengine/model/favmediamodel/inc \ ../uiengine/medialistwrapper/inc \ ../viewbase/inc \ @@ -48,55 +52,52 @@ ../../traces \ ../../tvout/tvoutwrapper/inc \ ../uiengine/model/modelwrapper/inc \ - /epoc32/include/mw/hgwidgets + ../viewutilities/effectengine/inc \ + ../viewutilities/settingutility/inc \ + /epoc32/include/mw/hgwidgets \ + ../detailscustomwidget/detailsnamelabel/inc \ + ../detailscustomwidget/detailsdescriptionedit/inc symbian: { TARGET.UID3 = 0x200009EF INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE TARGET.EPOCALLOWDLLDATA = 1 TARGET.CAPABILITY = ALL -TCB +MMP_RULES += SMPSAFE } # Input 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/glxdetailscustomwidgets.cpp \ - detailsview/src/glxdetailscustomicon.cpp \ + detailsview/src/glxdetailsview.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 -DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT \ No newline at end of file +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxviews.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxviews.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectengine/inc/glxeffectengine.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectengine/inc/glxeffectengine.h Thu Jul 22 16:33:32 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 +#include +#include +#include +#include +#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 mTransitionEffectList; + GlxEffect mTransitionEffect; + GlxEffectPluginResolver *mEffectResolver; +}; + +#endif /*GLXEFFECTENGINE_H*/ diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectengine/inc/glxtransitioneffect.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectengine/inc/glxtransitioneffect.h Thu Jul 22 16:33:32 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 + +#include "glxuistd.h" + +class QString; +class QGraphicsItem ; + +/* + * This class have the views transition effect information + */ +class GlxTransitionEffectSetting +{ +public : + GlxTransitionEffectSetting(GlxEffect effect); + ~GlxTransitionEffectSetting(); + + QList effectFileList() { return mEffectFileList ; } + QList itemType() { return mItemType ; } + QList eventType() { return mEventType ; } + bool isTransitionLater() { return mTransitionLater ; } + QGraphicsItem * animationItem() { return mItem ; } + + void setEffectFileList( QList & effectFileList) { mEffectFileList = effectFileList ; } + void setItemTypes( QList & itemType) { mItemType = itemType; } + void setEventTypes( QList & 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 mEffectFileList; //list of fxml file used for animation + QList mItemType; //list of item type + QList mEventType; //list of event type +}; + +#endif //GLXTRANSITIONEFFECT_H diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectengine/src/glxeffectengine.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectengine/src/glxeffectengine.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,268 @@ +/* +* 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 + +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 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 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()"); + + QHashIterator iter( mTransitionEffectList ); + + while ( iter.hasNext() ) { + iter.next(); + GlxTransitionEffectSetting *list = iter.value(); + 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(); +} + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectengine/src/glxtransitioneffect.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectengine/src/glxtransitioneffect.cpp Thu Jul 22 16:33:32 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 + +#include + +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(); +} + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/inc/glxeffectpluginbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/inc/glxeffectpluginbase.h Thu Jul 22 16:33:32 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 +#include +#include + +/* + * 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 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*/ diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/inc/glxeffectpluginresolver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/inc/glxeffectpluginresolver.h Thu Jul 22 16:33:32 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 +#include + +#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 diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/inc/glxfadeeffectplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/inc/glxfadeeffectplugin.h Thu Jul 22 16:33:32 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 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 mEffectFileList; +}; + +#endif /* GLXFADEEFFECTPLUGIN_H */ diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/inc/glxflipeffectplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/inc/glxflipeffectplugin.h Thu Jul 22 16:33:32 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 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 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 mEffectFileList; +}; + +#endif /*GLXFLIPEFFECTPLUGIN_H*/ + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/inc/glxhelixeffectplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/inc/glxhelixeffectplugin.h Thu Jul 22 16:33:32 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 GLXHELIXEFFECTPLUGIN_H +#define GLXHELIXEFFECTPLUGIN_H + +#include "glxeffectpluginbase.h" + +class QString ; + +class GlxHelixEffectPlugin : public GlxEffectPluginBase +{ +public : + /* + * Constructor + */ + GlxHelixEffectPlugin(); + + /* + * Destructor + */ + ~GlxHelixEffectPlugin(); + + /* + * return the fade in and fade out fxml file list + */ + QList 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 mEffectFileList; +}; + +#endif /* GLXHELIXEFFECTPLUGIN_H */ diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/inc/glxzoominoutplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/inc/glxzoominoutplugin.h Thu Jul 22 16:33:32 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 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 mEffectFileList; + QGraphicsItem *mItem; +}; + +#endif /*GLXZOOMINOUTEFFECTPLUGIN_H*/ diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/src/glxeffectpluginresolver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/src/glxeffectpluginresolver.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,97 @@ +/* +* 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 + +#include "glxeffectpluginresolver.h" +#include "glxeffectpluginbase.h" +#include "glxfadeeffectplugin.h" +#include "glxflipeffectplugin.h" +#include "glxzoominoutplugin.h" +#include "glxhelixeffectplugin.h" + +GlxEffectPluginResolver::GlxEffectPluginResolver() +{ + mEffectPluginList.clear(); +} + +QString GlxEffectPluginResolver::effectName( int effectId ) +{ + qDebug( " GlxEffectPluginResolver::effectName %d ", effectId ); + switch ( effectId ) { + case FLIP_EFFECT : + return GlxFlipEffectPlugin::effectName(); + + case SMOOTH_FADE : + return GlxFadeEffectPlugin::effectName() ; + + case ZOOM_TO_FACE : + return GlxZoomInOutEffectPlugin::effectName(); + + case HELIX_EFFECT : + return GlxHelixEffectPlugin::effectName(); + + default : + return GlxFadeEffectPlugin::effectName() ; + } +} + +GlxEffectPluginBase *GlxEffectPluginResolver::effectPlugin( int effectId ) +{ + qDebug( " GlxEffectPluginResolver::effectPlugin %d ", 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 HELIX_EFFECT : + effectPlugin = new GlxHelixEffectPlugin() ; + mEffectPluginList[ HELIX_EFFECT ] = 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(); +} diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/src/glxfadeeffectplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/src/glxfadeeffectplugin.cpp Thu Jul 22 16:33:32 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(); +} + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/src/glxflipeffectplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/src/glxflipeffectplugin.cpp Thu Jul 22 16:33:32 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 "glxflipeffectplugin.h" +#include "glxuistd.h" + +GlxFlipEffectPlugin::GlxFlipEffectPlugin() : GlxEffectPluginBase( FLIP_EFFECT ) +{ + mEffectFileList.append(QString(":/data/uphide.fxml")); + mEffectFileList.append(QString(":/data/downshow.fxml")); +} + +void GlxFlipEffectPlugin::setUpItems( QList< QGraphicsItem * > & items ) +{ + if ( items.count() < 2 ) + return; + + items.at(0)->setPos(0,0); + items.at(1)->setPos(0,0); +} + +QString GlxFlipEffectPlugin::effectName() +{ + return ( "FLip" ) ; +} + +GlxFlipEffectPlugin::~GlxFlipEffectPlugin() +{ + mEffectFileList.clear(); +} + + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/src/glxhelixeffectplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/src/glxhelixeffectplugin.cpp Thu Jul 22 16:33:32 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 "glxhelixeffectplugin.h" +#include "glxuistd.h" +#include "glxlocalisationstrings.h" + +GlxHelixEffectPlugin::GlxHelixEffectPlugin() : GlxEffectPluginBase( HELIX_EFFECT ) +{ + mEffectFileList.append(QString(":/data/helix.fxml")); + mEffectFileList.append(QString(":/data/fadein.fxml")); +} + +void GlxHelixEffectPlugin::setUpItems( QList< QGraphicsItem * > & items ) +{ + if ( items.count() < 2 ) + return; + + items.at(0)->setPos(0,0); + items.at(1)->setPos(0,0); +} + +QString GlxHelixEffectPlugin::effectName() +{ + return ( "Helix" ) ; +} + +GlxHelixEffectPlugin::~GlxHelixEffectPlugin() +{ + mEffectFileList.clear(); +} + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/effectplugin/src/glxzoominoutplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/effectplugin/src/glxzoominoutplugin.cpp Thu Jul 22 16:33:32 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(); +} diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/settingutility/inc/glxsetting.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/settingutility/inc/glxsetting.h Thu Jul 22 16:33:32 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 + +class XQSettingsKey; +class XQSettingsManager; +class QStringList; + +#define NBR_SLIDESHOW_EFFECT 4 + +/* + * 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 diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/settingutility/inc/glxsettinginterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/settingutility/inc/glxsettinginterface.h Thu Jul 22 16:33:32 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 + +#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 + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/settingutility/src/glxsetting.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/settingutility/src/glxsetting.cpp Thu Jul 22 16:33:32 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 +#include +#include + +#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, 0x9 }; +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() ; +} + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/settingutility/src/glxsettinginterface.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/settingutility/src/glxsettinginterface.cpp Thu Jul 22 16:33:32 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 +#include + +GlxSettingInterface::GlxSettingInterface() +{ +} + +GlxSettingInterface::~GlxSettingInterface() +{ +} + +GlxSettingInterface::GlxSettingInterface( GlxSettingInterface & ) +{ +} + +GlxSettingInterface * GlxSettingInterface::instance() +{ + return GlxSetting::instance(); +} + diff -r c9962d0368d9 -r 525c140ec8db ui/viewutilities/viewutilities.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/viewutilities/viewutilities.pro Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,72 @@ +#/* +#* 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 +MMP_RULES += SMPSAFE +} + +# 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/glxhelixeffectplugin.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/glxhelixeffectplugin.cpp \ + effectplugin/src/glxeffectpluginresolver.cpp \ + effectengine/src/glxtransitioneffect.cpp \ + effectengine/src/glxeffectengine.cpp + +DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxviewutilities.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxviewutilities.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/widgets/bwins/glxzoomwidgetu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/widgets/bwins/glxzoomwidgetu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,42 @@ +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) + ?indexChanged@GlxZoomWidget@@QAEXXZ @ 25 NONAME ; void GlxZoomWidget::indexChanged(void) + ?animateZoomOut@GlxZoomWidget@@QAEXVQPointF@@@Z @ 26 NONAME ; void GlxZoomWidget::animateZoomOut(class QPointF) + ?timerEvent@GlxZoomWidget@@MAEXPAVQTimerEvent@@@Z @ 27 NONAME ; void GlxZoomWidget::timerEvent(class QTimerEvent *) + ?adjustGestureCenter@GlxZoomWidget@@AAEXAAVQPointF@@AAM@Z @ 28 NONAME ; void GlxZoomWidget::adjustGestureCenter(class QPointF &, float &) + ?metaObject@GlxZoomWidget@@UBEPBUQMetaObject@@XZ @ 29 NONAME ; struct QMetaObject const * GlxZoomWidget::metaObject(void) const + ?decodedImageAvailable@GlxZoomWidget@@QAEXXZ @ 30 NONAME ; void GlxZoomWidget::decodedImageAvailable(void) + ??_EGlxZoomWidget@@UAE@I@Z @ 31 NONAME ; GlxZoomWidget::~GlxZoomWidget(unsigned int) + ??1GlxZoomWidget@@UAE@XZ @ 32 NONAME ; GlxZoomWidget::~GlxZoomWidget(void) + ?sceneEventFilter@GlxZoomWidget@@MAE_NPAVQGraphicsItem@@PAVQEvent@@@Z @ 33 NONAME ; bool GlxZoomWidget::sceneEventFilter(class QGraphicsItem *, class QEvent *) + ?pinchGestureReceived@GlxZoomWidget@@IAEXH@Z @ 34 NONAME ; void GlxZoomWidget::pinchGestureReceived(int) + ?setWindowSize@GlxZoomWidget@@QAEXVQSize@@@Z @ 35 NONAME ; void GlxZoomWidget::setWindowSize(class QSize) + ?retreiveFocusedImage@GlxZoomWidget@@AAEXXZ @ 36 NONAME ; void GlxZoomWidget::retreiveFocusedImage(void) + ?animationFrameChanged@GlxZoomWidget@@QAEXH@Z @ 37 NONAME ; void GlxZoomWidget::animationFrameChanged(int) + ?tr@GlxZoomWidget@@SA?AVQString@@PBD0@Z @ 38 NONAME ; class QString GlxZoomWidget::tr(char const *, char const *) + ?trUtf8@GlxZoomWidget@@SA?AVQString@@PBD0H@Z @ 39 NONAME ; class QString GlxZoomWidget::trUtf8(char const *, char const *, int) + ?modelDestroyed@GlxZoomWidget@@IAEXXZ @ 40 NONAME ; void GlxZoomWidget::modelDestroyed(void) + diff -r c9962d0368d9 -r 525c140ec8db ui/widgets/eabi/glxzoomwidgetu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/widgets/eabi/glxzoomwidgetu.def Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,48 @@ +EXPORTS + _ZN13GlxZoomWidget10sceneEventEP6QEvent @ 1 NONAME + _ZN13GlxZoomWidget10timerEventEP11QTimerEvent @ 2 NONAME + _ZN13GlxZoomWidget11dataChangedE11QModelIndexS0_ @ 3 NONAME + _ZN13GlxZoomWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 4 NONAME + _ZN13GlxZoomWidget11qt_metacastEPKc @ 5 NONAME + _ZN13GlxZoomWidget12indexChangedEi @ 6 NONAME + _ZN13GlxZoomWidget12indexChangedEv @ 7 NONAME + _ZN13GlxZoomWidget13animateZoomInE7QPointF @ 8 NONAME + _ZN13GlxZoomWidget13setWindowSizeE5QSize @ 9 NONAME + _ZN13GlxZoomWidget14animateZoomOutE7QPointF @ 10 NONAME + _ZN13GlxZoomWidget15getFocusedImageEv @ 11 NONAME + _ZN13GlxZoomWidget15setMinMaxZValueEii @ 12 NONAME + _ZN13GlxZoomWidget16sceneEventFilterEP13QGraphicsItemP6QEvent @ 13 NONAME + _ZN13GlxZoomWidget16staticMetaObjectE @ 14 NONAME DATA 16 + _ZN13GlxZoomWidget17limitRequiredSizeER6QSizeF @ 15 NONAME + _ZN13GlxZoomWidget17sendDecodeRequestEi @ 16 NONAME + _ZN13GlxZoomWidget19adjustGestureCenterER7QPointFRf @ 17 NONAME + _ZN13GlxZoomWidget19executeGestureEventEP13QGraphicsItemP13QGestureEvent @ 18 NONAME + _ZN13GlxZoomWidget19getStaticMetaObjectEv @ 19 NONAME + _ZN13GlxZoomWidget20pinchGestureReceivedEi @ 20 NONAME + _ZN13GlxZoomWidget20retreiveFocusedImageEv @ 21 NONAME + _ZN13GlxZoomWidget21animationFrameChangedEi @ 22 NONAME + _ZN13GlxZoomWidget21decodedImageAvailableEv @ 23 NONAME + _ZN13GlxZoomWidget23finalizeWidgetTransformEv @ 24 NONAME + _ZN13GlxZoomWidget25animationTimeLineFinishedEv @ 25 NONAME + _ZN13GlxZoomWidget25zoomWidgetMovedBackgroundEi @ 26 NONAME + _ZN13GlxZoomWidget32connectDecodeRequestToPinchEventEv @ 27 NONAME + _ZN13GlxZoomWidget7cleanUpEv @ 28 NONAME + _ZN13GlxZoomWidget8activateEv @ 29 NONAME + _ZN13GlxZoomWidget8setModelEP18QAbstractItemModel @ 30 NONAME + _ZN13GlxZoomWidget9zoomImageEf7QPointF @ 31 NONAME + _ZN13GlxZoomWidgetC1EP13QGraphicsItem @ 32 NONAME + _ZN13GlxZoomWidgetC2EP13QGraphicsItem @ 33 NONAME + _ZN13GlxZoomWidgetD0Ev @ 34 NONAME + _ZN13GlxZoomWidgetD1Ev @ 35 NONAME + _ZN13GlxZoomWidgetD2Ev @ 36 NONAME + _ZNK13GlxZoomWidget10metaObjectEv @ 37 NONAME + _ZTI13GlxZoomWidget @ 38 NONAME + _ZTV13GlxZoomWidget @ 39 NONAME + _ZThn16_N13GlxZoomWidgetD0Ev @ 40 NONAME + _ZThn16_N13GlxZoomWidgetD1Ev @ 41 NONAME + _ZThn8_N13GlxZoomWidget10sceneEventEP6QEvent @ 42 NONAME + _ZThn8_N13GlxZoomWidget16sceneEventFilterEP13QGraphicsItemP6QEvent @ 43 NONAME + _ZThn8_N13GlxZoomWidgetD0Ev @ 44 NONAME + _ZThn8_N13GlxZoomWidgetD1Ev @ 45 NONAME + _ZN13GlxZoomWidget14modelDestroyedEv @ 46 NONAME + diff -r c9962d0368d9 -r 525c140ec8db ui/widgets/glxzoomwidget/glxzoomwidget.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/widgets/glxzoomwidget/glxzoomwidget.pro Thu Jul 22 16:33:32 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: +#* +#*/ + + +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 +MMP_RULES += SMPSAFE +} + +exportfile = "inc/glxzoomwidget.h APP_LAYER_PLATFORM_EXPORT_PATH(glxzoomwidget.h)" +exportfile += "inc/glxzoomwidget_global.h APP_LAYER_PLATFORM_EXPORT_PATH(glxzoomwidget_global.h)" +BLD_INF_RULES.prj_exports += exportfile + +# Input +HEADERS += inc/glxzoomwidget.h inc/glxzoomwidget_global.h +SOURCES += src/glxzoomwidget.cpp + +defBlock = \ +"$${LITERAL_HASH}if defined(EABI)" \ +"DEFFILE ../eabi/glxzoomwidget.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../bwins/glxzoomwidget.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock diff -r c9962d0368d9 -r 525c140ec8db ui/widgets/glxzoomwidget/inc/glxzoomwidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/widgets/glxzoomwidget/inc/glxzoomwidget.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,142 @@ +/* +* 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 +#include +#include +#include + +#include + +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(); + + /* + * This is an overloaded function when an index is changes due to deletion + */ + void indexChanged(); + + 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); + void timerEvent(QTimerEvent *event); + protected slots: + void dataChanged(QModelIndex startIndex, QModelIndex endIndex); + void modelDestroyed(); + + 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; + int mTimerId; + +}; +#endif //GLXZOOMWIDGET_H diff -r c9962d0368d9 -r 525c140ec8db ui/widgets/glxzoomwidget/inc/glxzoomwidget_global.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/widgets/glxzoomwidget/inc/glxzoomwidget_global.h Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,12 @@ +#ifndef GLXZOOMWIDGET_GLOBAL_H +#define GLXZOOMWIDGET_GLOBAL_H + +#include + +#if defined(GLXZOOMWIDGET_LIBRARY) +# define GLXZOOMWIDGETSHARED_EXPORT Q_DECL_EXPORT +#else +# define GLXZOOMWIDGETSHARED_EXPORT Q_DECL_IMPORT +#endif + +#endif // GLXZOOMWIDGET_GLOBAL_H diff -r c9962d0368d9 -r 525c140ec8db ui/widgets/glxzoomwidget/src/glxzoomwidget.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/widgets/glxzoomwidget/src/glxzoomwidget.cpp Thu Jul 22 16:33:32 2010 +0100 @@ -0,0 +1,526 @@ + /* +* 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 +#include +#include +#include +#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), mTimerId(0) +{ + grabGesture(Qt::PinchGesture); + grabGesture(Qt::TapGesture); + 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(500, 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) ) ); + connect( mModel, SIGNAL( destroyed() ), this, SLOT( modelDestroyed() ) ); + } +} + +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() +{ + if(mModel) { + disconnect( mModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), this, SLOT( dataChanged(QModelIndex,QModelIndex) ) ); + disconnect( mModel, SIGNAL( destroyed() ), this, SLOT( modelDestroyed() ) ); + mModel = NULL; + } + 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(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(event)); + } + + if(!consume) { + consume = HbScrollArea::sceneEventFilter(watched,event); + } + return consume; + +} + +bool GlxZoomWidget::executeGestureEvent(QGraphicsItem *source,QGestureEvent *event) +{ + if(QTapGesture *gesture = static_cast(event->gesture(Qt::TapGesture))) { + if (gesture->state() == Qt::GestureFinished) { + if(!mTimerId) { + mTimerId = startTimer(500); + } + else { + killTimer(mTimerId); + mTimerId = 0; + animateZoomOut(gesture->position()); + } + } + event->accept(gesture); + return true; + } + if (QGesture *pinch = event->gesture(Qt::PinchGesture)) { + QPinchGesture* pinchG = static_cast(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()); + 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; + mZoomItem->setPixmap(targetPixmap); + finalizeWidgetTransform(); + } + } +} + +void GlxZoomWidget::modelDestroyed() +{ + mModel = NULL ; +} + +void GlxZoomWidget::indexChanged() + { + retreiveFocusedImage(); + } + +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(); + 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(); + 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 () ) { + QIcon itemIcon = iconVariant.value().qicon(); + QSize itemSize = itemIcon.actualSize(mWindowSize); + QSize scaleSize; + if(sizeVariant.isValid() && sizeVariant.canConvert ()) { + 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()/mMinDecScaleSize.width(); + m_AnimTimeLine->setDirection(QTimeLine::Forward); + m_AnimTimeLine->start(); + // zoomImage(5, m_AnimRefPoint); + +} +void GlxZoomWidget::animateZoomOut(QPointF animRefPoint) +{ + m_AnimRefPoint = animRefPoint; + m_FinalAnimatedScaleFactor = mMinDecScaleSize.width()/mCurrentSize.width(); + //m_AnimTimeLine->setDirection(QTimeLine::Backward); + m_AnimTimeLine->start(); +} +void GlxZoomWidget::animationFrameChanged(int frameNumber) +{ +qreal scaleFactor = 1; + if(m_FinalAnimatedScaleFactor > 1) { + scaleFactor = (1.0 + (((m_FinalAnimatedScaleFactor - 1)/100)*frameNumber))/(mCurrentSize.width()/mMinDecScaleSize.width()); + } + if(m_FinalAnimatedScaleFactor < 1) { + scaleFactor = (m_FinalAnimatedScaleFactor+ (((1 - m_FinalAnimatedScaleFactor)/100)*frameNumber))/(mCurrentSize.width()/mMinDecScaleSize.width()); + } + + 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 + } +} + + +void GlxZoomWidget::timerEvent(QTimerEvent *event) +{ + if(mTimerId == event->timerId()) + { + killTimer(mTimerId); + mTimerId = 0; + } +} diff -r c9962d0368d9 -r 525c140ec8db ui/widgets/widgets.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/widgets/widgets.pro Thu Jul 22 16:33:32 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