2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (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 PhnPanelFactory.cpp
19 * @brief The Panel factory for Dial application
22 #include "PhnPanelFactory.h"
23 #include "PhnTabDialer.h"
24 #include "PhnTabContacts.h"
25 #include "PhnTabLogs.h"
26 #include "PhnTabFavorites.h"
28 using namespace Tizen::Base;
29 using namespace Tizen::Ui::Controls;
30 using namespace Tizen::Ui::Scenes;
34 PanelFactory::PanelFactory(void)
38 PanelFactory::~PanelFactory(void)
43 PanelFactory::CreatePanelN(const String& panelId, const SceneId& sceneId)
45 SceneManager* pSceneManager = SceneManager::GetInstance();
46 AppAssert(pSceneManager);
47 Panel* pNewPanel = null;
49 if (panelId == PANEL_DIALER)
51 DialTabDialer* pPanel = new DialTabDialer();
53 pSceneManager->AddSceneEventListener(sceneId, *pPanel);
56 else if (panelId == PANEL_LOGS)
58 DialTabLogs* pPanel = new DialTabLogs();
60 pSceneManager->AddSceneEventListener(sceneId, *pPanel);