#include <FUi.h>
#include "GlBaseForm.h"
#include "GlFileMoveTimer.h"
+#include "GlSlideShowPopUp.h"
+#include "GlSlideSettingListener.h"
class FileListPresentationModel;
class FileMoveTimer;
+class ISlideSettingListener;
class FileListEditorForm
: public BaseForm
, public Tizen::Ui::Controls::IFormBackEventListener
, public IFileOpInvalidateListener
, public IFormContentUpdateEventListener
+ , public ISlideSettingListener
{
public:
FileListEditorForm(void);
void OnFileOpInvalidate(enum FileActionMode __actionId);
void OnFileOpComplete(enum FileActionMode __actionId, enum FileActionCompleteRes);
+ virtual void OnSlideSettingPopUpItemSelected(int index);
private:
result InitializeFooter(void);
Tizen::Base::String GetDirecotyNameFromFullPath(const Tizen::Base::String& fullPath)const;
Tizen::Graphics::Point __morePosition;
Tizen::Base::Collection::IList* __pContentDirectoryList;
Tizen::Base::Collection::IList* __pContentDirectoryNameList;
+ SlideShowPopUp* __pPopUp;
FileListPresentationModel* __pPresentationModel;
FileMoveTimer* __pFileMove;
};
#include <FUi.h>
#include "GlBaseForm.h"
#include "GlFormContentUpdateEventListener.h"
+#include "GlSlideShowPopUp.h"
+#include "GlSlideSettingListener.h"
class FileListPresentationModel;
+class ISlideSettingListener;
class FileListForm
: public BaseForm
, public Tizen::Ui::IActionEventListener
, public Tizen::Ui::Controls::IFormBackEventListener
, public IFormContentUpdateEventListener
+ , public ISlideSettingListener
{
public:
FileListForm(void);
void SetTitleText(const Tizen::Base::String& titleText);
+ virtual void OnSlideSettingPopUpItemSelected(int index);
+
private:
result InitializeFooter(void);
private:
Tizen::Ui::Controls::ContextMenu* __pContextMenuMore;
+ SlideShowPopUp* __pPopUp;
FileListPresentationModel* __pPresentationModel;
};
--- /dev/null
+//
+// 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 ISlideSettingListener.h
+ * @brief This is the header file for ISlideSettingListener class.
+ */
+
+#ifndef _GL_SLIDE_SETTING_LISTENER_H_
+#define _GL_SLIDE_SETTING_LISTENER_H_
+
+#include <FBase.h>
+
+
+class ISlideSettingListener
+{
+public:
+ ISlideSettingListener(void){};
+ virtual ~ISlideSettingListener(void) {};
+
+ virtual void OnSlideSettingPopUpItemSelected(int index ) = 0 ;
+};
+
+#endif /* _GL_SLIDE_SETTING_LISTENER_H_ */
--- /dev/null
+//
+// Tizen Native SDK
+// 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://www.tizenopensource.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 GlSlideShowPopUp.h
+ * @brief This header file contains the declarations of the SlideShowPopUp
+ *
+ */
+
+#ifndef _GL_SLIDE_SHOW_POPUP_H_
+#define _GL_SLIDE_SHOW_POPUP_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FUi.h>
+
+
+class ISlideSettingListener;
+
+class SlideShowPopUp
+ : public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::Controls::Popup
+ , public Tizen::Ui::IActionEventListener
+ {
+ public:
+ /**
+ * @brief The Default Constructor
+ */
+ SlideShowPopUp(void);
+
+ /**
+ * @brief The Default Destructor
+ */
+ ~SlideShowPopUp(void);
+
+ /**
+ * @brief Initializes this SettingForm Form.
+ *
+ * @return An error code
+ * @exception true The method is succeIOrientationEventListenerssful.
+ * @exception false An error Occured.
+ */
+ bool Initialize(void);
+
+ /**
+ * This function terminates all the controls
+ *
+ * @return result type
+ * @param No parameter
+ */
+ virtual result OnTerminating(void);
+
+ public:
+
+ //IListViewItemProvider
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+
+ //IActionEventListener
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ // IListViewItemEventListener
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state){};
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction){};
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback){};
+
+ void SetEventListner(ISlideSettingListener* listner);
+
+ private:
+ Tizen::Ui::Controls::ListView* __pList;
+ ISlideSettingListener* __pListener;
+ };
+
+
+#endif /* _GL_SLIDE_SHOW_POPUP_H_ */
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+<ScenePopup Bversion="2.0.0.201303280947" Dversion="20120315">
+ <Popup id="IDL_SLIDESHOW_SETTING_POPUP">
+ <property accessibilityHint="" color="#FFFFFF" titleText="SlideShow" titleTextColor=""/>
+ <layout height="440.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="580.0"/>
+ <layout height="400.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="600.0"/>
+ </Popup>
+ <ListView id="IDC_POPUP_LIST" parent="IDL_SLIDESHOW_SETTING_POPUP">
+ <property backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" bitmapPathOfEmptyList="" colorOfEmptyListText="" fastScroll="false" itemDivider="true" itemDividerColor="" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" sweepEnabled="false" textOfEmptyList=""/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="226.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="540.0" x="0.0" y="3.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="224.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="-1.0" y="2.0"/>
+ </ListView>
+ <Button id="IDC_BUTTON" parent="IDL_SLIDESHOW_SETTING_POPUP">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="Cancel" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="72.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="432.0" x="44.0" y="263.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="67.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="381.0" x="90.0" y="236.0"/>
+ </Button>
+</ScenePopup>
delete pDropperBitmapPressed;
}
- SetElementSelectionEnabled(IDA_FORMAT_MAIN_STRING, true);
- SetElementSelectionEnabled(IDA_FORMAT_SUB_STRING, true);
- SetElementSelectionEnabled(IDA_FORMAT_DROPPER, true);
-
return E_SUCCESS;
}
#include "GlGalleryApp.h"
#include "GlImageListEditorPanel.h"
#include "GlResourceManager.h"
+#include "GlSlideSettingListener.h"
#include "GlTypes.h"
#include "GlVideoListEditorPanel.h"
#include "GlFileMoveTimer.h"
Header* pHeader = GetHeader();
TryReturn(pHeader != null, E_FAILURE, "[%s] fail to get the header.", GetErrorMessage(GetLastResult()));
+ __pPopUp = new (std::nothrow) SlideShowPopUp();
+
+ if (__pPopUp != null)
+ {
+ __pPopUp->Initialize();
+ __pPopUp->SetEventListner(this);
+ AddControl(*__pPopUp);
+ }
+
__pPresentationModel = FileListPresentationModel::GetInstance();
__pPresentationModel->ClearThumbnailRequests();
__pPresentationModel->AddContentEventListener(this);
}
case ACTION_ID_CONTEXT_MENU_MORE_SLIDE_SHOW:
{
- if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
- {
- AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
- if (pEditorPanel != null)
- {
- pEditorPanel->OnRequestSlideShow();
- }
- }
- else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
+ if (__pPopUp != null)
{
- AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
- if (pSelectionPanel != null)
- {
- pSelectionPanel->OnRequestSlideShow();
- }
+ __pPopUp->SetShowState(true);
+ __pPopUp->Show();
}
break;
}
}
}
+
+void
+FileListEditorForm::OnSlideSettingPopUpItemSelected(int index)
+{
+
+ if ( __pPopUp != NULL)
+ {
+ __pPopUp->SetShowState(false);
+ }
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+
+ if (index == 0) // start slide show
+ {
+ if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR)
+ {
+ AllListEditorPanel* pEditorPanel = dynamic_cast<AllListEditorPanel*>(pSceneManager->GetCurrentScene()->GetPanel());
+ if (pEditorPanel != null)
+ {
+ pEditorPanel->OnRequestSlideShow();
+ }
+ }
+ else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION)
+ {
+ AllListSelectionPanel* pSelectionPanel = dynamic_cast<AllListSelectionPanel*>
+ (pSceneManager->GetCurrentScene()->GetPanel());
+
+ if (pSelectionPanel != null)
+ {
+ pSelectionPanel->OnRequestSlideShow();
+ }
+ }
+
+ }
+ else if (index == 1) // go to settingsForm
+ {
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
+
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_MAIN));
+
+ }
+}
+
#include "GlFileListForm.h"
#include "GlFileListPresentationModel.h"
#include "GlResourceManager.h"
+#include "GlSlideSettingListener.h"
#include "GlTypes.h"
using namespace Tizen::App;
__pPresentationModel->ClearThumbnailRequests();
__pPresentationModel->AddContentEventListener(this);
+
+ __pPopUp = new (std::nothrow) SlideShowPopUp();
+
+ if (__pPopUp != null)
+ {
+ __pPopUp->Initialize();
+ __pPopUp->SetEventListner(this);
+ AddControl(*__pPopUp);
+ }
+
InitializeFooter();
SetFormBackEventListener(this);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
case ACTION_ID_FOOTER_SLIDESHOW:
{
- ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
- pArrayList->Construct();
- int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
- for (int i = 0; i < loopCount; ++i)
+ if (__pPopUp != null)
{
- pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
+ __pPopUp->SetShowState(true);
+ __pPopUp->Show();
}
- HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
- pDataList->Construct();
- pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
- pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
-
- __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null,
- pDataList, null);
break;
}
case ACTION_ID_FOOTER_CAMERA:
pHeader->Show();
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+
+void
+FileListForm::OnSlideSettingPopUpItemSelected(int index)
+{
+
+ if ( __pPopUp != NULL)
+ {
+ __pPopUp->SetShowState(false);
+ }
+
+ if (index == 0) // start slide show
+ {
+ ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArrayList->Construct();
+ int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+
+ for (int i = 0; i < loopCount; ++i)
+ {
+ pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i)));
+ }
+
+ HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+ pDataList->Construct();
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
+
+ __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW,null, pDataList, null);
+
+ }
+ else if (index == 1) // go to settingsForm
+ {
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult()));
+
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_MAIN));
+
+ }
+}
}
TryCatch(!IsFailed(r),,"RadioCustomItem::the value is %s",GetErrorMessage(r));
- r = SetElementSelectionEnabled(IDA_FORMAT_STRING, true);
- TryCatch(!IsFailed(r),,"RadioCustomItem::the value is %s",GetErrorMessage(r));
-
CATCH:
return r;
}
if (pApp->GetAppControlOperationId() == APPCONTROL_OPERATION_ID_CONFIGURE)
{
pApp->SendAppControlResult(APP_CTRL_RESULT_TERMINATED, null);
+ pApp->Terminate();
+ }
+ else
+ {
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoBackward(BackwardSceneTransition());
}
- pApp->Terminate();
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
const int textSize = 40;
AddElement(Rectangle(X_Margin, Y_Margin, __width - 60, 60), IDA_FORMAT_STRING, __text, textSize, textColor, pressedTextColor, pressedTextColor, true);
- SetElementSelectionEnabled(IDA_FORMAT_STRING, false);
return E_SUCCESS;
}
--- /dev/null
+//
+// Tizen Native SDK
+// 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://www.tizenopensource.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 SlideShowPopUp.cpp
+ * @brief This file contains the definitions of the SlideShowPopUp class.
+ */
+
+#include <FAppUiApp.h>
+#include <FUiScenes.h>
+
+#include "GlResourceManager.h"
+#include "GlSlideShowPopUp.h"
+#include "GlSlideSettingListener.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+
+static const int ID_FORMAT_START = 501;
+static const int ID_FORMAT_SETTING = 502;
+static const int ID_CANCEL_BUTTON = 503;
+
+
+SlideShowPopUp::SlideShowPopUp(void)
+:__pList(null)
+{
+
+}
+
+SlideShowPopUp::~SlideShowPopUp(void)
+{
+
+}
+
+bool
+SlideShowPopUp::Initialize(void)
+{
+ Button* pCancelButton = null;
+ Popup::Construct(L"IDL_SLIDESHOW_SETTING_POPUP");
+
+ __pList = static_cast<ListView*>(GetControl(L"IDC_POPUP_LIST"));
+
+ if (__pList == null)
+ {
+ return false;
+ }
+
+ __pList->SetItemProvider(*this);
+ __pList->AddListViewItemEventListener(*this);
+
+ pCancelButton = static_cast< Button* >(GetControl(L"IDC_BUTTON", true));
+
+ if (pCancelButton != null)
+ {
+ pCancelButton->AddActionEventListener(*this);
+ pCancelButton->SetActionId(ID_CANCEL_BUTTON);
+ }
+
+ return true;
+
+}
+
+result
+SlideShowPopUp::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
+
+void
+SlideShowPopUp::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ case ID_CANCEL_BUTTON:
+ {
+ Popup::SetShowState(false);
+ Popup::Show();
+ }
+ break;
+ default:
+ break;
+ }
+ return;
+}
+
+void
+SlideShowPopUp::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
+{
+
+ if (__pListener != null)
+ {
+ __pListener->OnSlideSettingPopUpItemSelected(index);
+ }
+
+}
+
+ListItemBase*
+SlideShowPopUp::CreateItem(int index, int itemWidth)
+{
+ result r = E_FAILURE;
+ ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
+ int listItemHeight = 112;
+
+ CustomItem* pItem = new (std::nothrow) CustomItem();
+ r = pItem->Construct(Dimension(GetClientAreaBounds().width, listItemHeight), style);
+ pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, Color::GetColor(COLOR_ID_WHITE));
+
+ if (IsFailed(r))
+ {
+ AppLogDebug("Create Item Failed with error %s", GetErrorMessage(r));
+ return null;
+ }
+
+ switch (index)
+ {
+
+ case 0:
+ {
+ pItem->AddElement(Rectangle(0, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_START,
+ ResourceManager::GetString(L"IDS_MEDIABR_OPT_START_SLIDESHOW"), true);
+ }
+ break;
+
+ case 1:
+ {
+ pItem->AddElement(Rectangle(0, 0, GetClientAreaBounds().width, listItemHeight), ID_FORMAT_SETTING,
+ ResourceManager::GetString(L"IDS_MEDIABR_BODY_SLIDESHOW_SETTINGS"), true);
+ }
+ break;
+
+ break;
+ default:
+ break;
+ }
+
+ return pItem;
+}
+
+bool
+SlideShowPopUp::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ return true;
+}
+
+int
+SlideShowPopUp::GetItemCount(void)
+{
+ return 2;
+}
+
+void
+SlideShowPopUp::SetEventListner(ISlideSettingListener* listner)
+{
+ __pListener = listner;
+}
+