# HG changeset patch # User hgs # Date 1278703779 -19800 # Node ID a0f57508af73693881d696c33d5bc16f5b83480b # Parent 863223ea69617ec23b12bef81ec479edff78eb11 201027 diff -r 863223ea6961 -r a0f57508af73 commonutilities/imagedecoderwrapper/imagedecoderwrapper.pro --- a/commonutilities/imagedecoderwrapper/imagedecoderwrapper.pro Fri Jun 25 15:41:33 2010 +0530 +++ b/commonutilities/imagedecoderwrapper/imagedecoderwrapper.pro Sat Jul 10 00:59:39 2010 +0530 @@ -26,7 +26,9 @@ -lbitmaptransforms.dll \ -liclextjpegapi.dll \ -lfbscli.dll \ - -lefsrv.dll + -lefsrv.dll \ + -lapmime.dll \ + -lapgrfx.dll DEFINES += BUILD_IMAGEWRAPPER symbian: { diff -r 863223ea6961 -r a0f57508af73 commonutilities/imagedecoderwrapper/inc/glximagedecoder.h --- a/commonutilities/imagedecoderwrapper/inc/glximagedecoder.h Fri Jun 25 15:41:33 2010 +0530 +++ b/commonutilities/imagedecoderwrapper/inc/glximagedecoder.h Sat Jul 10 00:59:39 2010 +0530 @@ -26,6 +26,9 @@ class CImageDecoder; class CFbsBitmap; const TReal KTargetSize = 1000000; +//if any image is converted to Pixmap with an dimension > 2048 +//the conversion will fail +const TInt KMaxDimensionLimit = 2000; class CGlxImageDecoder : public CActive { public: @@ -50,6 +53,19 @@ * */ void ConstructL(GlxImageDecoderWrapper* decoderWrapper); + /* + * Checks if the mimetype needs recalculations + * @returnType false if jpeg + * true otheriwise + */ + TBool DoesMimeTypeNeedsRecalculateL(QString aSourceFileName); + + /* + * Does the recalculation and returns back the correct size + * @returntype Size of the decoded bitmap + */ + TSize ReCalculateSizeL(QString aSourceFileName, TSize aDestSize); + private: GlxImageDecoderWrapper* iDecoderWrapper; /*Specifies the Decoder */ diff -r 863223ea6961 -r a0f57508af73 commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp --- a/commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/commonutilities/imagedecoderwrapper/src/glximagedecoder.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -22,7 +22,10 @@ #include #include // For CExtJpegDecoder #include +#include +_LIT(KMimeJpeg,"image/jpeg"); +_LIT(KMimeJpg,"image/jpg"); // --------------------------------------------------------------------------- // Two-phased constructor. @@ -90,15 +93,15 @@ iImageDecoder = NULL; } TRAPD( err, iImageDecoder = CExtJpegDecoder::FileNewL( - CExtJpegDecoder::EHwImplementation, iFs, sourceFileName, CImageDecoder::EOptionAutoRotate ) ); + CExtJpegDecoder::EHwImplementation, iFs, sourceFileName, CImageDecoder::EOptionAlwaysThread ) ); if ( KErrNone != err ) { TRAP(err,iImageDecoder = CExtJpegDecoder::FileNewL( - CExtJpegDecoder::ESwImplementation, iFs, sourceFileName, CImageDecoder::EOptionAutoRotate ) ); + CExtJpegDecoder::ESwImplementation, iFs, sourceFileName, CImageDecoder::EOptionAlwaysThread ) ); if ( KErrNone != err ) { // Not a JPEG - use standard decoder - iImageDecoder = CImageDecoder::FileNewL( iFs, sourceFileName, CImageDecoder::EOptionAutoRotate ); + iImageDecoder = CImageDecoder::FileNewL( iFs, sourceFileName, CImageDecoder::EOptionAlwaysThread ); } } TSize imageSize = iImageDecoder->FrameInfo().iOverallSizeInPixels; @@ -116,6 +119,15 @@ decodeSize = TSize(imageSize.iWidth * compressionFactor, imageSize.iHeight * compressionFactor); } + //if an image is converted to Pixmap with any of its dimension > 2048 + //the conversion will fail so limiting dimensions to 2000 + //on 2048 there is a buffer corruption so display image is distorted + if(decodeSize.iWidth > KMaxDimensionLimit ||decodeSize.iHeight > KMaxDimensionLimit) + { + QSize finalSize(decodeSize.iWidth, decodeSize.iHeight); + finalSize.scale(KMaxDimensionLimit, KMaxDimensionLimit, Qt::KeepAspectRatio); + decodeSize = TSize(finalSize.width(), finalSize.height()); + } //clear the existing Bitmap if(iBitmap) { @@ -126,12 +138,56 @@ if(!iBitmap) { iBitmap = new (ELeave) CFbsBitmap(); - iBitmap->Create( decodeSize,EColor64K); + decodeSize = ReCalculateSizeL(aSourceFileName, decodeSize); + iBitmap->Create( decodeSize,EColor16MU); iImageDecoder->Convert( &iStatus, *iBitmap ); SetActive(); } return QSizeF(decodeSize.iWidth,decodeSize.iHeight) ; } + +// ----------------------------------------------------------------------------- +// DoesMimeTypeNeedsRecalculateL() +// ----------------------------------------------------------------------------- +// +TBool CGlxImageDecoder::DoesMimeTypeNeedsRecalculateL(QString aSourceFileName){ + RApaLsSession session; + TDataType mimeType; + TUid uid; + + User::LeaveIfError( session.Connect() ); + CleanupClosePushL( session ); + TPtrC16 sourceFileName(reinterpret_cast(aSourceFileName.utf16())); + User::LeaveIfError( session.AppForDocument( sourceFileName, uid, mimeType ) ); + CleanupStack::PopAndDestroy(&session); + + if (mimeType.Des().Compare(KMimeJpeg)==0 || + mimeType.Des().Compare(KMimeJpg)==0){ + return EFalse; + } + else{ + return ETrue; + } + } + +// ----------------------------------------------------------------------------- +// ReCalculateSize +// ----------------------------------------------------------------------------- +TSize CGlxImageDecoder::ReCalculateSizeL(QString aSourceFileName, TSize aDestSize){ + if(DoesMimeTypeNeedsRecalculateL(aSourceFileName)){ + TSize fullFrameSize = iImageDecoder->FrameInfo().iOverallSizeInPixels; + // calculate the reduction factor on what size we need + TInt reductionFactor = iImageDecoder->ReductionFactor(fullFrameSize, aDestSize); + // get the reduced size onto destination size + TSize destSize; + User::LeaveIfError(iImageDecoder->ReducedSize(fullFrameSize, reductionFactor, destSize)); + return destSize; + } + else{ + return aDestSize; + } + } + // --------------------------------------------------------------------------- // RunL // --------------------------------------------------------------------------- @@ -176,49 +232,7 @@ { if(iBitmap) { - //convert the bitmap to pixmap - iBitmap->LockHeap(); - TUint32 *tempData = iBitmap->DataAddress(); - uchar *data = (uchar *)(tempData); - int bytesPerLine = iBitmap->ScanLineLength(iBitmap->SizeInPixels().iWidth , iBitmap->DisplayMode()); - QImage::Format format; - switch(iBitmap->DisplayMode()) { - case EGray2: - format = QImage::Format_MonoLSB; - break; - case EColor256: - case EGray256: - format = QImage::Format_Indexed8; - break; - case EColor4K: - format = QImage::Format_RGB444; - break; - case EColor64K: - format = QImage::Format_RGB16; - break; - case EColor16M: - format = QImage::Format_RGB666; - break; - case EColor16MU: - format = QImage::Format_RGB32; - break; - case EColor16MA: - format = QImage::Format_ARGB32; - break; -#if !defined(__SERIES60_31__) && !defined(__S60_32__) - case EColor16MAP: - format = QImage::Format_ARGB32_Premultiplied; - break; -#endif - default: - format = QImage::Format_Invalid; - break; - } - //QImage share the memory occupied by data - QImage image(data, iBitmap->SizeInPixels().iWidth, iBitmap->SizeInPixels().iHeight, bytesPerLine, format); - iDecodedPixmap = QPixmap::fromImage(image); - iBitmap->UnlockHeap(); - //clean the bitmap as it is not required anymore + iDecodedPixmap = QPixmap::fromSymbianCFbsBitmap(iBitmap); delete iBitmap; iBitmap = NULL; } diff -r 863223ea6961 -r a0f57508af73 data/Image1.jpg Binary file data/Image1.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image10.jpg Binary file data/Image10.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image2.jpg Binary file data/Image2.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image3.jpg Binary file data/Image3.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image4.jpg Binary file data/Image4.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image5.jpg Binary file data/Image5.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image6.jpg Binary file data/Image6.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image7.jpg Binary file data/Image7.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image8.jpg Binary file data/Image8.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Image9.jpg Binary file data/Image9.jpg has changed diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_01.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_01.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_02.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_02.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_03.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_03.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_04.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_04.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_05.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_05.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_06.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_06.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_07.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_07.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_08.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_08.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_09.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_09.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/Wait/qgn_graf_ring_wait_10.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/Wait/qgn_graf_ring_wait_10.svg Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 863223ea6961 -r a0f57508af73 data/photos.css --- a/data/photos.css Fri Jun 25 15:41:33 2010 +0530 +++ b/data/photos.css Sat Jul 10 00:59:39 2010 +0530 @@ -50,16 +50,8 @@ } HbListViewItem::selection-icon{ - fixed-height: var(hb-param-graphic-size-primary-medium); - fixed-width: var(hb-param-graphic-size-primary-medium); -} - -HbListViewItem::multiselection-toucharea{ + fixed-height: 0.0un; fixed-width: 0.0un; } -HbListViewItem::icon-1{ - fixed-height: var(hb-param-graphic-size-function); - fixed-width: var(hb-param-margin-view-bottom); -} diff -r 863223ea6961 -r a0f57508af73 inc/glxlocalisationstrings.h --- a/inc/glxlocalisationstrings.h Fri Jun 25 15:41:33 2010 +0530 +++ b/inc/glxlocalisationstrings.h Sat Jul 10 00:59:39 2010 +0530 @@ -92,6 +92,7 @@ #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") +#define GLX_ALBUM_SELECTION_TITLE QString("Select Album") //VIEW RELATED STRINGS AND COMMON DIALOGS //comments lable for photos flip view @@ -111,6 +112,8 @@ #define GLX_BUTTON_HIDE hbTrId("txt_common_button_hide") +#define GLX_BUTTON_NEW QString("New") + #define GLX_LABEL_TRANSITION_EFFECT hbTrId("txt_photos_setlabel_transistion_effect") #define GLX_VAL_SMOOTH_FADE hbTrId("txt_photos_setlabel_transistion_effect_val_smooth") @@ -118,5 +121,15 @@ #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") +#define GLX_NOIMAGE_PLAY_SLIDESHOW hbTrId( "txt_photos_info_no_images_to_play_slideshow" ) +#define GLX_REFRESHING QString("Refreshing") + +//Full Screen Menu +#define GLX_MENU_USE_IMAGE QString("Use Image") +#define GLX_MENU_SET_WALLPAPER QString("Wallpaper") +#define GLX_MENU_ROTATE QString("Rotate") +#define GLX_MENU_90_CW QString("90 CW") +#define GLX_MENU_90_CCW QString("90 CCW") +#define GLX_MENU_CROP QString("Crop") #endif /* GLXLOCALISATIONSTRINGS_H_ */ diff -r 863223ea6961 -r a0f57508af73 main/glxaiwservicehandler.cpp --- a/main/glxaiwservicehandler.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/main/glxaiwservicehandler.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -238,6 +238,7 @@ mFSView = GlxViewsFactory::createView(GLX_FULLSCREENVIEW_ID, this); //ownership transfered to view mFSView->setToolBar(toolBar); + mView->deActivate(); mFSView->activate(); mFSView->setModel(mModel); addView(mFSView); diff -r 863223ea6961 -r a0f57508af73 photos.qrc --- a/photos.qrc Fri Jun 25 15:41:33 2010 +0530 +++ b/photos.qrc Sat Jul 10 00:59:39 2010 +0530 @@ -27,16 +27,16 @@ 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 + data/detailsview.docml + data/Wait/qgn_graf_ring_wait_01.svg + data/Wait/qgn_graf_ring_wait_02.svg + data/Wait/qgn_graf_ring_wait_03.svg + data/Wait/qgn_graf_ring_wait_04.svg + data/Wait/qgn_graf_ring_wait_05.svg + data/Wait/qgn_graf_ring_wait_06.svg + data/Wait/qgn_graf_ring_wait_07.svg + data/Wait/qgn_graf_ring_wait_08.svg + data/Wait/qgn_graf_ring_wait_09.svg + data/Wait/qgn_graf_ring_wait_10.svg diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/bwins/glxcommoncommandhandlersu.def --- a/ui/commandhandlers/bwins/glxcommoncommandhandlersu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/bwins/glxcommoncommandhandlersu.def Sat Jul 10 00:59:39 2010 +0530 @@ -1,81 +1,76 @@ EXPORTS - ?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) + ??_EGlxCommandHandlerRemoveFrom@@UAE@I@Z @ 1 NONAME ; GlxCommandHandlerRemoveFrom::~GlxCommandHandlerRemoveFrom(unsigned int) + ?RotateImageL@GlxCommandHandlerRotate@@AAEXV?$TBuf@$0BAA@@@@Z @ 2 NONAME ; void GlxCommandHandlerRotate::RotateImageL(class TBuf<256>) + ?qt_metacall@GlxCommandHandlerNewMedia@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 3 NONAME ; int GlxCommandHandlerNewMedia::qt_metacall(enum QMetaObject::Call, int, void * *) + ?ProgressTextL@GlxCommandHandlerRemoveFrom@@EBE?AVQString@@XZ @ 4 NONAME ; class QString GlxCommandHandlerRemoveFrom::ProgressTextL(void) const + ??0GlxCommandHandlerRename@@QAE@XZ @ 5 NONAME ; GlxCommandHandlerRename::GlxCommandHandlerRename(void) + ??1GlxCommandHandlerAddToContainer@@UAE@XZ @ 6 NONAME ; GlxCommandHandlerAddToContainer::~GlxCommandHandlerAddToContainer(void) + ?getStaticMetaObject@GlxCommandHandlerNewMedia@@SAABUQMetaObject@@XZ @ 7 NONAME ; struct QMetaObject const & GlxCommandHandlerNewMedia::getStaticMetaObject(void) + ?SetImageOrientationL@GlxCommandHandlerRotate@@AAEXG@Z @ 8 NONAME ; void GlxCommandHandlerRotate::SetImageOrientationL(unsigned short) + ?ConfirmationTextL@GlxCommandHandlerDelete@@EBE?AVQString@@_N@Z @ 9 NONAME ; class QString GlxCommandHandlerDelete::ConfirmationTextL(bool) const + ??_EGlxCommandHandlerSend@@UAE@I@Z @ 10 NONAME ; GlxCommandHandlerSend::~GlxCommandHandlerSend(unsigned int) + ?trUtf8@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0@Z @ 11 NONAME ; class QString GlxCommandHandlerNewMedia::trUtf8(char const *, char const *) + ?HandleErrorL@GlxCommandHandlerNewMedia@@MAEXH@Z @ 12 NONAME ; void GlxCommandHandlerNewMedia::HandleErrorL(int) + ?GetName@GlxCommandHandlerRename@@ABE?AVQString@@AAVMGlxMediaList@@@Z @ 13 NONAME ; class QString GlxCommandHandlerRename::GetName(class MGlxMediaList &) const + ?tr@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0H@Z @ 14 NONAME ; class QString GlxCommandHandlerNewMedia::tr(char const *, char const *, int) + ?DoExecuteCommandL@GlxCommandHandlerRotate@@UAEXHAAVMGlxMediaList@@AAH@Z @ 15 NONAME ; void GlxCommandHandlerRotate::DoExecuteCommandL(int, class MGlxMediaList &, int &) + ?CompletionTextL@GlxCommandHandlerComment@@EBE?AVQString@@XZ @ 16 NONAME ; class QString GlxCommandHandlerComment::CompletionTextL(void) const + ?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 *) + ??0GlxCommandHandlerComment@@QAE@XZ @ 22 NONAME ; GlxCommandHandlerComment::GlxCommandHandlerComment(void) + ?GenerateNewMediaItemTitleL@GlxCommandHandlerNewMedia@@ABE?AVQString@@V2@AAVMGlxMediaList@@@Z @ 23 NONAME ; class QString GlxCommandHandlerNewMedia::GenerateNewMediaItemTitleL(class QString, class MGlxMediaList &) const + ??1GlxCommandHandlerRemoveFrom@@UAE@XZ @ 24 NONAME ; GlxCommandHandlerRemoveFrom::~GlxCommandHandlerRemoveFrom(void) + ??_EGlxCommandHandlerEditImage@@UAE@I@Z @ 25 NONAME ; GlxCommandHandlerEditImage::~GlxCommandHandlerEditImage(unsigned int) + ?qt_metacast@GlxCommandHandlerNewMedia@@UAEPAXPBD@Z @ 26 NONAME ; void * GlxCommandHandlerNewMedia::qt_metacast(char const *) + ??0GlxCommandHandlerRemoveFrom@@QAE@XZ @ 27 NONAME ; GlxCommandHandlerRemoveFrom::GlxCommandHandlerRemoveFrom(void) + ?HandleItemAddedL@GlxCommandHandlerNewMedia@@MAEXHHPAVMGlxMediaList@@@Z @ 28 NONAME ; void GlxCommandHandlerNewMedia::HandleItemAddedL(int, int, class MGlxMediaList *) + ?tr@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0@Z @ 29 NONAME ; class QString GlxCommandHandlerNewMedia::tr(char const *, char const *) + ?createNewMedia@GlxCommandHandlerAddToContainer@@ABEXXZ @ 30 NONAME ; void GlxCommandHandlerAddToContainer::createNewMedia(void) const + ?ReadImageOrientationL@GlxCommandHandlerRotate@@AAEGXZ @ 31 NONAME ; unsigned short GlxCommandHandlerRotate::ReadImageOrientationL(void) + ??_EGlxCommandHandlerComment@@UAE@I@Z @ 32 NONAME ; GlxCommandHandlerComment::~GlxCommandHandlerComment(unsigned int) + ??1GlxCommandHandlerRotate@@UAE@XZ @ 33 NONAME ; GlxCommandHandlerRotate::~GlxCommandHandlerRotate(void) + ?CreateCommandL@GlxCommandHandlerRename@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 34 NONAME ; class CMPXMedia * GlxCommandHandlerRename::CreateCommandL(int, class MGlxMediaList &, int &) const + ??1GlxCommandHandlerNewMedia@@UAE@XZ @ 35 NONAME ; GlxCommandHandlerNewMedia::~GlxCommandHandlerNewMedia(void) + ??_EGlxCommandHandlerNewMedia@@UAE@I@Z @ 36 NONAME ; GlxCommandHandlerNewMedia::~GlxCommandHandlerNewMedia(unsigned int) + ?CompletionTextL@GlxCommandHandlerRemoveFrom@@EBE?AVQString@@XZ @ 37 NONAME ; class QString GlxCommandHandlerRemoveFrom::CompletionTextL(void) const + ??_EGlxCommandHandlerDelete@@UAE@I@Z @ 38 NONAME ; GlxCommandHandlerDelete::~GlxCommandHandlerDelete(unsigned int) + ?ProgressTextL@GlxCommandHandlerDelete@@EBE?AVQString@@XZ @ 39 NONAME ; class QString GlxCommandHandlerDelete::ProgressTextL(void) const + ?CompletionTextL@GlxCommandHandlerRename@@EBE?AVQString@@XZ @ 40 NONAME ; class QString GlxCommandHandlerRename::CompletionTextL(void) const + ?staticMetaObject@GlxCommandHandlerNewMedia@@2UQMetaObject@@B @ 41 NONAME ; struct QMetaObject const GlxCommandHandlerNewMedia::staticMetaObject + ?DestroyExifWriter@GlxCommandHandlerRotate@@AAEXXZ @ 42 NONAME ; void GlxCommandHandlerRotate::DestroyExifWriter(void) + ??0GlxCommandHandlerDelete@@QAE@XZ @ 43 NONAME ; GlxCommandHandlerDelete::GlxCommandHandlerDelete(void) + ??1GlxCommandHandlerRename@@UAE@XZ @ 44 NONAME ; GlxCommandHandlerRename::~GlxCommandHandlerRename(void) + ??0GlxCommandHandlerSend@@QAE@XZ @ 45 NONAME ; GlxCommandHandlerSend::GlxCommandHandlerSend(void) + ?HandleError@GlxCommandHandlerNewMedia@@MAEXH@Z @ 46 NONAME ; void GlxCommandHandlerNewMedia::HandleError(int) + ??0GlxCommandHandlerAddToContainer@@QAE@XZ @ 47 NONAME ; GlxCommandHandlerAddToContainer::GlxCommandHandlerAddToContainer(void) + ??_EGlxCommandHandlerRename@@UAE@I@Z @ 48 NONAME ; GlxCommandHandlerRename::~GlxCommandHandlerRename(unsigned int) + ?GetName@GlxCommandHandlerComment@@ABE?AVQString@@AAVMGlxMediaList@@@Z @ 49 NONAME ; class QString GlxCommandHandlerComment::GetName(class MGlxMediaList &) const + ?HandleErrorL@GlxCommandHandlerRename@@EAEXH@Z @ 50 NONAME ; void GlxCommandHandlerRename::HandleErrorL(int) + ?doHandleUserAction@GlxCommandHandlerEditImage@@UBEXPAVGlxMediaModel@@V?$QList@VQModelIndex@@@@@Z @ 51 NONAME ; void GlxCommandHandlerEditImage::doHandleUserAction(class GlxMediaModel *, class QList) const + ??_EGlxCommandHandlerRotate@@UAE@I@Z @ 52 NONAME ; GlxCommandHandlerRotate::~GlxCommandHandlerRotate(unsigned int) + ?ExecuteLD@GlxCommandHandlerNewMedia@@QAEHAAVTGlxMediaId@@AAVQString@@@Z @ 53 NONAME ; int GlxCommandHandlerNewMedia::ExecuteLD(class TGlxMediaId &, class QString &) + ?ProgressTextL@GlxCommandHandlerAddToContainer@@EBE?AVQString@@XZ @ 54 NONAME ; class QString GlxCommandHandlerAddToContainer::ProgressTextL(void) const + ??1GlxCommandHandlerComment@@UAE@XZ @ 55 NONAME ; GlxCommandHandlerComment::~GlxCommandHandlerComment(void) + ??0GlxCommandHandlerEditImage@@QAE@XZ @ 56 NONAME ; GlxCommandHandlerEditImage::GlxCommandHandlerEditImage(void) + ??1GlxCommandHandlerSend@@UAE@XZ @ 57 NONAME ; GlxCommandHandlerSend::~GlxCommandHandlerSend(void) + ?CompletionTextL@GlxCommandHandlerAddToContainer@@EBE?AVQString@@XZ @ 58 NONAME ; class QString GlxCommandHandlerAddToContainer::CompletionTextL(void) const + ??0GlxCommandHandlerNewMedia@@QAE@XZ @ 59 NONAME ; GlxCommandHandlerNewMedia::GlxCommandHandlerNewMedia(void) + ?executeCommand@GlxCommandHandlerEditImage@@UAEXHHV?$QList@VQModelIndex@@@@@Z @ 60 NONAME ; void GlxCommandHandlerEditImage::executeCommand(int, int, class QList) + ?trUtf8@GlxCommandHandlerNewMedia@@SA?AVQString@@PBD0H@Z @ 61 NONAME ; class QString GlxCommandHandlerNewMedia::trUtf8(char const *, char const *, int) + ?doHandleUserAction@GlxCommandHandlerSend@@UBEXPAVGlxMediaModel@@V?$QList@VQModelIndex@@@@@Z @ 62 NONAME ; void GlxCommandHandlerSend::doHandleUserAction(class GlxMediaModel *, class QList) const + ??_EGlxCommandHandlerAddToContainer@@UAE@I@Z @ 63 NONAME ; GlxCommandHandlerAddToContainer::~GlxCommandHandlerAddToContainer(unsigned int) + ?ProgressTextL@GlxCommandHandlerNewMedia@@EBE?AVQString@@XZ @ 64 NONAME ; class QString GlxCommandHandlerNewMedia::ProgressTextL(void) const + ?CreateCommandL@GlxCommandHandlerRotate@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 65 NONAME ; class CMPXMedia * GlxCommandHandlerRotate::CreateCommandL(int, class MGlxMediaList &, int &) const + ?CreateCommandL@GlxCommandHandlerComment@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 66 NONAME ; class CMPXMedia * GlxCommandHandlerComment::CreateCommandL(int, class MGlxMediaList &, int &) const + ?CompletionTextL@GlxCommandHandlerNewMedia@@EBE?AVQString@@XZ @ 67 NONAME ; class QString GlxCommandHandlerNewMedia::CompletionTextL(void) const + ?CreateCommandL@GlxCommandHandlerRemoveFrom@@UBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 68 NONAME ; class CMPXMedia * GlxCommandHandlerRemoveFrom::CreateCommandL(int, class MGlxMediaList &, int &) const + ??1GlxCommandHandlerEditImage@@UAE@XZ @ 69 NONAME ; GlxCommandHandlerEditImage::~GlxCommandHandlerEditImage(void) + ?CalculateFinalOrientationL@GlxCommandHandlerRotate@@AAEGG@Z @ 70 NONAME ; unsigned short GlxCommandHandlerRotate::CalculateFinalOrientationL(unsigned short) + ?InitializeExifWriterL@GlxCommandHandlerRotate@@AAEXV?$TBuf@$0BAA@@@@Z @ 71 NONAME ; void GlxCommandHandlerRotate::InitializeExifWriterL(class TBuf<256>) + ??1GlxCommandHandlerDelete@@UAE@XZ @ 72 NONAME ; GlxCommandHandlerDelete::~GlxCommandHandlerDelete(void) + ?CreateCommandL@GlxCommandHandlerNewMedia@@MBEPAVCMPXMedia@@HAAVMGlxMediaList@@AAH@Z @ 73 NONAME ; class CMPXMedia * GlxCommandHandlerNewMedia::CreateCommandL(int, class MGlxMediaList &, int &) const + ??0GlxCommandHandlerRotate@@QAE@XZ @ 74 NONAME ; GlxCommandHandlerRotate::GlxCommandHandlerRotate(void) diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp --- a/ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -487,7 +487,7 @@ } // (else) If error, assume confirmed anyway CleanupStack::PopAndDestroy(attributeContext); - HbMessageBox::question(qtText, this, SLOT(messageDialogClose(HbAction*))); + HbMessageBox::question(qtText, this, SLOT(messageDialogClose(HbAction*)),HbMessageBox::Ok | HbMessageBox::Cancel); } else{ executeMpxCommand(true); @@ -499,7 +499,7 @@ QString qtText = ConfirmationTextL(true); if(!qtText.isEmpty ()) { - HbMessageBox::question(qtText, this, SLOT(messageDialogClose(HbAction*))); + HbMessageBox::question(qtText, this, SLOT(messageDialogClose(HbAction*)),HbMessageBox::Ok |HbMessageBox::Cancel); } else{ executeMpxCommand(true); diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/commoncommandhandlers.pro --- a/ui/commandhandlers/commoncommandhandlers/commoncommandhandlers.pro Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/commoncommandhandlers/commoncommandhandlers.pro Sat Jul 10 00:59:39 2010 +0530 @@ -71,8 +71,8 @@ HEADERS += inc/glxcommandhandlerrename.h HEADERS += inc/glxcommondialogs.h HEADERS += inc/glxcommandhandlercomment.h -HEADERS += inc/glxcommandhandlercropimage.h -HEADERS += inc/glxcommandhandlerrotateimage.h +HEADERS += inc/glxcommandhandlereditimage.h + SOURCES += src/glxcommandhandlerdelete.cpp SOURCES += src/glxcommandhandleraddtocontainer.cpp @@ -83,8 +83,8 @@ SOURCES += src/glxcommandhandlerrename.cpp SOURCES += src/glxcommondialogs.cpp SOURCES += src/glxcommandhandlercomment.cpp -SOURCES += src/glxcommandhandlercropimage.cpp -SOURCES += src/glxcommandhandlerrotateimage.cpp +SOURCES += src/glxcommandhandlereditimage.cpp + DEFINES += QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h --- a/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h Sat Jul 10 00:59:39 2010 +0530 @@ -33,7 +33,6 @@ class QGraphicsGridLayout; class GlxAlbumModel; class QGraphicsItem; -class HbDialog; class QItemSelectionModel; class QEventLoop; @@ -51,9 +50,9 @@ void createNewMedia() const; private: - static TInt iSelectionCount; mutable bool mNewMediaAdded ; mutable CMPXCollectionPath* mTargetContainers ; + mutable QString mAlbumName; }; class GlxAlbumSelectionPopup: public QObject @@ -66,11 +65,9 @@ QModelIndexList GetSelectionList(GlxAlbumModel *model,bool *ok = 0) ; private slots: - void changeButtonText(); void dialogClosed( HbAction *action ) ; private : - HbDialog* mPopupDlg; QItemSelectionModel * mSelectionModel; //no owner ship QEventLoop *mEventLoop; bool mResult; diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlercropimage.h --- a/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlercropimage.h Fri Jun 25 15:41:33 2010 +0530 +++ /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: -* -*/ - -#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 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlereditimage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlereditimage.h Sat Jul 10 00:59:39 2010 +0530 @@ -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 GlxCommandHandlerEditImage_H_ +#define GlxCommandHandlerEditImage_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 GlxCommandHandlerEditImage : public GlxModelCommandHandler +{ + +public: + GlxCommandHandlerEditImage(); + ~GlxCommandHandlerEditImage(); + void executeCommand(int commandId,int collectionId, QList indexList = QList() ); + void doHandleUserAction(GlxMediaModel* model,QList indexList) const ; + +private: + XQAiwRequest* mReq; + XQApplicationManager mAppmgr; +}; + + +#endif /* GlxCommandHandlerEditImage_H_ */ diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlernewmedia.h --- a/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlernewmedia.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlernewmedia.h Sat Jul 10 00:59:39 2010 +0530 @@ -36,7 +36,7 @@ GlxCommandHandlerNewMedia(); ~GlxCommandHandlerNewMedia(); - TInt ExecuteLD(TGlxMediaId& aNewMediaId); + TInt ExecuteLD(TGlxMediaId& aNewMediaId,QString& aTitle); private: QString CompletionTextL() const; diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlerrotateimage.h --- a/ui/commandhandlers/commoncommandhandlers/inc/glxcommandhandlerrotateimage.h Fri Jun 25 15:41:33 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +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: -* -*/ - -#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 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -35,7 +35,8 @@ #include #include #include -#include +#include + #include #include @@ -47,14 +48,10 @@ #endif -TInt GlxCommandHandlerAddToContainer::iSelectionCount = 0; - const TInt KSelectionPopupListHierarchy = 5; -const TInt KListPrefferedHeight = 400; GlxAlbumSelectionPopup::GlxAlbumSelectionPopup() - : mPopupDlg( 0 ), - mSelectionModel( 0 ), + : mSelectionModel( 0 ), mEventLoop( 0 ), mResult( false ) { @@ -66,71 +63,44 @@ QModelIndexList GlxAlbumSelectionPopup::GetSelectionList(GlxAlbumModel *model, bool *ok) { - // Create a popup - HbDialog popup; + HbSelectionDialog *dlg = new HbSelectionDialog; + dlg->setHeadingWidget(new HbLabel(GLX_ALBUM_SELECTION_TITLE)); + dlg->setSelectionMode(HbAbstractItemView::SingleSelection); + dlg->setModel(model); + dlg->setAttribute(Qt::WA_DeleteOnClose); + dlg->clearActions(); + HbAction *action; + action= new HbAction(GLX_BUTTON_NEW); + action->setObjectName( "ch_new_album_button" ); + dlg->addAction(action); + action= new HbAction(GLX_BUTTON_CANCEL); + action->setObjectName( "ch_cancel_album_button" ); + dlg->addAction(action); + dlg->open(this, SLOT(dialogClosed(HbAction*))); + QEventLoop eventLoop; mEventLoop = &eventLoop; - - popup.setPreferredHeight( KListPrefferedHeight ); - // Set dismiss policy that determines what tap events will cause the popup - // to be dismissed - popup.setDismissPolicy(HbDialog::NoDismiss); - - // Set timeout to zero to wait user to either click Ok or Cancel - popup.setTimeout(HbDialog::NoTimeout); - popup.setHeadingWidget( new HbLabel("Select Album") ); - - mPopupDlg = &popup; - HbListView *listview = new HbListView(); - listview->setSelectionMode(HbAbstractItemView::MultiSelection); - listview->setModel(model); - mSelectionModel = listview->selectionModel() ; - 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 - listview->show(); - - popup.open( this, SLOT( dialogClosed( HbAction* ) ) ); + eventLoop.exec( ); mEventLoop = 0 ; if ( ok ) { *ok = mResult ; } - QModelIndexList selectedIndexes = mSelectionModel->selectedIndexes(); - disconnect( mSelectionModel, SIGNAL( selectionChanged( const QItemSelection &, const QItemSelection& ) ), this, SLOT( changeButtonText() ) ); - delete primary; - delete secondary; + QModelIndexList selectedIndexes = dlg->selectedModelIndexes(); return selectedIndexes; } -void GlxAlbumSelectionPopup::changeButtonText() -{ - if ( mSelectionModel->selectedIndexes().count() ) { - mPopupDlg->actions().first()->setText( GLX_BUTTON_OK ); - } - else { - mPopupDlg->actions().first()->setText("New"); - } -} - void GlxAlbumSelectionPopup::dialogClosed(HbAction *action) { - HbDialog *dlg = static_cast(sender()); - if( action == dlg->actions().first() ) { - mResult = true ; + HbSelectionDialog *dlg = (HbSelectionDialog*)(sender()); + + if( action == dlg->actions().at(1) ) { + mResult = false ; } else { - mResult = false ; + mResult = true ; } if ( mEventLoop && mEventLoop->isRunning( ) ) { mEventLoop->exit( 0 ); @@ -138,7 +108,7 @@ } GlxCommandHandlerAddToContainer::GlxCommandHandlerAddToContainer() : - mNewMediaAdded(false) + mNewMediaAdded(false),mAlbumName(QString()) { OstTraceFunctionEntry0( GLXCOMMANDHANDLERADDTOCONTAINER_GLXCOMMANDHANDLERADDTOCONTAINER_ENTRY ); mTargetContainers = NULL; @@ -156,11 +126,11 @@ MGlxMediaList& aMediaList, TBool& /*aConsume*/) const { OstTraceFunctionEntry0( GLXCOMMANDHANDLERADDTOCONTAINER_CREATECOMMANDL_ENTRY ); - iSelectionCount = 0; CMPXCommand* command = NULL; - + mAlbumName.clear(); if(aCommandId == EGlxCmdAddToFav) { + mAlbumName = GLX_SUBTITLE_MYFAV_GRIDVIEW; CMPXCollectionPath* targetCollection = CMPXCollectionPath::NewL(); CleanupStack::PushL(targetCollection); // The target collection has to be appeneded with the albums plugin id @@ -235,6 +205,10 @@ delete mTargetContainers; mTargetContainers = NULL; mTargetContainers = targetContainers; + + const TGlxMedia& item = targetMediaList->Item(targetMediaList->SelectedItemIndex(0)); + const TDesC& title = item.Title(); + mAlbumName = QString::fromUtf16(title.Ptr(),title.Length()); } command = TGlxCommandFactory::AddToContainerCommandLC(*sourceItems, @@ -262,14 +236,15 @@ GlxCommandHandlerNewMedia* commandHandlerNewMedia = new GlxCommandHandlerNewMedia(); TGlxMediaId newMediaId; - TInt error = commandHandlerNewMedia->ExecuteLD(newMediaId); + QString newTitle; + TInt error = commandHandlerNewMedia->ExecuteLD(newMediaId,newTitle); while (error == KErrAlreadyExists) { HbMessageBox::warning("Name Already Exist!!!", new HbLabel( "New Album")); error = KErrNone; - error = commandHandlerNewMedia->ExecuteLD(newMediaId); + error = commandHandlerNewMedia->ExecuteLD(newMediaId,newTitle); } if (error == KErrNone) @@ -282,6 +257,7 @@ delete mTargetContainers; mTargetContainers = NULL; mTargetContainers = path; + mAlbumName = newTitle; mNewMediaAdded = true; } OstTraceFunctionExit0( GLXCOMMANDHANDLERADDTOCONTAINER_CREATENEWMEDIA_EXIT ); @@ -289,10 +265,13 @@ QString GlxCommandHandlerAddToContainer::CompletionTextL() const { - return QString(); + if(!mAlbumName.isNull()){ + return QString("Added to %1").arg(mAlbumName); + } + return QString(); } QString GlxCommandHandlerAddToContainer::ProgressTextL() const { - return QString("Adding album..."); + return QString("Adding Images..."); } diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlercropimage.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlercropimage.cpp Fri Jun 25 15:41:33 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +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: -* -*/ - -#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 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlereditimage.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlereditimage.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -0,0 +1,99 @@ +/* +* 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: Handles command related to mediaeditors in fullscreen +* for image Rotate, Crop & Set as Wallpaper +* +*/ + + + +#include +#include +#include "glxcommandhandlereditimage.h" +#include +#include +#include +#include +#include + +GlxCommandHandlerEditImage::GlxCommandHandlerEditImage() : mReq(NULL) + { + //Nothing to do here + } + +GlxCommandHandlerEditImage::~GlxCommandHandlerEditImage() + { + delete mReq; + mReq = NULL; + } + +void GlxCommandHandlerEditImage::executeCommand(int commandId,int collectionId, QList /*indexList*/) + { + 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(EGlxCmdSetWallpaper == commandId) + { + args << EEditorHighwayWallpaperCrop; + } + else if(EGlxCmdRotateImgCrop == commandId) + { + args << EEditorHighwayFreeCrop; + } + else 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 GlxCommandHandlerEditImage::doHandleUserAction(GlxMediaModel* /*model*/,QList /*indexList*/) const + { + //Dummy, to keepup with compiler errore + } diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlernewmedia.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -95,7 +95,7 @@ } -TInt GlxCommandHandlerNewMedia::ExecuteLD(TGlxMediaId& aNewMediaId) +TInt GlxCommandHandlerNewMedia::ExecuteLD(TGlxMediaId& aNewMediaId,QString& aTitle) { OstTraceFunctionEntry0( GLXCOMMANDHANDLERNEWMEDIA_EXECUTELD_ENTRY ); GlxMpxCommandHandler::executeCommand(EGlxCmdAddMedia, KGlxCollectionPluginAlbumsImplementationUid); @@ -108,6 +108,7 @@ if (iNewMediaCreationError == KErrNone) { aNewMediaId = iNewMediaId; + aTitle = QString::fromUtf16(iNewMediaItemTitle->Des().Ptr(),iNewMediaItemTitle->Length()); } } diff -r 863223ea6961 -r a0f57508af73 ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrotateimage.cpp --- a/ui/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrotateimage.cpp Fri Jun 25 15:41:33 2010 +0530 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +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: -* -*/ - - - -#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 863223ea6961 -r a0f57508af73 ui/commandhandlers/eabi/glxcommoncommandhandlersu.def --- a/ui/commandhandlers/eabi/glxcommoncommandhandlersu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/commandhandlers/eabi/glxcommoncommandhandlersu.def Sat Jul 10 00:59:39 2010 +0530 @@ -40,80 +40,71 @@ _ZN25GlxCommandHandlerNewMedia16staticMetaObjectE @ 39 NONAME DATA 16 _ZN25GlxCommandHandlerNewMedia19getStaticMetaObjectEv @ 40 NONAME _ZN25GlxCommandHandlerNewMedia24DoHandleCommandCompleteLEPvP9CMPXMediaiP13MGlxMediaList @ 41 NONAME - _ZN25GlxCommandHandlerNewMedia9ExecuteLDER11TGlxMediaId @ 42 NONAME + _ZN25GlxCommandHandlerNewMedia9ExecuteLDER11TGlxMediaIdR7QString @ 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 + _ZN26GlxCommandHandlerEditImage14executeCommandEii5QListI11QModelIndexE @ 48 NONAME + _ZN26GlxCommandHandlerEditImageC1Ev @ 49 NONAME + _ZN26GlxCommandHandlerEditImageC2Ev @ 50 NONAME + _ZN26GlxCommandHandlerEditImageD0Ev @ 51 NONAME + _ZN26GlxCommandHandlerEditImageD1Ev @ 52 NONAME + _ZN26GlxCommandHandlerEditImageD2Ev @ 53 NONAME + _ZN27GlxCommandHandlerRemoveFromC1Ev @ 54 NONAME + _ZN27GlxCommandHandlerRemoveFromC2Ev @ 55 NONAME + _ZN27GlxCommandHandlerRemoveFromD0Ev @ 56 NONAME + _ZN27GlxCommandHandlerRemoveFromD1Ev @ 57 NONAME + _ZN27GlxCommandHandlerRemoveFromD2Ev @ 58 NONAME + _ZN31GlxCommandHandlerAddToContainerC1Ev @ 59 NONAME + _ZN31GlxCommandHandlerAddToContainerC2Ev @ 60 NONAME + _ZN31GlxCommandHandlerAddToContainerD0Ev @ 61 NONAME + _ZN31GlxCommandHandlerAddToContainerD1Ev @ 62 NONAME + _ZN31GlxCommandHandlerAddToContainerD2Ev @ 63 NONAME + _ZNK21GlxCommandHandlerSend18doHandleUserActionEP13GlxMediaModel5QListI11QModelIndexE @ 64 NONAME + _ZNK23GlxCommandHandlerDelete13ProgressTextLEv @ 65 NONAME + _ZNK23GlxCommandHandlerDelete14CreateCommandLEiR13MGlxMediaListRi @ 66 NONAME + _ZNK23GlxCommandHandlerDelete15CompletionTextLEv @ 67 NONAME + _ZNK23GlxCommandHandlerDelete17ConfirmationTextLEb @ 68 NONAME + _ZNK23GlxCommandHandlerRename14CreateCommandLEiR13MGlxMediaListRi @ 69 NONAME + _ZNK23GlxCommandHandlerRename15CompletionTextLEv @ 70 NONAME + _ZNK23GlxCommandHandlerRename7GetNameER13MGlxMediaList @ 71 NONAME + _ZNK23GlxCommandHandlerRotate14CreateCommandLEiR13MGlxMediaListRi @ 72 NONAME + _ZNK24GlxCommandHandlerComment14CreateCommandLEiR13MGlxMediaListRi @ 73 NONAME + _ZNK24GlxCommandHandlerComment15CompletionTextLEv @ 74 NONAME + _ZNK24GlxCommandHandlerComment7GetNameER13MGlxMediaList @ 75 NONAME + _ZNK25GlxCommandHandlerNewMedia10metaObjectEv @ 76 NONAME + _ZNK25GlxCommandHandlerNewMedia13ProgressTextLEv @ 77 NONAME + _ZNK25GlxCommandHandlerNewMedia14CreateCommandLEiR13MGlxMediaListRi @ 78 NONAME + _ZNK25GlxCommandHandlerNewMedia15CompletionTextLEv @ 79 NONAME + _ZNK25GlxCommandHandlerNewMedia26GenerateNewMediaItemTitleLE7QStringR13MGlxMediaList @ 80 NONAME + _ZNK26GlxCommandHandlerEditImage18doHandleUserActionEP13GlxMediaModel5QListI11QModelIndexE @ 81 NONAME + _ZNK27GlxCommandHandlerRemoveFrom13ProgressTextLEv @ 82 NONAME + _ZNK27GlxCommandHandlerRemoveFrom14CreateCommandLEiR13MGlxMediaListRi @ 83 NONAME + _ZNK27GlxCommandHandlerRemoveFrom15CompletionTextLEv @ 84 NONAME + _ZNK31GlxCommandHandlerAddToContainer13ProgressTextLEv @ 85 NONAME + _ZNK31GlxCommandHandlerAddToContainer14CreateCommandLEiR13MGlxMediaListRi @ 86 NONAME + _ZNK31GlxCommandHandlerAddToContainer14createNewMediaEv @ 87 NONAME + _ZNK31GlxCommandHandlerAddToContainer15CompletionTextLEv @ 88 NONAME + _ZTI21GlxCommandHandlerSend @ 89 NONAME + _ZTI23GlxCommandHandlerDelete @ 90 NONAME + _ZTI23GlxCommandHandlerRename @ 91 NONAME + _ZTI23GlxCommandHandlerRotate @ 92 NONAME + _ZTI24GlxCommandHandlerComment @ 93 NONAME + _ZTI25GlxCommandHandlerNewMedia @ 94 NONAME + _ZTI26GlxCommandHandlerEditImage @ 95 NONAME + _ZTI27GlxCommandHandlerRemoveFrom @ 96 NONAME + _ZTI31GlxCommandHandlerAddToContainer @ 97 NONAME + _ZTV21GlxCommandHandlerSend @ 98 NONAME + _ZTV23GlxCommandHandlerDelete @ 99 NONAME + _ZTV23GlxCommandHandlerRename @ 100 NONAME + _ZTV23GlxCommandHandlerRotate @ 101 NONAME + _ZTV24GlxCommandHandlerComment @ 102 NONAME + _ZTV25GlxCommandHandlerNewMedia @ 103 NONAME + _ZTV26GlxCommandHandlerEditImage @ 104 NONAME + _ZTV27GlxCommandHandlerRemoveFrom @ 105 NONAME + _ZTV31GlxCommandHandlerAddToContainer @ 106 NONAME + _ZThn8_N25GlxCommandHandlerNewMedia11HandleErrorEi @ 107 NONAME + _ZThn8_N25GlxCommandHandlerNewMedia16HandleItemAddedLEiiP13MGlxMediaList @ 108 NONAME diff -r 863223ea6961 -r a0f57508af73 ui/inc/glxcommandhandlers.hrh --- a/ui/inc/glxcommandhandlers.hrh Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/inc/glxcommandhandlers.hrh Sat Jul 10 00:59:39 2010 +0530 @@ -119,6 +119,9 @@ EGlxCmdRotateImgCW, EGlxCmdRotateImgCCW, EGlxCmdRotateImgCrop, + EGlxCmd3DEffectOn, + EGlxCmd3DEffectOff, + EGlxCmdSetWallpaper, EGlxCmdAiwBase = 0x6000 }; diff -r 863223ea6961 -r a0f57508af73 ui/inc/glxmodelroles.h --- a/ui/inc/glxmodelroles.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/inc/glxmodelroles.h Sat Jul 10 00:59:39 2010 +0530 @@ -45,7 +45,8 @@ 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 + GlxTempVisualWindowIndex, //to store the visual index obtained from AM temporarily + GlxImageCorruptRole //To get the corrupt image status }; diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/bwins/glxmedialistwrapperu.def --- a/ui/uiengine/bwins/glxmedialistwrapperu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/bwins/glxmedialistwrapperu.def Sat Jul 10 00:59:39 2010 +0530 @@ -57,4 +57,5 @@ ?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) + ?isCorruptedImage@GlxMLWrapper@@QAE_NH@Z @ 59 NONAME ; bool GlxMLWrapper::isCorruptedImage(int) diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/eabi/glxmedialistwrapperu.def --- a/ui/uiengine/eabi/glxmedialistwrapperu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/eabi/glxmedialistwrapperu.def Sat Jul 10 00:59:39 2010 +0530 @@ -54,4 +54,5 @@ _ZN12GlxMLWrapper10IsDrmValidEi @ 53 NONAME _ZN12GlxMLWrapper11setDrmValidEib @ 54 NONAME _ZN12GlxMLWrapper14IsDrmProtectedEi @ 55 NONAME + _ZN12GlxMLWrapper16isCorruptedImageEi @ 56 NONAME diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/medialistwrapper/inc/glxmlwrapper.h --- a/ui/uiengine/medialistwrapper/inc/glxmlwrapper.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/medialistwrapper/inc/glxmlwrapper.h Sat Jul 10 00:59:39 2010 +0530 @@ -134,6 +134,7 @@ bool isSystemItem( int aItemIndex ); void handleTitleAvailable(QString aTitle); + bool isCorruptedImage( int index ); signals: void updateItem(int index, GlxTBContextType tbContextType); void insertItems(int startIndex,int endIndex); diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h --- a/ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/medialistwrapper/inc/glxmlwrapper_p.h Sat Jul 10 00:59:39 2010 +0530 @@ -138,6 +138,7 @@ bool IsDrmProtected(int index ); bool IsDrmValid(int index); void setDrmValid(int index,bool valid); + bool IsCorruptedImage( int aItemIndex ); private: /** diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp --- a/ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -308,7 +308,7 @@ // void GlxMLWrapper::handleDetailsItemAvailable(int itemIndex) { - + Q_UNUSED( itemIndex ) emit updateDetails(); } @@ -330,3 +330,7 @@ emit updateAlbumTitle(aTitle); } +bool GlxMLWrapper::isCorruptedImage( int index ) +{ + return mMLWrapperPrivate->IsCorruptedImage( index ); +} diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp --- a/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/medialistwrapper/src/glxmlwrapper_p.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -41,6 +41,7 @@ #include "glxmlgenericobserver.h" #include "glxattributeretriever.h" #include "glxicondefs.h" //Contains the icon names/Ids +#include "glxerrors.h" //#define GLXPERFORMANCE_LOG #include @@ -94,8 +95,8 @@ iLsFsContextActivated(EFalse), iPtFsContextActivated(EFalse), iPtListContextActivated(EFalse), - iSelectionListContextActivated(EFalse), - iDetailsContextActivated(EFalse) + iDetailsContextActivated(EFalse), + iSelectionListContextActivated(EFalse) { TRACER("GlxMLWrapperPrivate::GlxMLWrapperPrivate"); iGridThumbnailContext = NULL; @@ -700,12 +701,8 @@ { GLX_LOG_INFO1("### GlxMLWrapperPrivate::HandleAttributesAvailableL GetIconInfo-Index is %d",aItemIndex); }*/ - else if( tnError == KErrCANoRights) { //handle DRM case - } - else if( tnError ) { - return (new HbIcon(GLXICON_CORRUPT)); - } + GLX_LOG_INFO1("### GlxMLWrapperPrivate::RetrieveItemIcon value-Index is %d and have returned empty icon",aItemIndex); return NULL; @@ -1187,7 +1184,7 @@ void GlxMLWrapperPrivate::CheckDetailsAttributes(TInt aItemIndex, const RArray& aAttributes) { qDebug("GlxMLWrapperPrivate::CheckDetailsAttributes"); - TBool attribPresent = EFalse; + TMPXAttribute titleAttrib(KMPXMediaGeneralComment); TIdentityRelation< TMPXAttribute > match ( &TMPXAttribute::Match ); @@ -1196,7 +1193,7 @@ if (KErrNotFound != aAttributes.Find(titleAttrib, match)) { qDebug("GlxMLWrapperPrivate::CheckDetailsAttributes TRUE"); - attribPresent = ETrue; + iMLWrapper->handleDetailsItemAvailable(aItemIndex); GLX_LOG_INFO1("### GlxMLWrapperPrivate::CheckDetailsAttributes title present %d",aItemIndex); } @@ -1480,3 +1477,19 @@ } } +bool GlxMLWrapperPrivate::IsCorruptedImage( int aItemIndex ) +{ + const TGlxMedia& item = iMediaList->Item( aItemIndex ); + qDebug("GlxMLWrapperPrivate::IsCorruptedImage item property %u ", item.Properties() ); + TInt tnError = GlxErrorManager::HasAttributeErrorL( item.Properties(), KGlxMediaIdThumbnail ); + qDebug("GlxMLWrapperPrivate::IsCorruptedImage index %d error %d ", aItemIndex, tnError); + if ( KErrNone == tnError + || KErrNotSupported == tnError + || KErrCANoRights == tnError + || KErrGlxEmptyContainer == tnError ) { + return false ; + } + else { + return true ; + } +} diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/bwins/glxlistmodelu.def --- a/ui/uiengine/model/bwins/glxlistmodelu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/bwins/glxlistmodelu.def Sat Jul 10 00:59:39 2010 +0530 @@ -29,4 +29,5 @@ ?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) + ?getCorruptDefaultIcon@GlxAlbumModel@@ABEPAVHbIcon@@ABVQModelIndex@@@Z @ 31 NONAME ; class HbIcon * GlxAlbumModel::getCorruptDefaultIcon(class QModelIndex const &) const diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/bwins/glxmediamodelu.def --- a/ui/uiengine/model/bwins/glxmediamodelu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/bwins/glxmediamodelu.def Sat Jul 10 00:59:39 2010 +0530 @@ -39,4 +39,5 @@ ?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) + ?getCorruptDefaultIcon@GlxMediaModel@@ABEPAVHbIcon@@ABVQModelIndex@@@Z @ 41 NONAME ; class HbIcon * GlxMediaModel::getCorruptDefaultIcon(class QModelIndex const &) const diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/eabi/glxlistmodelu.def --- a/ui/uiengine/model/eabi/glxlistmodelu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/eabi/glxlistmodelu.def Sat Jul 10 00:59:39 2010 +0530 @@ -29,4 +29,5 @@ _ZTV13GlxAlbumModel @ 28 NONAME _ZN13GlxAlbumModel13listPopulatedEv @ 29 NONAME _ZN13GlxAlbumModel14modelPopulatedEv @ 30 NONAME + _ZNK13GlxAlbumModel21getCorruptDefaultIconERK11QModelIndex @ 31 NONAME diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/eabi/glxmediamodelu.def --- a/ui/uiengine/model/eabi/glxmediamodelu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/eabi/glxmediamodelu.def Sat Jul 10 00:59:39 2010 +0530 @@ -39,4 +39,5 @@ _ZN13GlxMediaModel17removeContextModeE14GlxContextMode @ 38 NONAME _ZN13GlxMediaModel17updateDetailItemsEv @ 39 NONAME _ZN13GlxMediaModel17updateDetailsViewEv @ 40 NONAME + _ZNK13GlxMediaModel21getCorruptDefaultIconERK11QModelIndex @ 41 NONAME diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/listmodel/inc/glxalbummodel.h --- a/ui/uiengine/model/listmodel/inc/glxalbummodel.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/listmodel/inc/glxalbummodel.h Sat Jul 10 00:59:39 2010 +0530 @@ -64,6 +64,7 @@ void setSelectedIndex(const QModelIndex &index); QModelIndex getFocusIndex() const; HbIcon* GetPreviewIconItem(int itemIndex, GlxTBContextType tbContextType) const; + HbIcon *getCorruptDefaultIcon ( const QModelIndex &index ) const; signals : void iconAvailable(int itemIndex, HbIcon* itemIcon, GlxTBContextType tbContextType) const; @@ -83,6 +84,7 @@ HbIcon* mDefaultIcon; QCache itemIconCache; int mTempVisibleWindowIndex; + HbIcon* m_CorruptIcon; }; #endif /* GLXALBUMMODEL_H */ diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/listmodel/src/glxalbummodel.cpp --- a/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/listmodel/src/glxalbummodel.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -25,10 +25,6 @@ #include "glxicondefs.h" //Contains the icon names/Ids -const QColor KListOddRowColor(211, 211, 211, 127); -const QColor KListEvenRowColor(255, 250, 250, 127); - - GlxAlbumModel::GlxAlbumModel(GlxModelParm & modelParm):mContextMode(GlxContextInvalid) { qDebug("GlxAlbumModel::GlxAlbumModel()"); @@ -41,6 +37,7 @@ //todo get this Default icon from some generic path and not directly. mDefaultIcon = new HbIcon(GLXICON_DEFAULT); + m_CorruptIcon = new HbIcon( GLXICON_CORRUPT ); int err = connect(mMLWrapper, SIGNAL(updateItem(int, GlxTBContextType)), this, SLOT(itemUpdated1(int, GlxTBContextType))); qDebug("updateItem() connection status %d", err); @@ -61,6 +58,7 @@ qDebug("GlxAlbumModel::~GlxAlbumModel()"); delete mDefaultIcon; mDefaultIcon = NULL; + delete m_CorruptIcon; int err = disconnect(mMLWrapper, SIGNAL(updateItem(int, GlxTBContextType)), this, SLOT(itemUpdated1(int, GlxTBContextType))); err = disconnect(mMLWrapper, SIGNAL(insertItems(int, int)), this, SLOT(itemsAdded(int, int))); err = disconnect(mMLWrapper, SIGNAL(removeItems(int, int)), this, SLOT(itemsRemoved(int, int))); @@ -117,7 +115,7 @@ case Qt::DecorationRole : if(mContextMode == GlxContextSelectionList){ - return HbIcon(); + return QVariant(); } else { @@ -128,21 +126,10 @@ } else { qDebug("GlxAlbumModel::data, Item inValid"); - itemIcon = mDefaultIcon; + itemIcon = getCorruptDefaultIcon( index ) ;; return *itemIcon; } } - case Qt::BackgroundRole: - { - if (rowIndex % 2 == 0) - { - return QBrush(KListEvenRowColor); - } - else - { - return QBrush(KListOddRowColor); - } - } case GlxFocusIndexRole : idx = getFocusIndex(); @@ -160,6 +147,13 @@ return QVariant(); } } +HbIcon * GlxAlbumModel::getCorruptDefaultIcon( const QModelIndex &index ) const +{ + if ( mMLWrapper->isCorruptedImage( index.row() ) ) { + return m_CorruptIcon ; + } + return mDefaultIcon ; +} bool GlxAlbumModel::setData ( const QModelIndex & idx, const QVariant & value, int role ) { @@ -247,11 +241,18 @@ void GlxAlbumModel::modelPopulated() { if ( mTempVisibleWindowIndex!=-1) { + //Set the visible Window index only ff the index stored in the activity manager is not out of range + if(rowCount() > mTempVisibleWindowIndex && mTempVisibleWindowIndex > 0) { mMLWrapper->setVisibleWindowIndex(mTempVisibleWindowIndex); + } + else { + mMLWrapper->setVisibleWindowIndex(0); + } mTempVisibleWindowIndex = -1; + } emit listPopulated(); } -} + void GlxAlbumModel::itemUpdated1(int mlIndex,GlxTBContextType tbContextType ) { Q_UNUSED(tbContextType); diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/mediamodel/inc/glxmediamodel.h --- a/ui/uiengine/model/mediamodel/inc/glxmediamodel.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/mediamodel/inc/glxmediamodel.h Sat Jul 10 00:59:39 2010 +0530 @@ -84,7 +84,7 @@ void setFocusIndex(const QModelIndex &index); QModelIndex getFocusIndex() const; void setSelectedIndex(const QModelIndex &index); - + HbIcon *getCorruptDefaultIcon ( const QModelIndex &index ) const; signals : @@ -108,11 +108,14 @@ private slots: void updateItemIcon(int itemIndex, HbIcon* itemIcon, GlxTBContextType tbContextType); + private: GlxMLWrapper* mMLWrapper; QCache itemIconCache; QCache itemFsIconCache; HbIcon* m_DefaultIcon; + HbIcon* m_CorruptIcon; + GlxContextMode mContextMode; //for external data to be populated by model GlxExternalData* mExternalItems; diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/mediamodel/src/glxmediamodel.cpp --- a/ui/uiengine/model/mediamodel/src/glxmediamodel.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/mediamodel/src/glxmediamodel.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -62,8 +62,8 @@ itemFsIconCache.setMaxCost(5); itemExternalIconCache.setMaxCost(0); - //todo get this Default icon from some generic path and not directly. m_DefaultIcon = new HbIcon(GLXICON_DEFAULT); + m_CorruptIcon = new HbIcon( GLXICON_CORRUPT ); mExternalItems = NULL; externalDataCount = 0; mFocusIndex = -1; @@ -79,8 +79,10 @@ itemFsIconCache.clear(); delete m_DefaultIcon; m_DefaultIcon = NULL; + delete m_CorruptIcon; + m_CorruptIcon = NULL; clearExternalItems(); - int err = disconnect(mMLWrapper, SIGNAL(updateItem(int, GlxTBContextType)), this, SLOT(itemUpdated1(int, GlxTBContextType))); + 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))); @@ -177,12 +179,11 @@ //todo refactor this whole function ... too many return statements are not good -QVariant GlxMediaModel::data(const QModelIndex &index, int role) const +QVariant GlxMediaModel::data( const QModelIndex &index, int role ) const { - if (role == GlxViewTitle) - { + if (role == GlxViewTitle) { return mMLWrapper->retrieveViewTitle(); - } + } if(role == GlxPopulated) { return mMLWrapper->IsPopulated(); @@ -204,12 +205,11 @@ 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); - } + return m_DefaultIcon->pixmap().toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied); + } else { return QImage(); - } - + } } HbIcon* itemIcon = NULL; @@ -220,31 +220,18 @@ return QVariant(); } -//external data are always placed at the beginning of the Media List -//Check if the index can be mapped to the external data -//if not then map the index to Ml Index - if(itemIndex < externalDataCount) { - if(role == Qt::DecorationRole || role == GlxFsImageRole){ - return *(GetExternalIconItem(itemIndex,GlxTBContextExternal)); - } - } - else { - itemIndex -= externalDataCount; - } - -//retrieve Data from Media List - if (role == Qt::DecorationRole) { + //retrieve Data from Media List + if ( role == Qt::DecorationRole ) { itemIcon = GetGridIconItem(itemIndex,GlxTBContextGrid); - if(itemIcon == NULL || itemIcon->isNull() ){ - itemIcon = m_DefaultIcon; + if( itemIcon == NULL || itemIcon->isNull() ) { + itemIcon = getCorruptDefaultIcon( index ); } return *itemIcon; } - if (role == GlxQImageSmall) - { + if (role == GlxQImageSmall) { return mMLWrapper->retrieveItemImage(itemIndex, GlxTBContextGrid); - } + } if (role == GlxFsImageRole){ if(mContextMode == GlxContextLsFs){ @@ -254,14 +241,17 @@ itemIcon = GetFsIconItem(itemIndex,GlxTBContextPtFs); } - if ( itemIcon == NULL) { - //itemIcon = GetGridIconItem(itemIndex,GlxTBContextGrid); + if ( itemIcon == NULL ) { HbIcon* tempIcon = GetGridIconItem( itemIndex, GlxTBContextGrid ); if (tempIcon && !tempIcon->isNull()) { qDebug("GlxMediaModel::scaling thumbnail"); QPixmap tempPixmap = tempIcon->qicon().pixmap(128, 128); + QSize itemSize = mMLWrapper->retrieveItemDimension(itemIndex); QSize sz = ( mContextMode == GlxContextLsFs ) ? QSize ( 640, 360) : QSize ( 360, 640 ); - tempPixmap = tempPixmap.scaled(sz, Qt::KeepAspectRatio ); + if(!((itemSize.width() < sz.width()) && (itemSize.height() < sz.height()))); { + itemSize.scale(sz, Qt::KeepAspectRatio); + } + tempPixmap = tempPixmap.scaled(itemSize, Qt::IgnoreAspectRatio ); HbIcon tmp = HbIcon( QIcon(tempPixmap)) ; if(!tmp.isNull()){ return tmp; @@ -270,79 +260,76 @@ } if ( itemIcon == NULL || itemIcon->isNull() ) { - itemIcon = m_DefaultIcon; + itemIcon = getCorruptDefaultIcon( index ) ; } return *itemIcon; } - if (role == GlxQImageLarge) - { - if(mContextMode == GlxContextLsFs) - { + if (role == GlxQImageLarge) { + if(mContextMode == GlxContextLsFs) { itemImage = mMLWrapper->retrieveItemImage(itemIndex, GlxTBContextLsFs); - } - else - { + } + else { itemImage = mMLWrapper->retrieveItemImage(itemIndex, GlxTBContextPtFs); - } - if(!itemImage.isNull()) - { + } + if(!itemImage.isNull()) { return itemImage; - } - else - { + } + else { itemImage = mMLWrapper->retrieveItemImage(itemIndex, GlxTBContextGrid); - if (!itemImage.isNull()) - { + if (!itemImage.isNull()) { QSize sz = ( mContextMode == GlxContextLsFs ) ? QSize ( 640, 360) : QSize ( 360, 640 ); itemImage = itemImage.scaled(sz,Qt::KeepAspectRatio); - } - return itemImage; } + return itemImage; } + } - if (role == GlxVisualWindowIndex) - { + if (role == GlxVisualWindowIndex) { return mMLWrapper->getVisibleWindowIndex(); - } + } QModelIndex idx; if ( GlxFocusIndexRole == role ) { idx = getFocusIndex(); return idx.row(); } + if(role == GlxUriRole) { return (mMLWrapper->retrieveItemUri(itemIndex)); } + if(role == GlxDimensionsRole) { return (mMLWrapper->retrieveItemDimension(itemIndex)); } if(role == GlxDateRole ) { - qDebug("GlxMediaModel::data GlxDateRole "); return (mMLWrapper->retrieveItemDate(itemIndex)); } if (role == GlxFrameCount) { - qDebug("GlxMediaModel:: GlxFrameCount "); - return (mMLWrapper->retrieveItemFrameCount(itemIndex)); + return (mMLWrapper->retrieveItemFrameCount(itemIndex)); } if (role == GlxHdmiBitmap) { return mMLWrapper->RetrieveBitmap(itemIndex); } + + if ( role == GlxImageCorruptRole ) { + return mMLWrapper->isCorruptedImage( itemIndex ); + } if (role == GlxTimeRole) { return mMLWrapper->retrieveItemTime(itemIndex); } if (role == GlxSizeRole) { - return mMLWrapper->retrieveItemSize(itemIndex); - } + return mMLWrapper->retrieveItemSize(itemIndex); + } - if (role == GlxDescRole) { - return mMLWrapper->retrieveListDesc(itemIndex); - } + if (role == GlxDescRole) { + return mMLWrapper->retrieveListDesc(itemIndex); + } return QVariant(); } @@ -434,9 +421,15 @@ void GlxMediaModel::modelpopulated() { if ( mTempVisibleWindowIndex!=-1) { - mMLWrapper->setVisibleWindowIndex(mTempVisibleWindowIndex); + //Set the visible Window index only ff the index stored in the activity manager is not out of range + if( rowCount() > mTempVisibleWindowIndex && mTempVisibleWindowIndex > 0 ) { + mMLWrapper->setVisibleWindowIndex(mTempVisibleWindowIndex); + } + else { + mMLWrapper->setVisibleWindowIndex(0); + } mTempVisibleWindowIndex = -1; - } + } emit populated(); } @@ -550,6 +543,14 @@ mMLWrapper->setSelectedIndex(itemIndex); } +HbIcon * GlxMediaModel::getCorruptDefaultIcon( const QModelIndex &index ) const +{ + if ( mMLWrapper->isCorruptedImage( index.row() ) ) { + return m_CorruptIcon ; + } + return m_DefaultIcon ; +} + bool GlxMediaModel::setData ( const QModelIndex & idx, const QVariant & value, int role ) { Q_UNUSED( idx ) diff -r 863223ea6961 -r a0f57508af73 ui/uiengine/model/modelwrapper/src/glxmodelwrapper.cpp --- a/ui/uiengine/model/modelwrapper/src/glxmodelwrapper.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/uiengine/model/modelwrapper/src/glxmodelwrapper.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -173,7 +173,20 @@ void GlxModelWrapper::dataChangedinModel(QModelIndex startIndex, QModelIndex endIndex) { - emit dataChanged(index(startIndex.row(),startIndex.column()),index(endIndex.row(),endIndex.column())); + int aStartRow = startIndex.row(); + + if((aStartRow == 14) || (aStartRow+1 == rowCount())) + { + emit dataChanged(index(0,0),index(endIndex.row(),0)); + } + else if(aStartRow >= 15) + { + emit dataChanged(index(aStartRow,0),index(endIndex.row(),0)); + } + else + { + // Do Nothing + } } void GlxModelWrapper::rowsAboutToBeInserted(const QModelIndex &parent,int start,int end) diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/statehandler/inc/glxdetailstate.h --- a/ui/viewmanagement/statehandler/inc/glxdetailstate.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/statehandler/inc/glxdetailstate.h Sat Jul 10 00:59:39 2010 +0530 @@ -27,6 +27,11 @@ public : GlxDetailState(GlxState *preState = NULL); void eventHandler(qint32 &id); + int state() const { return (int) mState; } +/* + * This Function set the internal state of details state + */ + void setState(int internalState) { mState = (DetailState) internalState; } /* * This function set the transition parameter ( for animation) from full screen view to other view */ @@ -45,6 +50,7 @@ //Functions private: + DetailState mState; //Data Member }; diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/statehandler/inc/glxfullscreenstate.h --- a/ui/viewmanagement/statehandler/inc/glxfullscreenstate.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/statehandler/inc/glxfullscreenstate.h Sat Jul 10 00:59:39 2010 +0530 @@ -21,11 +21,12 @@ #define GLXFULLSCREENSTATE_H #include +class GlxStateManager; class GlxFullScreenState : public GlxState { public : - GlxFullScreenState(GlxState *preState = NULL); + GlxFullScreenState( GlxStateManager *stateManager, GlxState *preState = NULL ); int state() const { return (int) mState; } /* * This Function set the internal state of full screen state @@ -49,6 +50,7 @@ private: FullScreenState mState; + GlxStateManager *mStateManager; }; diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/statehandler/src/glxcommandhandlerfactory.cpp --- a/ui/viewmanagement/statehandler/src/glxcommandhandlerfactory.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/statehandler/src/glxcommandhandlerfactory.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -21,15 +21,13 @@ #include #include #include -#include -#include +#include #include #include #include #include #include - GlxCommandHandler* GlxCommandHandlerFactory::CreateCommandHandler(int commandId) { GlxCommandHandler* cmdHandler = NULL; @@ -60,9 +58,9 @@ break; case EGlxCmdRotateImgCW: case EGlxCmdRotateImgCCW: - cmdHandler = new GlxCommandHandlerRotateImage(); - break; - case EGlxCmdRotateImgCrop: cmdHandler = new GlxCommandHandlerCropImage(); + case EGlxCmdRotateImgCrop: + case EGlxCmdSetWallpaper: + cmdHandler = new GlxCommandHandlerEditImage(); break; default: break; diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/statehandler/src/glxdetailstate.cpp --- a/ui/viewmanagement/statehandler/src/glxdetailstate.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/statehandler/src/glxdetailstate.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -21,7 +21,7 @@ GlxDetailState::GlxDetailState(GlxState *preState) : GlxState(GLX_DETAILSVIEW_ID, preState) { - + mState = NO_DETAIL_S ; } diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/statehandler/src/glxfullscreenstate.cpp --- a/ui/viewmanagement/statehandler/src/glxfullscreenstate.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/statehandler/src/glxfullscreenstate.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -18,15 +18,31 @@ #include +#include +#include -GlxFullScreenState::GlxFullScreenState(GlxState *preState) : GlxState(GLX_FULLSCREENVIEW_ID, preState) +GlxFullScreenState::GlxFullScreenState(GlxStateManager *stateManager, GlxState *preState) : GlxState(GLX_FULLSCREENVIEW_ID, preState) { - + mStateManager = stateManager ; } void GlxFullScreenState::eventHandler(qint32 &id) { - Q_UNUSED(id); + switch ( id ){ + case EGlxCmdDetailsOpen : + if ( mState == IMAGEVIEWER_S ) { + + mStateManager->nextState( GLX_DETAILSVIEW_ID, IMAGEVIEWER_DETAIL_S ); + } + else { + + mStateManager->nextState( GLX_DETAILSVIEW_ID, NO_DETAIL_S ); + } + id = EGlxCmdHandled; + break ; + default : + break ; + } } void GlxFullScreenState::setTranstionParameter(NavigationDir dir, GlxEffect &effect, GlxViewEffect &viewEffect) diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/statehandler/src/glxstatemanager.cpp --- a/ui/viewmanagement/statehandler/src/glxstatemanager.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/statehandler/src/glxstatemanager.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -69,7 +69,6 @@ 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 ); @@ -134,7 +133,7 @@ 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); @@ -146,8 +145,7 @@ } mTNObserver->startTNObserving() ; - } - //Remove the previous activity +} HbActivityManager* activityManager = app->activityManager(); bool ok = activityManager->removeActivity("PhotosMainView"); if ( !ok ) @@ -162,30 +160,29 @@ 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"); + stream >> mSaveActivity; + qint32 stateId = mSaveActivity.value("ID"); mCurrentState = createState(stateId); - mCurrentState->setState( fetchActivity.value("InternalState") ); + mCurrentState->setState( mSaveActivity.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 ); + mCurrentModel->setData(QModelIndex(), mSaveActivity.value("VisibleIndex") , GlxTempVisualWindowIndex ); mViewManager->launchApplication(stateId, mCurrentModel); return true; } void GlxStateManager::launchFromExternal() { - qDebug("GlxStateManager::launchApplication"); + qDebug("GlxStateManager::launchFromExternal"); mCurrentState = createState(GLX_FULLSCREENVIEW_ID); mCurrentState->setState(IMAGEVIEWER_S); @@ -210,17 +207,22 @@ mActionHandler = new GlxActionHandler(); connect ( mViewManager, SIGNAL(externalCommand(int )), this, SIGNAL(externalCommand(int )) ); mViewManager->setupItems(); - mViewManager->updateToolBarIcon(GLX_ALL_ACTION_ID); + switch(mSaveActivity.value("ID")){ + case GLX_LISTVIEW_ID: + mViewManager->updateToolBarIcon(GLX_ALBUM_ACTION_ID); + break; + case GLX_GRIDVIEW_ID: + default: + 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 + // this is case when progress bar is not showing + // in the case of rename of an image or capture the single item + // it is also launching the progress bar, to avoid this scenario add the check of count more than 5 if ( mCurrentModel && ( count > 5 ) ) { goBack( GLX_GRIDVIEW_ID, ALL_ITEM_S ) ; cleanAllModel(); @@ -238,27 +240,21 @@ } } } - 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())); @@ -266,16 +262,14 @@ 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); @@ -459,7 +453,7 @@ return new GlxListState( mCurrentState ); case GLX_FULLSCREENVIEW_ID : - return new GlxFullScreenState( mCurrentState ); + return new GlxFullScreenState( this, mCurrentState ); case GLX_DETAILSVIEW_ID: return new GlxDetailState( mCurrentState ); @@ -686,6 +680,8 @@ case EGlxCmdMarkAll: case EGlxCmdUnMarkAll: + case EGlxCmd3DEffectOn: + case EGlxCmd3DEffectOff: mViewManager->handleUserAction(mCurrentState->id(), id); id = EGlxCmdHandled; break; @@ -713,6 +709,7 @@ { qDebug("GlxStateManager::~GlxStateManager"); cleanAllModel(); + mSaveActivity.clear(); delete mActionHandler; qDebug("GlxStateManager::~GlxStateManager delete Model"); diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/viewmanager/inc/glxmenumanager.h --- a/ui/viewmanagement/viewmanager/inc/glxmenumanager.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/viewmanager/inc/glxmenumanager.h Sat Jul 10 00:59:39 2010 +0530 @@ -21,6 +21,7 @@ class QAbstractItemModel; class QAction; class HbMainWindow; +class GlxSettingInterface; //Grid view option menu @@ -29,7 +30,8 @@ GlxGridViewSlideShow, GlxGridViewAddToAlbum, GlxGridViewRemoveFromAlbum, - GlxGridViewDelete + GlxGridViewDelete, + GlxGridView3DEffect }; class GlxMenuManager : public QObject @@ -37,22 +39,23 @@ Q_OBJECT public : - GlxMenuManager(HbMainWindow* mainWindow); + GlxMenuManager( HbMainWindow* mainWindow ); ~GlxMenuManager(); - void createMarkingModeMenu(HbMenu* menu); - void ShowItemSpecificMenu(qint32 viewId,QPointF pos); - void setModel(QAbstractItemModel *model) { mModel = model ; } - void addMenu(qint32 viewId, HbMenu* menu); - void removeMenu(qint32 viewId, HbMenu* menu); - void disableAction(HbMenu* menu,bool disable); + void createMarkingModeMenu( HbMenu* menu ); + void ShowItemSpecificMenu( qint32 viewId,QPointF pos ); + void setModel( QAbstractItemModel *model ) { mModel = model ; } + void addMenu( qint32 viewId, HbMenu* menu ); + void removeMenu( qint32 viewId, HbMenu* menu ); + void disableAction( HbMenu* menu,bool disable ); signals : - void commandTriggered(qint32 commandId); + void commandTriggered( qint32 commandId ); private: - void CreateGridMenu(HbMenu* menu); - void CreateListMenu(HbMenu* menu); - void CreateFullscreenMenu(HbMenu* menu); + void CreateGridMenu( HbMenu* menu ); + void CreateListMenu( HbMenu* menu ); + void CreateFullscreenMenu( HbMenu* menu ); + void createSlideShowMenu( HbMenu* menu ); void setAllActionVisibility( QList actionList, bool visible ); int viewSubState(); @@ -67,4 +70,6 @@ HbMainWindow* mMainWindow; HbMenu *mContextMenu; HbMenu* mSubMenu; + HbMenu* m3DEffectSubMenu; + GlxSettingInterface *mSettings; }; diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/viewmanager/src/glxmenumanager.cpp --- a/ui/viewmanagement/viewmanager/src/glxmenumanager.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/viewmanager/src/glxmenumanager.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -28,6 +28,7 @@ #include "glxcommandhandlers.hrh" #include "glxmodelparm.h" #include "glxlocalisationstrings.h" +#include "glxsettinginterface.h" GlxMenuManager::GlxMenuManager(HbMainWindow* mainWindow) @@ -35,6 +36,7 @@ mMainWindow( mainWindow ), mContextMenu( 0 ) { + mSettings = GlxSettingInterface::instance(); } GlxMenuManager::~GlxMenuManager() @@ -73,8 +75,8 @@ { switch(viewId) { case GLX_GRIDVIEW_ID: + CreateGridMenu( menu ); connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateGridMenu() ) ); - CreateGridMenu( menu ); break; case GLX_LISTVIEW_ID: @@ -82,9 +84,13 @@ break; case GLX_FULLSCREENVIEW_ID: + CreateFullscreenMenu( menu ); connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateFullscreenMenu() ) ); - CreateFullscreenMenu( menu ); break; + + case GLX_SLIDESHOWVIEW_ID : + createSlideShowMenu( menu ); + break ; default: break; @@ -145,6 +151,22 @@ action->setData(EGlxCmdDelete); action->setObjectName( "GridMenu Delete" ); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + + m3DEffectSubMenu = menu->addMenu("3D Effect"); + m3DEffectSubMenu->setObjectName( "GridMenu 3DEffect" ); + + action = m3DEffectSubMenu->addAction("On"); + action->setCheckable(ETrue); + action->setData(EGlxCmd3DEffectOn); + action->setObjectName( "GridMenu 3DOn" ); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + + action = m3DEffectSubMenu->addAction("Off"); + action->setCheckable(ETrue); + action->setData(EGlxCmd3DEffectOff); + action->setObjectName( "GridMenu 3DOff" ); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + } void GlxMenuManager::CreateListMenu(HbMenu* menu) @@ -186,15 +208,21 @@ CFeatureDiscovery* featManager = CFeatureDiscovery::NewL(); if(featManager->IsFeatureSupportedL(KFeatureIdFfImageEditor)) { - mSubMenu = menu->addMenu(QString("Rotate")); - action = mSubMenu->addAction(QString("90 CW")); + mSubMenu = menu->addMenu(GLX_MENU_USE_IMAGE); + action = mSubMenu->addAction(GLX_MENU_SET_WALLPAPER); + action->setData(EGlxCmdSetWallpaper); + connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + + + mSubMenu = menu->addMenu(GLX_MENU_ROTATE); + action = mSubMenu->addAction(GLX_MENU_90_CW); action->setData(EGlxCmdRotateImgCW); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); - action = mSubMenu->addAction(QString("90 CCW")); + action = mSubMenu->addAction(GLX_MENU_90_CCW); action->setData(EGlxCmdRotateImgCCW); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); - action = menu->addAction(QString("Crop")); + action = menu->addAction(GLX_MENU_CROP); action->setData(EGlxCmdRotateImgCrop); connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } @@ -207,6 +235,17 @@ connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); } +void GlxMenuManager::createSlideShowMenu( HbMenu* menu ) +{ + HbAction *action = NULL; + menu->setObjectName( "SSMenu" ); + + action = menu->addAction( GLX_OPTION_SS_SETTINGS ); + action->setData( EGlxCmdSlideshowSettings ); + action->setObjectName( "SSMenu Setting" ); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); +} + void GlxMenuManager::setAllActionVisibility( QList actionList, bool visible ) { qDebug() << "GlxMenuManager::setAllActionVisibility count " << actionList.count() << " visible" << visible; @@ -257,6 +296,26 @@ actionList.at(GlxGridViewRemoveFromAlbum)->setVisible( FALSE ); break ; } + + if(mMainWindow->orientation() == Qt::Horizontal) + { + actionList.at(GlxGridView3DEffect)->setVisible( TRUE ); + QList subActionList = m3DEffectSubMenu->actions(); + if(mSettings->mediaWall3DEffect()) + { + subActionList.at(0)->setChecked(ETrue); + subActionList.at(1)->setChecked(EFalse); + } + else + { + subActionList.at(0)->setChecked(EFalse); + subActionList.at(1)->setChecked(ETrue); + } + } + else + { + actionList.at(GlxGridView3DEffect)->setVisible( FALSE ); + } } } @@ -295,32 +354,37 @@ 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_OPEN ); + action->setData( EGlxCmdFullScreenOpen ); + action->setObjectName( "CM Open" ); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); - action = mContextMenu->addAction(GLX_MENU_SLIDESHOW); - action->setData(EGlxCmdSelectSlideshow); + 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())); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); if ( viewSubState() == ALBUM_ITEM_S ) { - action = mContextMenu->addAction(GLX_OPTION_REMOVE_FROM_ALBUM); - action->setData(EGlxCmdContextRemoveFrom); + action = mContextMenu->addAction( GLX_OPTION_REMOVE_FROM_ALBUM ); + action->setData( EGlxCmdContextRemoveFrom ); action->setObjectName( "CM RemoveAlbum" ); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); } - action = mContextMenu->addAction(GLX_MENU_ADD_TO_ALBUM); - action->setData(EGlxCmdContextAddToAlbum); + action = mContextMenu->addAction( GLX_MENU_ADD_TO_ALBUM ); + action->setData( EGlxCmdContextAddToAlbum ); action->setObjectName( "CM AddToAlbum" ); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); - action = mContextMenu->addAction(GLX_MENU_DELETE); - action->setData(EGlxCmdContextDelete); + action = mContextMenu->addAction( GLX_MENU_DELETE ); + action->setData( EGlxCmdContextDelete ); action->setObjectName( "CM Delete" ); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); break; case GLX_LISTVIEW_ID : { @@ -328,26 +392,31 @@ QVariant variant = mModel->data( mModel->index(0,0), GlxListItemCount ); if ( variant.isValid() && variant.canConvert () ) { count = variant.value(); - } + } + + action = mContextMenu->addAction( GLX_MENU_OPEN ); + action->setData( EGlxCmdAlbumGridOpen ); + action->setObjectName( "CM Album Open" ); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); if ( count ) { - action = mContextMenu->addAction(GLX_MENU_SLIDESHOW); - action->setData(EGlxCmdAlbumSlideShow); + action = mContextMenu->addAction( GLX_MENU_SLIDESHOW ); + action->setData( EGlxCmdAlbumSlideShow ); action->setObjectName( "CM Album SlideShow" ); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); } variant = mModel->data( mModel->index(0,0), GlxSystemItemRole ); if ( variant.isValid() && variant.canConvert () && ( variant.value() == false ) ) { - action = mContextMenu->addAction(GLX_MENU_RENAME); - action->setData(EGlxCmdContextRename); + action = mContextMenu->addAction( GLX_MENU_RENAME ); + action->setData( EGlxCmdContextRename ); action->setObjectName( "CM Rename" ); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); - action = mContextMenu->addAction(GLX_MENU_DELETE); - action->setData(EGlxCmdContextAlbumDelete); + action = mContextMenu->addAction( GLX_MENU_DELETE ); + action->setData( EGlxCmdContextAlbumDelete ); action->setObjectName( "CM Album Delete" ); - connect(action, SIGNAL(triggered()), this, SLOT(menuItemSelected())); + connect( action, SIGNAL( triggered() ), this, SLOT( menuItemSelected() ) ); } } break; diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/viewmanager/src/glxviewmanager.cpp --- a/ui/viewmanagement/viewmanager/src/glxviewmanager.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/viewmanager/src/glxviewmanager.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -129,8 +129,8 @@ { qDebug("GlxViewManager::addBackSoftKeyAction "); //create the back soft key action and set the data - mBackAction = new HbAction(Hb::BackNaviAction, this); - mBackAction->setData(EGlxCmdBack); + mBackAction = new HbAction( Hb::BackNaviAction, this ); + mBackAction->setData( EGlxCmdBack ); mBackAction->setObjectName( "App Back" ); mView->setNavigationAction( mBackAction ); } @@ -179,7 +179,7 @@ mView = resolveView(id); //partially initialise the view so that animation run smoothly - mView->initializeView( model); + mView->initializeView( model, curr_view ); mModel = model; if ( viewEffect == CURRENT_VIEW || viewEffect == BOTH_VIEW ) { @@ -289,7 +289,7 @@ mProgressDialog->setIcon(icon); if ( currentValue < 0 ) { - mProgressDialog->setText( QString( "Refreshing" ) ); //To:Do string will change later + mProgressDialog->setText( QString( GLX_REFRESHING ) ); //To:Do string will change later mProgressDialog->setProgressValue( 0 ); } else { @@ -343,7 +343,6 @@ if( mMarkingActionList.at(i)->data()==EGlxCmdSelect) { bool noSelection=selectedModelIndex.empty(); mMarkingActionList.at(i)->setDisabled(noSelection); - mMenuManager->disableAction(mView->menu(),noSelection); break; } } diff -r 863223ea6961 -r a0f57508af73 ui/viewmanagement/viewmanager/viewmanager.pro --- a/ui/viewmanagement/viewmanager/viewmanager.pro Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewmanagement/viewmanager/viewmanager.pro Sat Jul 10 00:59:39 2010 +0530 @@ -25,6 +25,7 @@ ../../../loggers/loggerqt/inc \ ../../../commonutilities/externalutility/inc \ ../../viewutilities/effectengine/inc \ + ../../viewutilities/settingutility/inc CONFIG += hb diff -r 863223ea6961 -r a0f57508af73 ui/views/detailsview/inc/glxdetailsview.h --- a/ui/views/detailsview/inc/glxdetailsview.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/detailsview/inc/glxdetailsview.h Sat Jul 10 00:59:39 2010 +0530 @@ -61,7 +61,7 @@ /* * This is called from the view manager before the view is going to Activated. */ - void initializeView(QAbstractItemModel *model); + void initializeView( QAbstractItemModel *model, GlxView *preView ); /* * This is called from the view manager before the view is going to de-activated. @@ -146,6 +146,7 @@ */ void clearConnections(); + int getSubState(); private: //Contains the thumbnail shown in teh details view. diff -r 863223ea6961 -r a0f57508af73 ui/views/detailsview/src/glxdetailsview.cpp --- a/ui/views/detailsview/src/glxdetailsview.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/detailsview/src/glxdetailsview.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -100,7 +100,9 @@ { OstTraceFunctionEntry0( GLXDETAILSVIEW_ACTIVATE_ENTRY ); //create and set the Favourite Model - setFavModel(); + if(getSubState() != IMAGEVIEWER_DETAIL_S) { + setFavModel(); + } //fill the data FillDetails(); @@ -120,19 +122,20 @@ //-------------------------------------------------------------------------------------------------------------------------------------------- //initializeView //-------------------------------------------------------------------------------------------------------------------------------------------- -void GlxDetailsView::initializeView(QAbstractItemModel *model) - { +void GlxDetailsView::initializeView( QAbstractItemModel *model, GlxView *preView) +{ + Q_UNUSED( preView ) 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)); @@ -144,6 +147,7 @@ mFavIcon = static_cast (mDocLoader->findWidget( GLX_DETAILSVIEW_FAVICON)); + mDescriptions = static_cast (mDocLoader->findWidget( GLX_DETAILSVIEW_DESCRPTIONTEXT)); @@ -159,20 +163,26 @@ mSizeLabel = static_cast (mDocLoader->findWidget( GLX_DETAILSVIEW_SIZETEXT)); - //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 + //Set the Model mModel = model; - + if(getSubState() == IMAGEVIEWER_DETAIL_S) { + mFavIcon->hide(); + } + else + { + //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 Layout Correspondingly. updateLayout(mWindow->orientation()); @@ -211,11 +221,12 @@ //-------------------------------------------------------------------------------------------------------------------------------------------- void GlxDetailsView::cleanUp() { + qDebug("GlxDetailsView::cleanUp Enter"); + //clear the connections + clearConnections(); + clearCurrentModel(); - //clear the connections - clearConnections(); - delete mFavModel; mFavModel = NULL; @@ -296,15 +307,21 @@ { connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(updateLayout(Qt::Orientation))); + + + if(getSubState() != IMAGEVIEWER_DETAIL_S) { connect(mFavIcon, SIGNAL(clicked()), this, SLOT(updateFavourites())); connect(mDescriptions, SIGNAL(labelPressed()), this, SLOT(UpdateDescription())); + connect(mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), + this, SLOT( dataChanged(QModelIndex,QModelIndex) )); + } + connect(mModel, SIGNAL( updateDetailsView() ), this, SLOT( FillDetails() )); - connect(mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), - this, SLOT( dataChanged(QModelIndex,QModelIndex) )); + } //-------------------------------------------------------------------------------------------------------------------------------------------- @@ -312,18 +329,22 @@ //-------------------------------------------------------------------------------------------------------------------------------------------- void GlxDetailsView::clearConnections() { + + qDebug("GlxDetailsView:: clearConnections"); disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(updateLayout(Qt::Orientation))); - + + if(mModel && getSubState() != IMAGEVIEWER_DETAIL_S) { disconnect(mFavIcon, SIGNAL(clicked()), this, SLOT(updateFavourites())); - disconnect(mDescriptions, SIGNAL(labelPressed()), this, SLOT(UpdateDescription())); + disconnect(mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), + this, SLOT( dataChanged(QModelIndex,QModelIndex) )); + } disconnect(mModel, SIGNAL( updateDetailsView() ), this, SLOT( FillDetails() )); - disconnect(mFavModel, SIGNAL( dataChanged(QModelIndex,QModelIndex) ), - this, SLOT( dataChanged(QModelIndex,QModelIndex) )); + } //-------------------------------------------------------------------------------------------------------------------------------------------- @@ -614,3 +635,20 @@ } return sizeString; } + +//-------------------------------------------------------------------------------------------------------------------------------------------- +//getSubState +//-------------------------------------------------------------------------------------------------------------------------------------------- +int GlxDetailsView::getSubState() + { + int substate = NO_DETAIL_S; + + if (mModel) { + QVariant variant = mModel->data(mModel->index(0, 0), GlxSubStateRole); + + if (variant.isValid() && variant.canConvert ()) { + substate = variant.value (); + } + } + return substate; + } diff -r 863223ea6961 -r a0f57508af73 ui/views/fullscreenview/inc/glxcoverflow.h --- a/ui/views/fullscreenview/inc/glxcoverflow.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/fullscreenview/inc/glxcoverflow.h Sat Jul 10 00:59:39 2010 +0530 @@ -44,7 +44,8 @@ { TAP_EVENT, //send the signal when user tap on full screen PANNING_START_EVENT, //send the signal when panning of full screen start - EMPTY_ROW_EVENT //send the signal when model have no data + EMPTY_ROW_EVENT, //send the signal when model have no data + ZOOM_START_EVENT } GlxCoverFlowEvent; class GlxCoverFlow : public HbWidget @@ -59,10 +60,20 @@ void indexChanged (int index); void setUiOn(bool uiOn) { mUiOn = uiOn; } void partiallyClean(); - void partiallyCreate(QAbstractItemModel *model, QSize itemSize); + void partiallyCreate(QAbstractItemModel *model, QSize itemSize, int posY = 0 ); void setCoverFlow(); void ClearCoverFlow(); void setMultitouchFilter(QGraphicsItem* multitouchFilter); + + /* + * To get the focus index + */ + int getFocusIndex( ); + + /* + * To get the full screen icon of the image + */ + HbIcon getIcon( int index ); public slots: void zoomStarted(int index); @@ -121,16 +132,6 @@ 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 diff -r 863223ea6961 -r a0f57508af73 ui/views/fullscreenview/inc/glxfullscreenview.h --- a/ui/views/fullscreenview/inc/glxfullscreenview.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/fullscreenview/inc/glxfullscreenview.h Sat Jul 10 00:59:39 2010 +0530 @@ -26,6 +26,9 @@ //User Defined Includes #include #include + +#define NBR_ANIM_ITEM 2 + //Orbit/Qt forward declartion class QTimer; class HbAction; @@ -54,7 +57,7 @@ * to make the widget light weight in order to make transition smooth * and also loads the widgets. */ - void initializeView(QAbstractItemModel *model); + void initializeView( QAbstractItemModel *model, GlxView *preView ); /* * resets the view, with just one icon being present in the widget @@ -116,7 +119,7 @@ GlxCoverFlow *mCoverFlow; HbGridView *mImageStrip; QTimer *mUiOffTimer; //use for ui off after 30 sec - HbIconItem *mIconItem ; //temporary item for play the image strip select animation + HbIconItem *mIconItems[ NBR_ANIM_ITEM ] ; //temporary item for play the image strip select animation GlxTvOutWrapper *mTvOutWrapper; HbToolBar *mFullScreenToolBar; //Fullscreen Toolbar //for Zoom diff -r 863223ea6961 -r a0f57508af73 ui/views/fullscreenview/src/glxcoverflow.cpp --- a/ui/views/fullscreenview/src/glxcoverflow.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/fullscreenview/src/glxcoverflow.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -24,6 +24,7 @@ #include #include #include +#include //User Includes #include @@ -119,7 +120,7 @@ else { killTimer(mTimerId); mTimerId = 0; - emit doubleTapEventReceived(gesture->position()); + emit doubleTapEventReceived(hbInstance->allMainWindows().first()->mapToScene(gesture->position().toPoint())); } event->accept(gesture); } @@ -486,11 +487,11 @@ } } -void GlxCoverFlow::partiallyCreate(QAbstractItemModel *model, QSize itemSize) +void GlxCoverFlow::partiallyCreate( QAbstractItemModel *model, QSize itemSize, int posY ) { - qDebug("GlxCoverFlow::resetpartiallyCreated"); + qDebug("GlxCoverFlow::resetpartiallyCreated poxY %d", posY ); mIconItem[2]->setSize ( itemSize ); - mIconItem[2]->setPos ( QPointF ( 0, 0) ); + mIconItem[2]->setPos ( QPointF ( 0, posY ) ); mModel = model ; mSelIndex = getFocusIndex(); mIconItem[2]->setIcon( getIcon( mSelIndex ) ) ; @@ -530,6 +531,7 @@ void GlxCoverFlow::zoomStarted(int index) { Q_UNUSED(index) + emit coverFlowEvent( ZOOM_START_EVENT ); stopAnimation(); mZoomOn = true; } diff -r 863223ea6961 -r a0f57508af73 ui/views/fullscreenview/src/glxfullscreenview.cpp --- a/ui/views/fullscreenview/src/glxfullscreenview.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/fullscreenview/src/glxfullscreenview.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -30,7 +30,7 @@ #include #include #include - +#include //User Includes #include "glxlog.h" #include "glxtracer.h" @@ -54,29 +54,31 @@ const int KUiOffTime = 3000; GlxFullScreenView::GlxFullScreenView(HbMainWindow *window,HbDocumentLoader *DocLoader) : - GlxView ( GLX_FULLSCREENVIEW_ID), - mModel(NULL), - mWindow( window), - mCoverFlow(NULL) , - mImageStrip (NULL), - mUiOffTimer(NULL), - mIconItem(NULL), - mTvOutWrapper(NULL), - mFullScreenToolBar(NULL), - mZoomWidget(NULL) + GlxView ( GLX_FULLSCREENVIEW_ID ), + mModel( NULL ), + mWindow( window ), + mCoverFlow( NULL ) , + mImageStrip( NULL ), + mUiOffTimer( NULL ), + mTvOutWrapper( NULL ), + mFullScreenToolBar( NULL ), + mZoomWidget( NULL ), + mUiOff ( false) { OstTraceFunctionEntry0( GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_ENTRY ); - + mIconItems[0] = NULL; + mIconItems[1] = NULL; mDocLoader = DocLoader; setContentFullScreen( true ); - HbEffect::add( QString("HbGridView"), QString(":/data/transitionup.fxml"), QString( "TapShow" )); - HbEffect::add( QString("HbGridView"), QString(":/data/transitiondown.fxml"), QString( "TapHide" )); - HbEffect::add( QString("HbGridViewItem"), QString(":/data/gridtofullscreenhide.fxml"), QString( "Select" )); + HbEffect::add( QString( "HbGridView" ), QString( ":/data/transitionup.fxml" ), QString( "TapShow" ) ); + HbEffect::add( QString( "HbGridView" ), QString( ":/data/transitiondown.fxml" ), QString( "TapHide" ) ); + HbEffect::add( QString( "HbGridViewItem" ), QString( ":/data/zoomin.fxml" ), QString( "SelectHide" ) ); + HbEffect::add( QString( "HbGridViewItem" ), QString( ":/data/zoomout.fxml" ), QString( "SelectShow" ) ); OstTraceFunctionExit0( GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_EXIT ); } -void GlxFullScreenView::initializeView(QAbstractItemModel *model) +void GlxFullScreenView::initializeView( QAbstractItemModel *model, GlxView *preView ) { OstTraceFunctionEntry0( GLXFULLSCREENVIEW_INITIALIZEVIEW_ENTRY ); @@ -87,9 +89,23 @@ setHdmiModel(model); 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() ); + /* + * Initialize the coverflow and partially creates the coverflow with one image + * to make the widget light weight in order to make transition smooth + */ + /* + * Grid view is not in full screen mode so this view have some flicker after transtion is finshed + * and some cases in grid view status bar is visible and some cases it is not + * so adjust the initial postion of fullscreen base on status bar visiblity. + */ + if ( preView->compare( GLX_GRIDVIEW_ID ) && preView->isItemVisible ( Hb::StatusBarItem ) ) { + qreal chromeHeight = 0; + style()->parameter( "hb-param-widget-chrome-height", chromeHeight ); + mCoverFlow->partiallyCreate( model, screenSize(), -chromeHeight ); + } + else { + mCoverFlow->partiallyCreate( model, screenSize() ); + } OstTraceFunctionExit0( GLXFULLSCREENVIEW_INITIALIZEVIEW_EXIT ); } @@ -113,6 +129,7 @@ mImageStrip->hide(); mImageStrip->setLayoutName( QString( "ImageStrip" ) ); // To distinguish in CSS file mImageStrip->setEnabledAnimations( HbAbstractItemView::None ); + mImageStrip->setHorizontalScrollBarPolicy( HbScrollArea::ScrollBarAlwaysOff ); OstTraceFunctionExit0( GLXFULLSCREENVIEW_LOADWIDGETS_EXIT ); } @@ -166,12 +183,14 @@ } //Loads the widgets corresponding to the orientation. loadViewSection(); - - setStatusBarVisible(FALSE); - setTitleBarVisible(FALSE); + // In case of fetcher don't hide status pane and title bar + if(!(XQServiceUtil::isService() && (0 == XQServiceUtil::interfaceName().compare(QLatin1String("com.nokia.symbian.IImageFetch"))))){ + setStatusBarVisible(FALSE); + setTitleBarVisible(FALSE); + mUiOff = true; + } mUiOffTimer = new QTimer(); - mUiOff = true; mUiOffTimer->stop(); mCoverFlow->setUiOn(FALSE); addConnection(); @@ -287,9 +306,8 @@ if(getSubState() == IMAGEVIEWER_S) { setTitle("Image Viewer"); } - else if(getSubState() == FETCHER_S){ - setStatusBarVisible(TRUE); - setTitleBarVisible(TRUE); + else if(getSubState() == FETCHER_S){ //do not zoom in case of fetcher + disconnect(mCoverFlow,SIGNAL( doubleTapEventReceived(QPointF) ), mZoomWidget, SLOT( animateZoomIn(QPointF) ) ); } OstTraceFunctionExit0( GLXFULLSCREENVIEW_SETMODEL_EXIT ); } @@ -419,6 +437,7 @@ 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(); @@ -435,16 +454,17 @@ OstTraceFunctionExit0( GLXFULLSCREENVIEW_INDEXCHANGED_EXIT ); return; } - mModel->setData( index, index.row(), GlxFocusIndexRole ); - mZoomWidget->indexChanged(index.row()); - mCoverFlow->indexChanged(index.row()); - mImageStrip->scrollTo(index, HbGridView::EnsureVisible ); + if (mTvOutWrapper){ - // for the indexchnaged through filmstrip - mTvOutWrapper->setImagetoHDMI(); + // for the indexchnaged through filmstrip + mTvOutWrapper->setImagetoHDMI(); } //disable the animation for the time being - //imageSelectionAnimation( index ); + imageSelectionAnimation( index ); + + mModel->setData( index, index.row(), GlxFocusIndexRole ); + mZoomWidget->indexChanged(index.row()); + mZoomWidget->setVisible( false ); OstTraceFunctionExit0( DUP1_GLXFULLSCREENVIEW_INDEXCHANGED_EXIT ); } @@ -528,6 +548,7 @@ break ; case PANNING_START_EVENT : + case ZOOM_START_EVENT : hideUi(); break ; @@ -567,13 +588,17 @@ { OstTraceFunctionEntry0( GLXFULLSCREENVIEW_IMAGESELECTIONEFFECTFINISHED_ENTRY ); - mIconItem->resetTransform(); - mIconItem->setVisible( false ); + for ( int i = 0; i < NBR_ANIM_ITEM; i++ ) { + mIconItems[ i ]->resetTransform(); + mIconItems[ i ]->setVisible( false ); + } QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole ); if ( variant.isValid() && variant.canConvert () ) { mCoverFlow->indexChanged( variant.value() ) ; } + mCoverFlow->setVisible( true ); + mZoomWidget->setVisible( true ); OstTraceFunctionExit0( GLXFULLSCREENVIEW_IMAGESELECTIONEFFECTFINISHED_EXIT ); } @@ -675,8 +700,9 @@ OstTraceFunctionEntry0( DUP1_GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_ENTRY ); cleanUp(); - - delete mIconItem ; + for ( int i = 0; i < NBR_ANIM_ITEM; i++ ) { + delete mIconItems[ i ] ; + } delete mImageStrip; delete mFullScreenToolBar; delete mCoverFlow; @@ -689,8 +715,9 @@ HbEffect::remove( QString("HbGridView"), QString(":/data/transitionup.fxml"), QString( "TapShow" )); HbEffect::remove( QString("HbGridView"), QString(":/data/transitiondown.fxml"), QString( "TapHide" )); - HbEffect::remove( QString("HbGridViewItem"), QString(":/data/gridtofullscreenhide.fxml"), QString( "Select" )); - + HbEffect::remove( QString( "HbGridViewItem" ), QString( ":/data/zoomin.fxml" ), QString( "SelectHide" ) ); + HbEffect::remove( QString( "HbGridViewItem" ), QString( ":/data/zoomout.fxml" ), QString( "SelectShow" ) ); + OstTraceFunctionExit0( DUP1_GLXFULLSCREENVIEW_GLXFULLSCREENVIEW_EXIT ); } @@ -698,25 +725,28 @@ { OstTraceFunctionEntry0( GLXFULLSCREENVIEW_IMAGESELECTIONANIMATION_ENTRY ); - if ( mIconItem == NULL ) { - mIconItem = new HbIconItem( mCoverFlow ); - mIconItem->setBrush( QBrush( Qt::black ) ); - mIconItem->setZValue( mCoverFlow->zValue() ); + if ( mIconItems[0] == NULL ) { + for ( int i = 0; i < NBR_ANIM_ITEM; i++ ) { + mIconItems[ i ] = new HbIconItem( mFullScreenToolBar->parentItem() ); + mIconItems[ i ]->setBrush( QBrush( Qt::black ) ); + mIconItems[ i ]->setZValue( mFullScreenToolBar->zValue() - 2 ); + mIconItems[ i ]->setPos( 0, 0 ); + mIconItems[ i ]->setAlignment( Qt::AlignCenter ); + } } - HbAbstractViewItem *mItem = mImageStrip->itemByIndex( index ); - mIconItem->setSize( mItem->size() ); - mIconItem->setPos( mItem->sceneTransform().map( QPoint(0,0)).x() , screenSize().height() - 2 * mItem->size().height() ); - mIconItem->setVisible( true ); + for ( int i = 0; i < NBR_ANIM_ITEM; i++ ) { + mIconItems[ i ]->setVisible( true ); + mIconItems[ i ]->setSize( screenSize() ); + } - QVariant variant = mModel->data( index, Qt::DecorationRole ); - if ( variant.isValid() && variant.canConvert () ) { - mIconItem->setIcon ( variant.value() ) ; - } - else { - mIconItem->setIcon( HbIcon() ); - } - HbEffect::start( mIconItem, QString("HbGridViewItem"), QString("Select"), this, "imageSelectionEffectFinished" ); + mIconItems[ 0 ]->setIcon( mCoverFlow->getIcon( mCoverFlow->getFocusIndex() ) ); + mIconItems[ 1 ]->setIcon( mCoverFlow->getIcon( index.row() ) ); + mCoverFlow->setVisible( false ); + mZoomWidget->setVisible( false ); + + HbEffect::start( mIconItems[ 0 ], QString( "HbGridViewItem" ), QString( "SelectHide" ) ); + HbEffect::start( mIconItems[ 1 ], QString( "HbGridViewItem" ), QString( "SelectShow" ), this, "imageSelectionEffectFinished" ); OstTraceFunctionExit0( GLXFULLSCREENVIEW_IMAGESELECTIONANIMATION_EXIT ); } @@ -752,9 +782,15 @@ GLX_LOG_INFO("GlxFullScreenView::event() shift to native - CGlxHdmi"); mTvOutWrapper->setToNativeMode(); } - if ( ev->type() == QEvent::ApplicationDeactivate && mTvOutWrapper) { - GLX_LOG_INFO("GlxFullScreenView::event() shift to Clone - CGlxHdmi"); - mTvOutWrapper->setToCloningMode(); + if (ev->type() == QEvent::ApplicationDeactivate) + { + if(mZoomWidget) { + mZoomWidget->forceZoomToBackground(); + } + if (mTvOutWrapper) { + GLX_LOG_INFO("GlxFullScreenView::event() shift to Clone - CGlxHdmi"); + mTvOutWrapper->setToCloningMode(); + } } return HbView::eventFilter(obj,ev); } diff -r 863223ea6961 -r a0f57508af73 ui/views/gridview/inc/glxgridview.h --- a/ui/views/gridview/inc/glxgridview.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/gridview/inc/glxgridview.h Sat Jul 10 00:59:39 2010 +0530 @@ -26,12 +26,13 @@ //Qt/Orbit forward declarations class HbMainWindow; class QAbstractItemModel; -class HgWidget; +class HgGrid; class GlxModelWrapper; class HbPushButton; class HbIconItem; class HbCheckBox; class HbLabel; +class GlxSettingInterface; class GlxGridView : public GlxView { @@ -42,7 +43,7 @@ ~GlxGridView(); void activate() ; void deActivate(); - void initializeView(QAbstractItemModel *model); + void initializeView( QAbstractItemModel *model, GlxView *preView ); void setModel(QAbstractItemModel *model); void addToolBar( HbToolBar *toolBar ); void enableMarking() ; @@ -89,7 +90,7 @@ HbMainWindow *mWindow; // no ownership QAbstractItemModel *mModel ; - HgWidget *mWidget; // HG Grid Widget + HgGrid *mWidget; // HG Grid Widget QItemSelectionModel *mSelectionModel; // Selected items model GlxModelWrapper *mModelWrapper; // Temp Model Wrapper, so That Role Change not a problem HbPushButton *mUiOnButton; @@ -102,6 +103,7 @@ HbLabel *mCountLabel; // Marked item count HbLabel *mZeroItemLabel; // zero itemcount HbLabel *mAlbumName; + GlxSettingInterface *mSettings; }; #endif /* GLXGRIDVIEW_H_ */ diff -r 863223ea6961 -r a0f57508af73 ui/views/gridview/src/glxgridview.cpp --- a/ui/views/gridview/src/glxgridview.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/gridview/src/glxgridview.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -38,6 +38,7 @@ #include "glxcommandhandlers.hrh" #include "glxicondefs.h" #include "glxlocalisationstrings.h" +#include "glxsettinginterface.h" #include "OstTraceDefinitions.h" #ifdef OST_TRACE_COMPILER_IN_USE @@ -66,6 +67,7 @@ mModelWrapper = new GlxModelWrapper(); mModelWrapper->setRoles(GlxQImageSmall); mIconItem = new HbIconItem(this); + mSettings = GlxSettingInterface::instance() ; OstTraceFunctionExit0( GLXGRIDVIEW_GLXGRIDVIEW_EXIT ); } @@ -116,8 +118,9 @@ OstTraceFunctionExit0( GLXGRIDVIEW_DEACTIVATE_EXIT ); } -void GlxGridView::initializeView(QAbstractItemModel *model) +void GlxGridView::initializeView( QAbstractItemModel *model, GlxView *preView ) { + Q_UNUSED( preView ) activate(); setModel(model); } @@ -450,6 +453,18 @@ mWidget->clearSelection(); break; + case EGlxCmd3DEffectOn: + mSettings->setmediaWall3DEffect(1); + if(mWidget && !mWidget->effect3dEnabled()) + mWidget->setEffect3dEnabled(ETrue); + break; + + case EGlxCmd3DEffectOff: + mSettings->setmediaWall3DEffect(0); + if(mWidget && mWidget->effect3dEnabled()) + mWidget->setEffect3dEnabled(EFalse); + break; + default : break; } @@ -528,6 +543,14 @@ mWidget->setObjectName( "Media Wall" ); mWidget->setLongPressEnabled(true); mWidget->setScrollBarPolicy(HgWidget::ScrollBarAutoHide); + if(XQServiceUtil::isService()) + { + mWidget->setEffect3dEnabled(EFalse); + } + else + { + mWidget->setEffect3dEnabled(mSettings->mediaWall3DEffect()); + } setWidget( mWidget ); addViewConnection(); hideorshowitems(orient); diff -r 863223ea6961 -r a0f57508af73 ui/views/listview/inc/glxlistview.h --- a/ui/views/listview/inc/glxlistview.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/listview/inc/glxlistview.h Sat Jul 10 00:59:39 2010 +0530 @@ -38,7 +38,7 @@ void deActivate(); void setModel(QAbstractItemModel *model); void addToolBar( HbToolBar *toolBar ); - void initializeView(QAbstractItemModel *model); + void initializeView( QAbstractItemModel *model, GlxView *preView ); QGraphicsItem * getAnimationItem( GlxEffect transtionEffect ); public slots: diff -r 863223ea6961 -r a0f57508af73 ui/views/listview/src/glxlistview.cpp --- a/ui/views/listview/src/glxlistview.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/listview/src/glxlistview.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -76,13 +76,14 @@ setToolBar(toolBar) ; } -void GlxListView::initializeView(QAbstractItemModel *model) +void GlxListView::initializeView( QAbstractItemModel *model, GlxView *preView ) { + Q_UNUSED( preView ) qDebug("GlxListView::initializeView()"); - if (mListView == NULL) { + if ( mListView == NULL ) { createListView(); } - setModel(model); + setModel( model ); } QGraphicsItem * GlxListView::getAnimationItem( GlxEffect transtionEffect ) diff -r 863223ea6961 -r a0f57508af73 ui/views/slideshowview/inc/glxslideshowwidget.h --- a/ui/views/slideshowview/inc/glxslideshowwidget.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/slideshowview/inc/glxslideshowwidget.h Sat Jul 10 00:59:39 2010 +0530 @@ -34,6 +34,7 @@ class QGraphicsItem; class HbDocumentLoader; class HbAbstractDataModel; +class HbLabel; //User Forward Declarations class GlxEffectEngine; @@ -48,12 +49,6 @@ EFFECT_STARTED // sends the signal when effect is started. } GlxSlideShowEvent; -typedef enum -{ - MOVE_FORWARD, - MOVE_BACKWARD, -} GlxSlideShowMoveDir; - class GlxSlideShowWidget : public HbWidget { Q_OBJECT @@ -108,23 +103,64 @@ //add the connection to the model void initializeNewModel(); void resetSlideShow(); - void setIconItems( int moveDir ); void moveImage( int nextIndex, int posX, const QString & move, char * callBack ); void addConnections(); void removeConnections(); + + /* + * To get the focus index + */ + int getFocusIndex( ); + + /* + * To get the full screen icon of the image + */ + HbIcon getIcon( int index ); + + /* + * To check the itemis corrupted or not + */ + bool isCorrupt( int index ); + + /* + * To set the current ( focus ) item icon + */ + bool setFocusItemIcon(); + + /* + * To set the next itme icon in the list + */ + bool setNextItemIcon(); + + /* + * To set the previous icon in the list + */ + bool setPreItemIcon(); + + /* + * In the case of all the image are corrupted then show the error notes + */ + void showErrorNote(); + + /* + * It will hide the corrupted images note + */ + void hideErrorNote(); private: GlxEffectEngine *mEffectEngine; GlxSettingInterface *mSettings; //no ownership - HbIconItem *mIconItems[NBR_ITEM]; + HbIconItem *mIconItems[ NBR_ITEM ]; HbPushButton *mContinueButton; + HbLabel *mErrorNote ; //when all the image are corrupted then show the no image label int mItemIndex; - int mSelIndex; + int mSelIndex[ NBR_ITEM ]; QTimer *mSlideTimer; QAbstractItemModel *mModel; QRect mScreenRect; QList mItemList; bool mIsPause; + int mSlideShowItemCount; }; #endif /* GLXSLIDESHOWWIDGET_H */ diff -r 863223ea6961 -r a0f57508af73 ui/views/slideshowview/src/glxslideshowwidget.cpp --- a/ui/views/slideshowview/src/glxslideshowwidget.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/slideshowview/src/glxslideshowwidget.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -28,6 +28,7 @@ #include #include #include +#include //User Includes #include "glxicondefs.h" //Contains the icon names/Ids @@ -36,19 +37,21 @@ #include "glxdocloaderdefs.h" #include "glxslideshowwidget.h" #include "glxsettinginterface.h" +#include "glxlocalisationstrings.h" #include "glxlog.h" #include "glxtracer.h" GlxSlideShowWidget::GlxSlideShowWidget( QGraphicsItem *parent ) - : HbWidget(parent), - mEffectEngine(NULL), + : HbWidget( parent ), + mEffectEngine( NULL ), mSettings( NULL ), - mContinueButton(NULL), - mItemIndex(1), - mSelIndex(0), - mSlideTimer(NULL), - mModel(NULL) + mContinueButton( NULL ), + mErrorNote( NULL ), + mItemIndex( 1 ), + mSlideTimer( NULL ), + mModel( NULL ), + mSlideShowItemCount( 0 ) { TRACER("GlxSlideShowWidget::GlxSlideShowWidget()"); mSettings = GlxSettingInterface::instance() ; //no owner ship @@ -66,16 +69,17 @@ // Now load the view and the contents. // and then set the play icon to the button - mContinueButton = static_cast(DocLoader->findWidget(GLXSLIDESHOW_PB)); - mContinueButton->setIcon(HbIcon(GLXICON_PLAY)); + mContinueButton = static_cast( DocLoader->findWidget( GLXSLIDESHOW_PB ) ); + mContinueButton->setIcon( HbIcon( GLXICON_PLAY ) ); mContinueButton->hide(); mIsPause = false; for ( int i = 0; i < NBR_ITEM ; i++) { - mIconItems[i] = new HbIconItem(this); - mIconItems[i]->setBrush(QBrush(Qt::black)); - mIconItems[i]->setAlignment( Qt::AlignCenter ); - mIconItems[i]->setObjectName( QString( "SlideShowIcon%1" ).arg( i ) ); + mSelIndex[ i ] = -1; + 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(); @@ -111,7 +115,7 @@ TRACER("GlxSlideShowWidget::cleanUp()"); removeConnections(); - if(mEffectEngine) { + if( mEffectEngine ) { mEffectEngine->deRegisterEffect( QString("HbIconItem") ); delete mEffectEngine; mEffectEngine = NULL; @@ -122,10 +126,15 @@ mIconItems[i] = NULL; } - if(mSlideTimer) { + if( mSlideTimer ) { delete mSlideTimer; mSlideTimer = NULL; } + + if ( mErrorNote ) { + delete mErrorNote ; + mErrorNote = NULL; + } clearCurrentModel(); HbEffect::remove( QString("HbIconItem"), QString(":/data/transition.fxml"), QString( "Move" )); @@ -176,22 +185,16 @@ 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); - 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 ); + mModel->setData( mModel->index( 0, 0 ), mSelIndex[ mItemIndex ], GlxFocusIndexRole ); + mModel->setData( mModel->index( 0, 0 ), mSelIndex[ mItemIndex ], GlxVisualWindowIndex ); + setNextItemIcon(); GLX_LOG_INFO2("GlxSlideShowWidget::effectFinshed() after image selected index %d array index %d ", mSelIndex, mItemIndex); - if ( mIsPause == false ) { - mSlideTimer->start( mSettings->slideShowDelayTime() ); - } + startSlideShow(); mItemList.clear(); emit indexchanged(); // on each item change } @@ -211,7 +214,7 @@ cancelEffect(); mContinueButton->setZValue( this->zValue() + 2); mContinueButton->show() ; - emit slideShowEvent(UI_ON_EVENT); + emit slideShowEvent( UI_ON_EVENT ); } void GlxSlideShowWidget::continueSlideShow(bool checked) @@ -219,11 +222,11 @@ Q_UNUSED( checked ) TRACER("GlxSlideShowWidget::continueSlideShow()"); mIsPause = false; - if ( mModel && mModel->rowCount() > 1 ) { + if ( mModel && mSlideShowItemCount > 1 ) { mSlideTimer->start( mSettings->slideShowDelayTime() ); } mContinueButton->hide(); - emit slideShowEvent(UI_OFF_EVENT); + emit slideShowEvent( UI_OFF_EVENT ); } void GlxSlideShowWidget::dataChanged(QModelIndex startIndex, QModelIndex endIndex) @@ -231,20 +234,12 @@ 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() ) ; + for( int i = 0; i < NBR_ITEM; ++i ) { + if ( mSelIndex[ i ] == startIndex.row() ) { + mIconItems[ i ]->setIcon( getIcon( startIndex.row() ) ); } - else { - mIconItems[index]->setIcon ( HbIcon() ) ; - } - } + } } void GlxSlideShowWidget::rowsInserted(const QModelIndex &parent, int start, int end) @@ -289,7 +284,6 @@ resetSlideShow(); } - void GlxSlideShowWidget::leftGesture(int value) { Q_UNUSED(value) @@ -313,14 +307,11 @@ Q_UNUSED(status) TRACER("GlxSlideShowWidget::leftMoveEffectFinished()"); GLX_LOG_INFO1("GlxSlideShowWidget::leftMoveEffectFinished() %d status", status.reason); - - int rowCount = mModel->rowCount(); - 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 ); + mModel->setData( mModel->index( 0, 0 ), mSelIndex[ mItemIndex ], GlxFocusIndexRole ); + mModel->setData( mModel->index( 0, 0 ), mSelIndex[ mItemIndex ], GlxVisualWindowIndex ); + setNextItemIcon(); startSlideShow(); emit indexchanged(); // on left swipe } @@ -331,13 +322,10 @@ TRACER ( "GlxSlideShowWidget::rightMoveEffectFinished( ) "); GLX_LOG_INFO1("GlxSlideShowWidget::rightMoveEffectFinished() %d status", status.reason); - int rowCount = mModel->rowCount(); - 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 ); + mModel->setData( mModel->index( 0, 0 ), mSelIndex[ mItemIndex ], GlxFocusIndexRole ); + mModel->setData( mModel->index( 0, 0 ), mSelIndex[ mItemIndex ], GlxVisualWindowIndex ); + setPreItemIcon(); startSlideShow(); emit indexchanged(); // on right swipe } @@ -374,7 +362,11 @@ { TRACER ( "GlxSlideShowWidget::startSlideShow( ) "); GLX_LOG_INFO1 ( "GlxSlideShowWidget::startSlideShow( ) is pause %d", mIsPause); - if ( mIsPause == false && mModel && mModel->rowCount() > 1 ) { + + if ( mSlideShowItemCount == 0 ) { + showErrorNote(); + } + if ( mIsPause == false && mModel && mSlideShowItemCount > 1 ) { mSlideTimer->start( mSettings->slideShowDelayTime() ); } } @@ -396,10 +388,6 @@ 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() @@ -413,70 +401,30 @@ } } - void GlxSlideShowWidget::resetSlideShow() { TRACER("GlxSlideShowWidget::resetSlideShow()" ); - if(! mModel) { + if( mModel == NULL || mModel->rowCount() == 0 ) { 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 ); - } - - variant = mModel->data( mModel->index( mSelIndex, 0 ), GlxFsImageRole ); - if ( variant.isValid() && variant.canConvert () ) { - mIconItems[mItemIndex]->setIcon ( variant.value() ) ; - } - else { - mIconItems[mItemIndex]->setIcon ( HbIcon() ) ; - } - - setIconItems(MOVE_FORWARD); - setIconItems(MOVE_BACKWARD); - if ( mIsPause == false && mModel && mModel->rowCount() > 1 ) { - mSlideTimer->start( mSettings->slideShowDelayTime() ); - } -} - -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 ; - } - - 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() ) ; - } - else { - mIconItems[itemIndex]->setIcon ( HbIcon() ) ; - } + + mSlideShowItemCount = mModel->rowCount(); + setFocusItemIcon() ; + setNextItemIcon() ; + setPreItemIcon() ; + startSlideShow(); + + qDebug( "GlxSlideShowWidget::resetSlideShow slide show item count %d" , mSlideShowItemCount ); + if ( mErrorNote && mErrorNote->isVisible() && mSlideShowItemCount > 1 ){ + hideErrorNote(); + } } void GlxSlideShowWidget::moveImage(int nextIndex, int posX, const QString & move, char * callBack) { TRACER("GlxSlideShowWidget::MoveImage()"); - if ( mModel->rowCount() <= 1 || mEffectEngine->isEffectRuning( mItemList ) ) { + if ( mSlideShowItemCount <= 1 || mEffectEngine->isEffectRuning( mItemList ) ) { return ; } @@ -514,3 +462,125 @@ disconnect( mContinueButton, SIGNAL( clicked(bool) ), this, SLOT( continueSlideShow(bool) ) ); } } + +int GlxSlideShowWidget::getFocusIndex( ) +{ + QVariant variant = mModel->data( mModel->index( 0, 0 ), GlxFocusIndexRole ) ; + if ( variant.isValid() && variant.canConvert< int > () ) { + return variant.value< int > (); + } + return -1; +} + +HbIcon GlxSlideShowWidget::getIcon( int index ) +{ + QVariant variant = mModel->data( mModel->index( index, 0 ), GlxFsImageRole ); + if ( variant.isValid() && variant.canConvert< HbIcon > () ) { + return variant.value< HbIcon > () ; + } + return HbIcon() ; +} + +bool GlxSlideShowWidget::isCorrupt( int index ) +{ + QVariant variant = mModel->data( mModel->index( index, 0 ), GlxImageCorruptRole ); + if ( variant.isValid() && variant.canConvert< bool> () ) { + return variant.value< bool > () ; + } + return false ; +} + +bool GlxSlideShowWidget::setFocusItemIcon( ) +{ + int nbrItem = mModel->rowCount(); + int focusIndex = getFocusIndex(); + + for ( int i = 0; i < nbrItem ; ++i ) { + if ( isCorrupt( focusIndex ) == false ) { + qDebug( "GlxSlideShowWidget::setFocusItemIcon1 focus index %d" , focusIndex ); + mIconItems[ mItemIndex ]->setIcon( getIcon( focusIndex ) ) ; + mSelIndex[ mItemIndex ] = focusIndex ; + if ( i != 0 ) { + mModel->setData( mModel->index( 0, 0 ), focusIndex, GlxFocusIndexRole ); + mModel->setData( mModel->index( 0, 0 ), focusIndex, GlxVisualWindowIndex ); + } + return true; + } + focusIndex = ( focusIndex + 1 ) % nbrItem; + } + mSlideShowItemCount = 0; + return false; +} + +bool GlxSlideShowWidget::setNextItemIcon( ) +{ + int nbrItem = mModel->rowCount(); + int imageIndex = ( mSelIndex[ mItemIndex ] + 1 ) % nbrItem ; + int itemIndex = ( mItemIndex + 1 ) % NBR_ITEM ; + + for( int i = 1; i < nbrItem; ++i ) { + if ( isCorrupt( imageIndex ) == false ) { + mIconItems[ itemIndex ]->setIcon( getIcon( imageIndex ) ); + mSelIndex[ itemIndex ] = imageIndex ; + return true; + } + imageIndex = ( imageIndex + 1 ) % nbrItem ; + } + + if ( isCorrupt( imageIndex ) ) { + mSlideShowItemCount = 0; + } + else { + mSlideShowItemCount = 1; + } + return false ; +} + +bool GlxSlideShowWidget::setPreItemIcon() +{ + int nbrItem = mModel->rowCount() ; + int imageIndex = mSelIndex[ mItemIndex ] > 0 ? mSelIndex[ mItemIndex ] - 1 : nbrItem - 1 ; + int itemIndex = mItemIndex > 0 ? mItemIndex - 1 : mItemIndex ; + + for( int i = 1; i < nbrItem; ++i ) { + if ( isCorrupt( imageIndex ) == false ) { + mIconItems[ itemIndex ]->setIcon( getIcon( imageIndex ) ) ; + mSelIndex[ itemIndex ] = imageIndex ; + return true; + } + imageIndex = imageIndex > 0 ? imageIndex - 1 : nbrItem - 1 ; + } + if ( isCorrupt( imageIndex ) ) { + mSlideShowItemCount = 0; + } + else { + mSlideShowItemCount = 1; + } + return false; +} + +void GlxSlideShowWidget::showErrorNote() +{ + if ( mErrorNote == NULL ){ + mErrorNote = new HbLabel( QString( GLX_NOIMAGE_PLAY_SLIDESHOW ), this); + mErrorNote->setObjectName( "No Image" ); + mErrorNote->setGeometry( mIconItems[ 0 ]->geometry() ); + mErrorNote->setAlignment( Qt::AlignCenter ); + } + + for( int i = 0; i < NBR_ITEM; ++i ){ + mIconItems[ i ]->setVisible( false ); + } + mErrorNote->setVisible( true ); + emit slideShowEvent( UI_ON_EVENT ); +} + +void GlxSlideShowWidget::hideErrorNote() +{ + for( int i = 0; i < NBR_ITEM; ++i ){ + mIconItems[ i ]->setVisible( true ); + } + mErrorNote->setVisible( false ); + emit slideShowEvent( UI_OFF_EVENT ); +} + diff -r 863223ea6961 -r a0f57508af73 ui/views/viewbase/inc/glxview.h --- a/ui/views/viewbase/inc/glxview.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/views/viewbase/inc/glxview.h Sat Jul 10 00:59:39 2010 +0530 @@ -37,19 +37,28 @@ Q_OBJECT public : - GlxView(qint32 id, QGraphicsItem *parent = 0 ); + GlxView( qint32 id, QGraphicsItem *parent = 0 ); virtual void activate() = 0; virtual void deActivate() = 0; - virtual void setModel(QAbstractItemModel *model) = 0; + virtual void setModel( QAbstractItemModel *model ) = 0; - virtual bool compare (qint32 id); + virtual bool compare ( qint32 id ); virtual void addToolBar( HbToolBar *toolBar ) { Q_UNUSED(toolBar) } virtual void enableMarking() { } virtual void disableMarking() { } - virtual void handleUserAction(qint32 commandId) { Q_UNUSED(commandId) } + virtual void handleUserAction( qint32 commandId ) { Q_UNUSED(commandId) } virtual QItemSelectionModel * getSelectionModel() { return NULL ; } virtual void resetView() {} - virtual void initializeView(QAbstractItemModel *model) {Q_UNUSED(model)} + /* + * model - Model to retreive the initial set up data + * preView - previous view pointer to retrieve the mode , state information + */ + virtual void initializeView( QAbstractItemModel *model, GlxView *preView ) + { + Q_UNUSED( model ) + Q_UNUSED( preView ) + } + inline qint32 viewId() { return mId;} QSize screenSize(); QRect screenGeometry(); @@ -57,10 +66,9 @@ virtual ~GlxView() { } signals: - void actionTriggered(qint32 id); - void itemSpecificMenuTriggered(qint32,QPointF ); - void gridItemSelected(const QModelIndex &); - + void actionTriggered( qint32 id ); + void itemSpecificMenuTriggered( qint32,QPointF ); + void gridItemSelected( const QModelIndex &); private : qint32 mId; diff -r 863223ea6961 -r a0f57508af73 ui/viewutilities/settingutility/inc/glxsetting.h --- a/ui/viewutilities/settingutility/inc/glxsetting.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewutilities/settingutility/inc/glxsetting.h Sat Jul 10 00:59:39 2010 +0530 @@ -81,6 +81,18 @@ */ int slideShowEffectId( int index ) ; + /* + * Returns Current Media Wall 3D effect Status + * This value is fetched from Central repository + */ + int mediaWall3DEffect(); + + /* + * Set Media Wall 3D effect. True = 3D Effect On / False = 3D Effect Off + * This data will be written to the Central Repository + */ + void setmediaWall3DEffect( int index ); + protected : /* * Constructor @@ -109,6 +121,8 @@ XQSettingsKey *mMediumCenRepKey; XQSettingsKey *mFastCenRepKey; + XQSettingsKey *m3DEffectCenRepKey; + static GlxSetting mObj; }; diff -r 863223ea6961 -r a0f57508af73 ui/viewutilities/settingutility/inc/glxsettinginterface.h --- a/ui/viewutilities/settingutility/inc/glxsettinginterface.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewutilities/settingutility/inc/glxsettinginterface.h Sat Jul 10 00:59:39 2010 +0530 @@ -82,6 +82,19 @@ */ virtual int slideShowEffectId( int index ) = 0; + + /* + * Returns Current Media Wall 3D effect Status + * This value is fetched from Central repository + */ + virtual int mediaWall3DEffect() = 0 ; + + /* + * Set Media Wall 3D effect. True = 3D Effect On / False = 3D Effect Off + * This data will be written to the Central Repository + */ + virtual void setmediaWall3DEffect( int index ) = 0 ; + protected : /* * Constructor diff -r 863223ea6961 -r a0f57508af73 ui/viewutilities/settingutility/src/glxsetting.cpp --- a/ui/viewutilities/settingutility/src/glxsetting.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/viewutilities/settingutility/src/glxsetting.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -30,6 +30,7 @@ const TUint32 KGlxMeduim = 0x4; const TUint32 KGlxFast = 0x5; const TUint32 KGlxSlideShowEffect[ ] = { 0x6, 0x7, 0x8, 0x9 }; +const TUint32 KGlx3DEffect = 0xA; const TUint32 KCRUidGallery = 0x20007194; GlxSetting GlxSetting::mObj ; @@ -43,6 +44,7 @@ mSlowCenRepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxSlow ); mMediumCenRepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxMeduim ); mFastCenRepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlxFast ); + m3DEffectCenRepKey = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery ,KGlx3DEffect ); for ( int i = 0; i < NBR_SLIDESHOW_EFFECT; i++ ) { mSlideShowEffectCenRepKey[ i ] = new XQSettingsKey( XQSettingsKey::TargetCentralRepository, KCRUidGallery , KGlxSlideShowEffect[ i ] ); @@ -62,6 +64,7 @@ delete mTransitionDelayCenrepKey; delete mTransitionEffectCenrepKey; delete mSettingsManager; + delete m3DEffectCenRepKey; for ( int i = 0 ; i < NBR_SLIDESHOW_EFFECT ; i++ ) { delete mSlideShowEffectCenRepKey[ i ]; @@ -136,3 +139,16 @@ return mSettingsManager->readItemValue( * mSlideShowEffectCenRepKey[ index ] ).toInt() ; } +int GlxSetting::mediaWall3DEffect() +{ + QVariant effectvalue = mSettingsManager->readItemValue(*m3DEffectCenRepKey); + return effectvalue.toInt(); +} + +void GlxSetting::setmediaWall3DEffect( int index ) +{ + mSettingsManager->writeItemValue( *m3DEffectCenRepKey, index ) ; +} + + + diff -r 863223ea6961 -r a0f57508af73 ui/widgets/bwins/glxzoomwidgetu.def --- a/ui/widgets/bwins/glxzoomwidgetu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/widgets/bwins/glxzoomwidgetu.def Sat Jul 10 00:59:39 2010 +0530 @@ -39,4 +39,6 @@ ?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) + ?setZoomParams@GlxZoomWidget@@AAEXXZ @ 41 NONAME ; void GlxZoomWidget::setZoomParams(void) + ?forceZoomToBackground@GlxZoomWidget@@QAEXXZ @ 42 NONAME ; void GlxZoomWidget::forceZoomToBackground(void) diff -r 863223ea6961 -r a0f57508af73 ui/widgets/eabi/glxzoomwidgetu.def --- a/ui/widgets/eabi/glxzoomwidgetu.def Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/widgets/eabi/glxzoomwidgetu.def Sat Jul 10 00:59:39 2010 +0530 @@ -45,4 +45,6 @@ _ZThn8_N13GlxZoomWidgetD0Ev @ 44 NONAME _ZThn8_N13GlxZoomWidgetD1Ev @ 45 NONAME _ZN13GlxZoomWidget14modelDestroyedEv @ 46 NONAME + _ZN13GlxZoomWidget13setZoomParamsEv @ 47 NONAME + _ZN13GlxZoomWidget21forceZoomToBackgroundEv @ 48 NONAME diff -r 863223ea6961 -r a0f57508af73 ui/widgets/glxzoomwidget/inc/glxzoomwidget.h --- a/ui/widgets/glxzoomwidget/inc/glxzoomwidget.h Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/widgets/glxzoomwidget/inc/glxzoomwidget.h Sat Jul 10 00:59:39 2010 +0530 @@ -53,6 +53,7 @@ * This is an overloaded function when an index is changes due to deletion */ void indexChanged(); + void forceZoomToBackground(); signals: void pinchGestureReceived(int index); @@ -94,6 +95,8 @@ void finalizeWidgetTransform(); //get the focused image from the model QPixmap getFocusedImage(); + //set all the zoom parameters as per the circumstances + void setZoomParams(); //data members private: @@ -136,6 +139,8 @@ bool mPinchGestureOngoing; //to check if decoded image is available bool mDecodedImageAvailable; + //to check if the widget is actually in Foreground + bool mZoomOngoing; int mTimerId; }; diff -r 863223ea6961 -r a0f57508af73 ui/widgets/glxzoomwidget/src/glxzoomwidget.cpp --- a/ui/widgets/glxzoomwidget/src/glxzoomwidget.cpp Fri Jun 25 15:41:33 2010 +0530 +++ b/ui/widgets/glxzoomwidget/src/glxzoomwidget.cpp Sat Jul 10 00:59:39 2010 +0530 @@ -19,11 +19,12 @@ #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) +GlxZoomWidget::GlxZoomWidget(QGraphicsItem *parent):HbScrollArea(parent), mModel(NULL), mMinZValue(MINZVALUE), mMaxZValue(MAXZVALUE), mImageDecodeRequestSend(false), mPinchGestureOngoing(false), mDecodedImageAvailable(false),mZoomOngoing(false), mTimerId(0) { grabGesture(Qt::PinchGesture); grabGesture(Qt::TapGesture); @@ -83,11 +84,30 @@ mWindowSize = windowSize; mBlackBackgroundItem->setGeometry(QRectF(QPointF(0,0), mWindowSize)); //try to reset the max and min zoomed size here + //In case the zoom widget is in background reset it + if(!mZoomOngoing && mModel) { + retreiveFocusedImage(); + } + setZoomParams(); +} + +void GlxZoomWidget::forceZoomToBackground() +{ + mBlackBackgroundItem->hide(); + //push the widget back to background + setZValue(mMinZValue); + mZoomOngoing = false; + emit zoomWidgetMovedBackground(mFocusIndex); + //this actually resets the ZoomWidget and decoder + if(mImageDecoder) { + mImageDecoder->resetDecoder(); + } + retreiveFocusedImage(); + } void GlxZoomWidget::indexChanged(int index) { - Q_UNUSED(index); if(mFocusIndex != index) { mImageDecoder->resetDecoder();//reset the decoder first to cancel pending tasks mImageDecodeRequestSend = false; @@ -162,7 +182,7 @@ else { killTimer(mTimerId); mTimerId = 0; - animateZoomOut(gesture->position()); + animateZoomOut(hbInstance->allMainWindows().first()->mapToScene(gesture->position().toPoint())); } } event->accept(gesture); @@ -173,6 +193,7 @@ QPinchGesture::ChangeFlags changeFlags = pinchG->changeFlags(); if (changeFlags & QPinchGesture::ScaleFactorChanged) { mPinchGestureOngoing = true; + mZoomOngoing = true; //bring the zoom widget to foreground setZValue(mMaxZValue); //show the black background @@ -184,7 +205,7 @@ 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); + QPointF sceneGestureCenter = hbInstance->allMainWindows().first()->mapToScene(center.toPoint()); zoomImage(value, sceneGestureCenter); } @@ -211,6 +232,7 @@ mBlackBackgroundItem->hide(); //push the widget back to background setZValue(mMinZValue); + mZoomOngoing = false; emit zoomWidgetMovedBackground(mFocusIndex); //do not reset the transform here as it will then zoom-in the widget to decoded image size } @@ -228,6 +250,10 @@ void GlxZoomWidget::zoomImage(qreal zoomFactor, QPointF center) { + // Pinch event filtering for very small zoom factors + if (qAbs(1.0 - zoomFactor) < 0.007) { + return; + } adjustGestureCenter(center, zoomFactor); QSizeF requiredSize(mCurrentSize.width()*zoomFactor, mCurrentSize.height()*zoomFactor); limitRequiredSize(requiredSize); @@ -279,42 +305,49 @@ } //maintains the boundary of the edges for zoom out conditions - if(zoomFactor < 1) - { + 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) { + if(hasWidthExceededWindow) { + bool hasItemCrossedBoundary = false; + if(itemOriginPos.x() >= -5) { + //image has crossed left boundry leaving blank space //stick the gesture to the left corner gestureCenter.setX(itemOriginPos.x()); + hasItemCrossedBoundary = true; + } + + //Check if the right boundry can be adjusted + if(itemOriginPos.x()+ mCurrentSize.width() <= mWindowSize.width()+5) { + //Image is before the right boundry leaving blank space + gestureCenter.setX(itemOriginPos.x()+ mCurrentSize.width() ); + hasItemCrossedBoundary = true; + } + if((mCurrentSize.width() - mWindowSize.width() <= 20) && !hasItemCrossedBoundary) { + gestureCenter.setX(mWindowSize.width()/2 + (qAbs(itemOriginPos.x()) - 10)); } } - //Check if the right boundry can be adjusted - if(itemOriginPos.x()+ mCurrentSize.width() <= mWindowSize.width()) { + + if(hasHeightExceededWindow) { + bool hasItemCrossedBoundary = false; + //check if the upper boundry could be adjusted + if(itemOriginPos.y() >= -5) { + //image has crossed the upper boundry leaving blank space + //stick the image to the upper boundry + gestureCenter.setY(itemOriginPos.y()); + hasItemCrossedBoundary = true; + } + //check if the lower boundry could be adjusted + if(itemOriginPos.y()+ mCurrentSize.height() <= mWindowSize.height()+5) { //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()); + hasItemCrossedBoundary = true; } - + if((mCurrentSize.height() - mWindowSize.height() <= 20) && !hasItemCrossedBoundary) { + gestureCenter.setY(mWindowSize.height()/2 + (qAbs(itemOriginPos.y()) - 10)); + } } } //control the zoom Factor to boundaries @@ -460,14 +493,35 @@ } +void GlxZoomWidget::setZoomParams() +{ + if (mModel) { + QVariant sizeVariant = mModel->data(mModel->index(mFocusIndex,0),GlxDimensionsRole); + QSize fsSize; + if(sizeVariant.isValid() && sizeVariant.canConvert ()) { + fsSize = sizeVariant.toSize(); + if(!(fsSize.width() < mWindowSize.width() && fsSize.height() < mWindowSize.height())) { + fsSize.scale( mWindowSize, Qt::KeepAspectRatio); + } + mMaxScaleSize = fsSize; + mMaxScaleSize.scale(mWindowSize*13, Qt::KeepAspectRatio); + mMaxScaleDecSize = fsSize; + mMaxScaleDecSize.scale(mWindowSize*7, Qt::KeepAspectRatio); + mMinScaleSize = fsSize* 0.7; + mMinDecScaleSize = fsSize; + } + } +} + void GlxZoomWidget::animateZoomIn(QPointF animRefPoint) { emit pinchGestureReceived(mFocusIndex); //bring the zoom widget to foreground + mZoomOngoing = true; setZValue(mMaxZValue); //show the black background mBlackBackgroundItem->setParentItem(parentItem()); @@ -510,6 +564,7 @@ mBlackBackgroundItem->hide(); //push the widget back to background setZValue(mMinZValue); + mZoomOngoing = false; emit zoomWidgetMovedBackground(mFocusIndex); //do not reset the transform here as it will then zoom-in the widget to decoded image size }