Rename feature added
authorchitta ranjan <chitta.rs@samsung.com>
Mon, 25 Mar 2013 08:50:36 +0000 (17:50 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Mon, 25 Mar 2013 08:50:36 +0000 (17:50 +0900)
Change-Id: I382ef6c3e7ab6c23d77bd7e133b5547b87162ec8
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
43 files changed:
inc/GlAlbumListPresentationModel.h
inc/GlAlbumNameEditorForm.h
inc/GlAlbumRenameEventListener.h [new file with mode: 0644]
inc/GlProgressAnimation.h [new file with mode: 0644]
inc/GlTypes.h
res/screen-density-xhigh/00_list_process_01.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_02.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_03.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_04.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_05.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_06.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_07.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_08.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_09.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_10.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_11.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_12.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_13.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_14.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_15.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_16.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_17.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_18.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_19.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_20.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_21.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_22.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_23.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_24.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_25.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_26.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_27.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_28.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_29.png [new file with mode: 0644]
res/screen-density-xhigh/00_list_process_30.png [new file with mode: 0644]
src/GlAlbumListEditorForm.cpp
src/GlAlbumListForm.cpp
src/GlAlbumListPresentationModel.cpp
src/GlAlbumNameEditorForm.cpp
src/GlFileListEditorForm.cpp
src/GlProgressAnimation.cpp [new file with mode: 0644]
src/GlProgressBar.cpp
src/GlTypes.cpp

index c7603f5..d104081 100644 (file)
@@ -25,6 +25,7 @@
 #include <FApp.h>
 #include <FBase.h>
 #include <FContent.h>
+#include <FCntIContentScanListener.h>
 #include <FGraphics.h>
 #include <FIo.h>
 #include <FUi.h>
 #include "GlTypes.h"
 
 class AlbumInfo;
+class IAlbumRenameEventListener;
 
 class AlbumListPresentationModel
        : public Tizen::Base::Object
        , public IThumbnailEventListener
+       , public Tizen::Content::IContentScanListener
 {
 public:
        static AlbumListPresentationModel* GetInstance(void);
@@ -65,8 +68,13 @@ public:
        AppControlMediaType GetAppControlMediaType(void) const;
        AppControlSelectionMode GetAppControlSelectionMode(void) const;
 
+       result RenameAlbum(const Tizen::Base::String&, const Tizen::Base::String&, IAlbumRenameEventListener*);
+
        virtual void OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg);
 
+       //From IContentScanListener
+       virtual void OnContentScanCompleted (RequestId reqId, const Tizen::Base::String &scanPath, result r);
+
 private:
        AlbumListPresentationModel(void);
        virtual ~AlbumListPresentationModel(void);
@@ -94,9 +102,11 @@ private:
        static ThumbnailEvent* __pThumbnailEvent;
 
        static Tizen::Base::Collection::ArrayList* __pPresentationModelListener;
-
        static Tizen::Base::Collection::IList* __pAlbumInfoList;
 
+       IAlbumRenameEventListener* __pAlbumListener;
+       RequestId __reqId;
+
        AppControlMode __appControlMode;
        AppControlMediaType __appControlMediaType;
        AppControlSelectionMode __appControlSelectionMode;
index 4500c7d..600b803 100644 (file)
@@ -29,7 +29,7 @@
 #include <FSystem.h>
 #include <FUi.h>
 
-
+#include "GlAlbumRenameEventListener.h"
 #include "GlBaseForm.h"
 #include "GlFileOpInvalidateListener.h"
 #include "GlTypes.h"
@@ -38,6 +38,7 @@
 class AlbumListPresentationModel;
 class FileListPresentationModel;
 class FileMoveTimer;
+class ProgressAnimation;
 
 class AlbumNameEditorForm
        : public BaseForm
@@ -46,6 +47,7 @@ class AlbumNameEditorForm
        , public Tizen::Ui::Controls::IFormBackEventListener
        , public Tizen::Ui::Scenes::ISceneEventListener
        , public IFileOpInvalidateListener
+       , public IAlbumRenameEventListener
 {
 public:
        AlbumNameEditorForm();
@@ -71,6 +73,13 @@ public:
        void OnFileOpInvalidate(enum FileActionMode __actionId);
        void OnFileOpComplete(enum FileActionMode __actionId, enum FileActionCompleteRes);
 
+       //From IAlbumRenameEventListener
+       void OnAlbumRenameComplete( void );
+
+private:
+       void OnCreateAlbum(void);
+       void OnRenameAlbum(const Tizen::Base::String& );
+
 private:
        Tizen::Ui::Controls::EditField* __pNameEditField;
        Tizen::Base::String __nameEditFieldText;
@@ -86,6 +95,7 @@ private:
        Tizen::Base::Collection::IList* __pMoveIndexList;
 
        FileMoveTimer* __pFileMove;
+       ProgressAnimation* __pProgressAnim;
 };
 
 #endif /* _GL_ALBUM_NAME_EDITOR_FORM_H_ */
diff --git a/inc/GlAlbumRenameEventListener.h b/inc/GlAlbumRenameEventListener.h
new file mode 100644 (file)
index 0000000..6574fa5
--- /dev/null
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file               GlAlbumRenameEventListener.h
+ * @brief              This is the header file for GlAlbumRenameEventListener class.
+ */
+
+#ifndef _GL_ALBUM_RENAME_LISTENER_H_
+#define _GL_ALBUM_RENAME_LISTENER_H_
+
+class IAlbumRenameEventListener
+{
+public:
+       virtual ~IAlbumRenameEventListener(void) {}
+       virtual void OnAlbumRenameComplete( void ) = 0;
+
+};
+
+#endif /* _GL_ALBUM_RENAME_LISTENER_H_ */
diff --git a/inc/GlProgressAnimation.h b/inc/GlProgressAnimation.h
new file mode 100644 (file)
index 0000000..25b37ac
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file               GlProgressAnimation.h
+ * @brief              This is the header file for GlProgressAnimation class.
+ */
+
+#ifndef _GLPROGRESSANIMATION_H_
+#define _GLPROGRESSANIMATION_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include <FMedia.h>
+#include <FApp.h>
+#include <FGraphics.h>
+
+class ProgressAnimation
+       : public Tizen::Ui::Controls::Panel
+{
+public:
+               ProgressAnimation(void);
+       virtual ~ProgressAnimation(void);
+
+       result Construct(Tizen::Graphics::Rectangle rect);
+
+       void AnimationStart(void);
+       void AnimationStop(void);
+
+private:
+       static const int DURATION = 500;
+       static const int PROGRESS_COUNT = 30;
+
+       Tizen::Ui::Controls::Animation* __pAnimation;
+       Tizen::Base::Collection::ArrayList* __pAnimationFrameList;
+
+};
+
+#endif // _GLPROGRESSANIMATION_H_
index 8a9e545..cc0e62a 100644 (file)
@@ -124,6 +124,12 @@ enum FileActionCompleteRes
        COMPLETE_SYS_FAILURE
 };
 
+enum AlbumAction
+{
+       ALBUM_CREATE,
+       ALBUM_RENAME
+};
+
 extern const wchar_t* IDL_FORM_ALBUM_LIST;
 extern const wchar_t* IDL_FORM_ALBUM_LIST_EDITOR;
 extern const wchar_t* IDL_FORM_FILE_LIST;
@@ -263,6 +269,62 @@ extern const wchar_t* IDB_ALBUM_ICON_FOLDER;
 extern const wchar_t* IDB_ALBUM_ICON_DOWNLOAD;
 extern const wchar_t*  IDB_ALBUM_ICON_CAMERA;
 
+extern const wchar_t* IDB_BUTTON_CIRCLE_BACKGROUND;
+extern const wchar_t* IDB_BUTTON_RENAME;
+extern const wchar_t* IDB_CONTROLBAR_CAMERA;
+extern const wchar_t* IDB_CONTROLBAR_DELETE;
+extern const wchar_t* IDB_CONTROLBAR_DELETE_DIM;
+extern const wchar_t* IDB_CONTROLBAR_MORE;
+extern const wchar_t* IDB_CONTROLBAR_MORE_DISABLED;
+extern const wchar_t* IDB_CONTROLBAR_SHARE;
+extern const wchar_t* IDB_CONTROLBAR_SHARE_DIM;
+extern const wchar_t* IDB_LISTVIEW_EMPTY;
+extern const wchar_t* IDB_MAIN_FOLDER_BACKGROUND;
+extern const wchar_t* IDB_VIDEOTHUMBNAIL_BG;
+extern const wchar_t* IDB_VIDEOTHUMBNAIL_BOOKMARK;
+extern const wchar_t* IDB_VIDEOTHUMBNAIL_FAVORITE;
+extern const wchar_t* IDB_VIDEOTHUMBNAIL_PLAY;
+extern const wchar_t* IDB_BUTTON_MOVE_SELECTION;
+extern const wchar_t* IDB_NO_CONTENTS_BROKEN;
+extern const wchar_t* IDB_LIST_EXPAND_CLOSED;
+extern const wchar_t* IDB_LIST_EXPAND_CLOSED_PRESS;
+extern const wchar_t* IDB_LIST_EXPAND_OPENED;
+extern const wchar_t* IDB_LIST_EXPAND_OPENED_PRESS;
+extern const wchar_t* IDB_ALBUM_EDIT_RENAME_BG;
+extern const wchar_t* IDB_ALBUM_EDIT_RENAME;
+
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS1;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS2;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS3;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS4;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS5;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS6;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS7;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS8;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS9;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS10;
+
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS11;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS12;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS13;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS14;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS15;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS16;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS17;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS18;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS19;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS20;
+
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS21;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS22;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS23;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS24;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS25;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS26;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS27;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS28;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS29;
+extern const wchar_t* IDB_ALBUM_RENAME_PROGRESS30;
 
 static const unsigned int CUSTOM_COLOR_GREY = Tizen::Graphics::Color32<124,124,124>::Value;
 static const unsigned int CUSTOM_COLOR_TRANSPARENT = Tizen::Graphics::Color32<0,0,0>::Value;
@@ -279,5 +341,7 @@ static const unsigned int CUSTOM_COLOR_SETTINGS_TEXT = Tizen::Graphics::Color32<
 static const unsigned int CUSTOM_COLOR_SETTINGS_LISTITEM_BACKGROUND = Tizen::Graphics::Color32<248, 246, 239>::Value;
 static const unsigned int CUSTOM_COLOR_SETTINGS_LISTITEM_RADIO_BACKGROUND = Tizen::Graphics::Color32<220, 218, 211>::Value;
 static const unsigned int CUSTOM_COLOR_SETTINGS_GROUPTITLE = Tizen::Graphics::Color32<59, 115, 182>::Value;
+static const int ALBUM_FIRST_ELEMENT = 0;
+
 
 #endif /* _GL_TYPES_H_ */
diff --git a/res/screen-density-xhigh/00_list_process_01.png b/res/screen-density-xhigh/00_list_process_01.png
new file mode 100644 (file)
index 0000000..cb74cb2
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_01.png differ
diff --git a/res/screen-density-xhigh/00_list_process_02.png b/res/screen-density-xhigh/00_list_process_02.png
new file mode 100644 (file)
index 0000000..bc43e8b
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_02.png differ
diff --git a/res/screen-density-xhigh/00_list_process_03.png b/res/screen-density-xhigh/00_list_process_03.png
new file mode 100644 (file)
index 0000000..280f431
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_03.png differ
diff --git a/res/screen-density-xhigh/00_list_process_04.png b/res/screen-density-xhigh/00_list_process_04.png
new file mode 100644 (file)
index 0000000..bf6f99d
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_04.png differ
diff --git a/res/screen-density-xhigh/00_list_process_05.png b/res/screen-density-xhigh/00_list_process_05.png
new file mode 100644 (file)
index 0000000..a1f3fc5
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_05.png differ
diff --git a/res/screen-density-xhigh/00_list_process_06.png b/res/screen-density-xhigh/00_list_process_06.png
new file mode 100644 (file)
index 0000000..3202a29
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_06.png differ
diff --git a/res/screen-density-xhigh/00_list_process_07.png b/res/screen-density-xhigh/00_list_process_07.png
new file mode 100644 (file)
index 0000000..8a29aea
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_07.png differ
diff --git a/res/screen-density-xhigh/00_list_process_08.png b/res/screen-density-xhigh/00_list_process_08.png
new file mode 100644 (file)
index 0000000..532cd07
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_08.png differ
diff --git a/res/screen-density-xhigh/00_list_process_09.png b/res/screen-density-xhigh/00_list_process_09.png
new file mode 100644 (file)
index 0000000..8c508a0
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_09.png differ
diff --git a/res/screen-density-xhigh/00_list_process_10.png b/res/screen-density-xhigh/00_list_process_10.png
new file mode 100644 (file)
index 0000000..679bcb8
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_10.png differ
diff --git a/res/screen-density-xhigh/00_list_process_11.png b/res/screen-density-xhigh/00_list_process_11.png
new file mode 100644 (file)
index 0000000..910f2b0
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_11.png differ
diff --git a/res/screen-density-xhigh/00_list_process_12.png b/res/screen-density-xhigh/00_list_process_12.png
new file mode 100644 (file)
index 0000000..35fb68f
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_12.png differ
diff --git a/res/screen-density-xhigh/00_list_process_13.png b/res/screen-density-xhigh/00_list_process_13.png
new file mode 100644 (file)
index 0000000..adcf94f
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_13.png differ
diff --git a/res/screen-density-xhigh/00_list_process_14.png b/res/screen-density-xhigh/00_list_process_14.png
new file mode 100644 (file)
index 0000000..283858b
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_14.png differ
diff --git a/res/screen-density-xhigh/00_list_process_15.png b/res/screen-density-xhigh/00_list_process_15.png
new file mode 100644 (file)
index 0000000..3167602
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_15.png differ
diff --git a/res/screen-density-xhigh/00_list_process_16.png b/res/screen-density-xhigh/00_list_process_16.png
new file mode 100644 (file)
index 0000000..26e691c
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_16.png differ
diff --git a/res/screen-density-xhigh/00_list_process_17.png b/res/screen-density-xhigh/00_list_process_17.png
new file mode 100644 (file)
index 0000000..1a059dd
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_17.png differ
diff --git a/res/screen-density-xhigh/00_list_process_18.png b/res/screen-density-xhigh/00_list_process_18.png
new file mode 100644 (file)
index 0000000..6c7f410
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_18.png differ
diff --git a/res/screen-density-xhigh/00_list_process_19.png b/res/screen-density-xhigh/00_list_process_19.png
new file mode 100644 (file)
index 0000000..3a33a95
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_19.png differ
diff --git a/res/screen-density-xhigh/00_list_process_20.png b/res/screen-density-xhigh/00_list_process_20.png
new file mode 100644 (file)
index 0000000..6076f52
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_20.png differ
diff --git a/res/screen-density-xhigh/00_list_process_21.png b/res/screen-density-xhigh/00_list_process_21.png
new file mode 100644 (file)
index 0000000..b09d472
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_21.png differ
diff --git a/res/screen-density-xhigh/00_list_process_22.png b/res/screen-density-xhigh/00_list_process_22.png
new file mode 100644 (file)
index 0000000..cffed12
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_22.png differ
diff --git a/res/screen-density-xhigh/00_list_process_23.png b/res/screen-density-xhigh/00_list_process_23.png
new file mode 100644 (file)
index 0000000..987562c
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_23.png differ
diff --git a/res/screen-density-xhigh/00_list_process_24.png b/res/screen-density-xhigh/00_list_process_24.png
new file mode 100644 (file)
index 0000000..a73d472
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_24.png differ
diff --git a/res/screen-density-xhigh/00_list_process_25.png b/res/screen-density-xhigh/00_list_process_25.png
new file mode 100644 (file)
index 0000000..02cfd95
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_25.png differ
diff --git a/res/screen-density-xhigh/00_list_process_26.png b/res/screen-density-xhigh/00_list_process_26.png
new file mode 100644 (file)
index 0000000..e5b6871
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_26.png differ
diff --git a/res/screen-density-xhigh/00_list_process_27.png b/res/screen-density-xhigh/00_list_process_27.png
new file mode 100644 (file)
index 0000000..7caf896
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_27.png differ
diff --git a/res/screen-density-xhigh/00_list_process_28.png b/res/screen-density-xhigh/00_list_process_28.png
new file mode 100644 (file)
index 0000000..6d30d39
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_28.png differ
diff --git a/res/screen-density-xhigh/00_list_process_29.png b/res/screen-density-xhigh/00_list_process_29.png
new file mode 100644 (file)
index 0000000..8d90522
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_29.png differ
diff --git a/res/screen-density-xhigh/00_list_process_30.png b/res/screen-density-xhigh/00_list_process_30.png
new file mode 100644 (file)
index 0000000..e6e392f
Binary files /dev/null and b/res/screen-density-xhigh/00_list_process_30.png differ
index d089956..d58538d 100644 (file)
@@ -57,13 +57,15 @@ static const int Y_POSITION_SHARE_CONTEXTMENU = 1180;
 static const Color COLOR_FOLDER_BITMAP_DIM(Color::GetColor(COLOR_ID_BLACK));
 static const int ALPHA_FOLDER_BITMAP_DIM = 70;
 
+static const int IDA_ALBUM_EDIT = 503 ;
+
 AlbumListEditorForm::AlbumListEditorForm()
-       : __checkedCount(0)
-       , __pSelectCountLabel(null)
-       , __pEditorFolderIconList(null)
-       , __pShareContextMenu(null)
-       , __pDeletePopup(null)
-       , __pPresentationModel(null)
+: __checkedCount(0)
+, __pSelectCountLabel(null)
+, __pEditorFolderIconList(null)
+, __pShareContextMenu(null)
+, __pDeletePopup(null)
+, __pPresentationModel(null)
 {
        AppLogDebug("ENTER");
        __overlayMsg = false;
@@ -234,7 +236,14 @@ AlbumListEditorForm::CreateItem(int index)
 {
        AppLogDebug("ENTER : index(%d)", index);
        Bitmap* pBitmap = null;
-       IconListViewItem* pIconListview = new IconListViewItem();
+       Canvas* pEditAlbumCanvas = null;
+       Bitmap* pEditAlbumBitmap = null;
+       Bitmap* pBitmapRenameBg = null;
+       Bitmap* pBitmapRename = null;
+       int canvasWidth = 64;
+       int canvasHeight = 64;
+
+       IconListViewItem* pIconListviewItem = new IconListViewItem();
 
        IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
        AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pAlbumInfoList->GetAt(index));
@@ -261,22 +270,47 @@ AlbumListEditorForm::CreateItem(int index)
                        canvas.FillRectangle(dimColor, canvas.GetBounds());
                        Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
                        pSelectedBitmap->Construct(canvas, canvas.GetBounds());
-                       pIconListview->Construct(*pBitmap, null, pSelectedBitmap);
+                       pIconListviewItem->Construct(*pBitmap, null, pSelectedBitmap);
                        delete pSelectedBitmap;
                }
        }
        else
        {
-               pIconListview->Construct(*pBitmap);
+               pIconListviewItem->Construct(*pBitmap);
        }
 
        if (pBitmap != null)
        {
                delete pBitmap;
        }
+
+       pBitmapRenameBg = ResourceManager::GetBitmapN(IDB_ALBUM_EDIT_RENAME_BG);
+       pBitmapRename = ResourceManager::GetBitmapN(IDB_ALBUM_EDIT_RENAME);
+
+       if ( pBitmapRenameBg != null &&  pBitmapRename != null)
+       {
+
+               pEditAlbumCanvas = new (std::nothrow) Canvas();
+               pEditAlbumCanvas->Construct(Rectangle(0,0,canvasWidth,canvasHeight));
+               pEditAlbumCanvas->DrawBitmap(Point(0,0),*pBitmapRenameBg);
+               pEditAlbumCanvas->DrawBitmap(Point(0,0),*pBitmapRename);
+
+
+               pEditAlbumBitmap = new (std::nothrow) Bitmap();
+
+               if ( pEditAlbumBitmap != NULL)
+               {
+                       pEditAlbumBitmap->Construct(*pEditAlbumCanvas,Rectangle(0,0,canvasWidth,canvasHeight));
+                       delete pEditAlbumCanvas;
+               }
+
+               pIconListviewItem->SetOverlayBitmap(IDA_ALBUM_EDIT, pEditAlbumBitmap, ALIGNMENT_RIGHT, ALIGNMENT_TOP);
+       }
+
+
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 
-       return pIconListview;
+       return pIconListviewItem;
 }
 
 void
@@ -288,11 +322,11 @@ AlbumListEditorForm::OnIconListViewItemStateChanged(IconListView& view, int inde
        {
                if (status == ICON_LIST_VIEW_ITEM_CHECKED)
                {
-                       --__checkedCount;
+                       ++__checkedCount;
                }
                else if (status == ICON_LIST_VIEW_ITEM_UNCHECKED)
                {
-                       ++__checkedCount;
+                       --__checkedCount;
                }
 
                String tempString;
@@ -325,14 +359,13 @@ AlbumListEditorForm::OnIconListViewOverlayBitmapSelected (IconListView &iconList
        AppLogDebug("ENTER");
        SceneManager* pSceneManager = SceneManager::GetInstance();
 
-       if (overlayBitmapId == ACTION_ID_EDITE_FOLDER)
-       {
-               ArrayList* pSelectedIndex = new (std::nothrow) ArrayList(SingleObjectDeleter);
-               pSelectedIndex->Construct();
-               pSelectedIndex->Add(new (std::nothrow) Integer(index));
+       ArrayList* pSelectedIndex = new (std::nothrow) ArrayList(SingleObjectDeleter);
+       pSelectedIndex->Construct();
+       //Adding the Action Type
+       pSelectedIndex->Add(new (std::nothrow) Integer(ALBUM_RENAME));
+       pSelectedIndex->Add(new (std::nothrow) Integer(index));
 
-               pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pSelectedIndex);
-       }
+       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pSelectedIndex);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
index e869739..af5ce2e 100644 (file)
@@ -445,6 +445,8 @@ AlbumListForm::OnSceneActivatedN(const SceneId& previousSceneId,
        {
                __pAlbumViewIconList->UpdateList();
        }
+
+       Invalidate(true);
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
index bd7c275..dd771f3 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "GlAlbumInfo.h"
 #include "GlAlbumListPresentationModel.h"
+#include "GlAlbumRenameEventListener.h"
 #include "GlGalleryApp.h"
 #include "GlThumbnailEvent.h"
 #include "GlThumbnailEventArg.h"
@@ -90,10 +91,11 @@ ThumbnailEvent* AlbumListPresentationModel::__pThumbnailEvent = null;
 IList* AlbumListPresentationModel::__pAlbumInfoList = null;
 
 AlbumListPresentationModel::AlbumListPresentationModel(void)
-: __pFolderBackgroundBitmap(null)
-, __appControlMode(APP_CONTROL_MODE_MAIN)
-, __appControlMediaType(APPCONTROL_MEDIA_TYPE_IMAGE)
-, __appControlSelectionMode(APPCONTROL_SELECTION_MODE_SINGLE)
+       : __pFolderBackgroundBitmap(null)
+       , __appControlMode(APP_CONTROL_MODE_MAIN)
+       , __appControlMediaType(APPCONTROL_MEDIA_TYPE_IMAGE)
+       , __pAlbumListener(null)
+       , __appControlSelectionMode(APPCONTROL_SELECTION_MODE_SINGLE)
 {
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
@@ -265,6 +267,38 @@ AlbumListPresentationModel::CallAlbumChangedEvent(void)
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
 }
 
+result
+AlbumListPresentationModel::RenameAlbum(const String& orgPath, const String& newPath,
+               IAlbumRenameEventListener* pAlbumListener)
+{
+       AppLogDebug("ENTER");
+       result r = Directory::Rename(orgPath, newPath);
+       if (IsFailed(r))
+       {
+               AppLogDebug("Album Rename failed(%s)", GetErrorMessage(r));
+       }
+       else
+       {
+               __pAlbumListener = pAlbumListener;
+               r = ContentManager::ScanDirectory(Tizen::System::Environment::GetMediaPath(), true, this, __reqId);
+               AppLogDebug("Content scan failed (%s)", GetErrorMessage(r));
+       }
+       AppLogDebug("EXIT");
+       return r;
+}
+
+void AlbumListPresentationModel::OnContentScanCompleted (RequestId reqId, const Tizen::Base::String &scanPath, result r)
+{
+       AppLogDebug("ENTER");
+       if ( __pAlbumListener && __reqId == reqId )
+       {
+               InitializeAlbumInfoList(CONTENT_TYPE_ALL);
+               __pAlbumListener->OnAlbumRenameComplete();
+       }
+       AppLogDebug("EXIT");
+
+}
+
 void
 AlbumListPresentationModel::DrawPartialImage(Canvas& canvas, AlbumInfo* pAlbumInfo, const Rectangle& rectNew)
 {
index 45a88a8..dcc19b9 100644 (file)
@@ -24,6 +24,7 @@
 #include "GlAlbumNameEditorForm.h"
 #include "GlAlbumListPresentationModel.h"
 #include "GlFileListPresentationModel.h"
+#include "GlProgressAnimation.h"
 #include "GlResourceManager.h"
 #include "GlTypes.h"
 #include "GlFileMoveTimer.h"
@@ -46,6 +47,7 @@ static const Rectangle RECT_NAME_EDIT_FIELD (0, 0, 720, 100);
 static const unsigned int COLOR_NAME_EDIT_FIELD = Color32<255, 255, 255>::Value;
 static const int ALBUM_MAX_LENGTH = 255;
 
+
 AlbumNameEditorForm::AlbumNameEditorForm()
 : __pNameEditField(null)
 , __folderIndex(0)
@@ -55,6 +57,7 @@ AlbumNameEditorForm::AlbumNameEditorForm()
 , __pFilePresentationModel(null)
 , __pMoveIndexList(null)
 ,__pFileMove(null)
+,__pProgressAnim(null)
 {
        AppLogDebug("ENTER");
        __overlayMsg = false;
@@ -84,6 +87,18 @@ AlbumNameEditorForm::OnInitializing(void)
        AppLogDebug("ENTER");
        AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
        __pFilePresentationModel = FileListPresentationModel::GetInstance();
+
+
+       __pNameEditField = new (std::nothrow) EditField();
+       __pNameEditField->Construct(RECT_NAME_EDIT_FIELD, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY,
+                       EDIT_FIELD_TITLE_STYLE_NONE, true, ALBUM_MAX_LENGTH);
+       __pNameEditField->AddTextEventListener(*this);
+       __pNameEditField->SetColor(EDIT_STATUS_NORMAL, COLOR_NAME_EDIT_FIELD);
+       __pNameEditField->SetOverlayKeypadCommandButtonVisible(false);
+
+       AddControl(*__pNameEditField);
+       __pNameEditField->AddActionEventListener(*this);
+
        return E_SUCCESS;
 }
 
@@ -201,6 +216,118 @@ void AlbumNameEditorForm::OnFileOpComplete(enum FileActionMode actionId, enum Fi
 }
 
 void
+AlbumNameEditorForm::OnRenameAlbum(const String& strOri)
+{
+       AppLogDebug("Rename Album");
+       String path;
+       path.Append(Tizen::System::Environment::GetMediaPath());
+       path.Append(__nameEditFieldText);
+
+       //Rename
+       result r = __pPresentationModel->RenameAlbum(strOri, path, this);
+       if (IsFailed(r))
+       {
+               AppLogDebug("Unable to rename Album %s", GetErrorMessage(r));
+               if (__pMessageBox == null)
+               {
+                       __pMessageBox = new (std::nothrow) MessageBox();
+                       __pMessageBox->Construct(L"", L"Unable to rename", MSGBOX_STYLE_NONE, 3000);
+                       int modalResult = 0;
+                       __overlayMsg = true;
+                       __pMessageBox->ShowAndWait(modalResult);
+                       __overlayMsg = false;
+                       delete __pMessageBox;
+                       __pMessageBox = null;
+                       SceneManager* pSceneManager = SceneManager::GetInstance();
+                       pSceneManager->GoBackward(BackwardSceneTransition(__callerSceneId));
+               }
+       }
+       else
+       {
+               //Add a popup here..
+               Rectangle clientRect= GetClientAreaBounds();
+               Rectangle rect(0,0,clientRect.width,clientRect.height);
+               __pProgressAnim = new (std::nothrow) ProgressAnimation;
+               __pProgressAnim->Construct(rect);
+               AddControl(*__pProgressAnim);
+               __pProgressAnim->SetShowState(true);
+               __pProgressAnim->AnimationStart();
+               __pProgressAnim->Draw();
+               __overlayMsg = true;
+       }
+
+}
+
+void
+AlbumNameEditorForm::OnCreateAlbum(void)
+{
+       String path;
+       __pNameEditField->HideKeypad();
+       __pNameEditField->RequestRedraw();
+       path.Append(Tizen::System::Environment::GetMediaPath());
+       path.Append(__nameEditFieldText);
+
+       if (__previousSceneId != IDSCN_ALL_LIST_EDITOR && __previousSceneId != IDSCN_ALL_LIST_SELECTION)
+       {
+               Directory::Create( path, true);
+       }
+
+       __nameEditFieldPreText = __nameEditFieldText;
+
+       if (path.IsEmpty())
+       {
+               AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
+               delete __pMoveIndexList;
+               __pMoveIndexList = null;
+               return ;
+       }
+
+       if (__pMoveIndexList == null || __pMoveIndexList->GetCount() <= 0)
+       {
+               AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
+               delete __pMoveIndexList;
+               __pMoveIndexList = null;
+               return ;
+       }
+
+       delete __pFileMove;
+       GetMoveFileIndexList(path, __pMoveIndexList, __pFilePresentationModel);
+       __pFileMove = new FileMoveTimer(path, __pMoveIndexList,
+                       __pFilePresentationModel,
+                       this );
+       result r = __pFileMove->StartTimer();
+
+       if (IsFailed(r))
+       {
+               delete __pFileMove;
+               __pFileMove = null;
+               __pNameEditField->SetText(__nameEditFieldPreText);
+               __pNameEditField->HideKeypad();
+               __pNameEditField->Draw();
+               AppLogDebug("MoveToContentFileList content failed (%s)", GetErrorMessage(r));
+               SceneManager* pSceneManager = SceneManager::GetInstance();
+               pSceneManager->GoBackward(BackwardSceneTransition(__callerSceneId));
+       }
+       else
+       {
+               AppLogDebug("MoveToContentFileList content in progress");
+               __overlayMsg = true;
+       }
+}
+
+void AlbumNameEditorForm::OnAlbumRenameComplete( void )
+{
+       //Hide popup here..
+       __pProgressAnim->AnimationStop();
+       __pProgressAnim->SetShowState(false);
+       RemoveControl(*__pProgressAnim);
+       __overlayMsg = false;
+       SceneManager* pSceneManager = SceneManager::GetInstance();
+       pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
+}
+
+
+void
 AlbumNameEditorForm::OnActionPerformed(const Control& source, int actionId)
 {
        AppLogDebug("ENTER");
@@ -222,61 +349,16 @@ AlbumNameEditorForm::OnActionPerformed(const Control& source, int actionId)
        {
        case ACTION_ID_BUTTON_CREATE_NAME_DONE:
        {
-               __pNameEditField->HideKeypad();
-               __pNameEditField->RequestRedraw();
-               pPath.Append(Tizen::System::Environment::GetMediaPath());
-               pPath.Append(__nameEditFieldText);
-
-               if (__previousSceneId != IDSCN_ALL_LIST_EDITOR && __previousSceneId != IDSCN_ALL_LIST_SELECTION)
+               if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_CREATE)
                {
-                       Directory::Create( pPath, true);
+                       //Create new Album
+                       OnCreateAlbum();
                }
-
-               __nameEditFieldPreText = __nameEditFieldText;
-               ArrayList argsList;
-               argsList.Construct();
-               argsList.Add(new (std::nothrow) String(pPath));
-
-
-               if (pPath.IsEmpty())
+               else if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_RENAME)
                {
-                       AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-                       delete __pMoveIndexList;
-                       __pMoveIndexList = null;
-                       return ;
+                       //Rename a album
+                       OnRenameAlbum(strOri);
                }
-
-               if (__pMoveIndexList == null || __pMoveIndexList->GetCount() <= 0)
-               {
-                       AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-                       delete __pMoveIndexList;
-                       __pMoveIndexList = null;
-                       return ;
-               }
-
-               delete __pFileMove;
-               GetMoveFileIndexList(pPath, __pMoveIndexList, __pFilePresentationModel);
-               __pFileMove = new FileMoveTimer(pPath, __pMoveIndexList,
-                               __pFilePresentationModel,
-                               this );
-               result r = __pFileMove->StartTimer();
-               
-               if (IsFailed(r))
-               {
-                       delete __pFileMove;
-                       __pFileMove = null;
-                       __pNameEditField->SetText(__nameEditFieldPreText);
-                       __pNameEditField->HideKeypad();
-                       __pNameEditField->Draw();
-                       pSceneManager->GoBackward(BackwardSceneTransition(__callerSceneId));
-               }
-               else
-               {
-                       __overlayMsg = true;
-               }
-
-               AppLogDebug("MoveToContentFileList content failed (%s)", GetErrorMessage(r));
-
                break;
        }
        case ACTION_ID_BUTTON_CREATE_NAME_CANCEL:
@@ -319,6 +401,22 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
        __pPresentationModel = AlbumListPresentationModel::GetInstance();
        __previousSceneId = previousSceneId;
 
+       if (pArgs != null)
+       {
+               Integer* albumTypePtr = static_cast<Integer*>(pArgs->GetAt(ALBUM_FIRST_ELEMENT));
+               if (albumTypePtr->ToInt() == ALBUM_CREATE)
+               {
+                       AppLogDebug("ALBUM_NAME_EDITOR_MODE_CREATE");
+                       __albumNameEditorMode = ALBUM_NAME_EDITOR_MODE_CREATE;
+               }
+               else if (albumTypePtr->ToInt()  == ALBUM_RENAME)
+               {
+                       AppLogDebug("ALBUM_NAME_EDITOR_MODE_RENAME");
+                       __albumNameEditorMode = ALBUM_NAME_EDITOR_MODE_RENAME;
+               }
+               pArgs->RemoveAt(ALBUM_FIRST_ELEMENT, true);
+       }
+
        if (previousSceneId == IDSCN_ALBUM_LIST_EDITOR)
        {
                if (pArgs != null)
@@ -351,12 +449,10 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
                        AppLogDebug("[MOVE] previousSceneId = IDSCN_ALL_LIST_SELECTION");
                }
 
-               __albumNameEditorMode = ALBUM_NAME_EDITOR_MODE_CREATE;
                __callerSceneId = previousSceneId;
        }
        else
        {
-               __albumNameEditorMode = ALBUM_NAME_EDITOR_MODE_RENAME;
                __callerSceneId = EMPTY_SPACE;
        }
 
@@ -379,21 +475,12 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
                pHeader->AddActionEventListener(*this);
                pHeader->SetItemEnabled(0, false);
 
-               __pNameEditField = new (std::nothrow) EditField();
-               __pNameEditField->Construct(RECT_NAME_EDIT_FIELD, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY,
-                               EDIT_FIELD_TITLE_STYLE_NONE, true, ALBUM_MAX_LENGTH);
-               __pNameEditField->AddTextEventListener(*this);
-               __pNameEditField->SetColor(EDIT_STATUS_NORMAL, COLOR_NAME_EDIT_FIELD);
-
-               AddControl(*__pNameEditField);
-               __pNameEditField->AddActionEventListener(*this);
-
                __nameEditFieldText = EMPTY_SPACE;
                __nameEditFieldPreText = EMPTY_SPACE;
                __pNameEditField->SetText(__nameEditFieldText);
                __nameEditFieldTempText = __nameEditFieldText;
 
-               __pNameEditField->SetOverlayKeypadCommandButtonVisible(false);
+
                __pNameEditField->SetFocus();
 
        }
@@ -416,14 +503,6 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
                pHeader->AddItem(cancelItem);
                pHeader->AddActionEventListener(*this);
 
-               __pNameEditField = new (std::nothrow) EditField();
-               __pNameEditField->Construct(RECT_NAME_EDIT_FIELD, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY,
-                               EDIT_FIELD_TITLE_STYLE_NONE, true, ALBUM_MAX_LENGTH);
-               __pNameEditField->AddTextEventListener(*this);
-               __pNameEditField->SetColor(EDIT_STATUS_NORMAL, COLOR_NAME_EDIT_FIELD);
-
-               AddControl(*__pNameEditField);
-               __pNameEditField->AddActionEventListener(*this);
                String strName;
 
                IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
@@ -436,27 +515,7 @@ AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId,
 
                __pNameEditField->SetOverlayKeypadCommandButtonVisible(false);
                __pNameEditField->SetFocus();
-       }
 
-       if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_CREATE)
-       {
-               __nameEditFieldText = EMPTY_SPACE;
-               __nameEditFieldPreText = EMPTY_SPACE;
-               __pNameEditField->SetText(__nameEditFieldText);
-       }
-       else
-       {
-               IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList();
-               AlbumInfo* pAlbumInfo = static_cast<AlbumInfo*>(pAlbumInfoList->GetAt(__folderIndex));
-               if (pAlbumInfo != null)
-               {
-                       String strName;
-                       strName = pAlbumInfo->GetAlbumName();
-
-                       __nameEditFieldText = strName;
-                       __nameEditFieldPreText = strName;
-                       __pNameEditField->SetText(__nameEditFieldText);
-               }
        }
 
        if (pArgs != NULL)
index c541fe5..430b87e 100644 (file)
@@ -572,7 +572,7 @@ FileListEditorForm::OnActionPerformed(const Control& source, int actionId)
                {
                        AllListEditorPanel* pListEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
                        IList* pList = pListEditorPanel->GetItemCheckedIndexListN();
-
+                       pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
                }
                break;
@@ -584,6 +584,7 @@ FileListEditorForm::OnActionPerformed(const Control& source, int actionId)
                        AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
                        (pSceneManager->GetCurrentScene()->GetPanel());
                        IList* pList = pSelectionPanel->GetItemCheckedIndexListN();
+                       pList->InsertAt(new (std::nothrow) Integer(ALBUM_CREATE), ALBUM_FIRST_ELEMENT);
                        pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pList);
                }
                break;
diff --git a/src/GlProgressAnimation.cpp b/src/GlProgressAnimation.cpp
new file mode 100644 (file)
index 0000000..c2f18cf
--- /dev/null
@@ -0,0 +1,216 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file               GlProgressAnimation.cpp
+ * @brief              This is the implementation file for GlProgressAnimation class.
+ */
+
+#include "GlProgressAnimation.h"
+#include "GlTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+
+ProgressAnimation::ProgressAnimation(void)
+       : __pAnimation(null)
+       , __pAnimationFrameList(null)
+{
+
+}
+
+
+ProgressAnimation::~ProgressAnimation(void)
+{
+       if(__pAnimationFrameList != null)
+       {
+               __pAnimationFrameList->RemoveAll(true);
+               delete __pAnimationFrameList;
+               __pAnimationFrameList = null;
+       }
+}
+
+result
+ProgressAnimation::Construct(Tizen::Graphics::Rectangle rect)
+{
+       result r = E_SUCCESS;
+       Panel::Construct(rect);
+
+       // Create Bitmap
+       AppResource *pAppResource = Application::GetInstance()->GetAppResource();
+       if (pAppResource != null)
+       {
+               Bitmap *pBitmap0 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS1);
+               Bitmap *pBitmap1 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS2);
+               Bitmap *pBitmap2 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS3);
+               Bitmap *pBitmap3 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS4);
+               Bitmap *pBitmap4 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS5);
+               Bitmap *pBitmap5 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS6);
+               Bitmap *pBitmap6 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS7);
+               Bitmap *pBitmap7 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS8);
+               Bitmap *pBitmap8 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS9);
+               Bitmap *pBitmap9 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS10);
+               Bitmap *pBitmap10 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS11);
+               Bitmap *pBitmap11 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS12);
+               Bitmap *pBitmap12 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS13);
+               Bitmap *pBitmap13 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS14);
+               Bitmap *pBitmap14 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS15);
+               Bitmap *pBitmap15 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS16);
+               Bitmap *pBitmap16 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS17);
+               Bitmap *pBitmap17 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS18);
+               Bitmap *pBitmap18 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS19);
+               Bitmap *pBitmap19 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS20);
+               Bitmap *pBitmap20 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS21);
+               Bitmap *pBitmap21 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS22);
+               Bitmap *pBitmap22 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS23);
+               Bitmap *pBitmap23 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS24);
+               Bitmap *pBitmap24 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS25);
+               Bitmap *pBitmap25 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS26);
+               Bitmap *pBitmap26 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS27);
+               Bitmap *pBitmap27 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS28);
+               Bitmap *pBitmap28 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS29);
+               Bitmap *pBitmap29 = pAppResource->GetBitmapN(IDB_ALBUM_RENAME_PROGRESS30);
+
+               // Create AnimationFrames
+               long duration = DURATION / PROGRESS_COUNT;
+               AnimationFrame *pAniFrame1 = new (std::nothrow) AnimationFrame(*pBitmap0, duration);
+               AnimationFrame *pAniFrame2 = new (std::nothrow) AnimationFrame(*pBitmap1, duration);
+               AnimationFrame *pAniFrame3 = new (std::nothrow) AnimationFrame(*pBitmap2, duration);
+               AnimationFrame *pAniFrame4 = new (std::nothrow) AnimationFrame(*pBitmap3, duration);
+               AnimationFrame *pAniFrame5 = new (std::nothrow) AnimationFrame(*pBitmap4, duration);
+               AnimationFrame *pAniFrame6 = new (std::nothrow) AnimationFrame(*pBitmap5, duration);
+               AnimationFrame *pAniFrame7 = new (std::nothrow) AnimationFrame(*pBitmap6, duration);
+               AnimationFrame *pAniFrame8 = new (std::nothrow) AnimationFrame(*pBitmap7, duration);
+               AnimationFrame *pAniFrame9 = new (std::nothrow) AnimationFrame(*pBitmap8, duration);
+               AnimationFrame *pAniFrame10 = new (std::nothrow) AnimationFrame(*pBitmap9, duration);
+               AnimationFrame *pAniFrame11 = new (std::nothrow) AnimationFrame(*pBitmap10, duration);
+               AnimationFrame *pAniFrame12 = new (std::nothrow) AnimationFrame(*pBitmap11, duration);
+               AnimationFrame *pAniFrame13 = new (std::nothrow) AnimationFrame(*pBitmap12, duration);
+               AnimationFrame *pAniFrame14 = new (std::nothrow) AnimationFrame(*pBitmap13, duration);
+               AnimationFrame *pAniFrame15 = new (std::nothrow) AnimationFrame(*pBitmap14, duration);
+               AnimationFrame *pAniFrame16 = new (std::nothrow) AnimationFrame(*pBitmap15, duration);
+               AnimationFrame *pAniFrame17 = new (std::nothrow) AnimationFrame(*pBitmap16, duration);
+               AnimationFrame *pAniFrame18 = new (std::nothrow) AnimationFrame(*pBitmap17, duration);
+               AnimationFrame *pAniFrame19 = new (std::nothrow) AnimationFrame(*pBitmap18, duration);
+               AnimationFrame *pAniFrame20 = new (std::nothrow) AnimationFrame(*pBitmap19, duration);
+               AnimationFrame *pAniFrame21 = new (std::nothrow) AnimationFrame(*pBitmap20, duration);
+               AnimationFrame *pAniFrame22 = new (std::nothrow) AnimationFrame(*pBitmap21, duration);
+               AnimationFrame *pAniFrame23 = new (std::nothrow) AnimationFrame(*pBitmap22, duration);
+               AnimationFrame *pAniFrame24 = new (std::nothrow) AnimationFrame(*pBitmap23, duration);
+               AnimationFrame *pAniFrame25 = new (std::nothrow) AnimationFrame(*pBitmap24, duration);
+               AnimationFrame *pAniFrame26 = new (std::nothrow) AnimationFrame(*pBitmap25, duration);
+               AnimationFrame *pAniFrame27 = new (std::nothrow) AnimationFrame(*pBitmap26, duration);
+               AnimationFrame *pAniFrame28 = new (std::nothrow) AnimationFrame(*pBitmap27, duration);
+               AnimationFrame *pAniFrame29 = new (std::nothrow) AnimationFrame(*pBitmap28, duration);
+               AnimationFrame *pAniFrame30 = new (std::nothrow) AnimationFrame(*pBitmap29, duration);
+
+               // Create AnimationList
+               __pAnimationFrameList = new (std::nothrow) ArrayList();
+               __pAnimationFrameList->Construct();
+               __pAnimationFrameList->Add(*pAniFrame1);
+               __pAnimationFrameList->Add(*pAniFrame2);
+               __pAnimationFrameList->Add(*pAniFrame3);
+               __pAnimationFrameList->Add(*pAniFrame4);
+               __pAnimationFrameList->Add(*pAniFrame5);
+               __pAnimationFrameList->Add(*pAniFrame6);
+               __pAnimationFrameList->Add(*pAniFrame7);
+               __pAnimationFrameList->Add(*pAniFrame8);
+               __pAnimationFrameList->Add(*pAniFrame9);
+               __pAnimationFrameList->Add(*pAniFrame10);
+               __pAnimationFrameList->Add(*pAniFrame11);
+               __pAnimationFrameList->Add(*pAniFrame12);
+               __pAnimationFrameList->Add(*pAniFrame13);
+               __pAnimationFrameList->Add(*pAniFrame14);
+               __pAnimationFrameList->Add(*pAniFrame15);
+               __pAnimationFrameList->Add(*pAniFrame16);
+               __pAnimationFrameList->Add(*pAniFrame17);
+               __pAnimationFrameList->Add(*pAniFrame18);
+               __pAnimationFrameList->Add(*pAniFrame19);
+               __pAnimationFrameList->Add(*pAniFrame20);
+               __pAnimationFrameList->Add(*pAniFrame21);
+               __pAnimationFrameList->Add(*pAniFrame22);
+               __pAnimationFrameList->Add(*pAniFrame23);
+               __pAnimationFrameList->Add(*pAniFrame24);
+               __pAnimationFrameList->Add(*pAniFrame25);
+               __pAnimationFrameList->Add(*pAniFrame26);
+               __pAnimationFrameList->Add(*pAniFrame27);
+               __pAnimationFrameList->Add(*pAniFrame28);
+               __pAnimationFrameList->Add(*pAniFrame29);
+               __pAnimationFrameList->Add(*pAniFrame30);
+
+               // Deallocate a Bitmap.
+               delete pBitmap0;
+               delete pBitmap1;
+               delete pBitmap2;
+               delete pBitmap3;
+               delete pBitmap4;
+               delete pBitmap5;
+               delete pBitmap6;
+               delete pBitmap7;
+               delete pBitmap8;
+               delete pBitmap9;
+               delete pBitmap10;
+               delete pBitmap11;
+               delete pBitmap12;
+               delete pBitmap13;
+               delete pBitmap14;
+               delete pBitmap15;
+               delete pBitmap16;
+               delete pBitmap17;
+               delete pBitmap18;
+               delete pBitmap19;
+               delete pBitmap20;
+               delete pBitmap21;
+               delete pBitmap22;
+               delete pBitmap23;
+               delete pBitmap24;
+               delete pBitmap25;
+               delete pBitmap26;
+               delete pBitmap27;
+               delete pBitmap28;
+               delete pBitmap29;
+
+               // Create Animation
+               __pAnimation = new (std::nothrow) Animation();
+               __pAnimation->Construct(Rectangle((rect.width/2-60/2), (rect.height/2-60/2), 60, 60), *__pAnimationFrameList);
+               __pAnimation->SetRepeatCount(10000);
+               AddControl(*__pAnimation);
+
+       }
+
+       return r;
+}
+
+void
+ProgressAnimation::AnimationStart(void)
+{
+       __pAnimation->SetShowState(true);
+       __pAnimation->Play();
+
+}
+void
+ProgressAnimation::AnimationStop(void)
+{
+       __pAnimation->Stop();
+       __pAnimation->SetShowState(false);
+}
+
+
index 3c16530..805aeb7 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <FApp.h>
 #include <FUi.h>
+
 #include "GlProgressBar.h"
 #include "GlResourceManager.h"
 #include "GlTypes.h"
index 79412a3..e910fc2 100644 (file)
@@ -162,3 +162,36 @@ const wchar_t* IDB_ALBUM_ICON_FOLDER = L"T01_album_icon_folder.png";
 const wchar_t* IDB_ALBUM_ICON_DOWNLOAD = L"T01_album_icon_download.png";
 const wchar_t* IDB_ALBUM_ICON_CAMERA = L"T01_album_icon_camera.png";
 
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS1 = L"00_list_process_01.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS2 = L"00_list_process_02.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS3 = L"00_list_process_03.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS4 = L"00_list_process_04.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS5 = L"00_list_process_05.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS6 = L"00_list_process_06.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS7 = L"00_list_process_07.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS8 = L"00_list_process_08.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS9 = L"00_list_process_09.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS10 = L"00_list_process_10.png";
+
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS11 = L"00_list_process_11.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS12 = L"00_list_process_12.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS13 = L"00_list_process_13.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS14 = L"00_list_process_14.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS15 = L"00_list_process_15.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS16 = L"00_list_process_16.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS17 = L"00_list_process_17.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS18 = L"00_list_process_18.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS19 = L"00_list_process_19.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS20 = L"00_list_process_20.png";
+
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS21 = L"00_list_process_21.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS22 = L"00_list_process_22.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS23 = L"00_list_process_23.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS24 = L"00_list_process_24.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS25 = L"00_list_process_25.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS26 = L"00_list_process_26.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS27 = L"00_list_process_27.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS28 = L"00_list_process_28.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS29 = L"00_list_process_29.png";
+const wchar_t* IDB_ALBUM_RENAME_PROGRESS30 = L"00_list_process_30.png";
+