2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file MpAlbumPickerPanel.cpp
19 * @brief This is the implementation file for AlbumPickerPanel class.
22 #include "MpAlbumPickerPanel.h"
23 #include "MpNowPlayContentPanel.h"
25 using namespace Tizen::Base;
26 using namespace Tizen::Base::Collection;
27 using namespace Tizen::Content;
28 using namespace Tizen::Graphics;
29 using namespace Tizen::Social;
30 using namespace Tizen::Ui;
31 using namespace Tizen::Ui::Controls;
32 using namespace Tizen::Ui::Scenes;
34 AlbumPickerPanel::AlbumPickerPanel(void)
40 AlbumPickerPanel::~AlbumPickerPanel(void)
47 AlbumPickerPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
48 const Tizen::Ui::Scenes::SceneId& currentSceneId,
49 Tizen::Base::Collection::IList* pArgs)
52 Form* pForm = dynamic_cast<Form*>(GetParent());
55 SceneManager* pSceneManager = SceneManager::GetInstance();
56 AppAssert(pSceneManager);
58 CommonUtil::CreateCancelFooter(*pForm);
59 pForm->SetFormBackEventListener(this);
60 __pPresentationModel->UpdateAlbumList();
64 pArgs->RemoveAll(true);
71 AlbumPickerPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
72 const Tizen::Ui::Scenes::SceneId& nextSceneId)
75 Form* pForm = dynamic_cast<Form*>(GetParent());
78 Footer* pFooter = pForm->GetFooter();
81 pFooter->RemoveAllButtons();
82 pFooter->RemoveAllItems();
88 AlbumPickerPanel::OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView,
90 Tizen::Ui::Controls::TableViewItem* pItem,
91 Tizen::Ui::Controls::TableViewItemStatus status)
94 SceneManager* pSceneManager = SceneManager::GetInstance();
95 AppAssert(pSceneManager);
97 if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
99 __pPresentationModel->InitializeContentList(itemIndex);
100 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_CONTENT_PICKER));