Coding Idioms changes
authorchitta ranjan <chitta.rs@samsung.com>
Fri, 12 Apr 2013 11:32:45 +0000 (20:32 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Fri, 12 Apr 2013 11:32:45 +0000 (20:32 +0900)
Change-Id: I4ba72e662f782a496ae1696c13cbb2219761efc1
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
25 files changed:
inc/IvBaseForm.h
inc/IvImageEventArg.h
inc/IvImageInfo.h
inc/IvImageProvider.h
inc/IvImageViewerApp.h
inc/IvImageViewerForm.h
inc/IvImageViewerPresentationModel.h
inc/IvSettingPresentationModel.h
inc/IvTypes.h
src/IvCommonUtil.cpp
src/IvFormFactory.cpp
src/IvImageCropForm.cpp
src/IvImageEvent.cpp
src/IvImageEventArg.cpp
src/IvImageInfo.cpp
src/IvImageNameEditorForm.cpp
src/IvImageProvider.cpp
src/IvImageViewerApp.cpp
src/IvImageViewerEntry.cpp
src/IvImageViewerForm.cpp
src/IvImageViewerPresentationModel.cpp
src/IvMainFrame.cpp
src/IvResourceManager.cpp
src/IvSettingPresentationModel.cpp
src/IvTypes.cpp

index c455e33..0b4d3ce 100644 (file)
 // limitations under the License.
 //
 
+/**
+ * @file               IvBaseForm.h
+ * @brief              This is the header file for BaseForm class.
+ */
+
 #include <FUi.h>
 
 #ifndef _IV_BASE_FORM_H_
index 9d1a6e5..54123ec 100644 (file)
@@ -35,8 +35,8 @@ public:
        Tizen::Graphics::Bitmap* GetBitmapN(void) const;
 
 protected:
-       Tizen::Base::String __filePath;
-       Tizen::Graphics::Bitmap* __pBitmap;
+       Tizen::Base::String _filePath;
+       Tizen::Graphics::Bitmap* _pBitmap;
 };
 
 #endif /* _IV_IMAGE_EVENT_ARG_H_ */
index 6322bbf..9f14559 100644 (file)
@@ -32,7 +32,7 @@ public:
        ImageInfo(void);
        virtual ~ImageInfo(void);
 
-       void Construct(const Tizen::Base::String& pFilePath, Tizen::Graphics::Bitmap* pBitmap);
+       void Construct(const Tizen::Base::String& filePath, Tizen::Graphics::Bitmap* pBitmap);
 
        Tizen::Base::String GetFilePath(void) const;
        void SetFilePath(const Tizen::Base::String& filePath);
@@ -40,9 +40,9 @@ public:
        void SetBitmap(Tizen::Graphics::Bitmap* pBitmap);
        void ClearBitmap(void);
 
-protected :
-       Tizen::Base::String __pFilePath;
-       Tizen::Graphics::Bitmap* __pBitmap;
+protected:
+       Tizen::Base::String _filePath;
+       Tizen::Graphics::Bitmap* _pBitmap;
 };
 
 #endif /* _IV_IMAGE_INFO_H_ */
index e162352..438d389 100644 (file)
@@ -31,30 +31,28 @@ class ImageProvider
        : public Tizen::Base::Runtime::EventDrivenThread
 {
 public:
-       static ImageProvider* GetInstance(void);
-
-public:
-       static void Release(void);
-
-       void RequestImage(const Tizen::Base::String& filePath, const ImageEvent* event);
-       void ClearImageRequests(bool appTerminating = false);
+       void RequestImage(const Tizen::Base::String& filePath, const ImageEvent* pRequestEvent);
+       void ClearImageRequests(bool isAppTerminating = false);
 
        virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList * pArgs);
        virtual bool OnStart(void);
        virtual void OnStop(void);
 
+       static ImageProvider* GetInstance(void);
+       static void Release(void);
+
 private:
        ImageProvider(void);
-       virtual ~ImageProvider(void);
        ImageProvider(ImageProvider& value);
        ImageProvider& operator=(ImageProvider&);
+       virtual ~ImageProvider(void);
 
        result Construct(void);
+       Tizen::Graphics::Bitmap* GetImageByDecodeN(const Tizen::Base::String& filePath) const;
+
        static void CreateInstance(void);
        static void DestroyInstance(void);
 
-       Tizen::Graphics::Bitmap* GetImageByDecodeN(const Tizen::Base::String& filePath) const;
-
 private:
        static ImageProvider* __pImageProviderInstance;
        static Tizen::Base::Collection::ArrayList* __pImageEventListener;
@@ -62,7 +60,7 @@ private:
        Tizen::Base::Runtime::Mutex* __pMutexCmd;
        Tizen::Base::Collection::ArrayList* __pCmdQueue;
        unsigned long __requestId;
-       bool __appTerminating;
+       bool __isAppTerminating;
 };
 
 #endif /* _IV_IMAGE_PROVIDER_H_ */
index 6ce020a..52b6df5 100644 (file)
@@ -41,10 +41,11 @@ public:
        Tizen::Base::String GetAppControlOperationId(void) const;
        Tizen::Base::String GetUriData(void) const;
        const Tizen::Base::Collection::IMap* GetAppControlArguments(void) const;
+       void SetFrameEnabled(bool isEnabled);
 
        virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
        virtual bool OnAppInitialized(void);
-       virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
+       virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool isForcedTermination = false);
        virtual void OnForeground(void);
 
        virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId,
@@ -55,8 +56,6 @@ public:
 
        virtual void OnSettingChanged(Tizen::Base::String& key);
 
-       void SetFrameEnabled(bool enabled);
-
        void SendAppControlResult(const Tizen::App::AppCtrlResult appControlResult,
                        const Tizen::Base::Collection::IMap* pExtraData);
 
index 1036bf9..53c1841 100644 (file)
@@ -45,26 +45,26 @@ class SettingPresentationModel;
 
 class ImageViewerForm
        : public BaseForm
+       , public IImageViewerEventListener
+       , public IFileUpdateEventListener
+       , public ISlideSettingListener
        , public Tizen::App::IAppControlResponseListener
        , public Tizen::Base::Runtime::ITimerEventListener
        , public Tizen::Content::IContentTransferListener
        , public Tizen::Media::IImageDecodeUrlEventListener
-       , public Tizen::Ui::IActionEventListener
-       , public Tizen::Ui::IOrientationEventListener
-       , public Tizen::Ui::IScrollPanelEventListener
        , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::Ui::Controls::IGalleryEventListener
        , public Tizen::Ui::Controls::IGalleryItemProvider
+       , public Tizen::Ui::IActionEventListener
+       , public Tizen::Ui::IOrientationEventListener
+       , public Tizen::Ui::IScrollPanelEventListener
        , public Tizen::Ui::Scenes::ISceneEventListener
-       , public IImageViewerEventListener
-       , public IFileUpdateEventListener
-       , public ISlideSettingListener
 {
 public:
        ImageViewerForm(void);
        virtual ~ImageViewerForm(void);
 
-       result Initialize();
+       result Initialize(void);
 
        virtual result OnInitializing(void);
        virtual result OnInitialized(void);
@@ -151,9 +151,9 @@ private:
        result InitializeContextMenuShare(void);
 
        result InitializeSliderPanel(void);
-       result ShowPanelDetail(bool showStatus);
+       result ShowPanelDetail(bool isShowStatus);
        result ChangeFooterItem(bool isChanged, Tizen::Ui::Controls::Footer* pFooter, int position);
-       long long GetFileSize(Tizen::Base::String filePath);
+       long long GetFileSize(Tizen::Base::String filePath) const;
        void GetLabelText(int index, Tizen::Base::String& page);
        void DownloadFile(void);
        void RotateImage(Tizen::Base::String& filePath, RotateMode rotateMode);
@@ -164,7 +164,7 @@ private:
        void OnRequestMessagesAction(void);
 
        void SetFooterItemState(bool isEnable);
-       Tizen::Graphics::Bitmap* GetQuickThumbnailN(Tizen::Base::String& fileName);
+       Tizen::Graphics::Bitmap* GetQuickThumbnailN(Tizen::Base::String& fileName) const;
 
        void CreateShuffledList(int count);
        void SlideShowStopped(int index);
@@ -190,11 +190,11 @@ private:
        Tizen::Ui::Controls::ContextMenu* __pContextMenuSetAs;
        Tizen::Ui::Controls::ContextMenu* __pContextMenuShare;
        Tizen::Ui::Controls::Popup* __pDeletePopup;
-       bool __visible;
-       bool __detail;
-       bool __startSlide;
-       bool __shuffle;
-       Tizen::Base::String __downLordFileName;
+       bool __isVisible;
+       bool __isDetail;
+       bool __isStartSlide;
+       bool __isShuffle;
+       Tizen::Base::String __downloadFileName;
        RequestId __requestId;
        Tizen::Content::ContentTransfer __contentTransfer;
        SlideShowPopUp* __pPopUp;
index 112ae54..19ea783 100644 (file)
@@ -48,17 +48,17 @@ public:
        static ImageViewerPresentationModel* GetInstance();
 
 public:
-       result AddListener(IImageViewerEventListener* listener);
+       result AddListener(IImageViewerEventListener* pListener);
        result RemoveListener(IImageViewerEventListener& listner);
 
-       result AddFileUpdateListener(IFileUpdateEventListener* listener);
+       result AddFileUpdateListener(IFileUpdateEventListener* pListener);
        result RemoveFileUpdateListener(IFileUpdateEventListener& listner);
 
-       void ClearImageRequests(bool appTerminating = false);
+       void ClearImageRequests(bool isAppTerminating = false);
        void DeleteFilePathAt(const int index);
        void UpdateFilePathAt(const int index, const Tizen::Base::String& filePath);
        Tizen::Base::String GetFilePathAt(const int index) const;
-       Tizen::Base::Collection::ArrayList* GetImageCache() const;
+       Tizen::Base::Collection::ArrayList* GetImageCache(void) const;
        ImageInfo* GetImageCacheAt(const int index) const;
        void AddImageCache(const Tizen::Base::String& filePath);
 
@@ -66,7 +66,7 @@ public:
        Tizen::Base::String GetType(void) const;
        int GetStartIndex(void) const;
 
-       Tizen::Base::String GetFileName(const Tizen::Base::String& filePath, bool checkExe = false) const;
+       Tizen::Base::String GetFileName(const Tizen::Base::String& filePath, bool isCheckExe = false) const;
        void RequestImage(const Tizen::Base::String& filePath) const;
        Tizen::Content::ContentId GetFileContentId(const Tizen::Base::String& filePath) const;
 
@@ -96,7 +96,7 @@ private:
        static void CreateInstance(void);
        static void DestroyInstance(void);
 
-       void LoadSettingValue();
+       void LoadSettingValue(void);
        int GetImageCacheIndex(const Tizen::Base::String& );
 
 private:
@@ -113,10 +113,10 @@ private:
        SlideShowTransitionEffect __transitionEffectOfSlideShow;
        Tizen::Content::ContentManager* __pCntMgr;
        SettingPresentationModel* __pSettingPresentationModel;
-       bool __ivTriggeredEvent;
+       bool __isIvTriggeredEvent;
        short __contentFileEventType;
        Tizen::Content::ContentId __contentId;
-       bool __ivTriggeredDeleteEvent;
+       bool __isIvTriggeredDeleteEvent;
 };
 
 #endif /* _IV_VIEWER_PRESENTATION_MODEL_H_ */
index d0e7811..d15aaeb 100644 (file)
 class SettingPresentationModel
 {
 public:
-       static SettingPresentationModel* GetInstance(void);
-
-public:
        result GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName,
                        int& value) const;
        result GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName,
                        Tizen::Base::String& value) const;
 
+       static SettingPresentationModel* GetInstance(void);
+
 private:
        SettingPresentationModel(void);
        virtual ~SettingPresentationModel(void);
        SettingPresentationModel(SettingPresentationModel& value);
-       SettingPresentationModel& operator = (SettingPresentationModel&);
 
        result Construct(void);
+       result CreateDefaultRegistry(void);
+
        static void CreateInstance(void);
        static void DestroyInstance(void);
 
-       result CreateDefaultRegistry(void);
+       SettingPresentationModel& operator = (SettingPresentationModel&);
 
 private:
        static SettingPresentationModel* __pPresentationModelInstance;
index 09c7b31..66c4fed 100644 (file)
@@ -39,32 +39,32 @@ enum SetterPressedStatus
 
 enum ActionID
 {
-         ACTION_ID_FORM_IMAGE = 101
-       , ACTION_ID_BUTTON_EDITFIELD_CANCEL = 201
-       , ACTION_ID_BUTTON_EDITFIELD_SAVE = 202
-       , ACTION_ID_CONTEXTMENU_CALLER = 301
-       , ACTION_ID_CONTEXTMENU_COPY = 302
-       , ACTION_ID_CONTEXTMENU_EMAIL = 303
-       , ACTION_ID_CONTEXTMENU_MESSAGE = 304
-       , ACTION_ID_CONTEXTMENU_HOME = 305
-       , ACTION_ID_CONTEXTMENU_LOCK = 306
-       , ACTION_ID_CONTEXTMENU_SET_AS = 307
-       , ACTION_ID_CONTORL_BUTTON_PLAY = 308
-       , ACTION_ID_DELETE_POPUP_CANCEL = 401
-       , ACTION_ID_DELETE_POPUP_DEL = 402
-       , ACTION_ID_FOOTER_BUTTON_BACK = 403
-       , ACTION_ID_FOOTER_BUTTON_DOWNLOAD = 404
-       , ACTION_ID_FOOTER_BUTTON_DELETE = 405
-       , ACTION_ID_FOOTER_BUTTON_DETAILS = 406
-       , ACTION_ID_FOOTER_BUTTON_SLIDE = 407
-       , ACTION_ID_FOOTER_BUTTON_SHARE = 408
-       , ACTION_ID_FOOTER_BUTTON_SAVE = 409
-       , ACTION_ID_FOOTER_BUTTON_CROP = 412
-       , ACTION_ID_FOOTER_BUTTON_ROTATE_LEFT = 413
-       , ACTION_ID_FOOTER_BUTTON_ROTATE_RIGHT = 414
-       , ACTION_ID_FOOTER_MORE = 501
-       , ACTION_ID_PANEL_HEADER_DETAILS_RENAME = 601
-       , ACTION_ID_CONTEXTMENU_HOME_AND_LOCK = 602
+         IDA_FORM_IMAGE = 101
+       , IDA_BUTTON_EDITFIELD_CANCEL = 201
+       , IDA_BUTTON_EDITFIELD_SAVE = 202
+       , IDA_CONTEXTMENU_CALLER = 301
+       , IDA_CONTEXTMENU_COPY = 302
+       , IDA_CONTEXTMENU_EMAIL = 303
+       , IDA_CONTEXTMENU_MESSAGE = 304
+       , IDA_CONTEXTMENU_HOME = 305
+       , IDA_CONTEXTMENU_LOCK = 306
+       , IDA_CONTEXTMENU_SET_AS = 307
+       , IDA_CONTORL_BUTTON_PLAY = 308
+       , IDA_DELETE_POPUP_CANCEL = 401
+       , IDA_DELETE_POPUP_DEL = 402
+       , IDA_FOOTER_BUTTON_BACK = 403
+       , IDA_FOOTER_BUTTON_DOWNLOAD = 404
+       , IDA_FOOTER_BUTTON_DELETE = 405
+       , IDA_FOOTER_BUTTON_DETAILS = 406
+       , IDA_FOOTER_BUTTON_SLIDE = 407
+       , IDA_FOOTER_BUTTON_SHARE = 408
+       , IDA_FOOTER_BUTTON_SAVE = 409
+       , IDA_FOOTER_BUTTON_CROP = 412
+       , IDA_FOOTER_BUTTON_ROTATE_LEFT = 413
+       , IDA_FOOTER_BUTTON_ROTATE_RIGHT = 414
+       , IDA_FOOTER_MORE = 501
+       , IDA_PANEL_HEADER_DETAILS_RENAME = 601
+       , IDA_CONTEXTMENU_HOME_AND_LOCK = 602
 };
 
 enum SlideShowTransitionEffect
@@ -210,8 +210,8 @@ extern const wchar_t* DEVICE_STORAGE_CARD_UNMOUNTED;
 
 extern const wchar_t* MEDIA_ROOT_PHONE;
 
-extern const int FOOTER_PANEL_HEIGHT;
-extern const int INDICATOR_BAR_HEIGHT;
-extern const int CROP_RECTANGLE_HEIGHT;
+extern const int H_FOOTER_PANEL;
+extern const int H_INDICATOR_BAR;
+extern const int H_CROP_RECTANGLE;
 
 #endif /* _IV_TYPES_H_ */
index a427707..b5c90e5 100644 (file)
@@ -30,6 +30,7 @@ ImageViewerMediaType
 CommonUtil::GetMediaType(const String& filePath)
 {
        AppLogDebug("Enter");
+
        ImageViewerMediaType mediaType = IMAGE_VIEWER_MEDIA_TYPE_OTHER;
 
        ContentType contentType = ContentManagerUtil::CheckContentType(filePath);
@@ -46,6 +47,7 @@ CommonUtil::GetMediaType(const String& filePath)
        {
                String tempPath = filePath;
                tempPath.ToLowerCase();
+               
                if (    tempPath.EndsWith(CONTENT_EXT_JPG)
                        || tempPath.EndsWith(CONTENT_EXT_PNG)
                        || tempPath.EndsWith(CONTENT_EXT_BMP)
@@ -67,6 +69,7 @@ CommonUtil::GetMediaType(const String& filePath)
                        mediaType = IMAGE_VIEWER_MEDIA_TYPE_VIDEO;
                }
        }
+
        AppLogDebug("EXIT(%s) mediaType(%d)", GetErrorMessage(GetLastResult()), mediaType);
 
        return mediaType;
@@ -76,7 +79,9 @@ Bitmap*
 CommonUtil::CloneBitmapN(const Bitmap& bitmap)
 {
        AppLogDebug("Enter");
+
        Bitmap* pResultBitmap = null;
+
        if (&bitmap != null)
        {
                Rectangle mainRect(0, 0, bitmap.GetWidth(), bitmap.GetHeight());
@@ -86,6 +91,8 @@ CommonUtil::CloneBitmapN(const Bitmap& bitmap)
                pResultBitmap = new (std::nothrow) Bitmap();
                pResultBitmap->Construct(mainCanvas, mainRect);
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
        return pResultBitmap;
 }
index f699411..8190923 100644 (file)
@@ -44,11 +44,13 @@ Form*
 FormFactory::CreateFormN(const String& formId, const SceneId& sceneId)
 {
        AppLogDebug("ENTER");
+
        Form* pNewForm = null;
 
        if (formId == FORM_IMAGE_VIEWER)
        {
                ImageViewerForm* pForm = new (std::nothrow) ImageViewerForm();
+
                pForm->Initialize();
                SceneManager::GetInstance()->AddSceneEventListener(sceneId, *pForm);
                pNewForm = pForm;
@@ -63,10 +65,12 @@ FormFactory::CreateFormN(const String& formId, const SceneId& sceneId)
        else if (formId == FORM_IMAGE_NAME_EDITOR)
        {
                ImageNameEditorForm* pForm = new (std::nothrow) ImageNameEditorForm();
+
                pForm->Initialize();
                SceneManager::GetInstance()->AddSceneEventListener(sceneId, *pForm);
                pNewForm = pForm;
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return pNewForm;
index f11648a..d3f0e83 100644 (file)
@@ -224,14 +224,14 @@ ImageCropForm::OnDraw(void)
                r = __pCanvas->SetLineWidth(CROP_BOX_LINE_WIDTH);
                r = __pCanvas->DrawBitmap(Rectangle(__imageBox.x, __imageBox.y, __imageBox.width, __imageBox.height), *__pCurrentBitmap);
                r = __pCanvas->DrawRectangle(Rectangle(__cropBox.x, __cropBox.y, __cropBox.width, __cropBox.height));
-               r = __pCanvas->DrawBitmap(Rectangle((__cropBox.x + __cropBox.width / 2) - (CROP_RECTANGLE_HEIGHT / 2), __cropBox.y - (CROP_RECTANGLE_HEIGHT / 2), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Top Rectangle
-               r = __pCanvas->DrawBitmap(Rectangle((__cropBox.x + __cropBox.width / 2) - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Bottom Rectangle
-               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height / 2) - (CROP_RECTANGLE_HEIGHT / 2), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); //Left Rectangle
-               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height / 2) - (CROP_RECTANGLE_HEIGHT / 2), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); //Right Rectangle
-               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2), __cropBox.y - (CROP_RECTANGLE_HEIGHT / 2), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Top Left Rectangle
-               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2), __cropBox.y - (CROP_RECTANGLE_HEIGHT / 2), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Top Right Rectangle
-               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Bottom Right Rectangle
-               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2), (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)), CROP_RECTANGLE_HEIGHT, CROP_RECTANGLE_HEIGHT), *__pRectangleBitmap); // Bottom Left Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle((__cropBox.x + __cropBox.width / 2) - (H_CROP_RECTANGLE / 2), __cropBox.y - (H_CROP_RECTANGLE / 2), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); // Top Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle((__cropBox.x + __cropBox.width / 2) - (H_CROP_RECTANGLE / 2), (__cropBox.y + __cropBox.height - (H_CROP_RECTANGLE / 2)), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); // Bottom Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (H_CROP_RECTANGLE / 2), (__cropBox.y + __cropBox.height / 2) - (H_CROP_RECTANGLE / 2), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); //Left Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (H_CROP_RECTANGLE / 2), (__cropBox.y + __cropBox.height / 2) - (H_CROP_RECTANGLE / 2), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); //Right Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (H_CROP_RECTANGLE / 2), __cropBox.y - (H_CROP_RECTANGLE / 2), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); // Top Left Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (H_CROP_RECTANGLE / 2), __cropBox.y - (H_CROP_RECTANGLE / 2), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); // Top Right Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x + __cropBox.width - (H_CROP_RECTANGLE / 2), (__cropBox.y + __cropBox.height - (H_CROP_RECTANGLE / 2)), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); // Bottom Right Rectangle
+               r = __pCanvas->DrawBitmap(Rectangle(__cropBox.x - (H_CROP_RECTANGLE / 2), (__cropBox.y + __cropBox.height - (H_CROP_RECTANGLE / 2)), H_CROP_RECTANGLE, H_CROP_RECTANGLE), *__pRectangleBitmap); // Bottom Left Rectangle
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
        return r;
@@ -440,7 +440,7 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
                {
                case INSIDE_TOP_RECTANGLE:
                {
-                       if ((__cropBox.y + deltaY) > __imageBox.y && deltaY < (__cropBox.height - (CROP_RECTANGLE_HEIGHT * 3)))
+                       if ((__cropBox.y + deltaY) > __imageBox.y && deltaY < (__cropBox.height - (H_CROP_RECTANGLE * 3)))
                        {
                                __cropBox.y += deltaY;
                                __cropBox.height -= deltaY;
@@ -451,7 +451,7 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
                case INSIDE_BOTTOM_RECTANGLE:
                {
                        if ((__cropBox.y + __cropBox.height + deltaY) < (__imageBox.y + __imageBox.height)
-                               && (__cropBox.height + deltaY) > (CROP_RECTANGLE_HEIGHT * 3))
+                               && (__cropBox.height + deltaY) > (H_CROP_RECTANGLE * 3))
                        {
                                __cropBox.height += deltaY;
                        }
@@ -460,7 +460,7 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
 
                case INSIDE_LEFT_RECTANGLE:
                {
-                       if ((__cropBox.x + deltaX) > __imageBox.x && deltaX < __cropBox.width - (CROP_RECTANGLE_HEIGHT * 3))
+                       if ((__cropBox.x + deltaX) > __imageBox.x && deltaX < __cropBox.width - (H_CROP_RECTANGLE * 3))
                        {
                                __cropBox.x += deltaX;
                                __cropBox.width -= deltaX;
@@ -471,7 +471,7 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
                case INSIDE_RIGHT_RECTANGLE:
                {
                        if ((__cropBox.x + __cropBox.width + deltaX) < (__imageBox.x + __imageBox.width)
-                               && __cropBox.width + deltaX > (CROP_RECTANGLE_HEIGHT * 3))
+                               && __cropBox.width + deltaX > (H_CROP_RECTANGLE * 3))
                        {
                                __cropBox.width += deltaX;
                        }
@@ -480,8 +480,8 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
 
                case INSIDE_TOP_LEFT_RECTANGLE:
                {
-                       if ((__cropBox.y + deltaY) > __imageBox.y && deltaY < (__cropBox.height - (CROP_RECTANGLE_HEIGHT * 3))
-                                       && (__cropBox.x + deltaX) > __imageBox.x && deltaX < __cropBox.width - (CROP_RECTANGLE_HEIGHT * 3))
+                       if ((__cropBox.y + deltaY) > __imageBox.y && deltaY < (__cropBox.height - (H_CROP_RECTANGLE * 3))
+                                       && (__cropBox.x + deltaX) > __imageBox.x && deltaX < __cropBox.width - (H_CROP_RECTANGLE * 3))
                        {
                                __cropBox.y += deltaY;
                                __cropBox.height -= deltaY;
@@ -493,8 +493,8 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
 
                case INSIDE_TOP_RIGHT_RECTANGLE:
                {
-                       if ((__cropBox.y + deltaY) > __imageBox.y && deltaY < (__cropBox.height - (CROP_RECTANGLE_HEIGHT * 3))
-                                       && (__cropBox.x + __cropBox.width + deltaX) < (__imageBox.x + __imageBox.width) && __cropBox.width + deltaX > (CROP_RECTANGLE_HEIGHT * 3))
+                       if ((__cropBox.y + deltaY) > __imageBox.y && deltaY < (__cropBox.height - (H_CROP_RECTANGLE * 3))
+                                       && (__cropBox.x + __cropBox.width + deltaX) < (__imageBox.x + __imageBox.width) && __cropBox.width + deltaX > (H_CROP_RECTANGLE * 3))
                        {
                                __cropBox.width += deltaX;
                                __cropBox.y += deltaY;
@@ -505,8 +505,8 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
 
                case INSIDE_BOTTOM_LEFT_RECTANGLE:
                {
-                       if ((__cropBox.y + __cropBox.height + deltaY) < (__imageBox.y + __imageBox.height) && (__cropBox.height + deltaY) > (CROP_RECTANGLE_HEIGHT * 3)
-                               && (__cropBox.x + deltaX) > __imageBox.x && deltaX < __cropBox.width - (CROP_RECTANGLE_HEIGHT * 3))
+                       if ((__cropBox.y + __cropBox.height + deltaY) < (__imageBox.y + __imageBox.height) && (__cropBox.height + deltaY) > (H_CROP_RECTANGLE * 3)
+                               && (__cropBox.x + deltaX) > __imageBox.x && deltaX < __cropBox.width - (H_CROP_RECTANGLE * 3))
                        {
                                __cropBox.x += deltaX;
                                __cropBox.width -= deltaX;
@@ -517,8 +517,8 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
 
                case INSIDE_BOTTOM_RIGHT_RECTANGLE:
                {
-                       if ((__cropBox.x + __cropBox.width + deltaX) < (__imageBox.x + __imageBox.width) && __cropBox.width + deltaX > (CROP_RECTANGLE_HEIGHT * 3)
-                               && (__cropBox.y + __cropBox.height + deltaY) < (__imageBox.y + __imageBox.height) && (__cropBox.height + deltaY) > (CROP_RECTANGLE_HEIGHT * 3))
+                       if ((__cropBox.x + __cropBox.width + deltaX) < (__imageBox.x + __imageBox.width) && __cropBox.width + deltaX > (H_CROP_RECTANGLE * 3)
+                               && (__cropBox.y + __cropBox.height + deltaY) < (__imageBox.y + __imageBox.height) && (__cropBox.height + deltaY) > (H_CROP_RECTANGLE * 3))
                        {
                                __cropBox.width += deltaX;
                                __cropBox.height += deltaY;
@@ -567,11 +567,11 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
                        int temp = __cropBox.height;
                        int height = (__formHeight * (__cropBox.width - (2 * deltaX))) /__formWidth;
                        temp = height - temp;
-                       if ((__cropBox.width - (2 * deltaX) > (CROP_RECTANGLE_HEIGHT * 3)) && (!(height >= __imageBox.height || (__cropBox.width - (2 * deltaX)) >= __imageBox.width)))
+                       if ((__cropBox.width - (2 * deltaX) > (H_CROP_RECTANGLE * 3)) && (!(height >= __imageBox.height || (__cropBox.width - (2 * deltaX)) >= __imageBox.width)))
                        {
                                if (__cropBox.x + deltaX >= __imageBox.x && __cropBox.x + __cropBox.width - deltaX <= __imageBox.x + __imageBox.width
                                        && __cropBox.y - (temp / 2) >= __imageBox.y && __cropBox.y + __cropBox.height + (temp / 2) < __imageBox.y + __imageBox.height
-                                       && (__cropBox.width - (2 * deltaX) > (CROP_RECTANGLE_HEIGHT * 3)))
+                                       && (__cropBox.width - (2 * deltaX) > (H_CROP_RECTANGLE * 3)))
                                {
                                        __cropBox.x += deltaX;
                                        __cropBox.width = __cropBox.width - (2 * deltaX);
@@ -619,9 +619,9 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
                        int temp = __cropBox.height;
                        int height = (__formHeight * (__cropBox.width - (2 * deltaX))) / __formWidth;
                        temp = height - temp;
-                       if ((__cropBox.width - (2 * deltaX) > (CROP_RECTANGLE_HEIGHT * 3)) && (!(height >= __imageBox.height || (__cropBox.width - (2 * deltaX)) >= __imageBox.width)))
+                       if ((__cropBox.width - (2 * deltaX) > (H_CROP_RECTANGLE * 3)) && (!(height >= __imageBox.height || (__cropBox.width - (2 * deltaX)) >= __imageBox.width)))
                        {
-                               if (deltaX < __cropBox.width - (CROP_RECTANGLE_HEIGHT * 3))
+                               if (deltaX < __cropBox.width - (H_CROP_RECTANGLE * 3))
                                {
                                        if (__cropBox.x + deltaX > __imageBox.x && __cropBox.x + __cropBox.width - deltaX <= __imageBox.x + __imageBox.width
                                                && __cropBox.y - (temp / 2) > __imageBox.y && __cropBox.y + __cropBox.height + (temp / 2) < __imageBox.y + __imageBox.height)
@@ -686,7 +686,7 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
                        int temp = __cropBox.width;
                        int width = (__formWidth * (__cropBox.height - (2 * deltaY))) / __formHeight;
                        temp = width - temp;
-                       if (__cropBox.height - (2 * deltaY) > (__formHeight * (CROP_RECTANGLE_HEIGHT * 3)) / __formWidth && (!(__cropBox.height - (2 * deltaY) >= __imageBox.height || width >= __imageBox.width)))
+                       if (__cropBox.height - (2 * deltaY) > (__formHeight * (H_CROP_RECTANGLE * 3)) / __formWidth && (!(__cropBox.height - (2 * deltaY) >= __imageBox.height || width >= __imageBox.width)))
                        {
                                if (__cropBox.x - (temp /2 ) > __imageBox.x && __cropBox.x + __cropBox.width + temp < __imageBox.x + __imageBox.width
                                        && __cropBox.y + (deltaY) > __imageBox.y && __cropBox.y + __cropBox.height - (2 * deltaY) < __imageBox.y + __imageBox.height)
@@ -750,7 +750,7 @@ ImageCropForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graph
                        int temp = __cropBox.width;
                        int width = (__formWidth * (__cropBox.height - (2 * deltaY))) / __formHeight;
                        temp = width - temp;
-                       if (__cropBox.height - (2 * deltaY) > (__formHeight * (CROP_RECTANGLE_HEIGHT * 3)) / __formWidth && (!(__cropBox.height - (2 * deltaY) >= __imageBox.height || width >= __imageBox.width)))
+                       if (__cropBox.height - (2 * deltaY) > (__formHeight * (H_CROP_RECTANGLE * 3)) / __formWidth && (!(__cropBox.height - (2 * deltaY) >= __imageBox.height || width >= __imageBox.width)))
                        {
                                if (__cropBox.x - (temp / 2) >= __imageBox.x && __cropBox.x + __cropBox.width + temp < __imageBox.x + __imageBox.width
                                        && __cropBox.y + deltaY > __imageBox.y && __cropBox.y + __cropBox.height - (2 * deltaY) < __imageBox.y + __imageBox.height)
@@ -841,43 +841,43 @@ void
 ImageCropForm::CheckCurrentPosition(const Point currentPosition)
 {
        AppLogDebug("ENTER");
-       if (currentPosition.x > ((__cropBox.x + __cropBox.width / 2) - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < ((__cropBox.x + __cropBox.width / 2) + (CROP_RECTANGLE_HEIGHT / 2))
-               && currentPosition.y >  (__cropBox.y - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < (__cropBox.y + (CROP_RECTANGLE_HEIGHT / 2)))
+       if (currentPosition.x > ((__cropBox.x + __cropBox.width / 2) - (H_CROP_RECTANGLE / 2)) && currentPosition.x < ((__cropBox.x + __cropBox.width / 2) + (H_CROP_RECTANGLE / 2))
+               && currentPosition.y >  (__cropBox.y - (H_CROP_RECTANGLE / 2)) && currentPosition.y < (__cropBox.y + (H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_TOP_RECTANGLE;
        }
-       else if (currentPosition.x > (__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < (__cropBox.x + (CROP_RECTANGLE_HEIGHT / 2))
-               && currentPosition.y >  ((__cropBox.y + __cropBox.height / 2) - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < ((__cropBox.y + __cropBox.height / 2) + (CROP_RECTANGLE_HEIGHT / 2)))
+       else if (currentPosition.x > (__cropBox.x - (H_CROP_RECTANGLE / 2)) && currentPosition.x < (__cropBox.x + (H_CROP_RECTANGLE / 2))
+               && currentPosition.y >  ((__cropBox.y + __cropBox.height / 2) - (H_CROP_RECTANGLE / 2)) && currentPosition.y < ((__cropBox.y + __cropBox.height / 2) + (H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_LEFT_RECTANGLE;
        }
-       else if (currentPosition.x > (__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < (__cropBox.x + __cropBox.width + (CROP_RECTANGLE_HEIGHT / 2))
-               && currentPosition.y > ((__cropBox.y + __cropBox.height / 2) - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < ((__cropBox.y + __cropBox.height / 2) + (CROP_RECTANGLE_HEIGHT / 2)))
+       else if (currentPosition.x > (__cropBox.x + __cropBox.width - (H_CROP_RECTANGLE / 2)) && currentPosition.x < (__cropBox.x + __cropBox.width + (H_CROP_RECTANGLE / 2))
+               && currentPosition.y > ((__cropBox.y + __cropBox.height / 2) - (H_CROP_RECTANGLE / 2)) && currentPosition.y < ((__cropBox.y + __cropBox.height / 2) + (H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_RIGHT_RECTANGLE;
        }
-       else if (currentPosition.x > ((__cropBox.x + __cropBox.width / 2) - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < ((__cropBox.x + __cropBox.width / 2) + (CROP_RECTANGLE_HEIGHT / 2))
-               && currentPosition.y > (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < (__cropBox.y + __cropBox.height + (CROP_RECTANGLE_HEIGHT / 2)))
+       else if (currentPosition.x > ((__cropBox.x + __cropBox.width / 2) - (H_CROP_RECTANGLE / 2)) && currentPosition.x < ((__cropBox.x + __cropBox.width / 2) + (H_CROP_RECTANGLE / 2))
+               && currentPosition.y > (__cropBox.y + __cropBox.height - (H_CROP_RECTANGLE / 2)) && currentPosition.y < (__cropBox.y + __cropBox.height + (H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_BOTTOM_RECTANGLE;
        }
-       else if (currentPosition.x > (__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < (__cropBox.x + (CROP_RECTANGLE_HEIGHT / 2))
-                        && currentPosition.y > (__cropBox.y - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < (__cropBox.y +(CROP_RECTANGLE_HEIGHT / 2)))
+       else if (currentPosition.x > (__cropBox.x - (H_CROP_RECTANGLE / 2)) && currentPosition.x < (__cropBox.x + (H_CROP_RECTANGLE / 2))
+                        && currentPosition.y > (__cropBox.y - (H_CROP_RECTANGLE / 2)) && currentPosition.y < (__cropBox.y +(H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_TOP_LEFT_RECTANGLE;
        }
-       else if (currentPosition.x > ((__cropBox.x + __cropBox.width / 2) - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < (__cropBox.x + __cropBox.width + (CROP_RECTANGLE_HEIGHT / 2))
-                       && currentPosition.y > (__cropBox.y - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < (__cropBox.y +(CROP_RECTANGLE_HEIGHT / 2)))
+       else if (currentPosition.x > ((__cropBox.x + __cropBox.width / 2) - (H_CROP_RECTANGLE / 2)) && currentPosition.x < (__cropBox.x + __cropBox.width + (H_CROP_RECTANGLE / 2))
+                       && currentPosition.y > (__cropBox.y - (H_CROP_RECTANGLE / 2)) && currentPosition.y < (__cropBox.y +(H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_TOP_RIGHT_RECTANGLE;
        }
-       else if (currentPosition.x > (__cropBox.x + __cropBox.width - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < (__cropBox.x + __cropBox.width + (CROP_RECTANGLE_HEIGHT / 2))
-                       && currentPosition.y > (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < (__cropBox.y + __cropBox.height + (CROP_RECTANGLE_HEIGHT / 2)))
+       else if (currentPosition.x > (__cropBox.x + __cropBox.width - (H_CROP_RECTANGLE / 2)) && currentPosition.x < (__cropBox.x + __cropBox.width + (H_CROP_RECTANGLE / 2))
+                       && currentPosition.y > (__cropBox.y + __cropBox.height - (H_CROP_RECTANGLE / 2)) && currentPosition.y < (__cropBox.y + __cropBox.height + (H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_BOTTOM_RIGHT_RECTANGLE;
        }
-       else if (currentPosition.x > (__cropBox.x - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.x < (__cropBox.x + (CROP_RECTANGLE_HEIGHT / 2))
-                       && currentPosition.y > (__cropBox.y + __cropBox.height - (CROP_RECTANGLE_HEIGHT / 2)) && currentPosition.y < (__cropBox.y + __cropBox.height + (CROP_RECTANGLE_HEIGHT / 2)))
+       else if (currentPosition.x > (__cropBox.x - (H_CROP_RECTANGLE / 2)) && currentPosition.x < (__cropBox.x + (H_CROP_RECTANGLE / 2))
+                       && currentPosition.y > (__cropBox.y + __cropBox.height - (H_CROP_RECTANGLE / 2)) && currentPosition.y < (__cropBox.y + __cropBox.height + (H_CROP_RECTANGLE / 2)))
        {
                __pointLocation = INSIDE_BOTTOM_LEFT_RECTANGLE;
        }
@@ -911,8 +911,8 @@ ImageCropForm::SetValue(void)
                __formWidth = Form::GetBounds().height;
        }
 
-       float clientAreaRatio = (GetClientAreaBoundsF().height - FOOTER_PANEL_HEIGHT) / GetClientAreaBoundsF().width;
-       if (__imageWidth >= GetClientAreaBounds().width || __imageHeight > (GetClientAreaBounds().height - FOOTER_PANEL_HEIGHT))
+       float clientAreaRatio = (GetClientAreaBoundsF().height - H_FOOTER_PANEL) / GetClientAreaBoundsF().width;
+       if (__imageWidth >= GetClientAreaBounds().width || __imageHeight > (GetClientAreaBounds().height - H_FOOTER_PANEL))
        {
                float imageRatio = __imageHeight / (float) __imageWidth;
                if (imageRatio < clientAreaRatio)
@@ -920,11 +920,11 @@ ImageCropForm::SetValue(void)
                        __imageBox.width = GetClientAreaBounds().width;
                        __imageBox.height = (__imageHeight * __imageBox.width) / __imageWidth;
                        __imageBox.x = GetClientAreaBounds().x;
-                       __imageBox.y = GetClientAreaBounds().y + ((GetClientAreaBounds().height - FOOTER_PANEL_HEIGHT) - __imageBox.height) / 2;
+                       __imageBox.y = GetClientAreaBounds().y + ((GetClientAreaBounds().height - H_FOOTER_PANEL) - __imageBox.height) / 2;
                }
                else
                {
-                       __imageBox.height = GetClientAreaBounds().height - FOOTER_PANEL_HEIGHT;
+                       __imageBox.height = GetClientAreaBounds().height - H_FOOTER_PANEL;
                        __imageBox.width = (__imageWidth * __imageBox.height) / __imageHeight;
                        __imageBox.x = (GetClientAreaBounds().width - __imageBox.width) / 2;
                        __imageBox.y = GetClientAreaBounds().y;
index 0502719..80bebca 100644 (file)
@@ -33,6 +33,7 @@ void
 ImageEvent::FireImpl(IEventListener& listener, const IEventArg& eventArg)
 {
        IImageProviderEventListener* pListener = static_cast<IImageProviderEventListener*> (&listener);
+
        if (pListener != null)
        {
                pListener->OnImageReceivedN(*(const_cast<IEventArg*>(&eventArg)));
index 87f43d2..9295db8 100644 (file)
@@ -27,28 +27,28 @@ using namespace std;
 using namespace Tizen::Graphics;
 
 ImageEventArg::ImageEventArg(const Tizen::Base::String& filePath, Tizen::Graphics::Bitmap* pBitmap)
-       : __filePath(filePath)
-       , __pBitmap(pBitmap)
+       : _filePath(filePath)
+       , _pBitmap(pBitmap)
 {
 }
 
 ImageEventArg::~ImageEventArg(void)
 {
-       if (__pBitmap != null)
+       if (_pBitmap != null)
        {
-               delete __pBitmap;
+               delete _pBitmap;
        }
 }
 
 Tizen::Base::String
 ImageEventArg::GetFilePath(void) const
 {
-       return __filePath;
+       return _filePath;
 }
 
 
 Bitmap*
 ImageEventArg::GetBitmapN(void) const
 {
-       return CommonUtil::CloneBitmapN(*__pBitmap);
+       return CommonUtil::CloneBitmapN(*_pBitmap);
 }
index 31f46c6..5cf2264 100644 (file)
@@ -26,15 +26,15 @@ using namespace Tizen::Base;
 using namespace Tizen::Graphics;
 
 ImageInfo::ImageInfo(void)
-       : __pBitmap(null)
+       : _pBitmap(null)
 {
 }
 
 ImageInfo::~ImageInfo(void)
 {
-       if (__pBitmap != null)
+       if (_pBitmap != null)
        {
-               delete __pBitmap;
+               delete _pBitmap;
        }
 }
 
@@ -42,8 +42,10 @@ void
 ImageInfo::Construct(const String& pFilePath, Bitmap* pBitmap)
 {
        AppLogDebug("ENTER");
-       __pFilePath = pFilePath;
-       __pBitmap = pBitmap;
+
+       _filePath = pFilePath;
+       _pBitmap = pBitmap;
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -52,7 +54,8 @@ ImageInfo::GetFilePath(void) const
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-       return __pFilePath;
+
+       return _filePath;
 }
 
 void
@@ -60,7 +63,8 @@ ImageInfo::SetFilePath(const String& filePath)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-       __pFilePath = filePath;
+
+       _filePath = filePath;
 }
 
 Bitmap*
@@ -68,18 +72,21 @@ ImageInfo::GetBitmapN(void) const
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-       return CommonUtil::CloneBitmapN(*__pBitmap);
+
+       return CommonUtil::CloneBitmapN(*_pBitmap);
 }
 
 void
 ImageInfo::SetBitmap(Tizen::Graphics::Bitmap* pBitmap)
 {
        AppLogDebug("ENTER pBitmap(%x)", pBitmap);
-       if (__pBitmap != null)
+
+       if (_pBitmap != null)
        {
-               delete __pBitmap;
+               delete _pBitmap;
        }
-       __pBitmap = pBitmap;
+       _pBitmap = pBitmap;
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -87,7 +94,8 @@ void
 ImageInfo::ClearBitmap(void)
 {
        AppLogDebug("ENTER");
-       delete __pBitmap;
-       __pBitmap = null;
+       delete _pBitmap;
+       _pBitmap = null;
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
index 3cc77f0..4299aa9 100644 (file)
@@ -43,7 +43,7 @@ using namespace Tizen::System;
 
 static const int FILE_MAX_LENGTH = 255;
 
-ImageNameEditorForm::ImageNameEditorForm()
+ImageNameEditorForm::ImageNameEditorForm(void)
        : __currentIndex(0)
        , __modalMsgBoxResult(0)
        , __pNameEditField(null)
@@ -54,7 +54,7 @@ ImageNameEditorForm::ImageNameEditorForm()
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
-ImageNameEditorForm::~ImageNameEditorForm()
+ImageNameEditorForm::~ImageNameEditorForm(void)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -82,7 +82,7 @@ ImageNameEditorForm::OnInitializing(void)
        GetFooter()->SetBackButton();
 
        FooterItem itemSave;
-       itemSave.Construct(ACTION_ID_BUTTON_EDITFIELD_SAVE);
+       itemSave.Construct(IDA_BUTTON_EDITFIELD_SAVE);
        itemSave.SetText(ResourceManager::GetString(L"IDS_COM_OPT_SAVE"));
 
        GetFooter()->AddItem(itemSave);
@@ -119,6 +119,7 @@ ImageNameEditorForm::OnInitializing(void)
 void
 ImageNameEditorForm::OnOrientationChanged(const Control &source, OrientationStatus orientationStatus)
 {
+
 }
 
 result
@@ -148,8 +149,7 @@ ImageNameEditorForm::OnActionPerformed(const Control& source, int actionId)
 
        switch (actionId)
        {
-       case ACTION_ID_BUTTON_EDITFIELD_SAVE:
-
+       case IDA_BUTTON_EDITFIELD_SAVE:
                inputString = __nameEditFieldText;
 
                if (__nameEditFieldPreText == __nameEditFieldText)
index 752d593..46b17ea 100644 (file)
@@ -19,7 +19,6 @@
  * @brief              This is the implementation file for ImageProvider class.
  */
 
-#include <cstdlib>
 #include <FContent.h>
 #include <FMedia.h>
 #include "IvCommonUtil.h"
@@ -45,7 +44,7 @@ ImageProvider::ImageProvider(void)
        : __pMutexCmd(null)
        , __pCmdQueue(null)
        , __requestId(0)
-       , __appTerminating(false)
+       , __isAppTerminating(false)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -202,12 +201,12 @@ ImageProvider::RequestImage(const String& filePath, const ImageEvent* event)
 }
 
 void
-ImageProvider::ClearImageRequests(bool appTerminating)
+ImageProvider::ClearImageRequests(bool isAppTerminating)
 {
        AppLogDebug("ENTER");
        __pMutexCmd->Acquire();
        __pCmdQueue->RemoveAll(true);
-       __appTerminating = appTerminating;
+       __isAppTerminating = isAppTerminating;
        __pMutexCmd->Release();
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
@@ -265,7 +264,7 @@ ImageProvider::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
                        if (requestIdForChecking == pImageJob->GetRequestId())
                        {
                                ImageEvent* pImageEvent = const_cast<ImageEvent*>(pImageJob->GetEvent());
-                               if (pImageEvent != null && __appTerminating == false)
+                               if (pImageEvent != null && __isAppTerminating == false)
                                {
                                        ImageEventArg* pSendingArg = new (std::nothrow)ImageEventArg(filePath, pBitmap);
                                        pImageEvent->Fire(*pSendingArg);
index bae8687..66ffd0c 100644 (file)
@@ -19,7 +19,6 @@
  * @brief              This is the implementation file for ImageViewerApp class.
  */
 
-#include <new>
 #include "IvBaseForm.h"
 #include "IvImageViewerApp.h"
 #include "IvMainFrame.h"
@@ -66,6 +65,7 @@ ImageViewerApp::GetAppControlOperationId(void) const
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
        return __operationId;
 }
 
@@ -74,6 +74,7 @@ ImageViewerApp::GetUriData(void) const
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
        return __uriData;
 }
 
@@ -82,6 +83,7 @@ ImageViewerApp::GetAppControlArguments(void) const
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
        return __pArguments;
 }
 
@@ -89,7 +91,9 @@ bool
 ImageViewerApp::OnAppInitializing(AppRegistry& appRegistry)
 {
        AppLogDebug("ENTER");
+
        AppControlProviderManager::GetInstance()->SetAppControlProviderEventListener(this);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return true;
@@ -99,21 +103,24 @@ bool
 ImageViewerApp::OnAppInitialized(void)
 {
        AppLogDebug("ENTER");
+
        MainFrame* pMainFrame = new (std::nothrow) MainFrame();
        pMainFrame->Construct();
        AddFrame(*pMainFrame);
 
        DeviceManager::AddDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
        SettingInfo::AddSettingEventListener(*this);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return true;
 }
 
 bool
-ImageViewerApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
+ImageViewerApp::OnAppTerminating(AppRegistry& appRegistry, bool isForcedTermination)
 {
        AppLogDebug("ENTER");
+
        ImageViewerPresentationModel* pPresentationModel = ImageViewerPresentationModel::GetInstance();
        if (pPresentationModel != null)
        {
@@ -132,10 +139,12 @@ void
 ImageViewerApp::OnForeground(void)
 {
        AppLogDebug("ENTER");
-       static bool bFirst = true;
-       if (bFirst)
+       
+       static bool isFirst = true;
+       
+       if (isFirst)
        {
-               bFirst = false;
+               isFirst = false;
                return;
        }
 
@@ -176,6 +185,7 @@ ImageViewerApp::OnAppControlRequestReceived(RequestId reqId, const String& opera
        {
                HashMap* pArguments = new (std::nothrow) HashMap(SingleObjectDeleter);
                result r = pArguments->Construct();
+               
                if (r != E_SUCCESS)
                {
                        delete pArguments;
@@ -196,13 +206,13 @@ ImageViewerApp::OnAppControlRequestReceived(RequestId reqId, const String& opera
                {
                        ArrayList* pArrayList = new (std::nothrow) ArrayList();
                        pArrayList->Construct();
-                       const String* temp;
+                       const String* pTemp;
                        int loopCount = pList->GetCount();
 
                        for (int i = 0; i < loopCount; ++i)
                        {
-                               temp = static_cast<const String*>(pList->GetAt(i));
-                               pArrayList->Add(new (std::nothrow) String(*temp));
+                               pTemp = static_cast<const String*>(pList->GetAt(i));
+                               pArrayList->Add(new (std::nothrow) String(*pTemp));
                        }
                        pArguments->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pArrayList);
                }
@@ -239,12 +249,12 @@ ImageViewerApp::OnSettingChanged(String& key)
 }
 
 void
-ImageViewerApp::SetFrameEnabled(bool enabled)
+ImageViewerApp::SetFrameEnabled(bool isEnabled)
 {
        MainFrame* pMainFrame = dynamic_cast<MainFrame*>(GetFrameAt(0));
        if (pMainFrame != null)
        {
-               pMainFrame->SetEnabled(enabled);
+               pMainFrame->SetEnabled(isEnabled);
        }
 }
 
@@ -252,7 +262,9 @@ void
 ImageViewerApp::SendAppControlResult(const AppCtrlResult appControlResult, const IMap* pExtraData)
 {
        AppLogDebug("ENTER");
+       
        AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
        pAppManager->SendAppControlResult(__requestId, appControlResult, pExtraData);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
index efa3f26..30e2904 100644 (file)
@@ -38,7 +38,9 @@ OspMain(int argc, char *pArgv[])
 {
        AppLogDebug("ENTER");
        AppLogDebug("Application started.");
+
        ArrayList args(SingleObjectDeleter);
+
        args.Construct();
        for (int i = 0; i < argc; i++)
        {
@@ -46,7 +48,9 @@ OspMain(int argc, char *pArgv[])
        }
 
        result r = UiApp::Execute(ImageViewerApp::CreateInstance, &args);
+
        TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+
        AppLogDebug("Application finished.");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
index 1ae41b2..89a2445 100644 (file)
@@ -113,10 +113,10 @@ ImageViewerForm::ImageViewerForm(void)
        , __pContextMenuSetAs(null)
        , __pContextMenuShare(null)
        , __pDeletePopup(null)
-       , __visible(true)
-       , __detail(true)
-       , __startSlide(false)
-       , __shuffle(false)
+       , __isVisible(true)
+       , __isDetail(true)
+       , __isStartSlide(false)
+       , __isShuffle(false)
        , __requestId(0)
        , __pShuffledList(null)
        , __pPresentationModel(null)
@@ -144,7 +144,7 @@ ImageViewerForm::Initialize()
        {
                if (__pPresentationModel->GetType() == APPCONTROL_DATA_SLIDE_SHOW)
                {
-                       __startSlide = true;
+                       __isStartSlide = true;
                }
        }
 
@@ -246,7 +246,7 @@ ImageViewerForm::OnInitializing(void)
                RequestDecodeUrl();
        }
 
-       if (__startSlide)
+       if (__isStartSlide)
        {
                __pTimer = new (std::nothrow) Timer();
                __pTimer->Construct(*this);
@@ -272,7 +272,7 @@ void
 ImageViewerForm::OnOrientationChanged(const Control &source, OrientationStatus orientationStatus)
 {
        AppLogDebug("ENTER");
-       if (__detail == false)
+       if (__isDetail == false)
        {
                ShowPanelDetail(true);
        }
@@ -316,7 +316,7 @@ ImageViewerForm::InitializeDisplay(AppControlMode status)
 
                        __pPlayButton->Construct(Rectangle(clientRect.width / 2 - W_PLAY_BUTTON / 2,
                                        clientRect.height / 2 - W_PLAY_BUTTON / 2, W_PLAY_BUTTON, H_PLAY_BUTTON));
-                       __pPlayButton->SetActionId(ACTION_ID_CONTORL_BUTTON_PLAY);
+                       __pPlayButton->SetActionId(IDA_CONTORL_BUTTON_PLAY);
                        AddControl(*__pPlayButton);
 
                        Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_PLAY);
@@ -336,13 +336,13 @@ ImageViewerForm::InitializeDisplay(AppControlMode status)
                __pFooter->SetBackButton();
 
                FooterItem footerItem1;
-               footerItem1.Construct(ACTION_ID_FOOTER_BUTTON_SHARE);
+               footerItem1.Construct(IDA_FOOTER_BUTTON_SHARE);
                Bitmap* pFooterItemShareNomal =
                                ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_FOOTER_ICON_SHARE_NORMAL);
                footerItem1.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemShareNomal);
 
                FooterItem footerItem2;
-               footerItem2.Construct(ACTION_ID_FOOTER_BUTTON_DELETE);
+               footerItem2.Construct(IDA_FOOTER_BUTTON_DELETE);
                Bitmap* pFooterItemDeleteNomal =
                                ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_FOOTER_ICON_DELETE_NORMAL);
                footerItem2.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemDeleteNomal);
@@ -354,7 +354,7 @@ ImageViewerForm::InitializeDisplay(AppControlMode status)
                delete pFooterItemDeleteNomal;
 
                ButtonItem buttonItemMore;
-               buttonItemMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE);
+               buttonItemMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
                buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL,
                                ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_MORE_NORMAL));
                buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED,
@@ -367,13 +367,13 @@ ImageViewerForm::InitializeDisplay(AppControlMode status)
                __pFooter->SetBackButton();
 
                FooterItem  footerItem1;
-               footerItem1.Construct(ACTION_ID_FOOTER_BUTTON_SHARE);
+               footerItem1.Construct(IDA_FOOTER_BUTTON_SHARE);
                Bitmap* pFooterItemShareNomal =
                                ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_FOOTER_ICON_SHARE_NORMAL);
                footerItem1.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemShareNomal);
 
                FooterItem  footerItem2;
-               footerItem2.Construct(ACTION_ID_FOOTER_BUTTON_DOWNLOAD);
+               footerItem2.Construct(IDA_FOOTER_BUTTON_DOWNLOAD);
                Bitmap* pFooterItemDownlordNomal = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_DOWNLOAD);
                footerItem2.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemDownlordNomal);
 
@@ -384,7 +384,7 @@ ImageViewerForm::InitializeDisplay(AppControlMode status)
                delete pFooterItemDownlordNomal;
 
                ButtonItem buttonItemMore;
-               buttonItemMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE);
+               buttonItemMore.Construct(BUTTON_ITEM_STYLE_ICON, IDA_FOOTER_MORE);
                buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL,
                                ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_MORE_NORMAL));
                buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED,
@@ -397,12 +397,12 @@ ImageViewerForm::InitializeDisplay(AppControlMode status)
        else if (status == APPCONTROL_MODE_CROP)
        {
                FooterItem  footerItem1;
-               footerItem1.Construct(ACTION_ID_FOOTER_BUTTON_SAVE);
+               footerItem1.Construct(IDA_FOOTER_BUTTON_SAVE);
                Bitmap* pfooterItem1 = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_SAVE);
                footerItem1.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pfooterItem1);
 
                FooterItem  footerItem2;
-               footerItem2.Construct(ACTION_ID_FOOTER_BUTTON_BACK);
+               footerItem2.Construct(IDA_FOOTER_BUTTON_BACK);
                Bitmap* pfooterItem2 = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_X);
                footerItem2.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pfooterItem2);
 
@@ -422,7 +422,7 @@ ImageViewerForm::InitializeDisplay(AppControlMode status)
 
                        __pPlayButton->Construct(Rectangle(clientRect.width / 2 - W_PLAY_BUTTON / 2,
                                        clientRect.height / 2 - W_PLAY_BUTTON / 2, W_PLAY_BUTTON, H_PLAY_BUTTON));
-                       __pPlayButton->SetActionId(ACTION_ID_CONTORL_BUTTON_PLAY);
+                       __pPlayButton->SetActionId(IDA_CONTORL_BUTTON_PLAY);
                        AddControl(*__pPlayButton);
 
                        Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_PLAY);
@@ -520,7 +520,7 @@ ImageViewerForm::DeleteImageFile()
 
        __pLabel->SetText(strItemIdxText);
 
-       if (__visible == true)
+       if (__isVisible == true)
        {
                ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath);
 
@@ -670,7 +670,7 @@ ImageViewerForm::InitializePanelDetail()
        __pRenameButton = new (std::nothrow) Button();
        Rectangle rect = GetBounds();
        __pRenameButton->Construct(Rectangle(rect.width - W_RENAME_BUTTON - 20, Y_RENAME_BUTTON, W_RENAME_BUTTON, H_RENAME_BUTTON));
-       __pRenameButton->SetActionId(ACTION_ID_PANEL_HEADER_DETAILS_RENAME);
+       __pRenameButton->SetActionId(IDA_PANEL_HEADER_DETAILS_RENAME);
        __pRenameButton->AddActionEventListener(*this);
 
        Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME);
@@ -728,7 +728,7 @@ ImageViewerForm::InitializePopup(void)
                pDeleteButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_DELETE_BUTTON_NORMAL);
                pDeleteButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_DELETE_BUTTON_PRESSED);
                pDeleteButton->SetTextColor(COLOR_DELETE_BUTTON_TEXT);
-               pDeleteButton->SetActionId(ACTION_ID_DELETE_POPUP_DEL);
+               pDeleteButton->SetActionId(IDA_DELETE_POPUP_DEL);
                pDeleteButton->AddActionEventListener(*this);
 
                Button* pCancelButton = new (std::nothrow) Button();
@@ -736,7 +736,7 @@ ImageViewerForm::InitializePopup(void)
                                Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM,
                                                Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON),
                                                ResourceManager::GetString(L"IDS_COM_SK_CANCEL"));
-               pCancelButton->SetActionId(ACTION_ID_DELETE_POPUP_CANCEL);
+               pCancelButton->SetActionId(IDA_DELETE_POPUP_CANCEL);
                pCancelButton->AddActionEventListener(*this);
 
                __pDeletePopup->AddControl(*pLabel);
@@ -776,19 +776,19 @@ ImageViewerForm::InitializeContextMenuMore(void)
        if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE)
        {
                __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_SET_AS"),
-                               ACTION_ID_CONTEXTMENU_SET_AS);
-               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_CROP"), ACTION_ID_FOOTER_BUTTON_CROP);
-               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"), ACTION_ID_FOOTER_BUTTON_ROTATE_RIGHT);
-               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"), ACTION_ID_FOOTER_BUTTON_ROTATE_LEFT);
+                               IDA_CONTEXTMENU_SET_AS);
+               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_CROP"), IDA_FOOTER_BUTTON_CROP);
+               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_RIGHT"), IDA_FOOTER_BUTTON_ROTATE_RIGHT);
+               __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_ROTATE_LEFT"), IDA_FOOTER_BUTTON_ROTATE_LEFT);
        }
 
        if (__pGallery->GetItemCount() > 1)
        {
                __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_SLIDE_SHOW"),
-                               ACTION_ID_FOOTER_BUTTON_SLIDE);
+                               IDA_FOOTER_BUTTON_SLIDE);
        }
        __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS"),
-                       ACTION_ID_FOOTER_BUTTON_DETAILS);
+                       IDA_FOOTER_BUTTON_DETAILS);
        __pContextMenuMore->SetShowState(false);
        __pContextMenuMore->AddActionEventListener(*this);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -812,13 +812,13 @@ ImageViewerForm::InitializeContextMenuSetAs(void)
                        CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
 
        __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"),
-                       ACTION_ID_CONTEXTMENU_HOME);
+                       IDA_CONTEXTMENU_HOME);
        __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"),
-                       ACTION_ID_CONTEXTMENU_LOCK);
+                       IDA_CONTEXTMENU_LOCK);
        __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_HOME_AND_LOCK_SCREENS"),
-                       ACTION_ID_CONTEXTMENU_HOME_AND_LOCK);
+                       IDA_CONTEXTMENU_HOME_AND_LOCK);
        __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_CALLER_IMAGE"),
-                       ACTION_ID_CONTEXTMENU_CALLER);
+                       IDA_CONTEXTMENU_CALLER);
        __pContextMenuSetAs->AddActionEventListener(*this);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -840,8 +840,8 @@ ImageViewerForm::InitializeContextMenuShare(void)
                        CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
 
        __pContextMenuShare->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MESSAGE"),
-                       ACTION_ID_CONTEXTMENU_MESSAGE);
-       __pContextMenuShare->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), ACTION_ID_CONTEXTMENU_EMAIL);
+                       IDA_CONTEXTMENU_MESSAGE);
+       __pContextMenuShare->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), IDA_CONTEXTMENU_EMAIL);
        __pContextMenuShare->AddActionEventListener(*this);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -849,7 +849,7 @@ ImageViewerForm::InitializeContextMenuShare(void)
 }
 
 long long
-ImageViewerForm::GetFileSize(String filePath)
+ImageViewerForm::GetFileSize(String filePath) const
 {
        AppLogDebug("ENTER");
        FileAttributes attr;
@@ -935,7 +935,7 @@ ImageViewerForm::SetDetailInfo(void)
 
        if (__initializeDisplayModeCurrent == APPCONTROL_MODE_WEB_LINK)
        {
-               strResult[0] = __downLordFileName;
+               strResult[0] = __downloadFileName;
        }
        else if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE)
        {
@@ -1031,14 +1031,14 @@ ImageViewerForm::ShowPanelDetail(bool showStatus)
                __pLabel->SetBackgroundColor(COLOR_HEADER_CONTROL_PANEL);
                __pLabel->Invalidate(true);
                __pScrollPanel->SetShowState(true);
-               __detail = false;
+               __isDetail = false;
        }
        else
        {
                __pLabel->SetBackgroundColor(COLOR_HEADER_CONTROL_LABEL);
                __pLabel->Invalidate(true);
                __pScrollPanel->SetShowState(false);
-               __detail = true;
+               __isDetail = true;
        }
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
@@ -1050,7 +1050,7 @@ ImageViewerForm::ChangeFooterItem(bool isChanged, Footer* pFooter, int position)
 {
        AppLogDebug("ENTER");
        FooterItem footerItem;
-       footerItem.Construct(ACTION_ID_FOOTER_BUTTON_DETAILS);
+       footerItem.Construct(IDA_FOOTER_BUTTON_DETAILS);
        Bitmap* pfooterItem = null;
 
        if (isChanged)
@@ -1095,7 +1095,7 @@ ImageViewerForm::DownloadFile(void)
        String sourcePath = DestPath;
        String destPath = Environment::GetMediaPath();
        destPath.Append(FOLDER_PATH_DOWNLOADS);
-       destPath.Append(__downLordFileName);
+       destPath.Append(__downloadFileName);
 
        contentId = contentManager.CreateContent(sourcePath, destPath, true, &imageContentInfo);
        ImageViewerForm::OnFormBackRequested(*this);
@@ -1119,7 +1119,7 @@ ImageViewerForm::CreateItem(int index)
 
        int curIndex = index;
 
-       if (__shuffle == true && __pShuffledList != null)
+       if (__isShuffle == true && __pShuffledList != null)
        {
                curIndex = __pShuffledList[index];
        }
@@ -1151,7 +1151,7 @@ ImageViewerForm::DeleteItem(int index, GalleryItem* pItem)
        AppLogDebug("ImageViewerForm::DeleteItem ENTER index(%d)", index);
        int curIndex = index;
 
-       if (__shuffle == true && __pShuffledList != null)
+       if (__isShuffle == true && __pShuffledList != null)
        {
                curIndex = __pShuffledList[index];
        }
@@ -1178,7 +1178,7 @@ ImageViewerForm::OnGalleryCurrentItemChanged(Gallery& view, int index)
        GetLabelText(__pGallery->GetCurrentItemIndex(), strItemIdxText);
        __pLabel->SetText(strItemIdxText);
 
-       if (__visible == true)
+       if (__isVisible == true)
        {
                ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath);
                if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO)
@@ -1203,7 +1203,7 @@ ImageViewerForm::OnGalleryItemClicked(Gallery& view, int index)
        String filePath = __pPresentationModel->GetFilePathAt(index);
        ContentType contentType = ContentManagerUtil::CheckContentType(filePath);
 
-       if (__visible == true)
+       if (__isVisible == true)
        {
                if (contentType == CONTENT_TYPE_VIDEO)
                {
@@ -1212,7 +1212,7 @@ ImageViewerForm::OnGalleryItemClicked(Gallery& view, int index)
 
                SetActionBarsVisible( FORM_ACTION_BAR_FOOTER, false);
                __pLabel->SetShowState(false);
-               __visible = false;
+               __isVisible = false;
        }
        else
        {
@@ -1223,7 +1223,7 @@ ImageViewerForm::OnGalleryItemClicked(Gallery& view, int index)
 
                SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
                __pLabel->SetShowState(true);
-               __visible = true;
+               __isVisible = true;
 
                __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y - 1);
                __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y + 1);
@@ -1241,7 +1241,7 @@ ImageViewerForm::OnGallerySlideShowStarted(Gallery& gallery)
 {
        AppLogDebug("ENTER");
        PowerManager::KeepScreenOnState(true, false);
-       if (__visible  == true)
+       if (__isVisible  == true)
        {
                SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, false);
                __pLabel->SetShowState(false);
@@ -1255,7 +1255,7 @@ ImageViewerForm::OnGallerySlideShowStarted(Gallery& gallery)
                        __pPlayButton->SetShowState(false);
                }
 
-               __visible = false;
+               __isVisible = false;
        }
 
        Rectangle clientRect = GetClientAreaBounds();
@@ -1272,7 +1272,7 @@ ImageViewerForm::OnGallerySlideShowStopped(Gallery& gallery)
 
        int index;
 
-       if (__shuffle == true)
+       if (__isShuffle == true)
        {
 
                if (__pShuffelTimer == null)
@@ -1298,7 +1298,7 @@ ImageViewerForm::SlideShowStopped(int index)
        AppLog("ImageViewerForm::SlideShowStopped");
        PowerManager::KeepScreenOnState(false, true);
 
-       if (__visible == false)
+       if (__isVisible == false)
        {
                SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, true);
                __pLabel->SetShowState(true);
@@ -1312,7 +1312,7 @@ ImageViewerForm::SlideShowStopped(int index)
                __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y - 1);
                __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y + 1);
 
-               __visible = true;
+               __isVisible = true;
        }
 
        String strItemIdxText;
@@ -1405,7 +1405,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
 
        switch (actionId)
        {
-       case ACTION_ID_FOOTER_MORE:
+       case IDA_FOOTER_MORE:
        {
                InitializeContextMenuMore();
 
@@ -1413,23 +1413,23 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                __pContextMenuMore->Show();
        }
        break;
-       case ACTION_ID_CONTEXTMENU_SET_AS:
+       case IDA_CONTEXTMENU_SET_AS:
                InitializeContextMenuSetAs();
 
                __pContextMenuSetAs->SetShowState(true);
                __pContextMenuSetAs->Show();
                break;
-       case ACTION_ID_FOOTER_BUTTON_SHARE:
+       case IDA_FOOTER_BUTTON_SHARE:
                InitializeContextMenuShare();
 
                __pContextMenuShare->SetShowState(true);
                __pContextMenuShare->Show();
                break;
-       case ACTION_ID_FOOTER_BUTTON_DELETE:
+       case IDA_FOOTER_BUTTON_DELETE:
                __pDeletePopup->SetShowState(true);
                __pDeletePopup->Show();
                break;
-       case ACTION_ID_FOOTER_BUTTON_SLIDE:
+       case IDA_FOOTER_BUTTON_SLIDE:
        {
                if (__pPopUp != null)
                {
@@ -1439,7 +1439,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
 
                break;
        }
-       case ACTION_ID_FOOTER_BUTTON_CROP:
+       case IDA_FOOTER_BUTTON_CROP:
        {
                String filePath;
                filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
@@ -1451,7 +1451,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                }
                int imageWidth = imagebuffer.GetWidth();
                int imageHeight = imagebuffer.GetHeight();
-               if (imageWidth <= (CROP_RECTANGLE_HEIGHT * 3) || imageHeight <= (CROP_RECTANGLE_HEIGHT * 3))
+               if (imageWidth <= (H_CROP_RECTANGLE * 3) || imageHeight <= (H_CROP_RECTANGLE * 3))
                {
                        MessageBox messageBox;
                        String messageText = ResourceManager::GetString(L"IDS_IMGE_POP_IMAGE_IS_TOO_SMALL");
@@ -1467,7 +1467,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
        }
        break;
-       case ACTION_ID_FOOTER_BUTTON_ROTATE_RIGHT:
+       case IDA_FOOTER_BUTTON_ROTATE_RIGHT:
        {
                int currentIndex = __pGallery->GetCurrentItemIndex();
                String filePath = __pPresentationModel->GetFilePathAt(currentIndex);
@@ -1477,7 +1477,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                ContentManager::ScanFile(filePath);
        }
        break;
-       case ACTION_ID_FOOTER_BUTTON_ROTATE_LEFT:
+       case IDA_FOOTER_BUTTON_ROTATE_LEFT:
        {
                int currentIndex = __pGallery->GetCurrentItemIndex();
                String filePath = __pPresentationModel->GetFilePathAt(currentIndex);
@@ -1487,20 +1487,20 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                ContentManager::ScanFile(filePath);
        }
        break;
-       case ACTION_ID_FOOTER_BUTTON_DETAILS:
+       case IDA_FOOTER_BUTTON_DETAILS:
        {
-               ShowPanelDetail(__detail);
+               ShowPanelDetail(__isDetail);
                break;
        }
-       case ACTION_ID_FOOTER_BUTTON_BACK:
+       case IDA_FOOTER_BUTTON_BACK:
                ImageViewerForm::OnFormBackRequested(*this);
                break;
-       case ACTION_ID_FOOTER_BUTTON_DOWNLOAD:
+       case IDA_FOOTER_BUTTON_DOWNLOAD:
                DownloadFile();
                break;
-       case ACTION_ID_FOOTER_BUTTON_SAVE:
+       case IDA_FOOTER_BUTTON_SAVE:
                break;
-       case ACTION_ID_PANEL_HEADER_DETAILS_RENAME:
+       case IDA_PANEL_HEADER_DETAILS_RENAME:
        {
                ArrayList* pSelectedIndex = new (std::nothrow) ArrayList(SingleObjectDeleter);
                pSelectedIndex->Construct();
@@ -1508,7 +1508,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_NAME_EDITOR), pSelectedIndex);
                break;
        }
-       case ACTION_ID_CONTEXTMENU_HOME:
+       case IDA_CONTEXTMENU_HOME:
        {
                String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
                String cropMode = APPCONTROL_DATA_FIT_TO_SCREEN;
@@ -1519,7 +1519,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
                break;
        }
-       case ACTION_ID_CONTEXTMENU_LOCK:
+       case IDA_CONTEXTMENU_LOCK:
        {
                String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
                String cropMode = APPCONTROL_DATA_FIT_TO_SCREEN;
@@ -1530,7 +1530,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
                break;
        }
-       case ACTION_ID_CONTEXTMENU_CALLER:
+       case IDA_CONTEXTMENU_CALLER:
        {
                HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
                pDataList->Construct();
@@ -1546,7 +1546,7 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                break;
        }
 
-       case ACTION_ID_CONTEXTMENU_HOME_AND_LOCK:
+       case IDA_CONTEXTMENU_HOME_AND_LOCK:
        {
                String filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
                String cropMode = APPCONTROL_DATA_FIT_TO_SCREEN;
@@ -1558,17 +1558,17 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                break;
        }
 
-       case ACTION_ID_CONTEXTMENU_EMAIL:
+       case IDA_CONTEXTMENU_EMAIL:
        {
                OnRequestEmailAction();
                break;
        }
-       case ACTION_ID_CONTEXTMENU_MESSAGE:
+       case IDA_CONTEXTMENU_MESSAGE:
        {
                OnRequestMessagesAction();
                break;
        }
-       case ACTION_ID_CONTEXTMENU_COPY:
+       case IDA_CONTEXTMENU_COPY:
        {
                int currentIndex = __pGallery->GetCurrentItemIndex();
                String filePath = __pPresentationModel->GetFilePathAt(currentIndex);
@@ -1579,25 +1579,25 @@ ImageViewerForm::OnActionPerformed(const Control& source, int actionId)
                pClipboard->CopyItem(item);
                break;
        }
-       case ACTION_ID_DELETE_POPUP_DEL:
+       case IDA_DELETE_POPUP_DEL:
        {
                __pDeletePopup->SetShowState(false);
                __pDeletePopup->Show();
                DeleteImageFile();
 
-               if (__detail == false)
+               if (__isDetail == false)
                {
                        ShowPanelDetail(false);
                }
                break;
        }
-       case ACTION_ID_DELETE_POPUP_CANCEL:
+       case IDA_DELETE_POPUP_CANCEL:
        {
                __pDeletePopup->SetShowState(false);
                __pDeletePopup->Show();
                break;
        }
-       case ACTION_ID_CONTORL_BUTTON_PLAY:
+       case IDA_CONTORL_BUTTON_PLAY:
                CallVideoPlayer();
                break;
        default:
@@ -1646,7 +1646,7 @@ void
 ImageViewerForm::OnFormBackRequested(Form& source)
 {
        AppLogDebug("ENTER");
-       if (__detail == false)
+       if (__isDetail == false)
        {
                ShowPanelDetail(false);
        }
@@ -1690,7 +1690,7 @@ ImageViewerForm::OnSceneActivatedN(const SceneId& previousSceneId,
                __pGallery->UpdateGallery();
                __pGallery->SetCurrentItemIndex(count);
                __pPresentationModel->RequestImage(filePath);
-               ShowPanelDetail(__detail);
+               ShowPanelDetail(__isDetail);
        }
 
        if (__pGallery->GetCurrentItemIndex() < 0)
@@ -1823,7 +1823,7 @@ ImageViewerForm::OnTimerExpired(Timer &timer)
                int curItemIndex = __pGallery->GetCurrentItemIndex();
                int index = __pShuffledList[curItemIndex];
 
-               __shuffle = false;
+               __isShuffle = false;
 
                __pGallery->UpdateGallery();
 
@@ -1851,12 +1851,12 @@ ImageViewerForm::OnTimerExpired(Timer &timer)
                {
                        __shuffelStartIndex = __pGallery->GetCurrentItemIndex();
                        CreateShuffledList(__pPresentationModel->GetFileCount());
-                       __shuffle = true;
+                       __isShuffle = true;
                }
                else
                {
                        __shuffelStartIndex = 0;
-                       __shuffle = false;
+                       __isShuffle = false;
                }
 
                if ( repeatValue == 0)
@@ -1946,7 +1946,7 @@ ImageViewerForm::RequestDecodeUrl(void)
                return;
        }
 
-       __downLordFileName = __pPresentationModel->GetFileName(filePath);
+       __downloadFileName = __pPresentationModel->GetFileName(filePath);
 
        Image* pImage = new (std::nothrow) Image();
        pImage->Construct();
@@ -2066,7 +2066,7 @@ ImageViewerForm::SetFooterItemState(bool isEnable)
 }
 
 Bitmap*
-ImageViewerForm::GetQuickThumbnailN(String& filePath)
+ImageViewerForm::GetQuickThumbnailN(String& filePath) const
 {
        AppLogDebug("ENTER");
        Bitmap* pBitmap = null;
@@ -2211,7 +2211,7 @@ void ImageViewerForm::OnFormFileEventOccuered(const int index, const unsigned lo
        GetLabelText(currentIndex,strItemIdxText);
        __pLabel->SetText(strItemIdxText);
 
-       if (__visible == true)
+       if (__isVisible == true)
        {
                ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath);
 
@@ -2224,10 +2224,10 @@ void ImageViewerForm::OnFormFileEventOccuered(const int index, const unsigned lo
                        __pPlayButton->SetShowState(true);
                }
        }
-       if (__detail == false)
+       if (__isDetail == false)
        {
                __pScrollPanel->SetShowState(false);
-               __detail = true;
+               __isDetail = true;
        }
 
        Invalidate(true);
@@ -2258,7 +2258,7 @@ ImageViewerForm::OnSlideSettingPopUpItemSelected(int index)
                        __pGallery->SetSlideShowViewDuration(interval);
                        __pGallery->UpdateGallery();
 
-                       if (__detail == false)
+                       if (__isDetail == false)
                        {
                                ShowPanelDetail(false);
                        }
@@ -2289,12 +2289,12 @@ ImageViewerForm::OnSlideSettingPopUpItemSelected(int index)
                        {
                                __shuffelStartIndex = __pGallery->GetCurrentItemIndex();
                                CreateShuffledList(__pPresentationModel->GetFileCount());
-                               __shuffle = true;
+                               __isShuffle = true;
                        }
                        else
                        {
                                __shuffelStartIndex = 0;
-                               __shuffle = false;
+                               __isShuffle = false;
                        }
 
                        if (repeatValue == 0)
index 415610b..5016b35 100644 (file)
@@ -19,7 +19,6 @@
  * @brief              This is the implementation file for ImageViewerPresentationModel class.
  */
 
-
 #include <FContent.h>
 #include <FIo.h>
 #include <FMedia.h>
@@ -60,9 +59,9 @@ ImageViewerPresentationModel::ImageViewerPresentationModel(void)
        , __durationOfSlideShow(0)
        , __transitionEffectOfSlideShow(SLIDE_SHOW_TRANSITION_EFFECT_PAGE)
        , __pSettingPresentationModel(null)
-       , __ivTriggeredEvent(false)
+       , __isIvTriggeredEvent(false)
        , __contentFileEventType(-1)
-       ,__ivTriggeredDeleteEvent(false)
+       ,__isIvTriggeredDeleteEvent(false)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -71,6 +70,7 @@ ImageViewerPresentationModel::ImageViewerPresentationModel(void)
 ImageViewerPresentationModel::~ImageViewerPresentationModel(void)
 {
        AppLogDebug("ENTER");
+
        delete __pImageCaches;
        delete __pFileUpdateListener;
        __pCntMgr->RemoveContentUpdateEventListener(*this);
@@ -82,10 +82,12 @@ ImageViewerPresentationModel*
 ImageViewerPresentationModel::GetInstance()
 {
        AppLogDebug("ENTER");
+
        if (__pPresentationModelInstance == null)
        {
                CreateInstance();
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return __pPresentationModelInstance;
@@ -95,16 +97,17 @@ result
 ImageViewerPresentationModel::Construct(void)
 {
        AppLogDebug("ENTER");
+
        if (__pImageCaches != null)
        {
                delete __pImageCaches;
        }
-
        __pImageCaches = new (std::nothrow) ArrayList(SingleObjectDeleter);
        __pImageCaches->Construct();
 
        ImageViewerApp* pImageViewerApp = static_cast<ImageViewerApp*>(ImageViewerApp::GetInstance());
        String uriData = pImageViewerApp->GetUriData();
+
        if (uriData.IsEmpty() == true)
        {
                const IMap* pArguments = pImageViewerApp->GetAppControlArguments();
@@ -146,7 +149,9 @@ ImageViewerPresentationModel::Construct(void)
        else
        {
                uriData.Replace(APPCONTROL_DATA_URI_FILE, L"");
+
                ImageInfo* pImageInfo = new (std::nothrow) ImageInfo();
+
                pImageInfo->Construct(uriData, null);
                __pImageCaches->Add(pImageInfo);
        }
@@ -161,6 +166,7 @@ ImageViewerPresentationModel::Construct(void)
        __pImageViewerListener->Construct();
 
        IImageProviderEventListener* pImageProviderEventListener = static_cast<IImageProviderEventListener*>(this);
+
        __pImageEvent = new (std::nothrow) ImageEvent();
        __pImageEvent->AddListener(*pImageProviderEventListener, true);
 
@@ -177,15 +183,19 @@ void
 ImageViewerPresentationModel::CreateInstance(void)
 {
        __pPresentationModelInstance = new (std::nothrow) ImageViewerPresentationModel();
+
        result r = __pPresentationModelInstance->Construct();
+
        if (IsFailed(r) == true)
        {
                delete __pPresentationModelInstance;
                __pPresentationModelInstance = null;
+
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
 
                return;
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        std::atexit(DestroyInstance);
@@ -195,17 +205,21 @@ void
 ImageViewerPresentationModel::DestroyInstance(void)
 {
        AppLogDebug("ENTER");
+
        delete __pImageEvent;
        delete __pImageViewerListener;
        delete __pPresentationModelInstance;
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
 result
-ImageViewerPresentationModel::AddListener(IImageViewerEventListener* listener)
+ImageViewerPresentationModel::AddListener(IImageViewerEventListener* pListener)
 {
        AppLogDebug("ENTER");
-       result r = __pImageViewerListener->Add(listener);
+
+       result r = __pImageViewerListener->Add(pListener);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -222,10 +236,10 @@ ImageViewerPresentationModel::RemoveListener(IImageViewerEventListener& listner)
 }
 
 result
-ImageViewerPresentationModel::AddFileUpdateListener(IFileUpdateEventListener* listener)
+ImageViewerPresentationModel::AddFileUpdateListener(IFileUpdateEventListener* pListener)
 {
        AppLogDebug("ENTER");
-       result r = __pFileUpdateListener->Add(listener);
+       result r = __pFileUpdateListener->Add(pListener);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -250,17 +264,18 @@ ImageViewerPresentationModel::GetStartIndex(void) const
 }
 
 void
-ImageViewerPresentationModel::ClearImageRequests(bool appTerminating)
+ImageViewerPresentationModel::ClearImageRequests(bool isAppTerminating)
 {
-       __pImageProvider->ClearImageRequests(appTerminating);
+       __pImageProvider->ClearImageRequests(isAppTerminating);
 }
 
 void
 ImageViewerPresentationModel::DeleteFilePathAt(const int index)
 {
        AppLogDebug("ENTER");
-       __ivTriggeredEvent = true;
+       __isIvTriggeredEvent = true;
        __pImageCaches->RemoveAt(index, true);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -268,9 +283,10 @@ void
 ImageViewerPresentationModel::UpdateFilePathAt(const int index, const String& filePath)
 {
        AppLogDebug("ENTER index(%d) filePath(%ls)", index, filePath.GetPointer());
+
        ImageInfo* pImageInfo = static_cast<ImageInfo*>(__pImageCaches->GetAt(index));
        pImageInfo->SetFilePath(filePath);
-       __ivTriggeredEvent = true;
+       __isIvTriggeredEvent = true;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -278,6 +294,7 @@ String
 ImageViewerPresentationModel::GetFilePathAt(const int index) const
 {
        AppLogDebug("ENTER index(%d)", index);
+
        if (index < 0 || __pImageCaches->GetCount() <= index)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
@@ -331,22 +348,25 @@ ImageViewerPresentationModel::GetType(void) const
 }
 
 String
-ImageViewerPresentationModel::GetFileName(const String& filePath, bool checkExe) const
+ImageViewerPresentationModel::GetFileName(const String& filePath, bool isCheckExe) const
 {
        AppLogDebug("ENTER");
+
        String strResult;
        int lastIndex = -1 ;
 
        filePath.LastIndexOf(DIRECTORY_SEPARATOR, filePath.GetLength() - 1, lastIndex);
        filePath.SubString(lastIndex+1, strResult);
 
-       if (checkExe == true)
+       if (isCheckExe == true)
        {
                String strTemp = strResult;
+
                lastIndex = -1;
                strTemp.LastIndexOf(FILE_EXT_SEPARATOR, strTemp.GetLength() - 1, lastIndex);
                strTemp.SubString(0, lastIndex, strResult);
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return strResult;
@@ -363,6 +383,7 @@ ImageViewerPresentationModel::StartAppControl(const String& providerId, const St
        if (pAc == null)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+
                return E_FAILURE;
        }
 
@@ -371,10 +392,12 @@ ImageViewerPresentationModel::StartAppControl(const String& providerId, const St
        if (r == E_SUCCESS)
        {
                ImageViewerApp* pImageViewerApp = static_cast<ImageViewerApp*>(ImageViewerApp::GetInstance());
+
                pImageViewerApp->SetFrameEnabled(false);
        }
 
        delete pAc;
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
@@ -384,7 +407,9 @@ void
 ImageViewerPresentationModel::RequestImage(const Tizen::Base::String& filePath) const
 {
        AppLogDebug("ENTER");
+
        __pImageProvider->RequestImage(filePath, __pImageEvent);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -392,6 +417,7 @@ ContentId
 ImageViewerPresentationModel::GetFileContentId(const String& filePath) const
 {
        AppLogDebug("ENTER");
+
        ContentId contentId;
        int totalPage = 0;
        int totalCount = 0;
@@ -406,6 +432,7 @@ ImageViewerPresentationModel::GetFileContentId(const String& filePath) const
        queryString.Append(L"'");
        queryString.Append(GetFileName(filePath));
        queryString.Append(L"'");
+
        pContentInfoList = contentSearch.SearchN(PAGE_NO_CONTENT_SEARCH, COUNT_PER_PAGE_CONTENT_SEARCH, totalPage,
                        totalCount, queryString, EMPTY_SPACE, SORT_ORDER_NONE);
 
@@ -452,13 +479,16 @@ void
 ImageViewerPresentationModel::OnImageReceivedN(IEventArg& eventArg)
 {
        AppLogDebug("ENTER");
+
        ImageEventArg* pImageEventArg = static_cast<ImageEventArg*>(&eventArg);
+
        if (pImageEventArg != null)
        {
                ImageInfo* pImageInfo = null;
                String string;
                String stringDecoded = pImageEventArg->GetFilePath();
                int loopCount = __pImageCaches->GetCount();
+
                for (int i = 0; i < loopCount; ++i)
                {
                        pImageInfo = static_cast<ImageInfo*>(__pImageCaches->GetAt(i));
@@ -477,6 +507,7 @@ ImageViewerPresentationModel::OnImageReceivedN(IEventArg& eventArg)
 
                                        IImageViewerEventListener* pEventListener = null;
                                        IEnumerator* pEventEnum = __pImageViewerListener->GetEnumeratorN();
+
                                        while (pEventEnum->MoveNext() == E_SUCCESS)
                                        {
                                                pEventListener = static_cast<IImageViewerEventListener*>(pEventEnum->GetCurrent());
@@ -492,7 +523,7 @@ ImageViewerPresentationModel::OnImageReceivedN(IEventArg& eventArg)
 }
 
 void
-ImageViewerPresentationModel::LoadSettingValue()
+ImageViewerPresentationModel::LoadSettingValue(void)
 {
        AppLogDebug("ENTER");
        int returnValue = 0;
@@ -562,7 +593,7 @@ ImageViewerPresentationModel::OnContentFileDeleted(Tizen::Content::ContentId con
 {
        AppLogDebug("ENTER");
        __contentId = contentId;
-       __ivTriggeredDeleteEvent = true;
+       __isIvTriggeredDeleteEvent = true;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -571,7 +602,7 @@ ImageViewerPresentationModel::OnContentDirectoryScanCompleted(const Tizen::Base:
 {
        AppLogDebug("ENTER");
        AppLogDebug(" directory path is %ls", filePath.GetPointer());
-       if ( !__ivTriggeredEvent && __ivTriggeredDeleteEvent)
+       if (!__isIvTriggeredEvent && __isIvTriggeredDeleteEvent)
        {
                int index = GetImageCacheIndex(filePath);
                AppLogDebug("index is %d", index);
@@ -588,10 +619,10 @@ ImageViewerPresentationModel::OnContentDirectoryScanCompleted(const Tizen::Base:
                        }
                }
        }
-       if (__ivTriggeredDeleteEvent)
+       if (__isIvTriggeredDeleteEvent)
        {
-               __ivTriggeredEvent = false;
+               __isIvTriggeredEvent = false;
        }
-       __ivTriggeredDeleteEvent = false;
+       __isIvTriggeredDeleteEvent = false;
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
index 47dd263..3b678d8 100644 (file)
@@ -47,6 +47,7 @@ result
 MainFrame::OnInitializing(void)
 {
        AppLogDebug("ENTER");
+
        static const wchar_t* PANEL_BLANK = L"";
        static FormFactory formFactory;
 
@@ -60,6 +61,7 @@ MainFrame::OnInitializing(void)
        ImageViewerApp* pImageViewerApp = static_cast<ImageViewerApp*>(ImageViewerApp::GetInstance());
 
        String operationID = pImageViewerApp->GetAppControlOperationId();
+
        if (operationID.CompareTo(APPCONTROL_OPERATION_ID_VIEW) == 0)
        {
                pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER), null);
@@ -72,6 +74,7 @@ MainFrame::OnInitializing(void)
        {
                pImageViewerApp->Terminate();
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return E_SUCCESS;
index 3895586..6f81a27 100644 (file)
@@ -30,12 +30,15 @@ Bitmap*
 ResourceManager::GetBitmapN(const String& id)
 {
        AppLogDebug("ENTER");
+
        AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
        if (pAppResource == null)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
                return null;
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return pAppResource->GetBitmapN(id);
@@ -45,7 +48,9 @@ String
 ResourceManager::GetString(const String& id)
 {
        AppLogDebug("ENTER");
+
        AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
        if (pAppResource == null)
        {
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
@@ -54,7 +59,9 @@ ResourceManager::GetString(const String& id)
        }
 
        String str;
+
        pAppResource->GetString(id, str);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return str;
index 39598bc..d7058b3 100644 (file)
@@ -19,7 +19,6 @@
  * @brief              This is the implementation file for SettingPresentationModel class.
  */
 
-#include <cstdlib>
 #include "IvSettingPresentationModel.h"
 
 using namespace Tizen::App;
@@ -83,6 +82,7 @@ void
 SettingPresentationModel::CreateInstance(void)
 {
        AppLogDebug("ENTER");
+
        __pPresentationModelInstance = new (nothrow) SettingPresentationModel;
        result r = __pPresentationModelInstance->Construct();
 
@@ -90,12 +90,14 @@ SettingPresentationModel::CreateInstance(void)
        {
                delete __pPresentationModelInstance;
                __pPresentationModelInstance = null;
+
                AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
 
                return;
        }
 
        atexit(DestroyInstance);
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -103,8 +105,10 @@ void
 SettingPresentationModel::DestroyInstance(void)
 {
        AppLogDebug("ENTER");
+
        delete __pPresentationModelInstance;
        __pPresentationModelInstance = null;
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
@@ -112,6 +116,7 @@ result
 SettingPresentationModel::GetValue(const String& strSectionName, const String& entryName, int& value) const
 {
        AppLogDebug("ENTER");
+
        result r = E_SUCCESS;
        String valueRegistryString = L"";
        AppManager* pAppManager = AppManager::GetInstance();
@@ -155,6 +160,7 @@ SettingPresentationModel::GetValue(const String& strSectionName, const String& e
        {
                r = __pAppGalleryRegistry->GetValue(strSectionName, entryName, value);
        }
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
        return r;
index edc5e6e..be647cb 100644 (file)
@@ -152,6 +152,6 @@ const wchar_t* DEVICE_STORAGE_CARD_UNMOUNTED = L"Unmounted";
 
 const wchar_t* MEDIA_ROOT_PHONE = L"Phone/";
 
-const int FOOTER_PANEL_HEIGHT = 98;
-const int INDICATOR_BAR_HEIGHT = 60;
-const int CROP_RECTANGLE_HEIGHT = 20;
+const int H_FOOTER_PANEL = 98;
+const int H_INDICATOR_BAR = 60;
+const int H_CROP_RECTANGLE = 20;