--- /dev/null
+//
+// Tizen C++ 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.
+//
+
+#ifndef _APP_RESOURCE_ID_H_
+#define _APP_RESOURCE_ID_H_
+
+extern const wchar_t* IDF_FORM;
+extern const wchar_t* IDC_CHOOSE_MODE_PANEL;
+extern const wchar_t* IDC_GENERATION_MODE_BUTTON;
+extern const wchar_t* IDC_UPDATE_MODE_BUTTON;
+extern const wchar_t* IDC_UPDATE_MODE_PANEL;
+extern const wchar_t* IDC_FEATURE_SET_PATH_LABEL;
+extern const wchar_t* IDC_BUTTON_LOAD_FEATURE_SET;
+extern const wchar_t* IDC_MESSAGE_POPUP;
+extern const wchar_t* IDC_LABEL_MASSEGE_TEXT;
+extern const wchar_t* IDC_BUTTON_MESSAGE_CLOSE;
+extern const wchar_t* IDC_GENERATION_MODE_PANEL;
+extern const wchar_t* IDC_BUTTON_CHOOSE_FEATURE_SET_PATH;
+extern const wchar_t* IDC_BUTTON_CHOOSE_IMAGE_FOLDER;
+extern const wchar_t* IDC_CHOOSE_IMAGE_FOLDER_LABEL;
+extern const wchar_t* IDC_CREATE_FEATRUE_SET_LABEL;
+
+#endif // _APP_RESOURCE_ID_H_
+
--- /dev/null
+//
+// Tizen C++ 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.
+//
+
+#include "AppResourceId.h"
+
+const wchar_t* IDF_FORM = L"IDF_FORM";
+const wchar_t* IDC_CHOOSE_MODE_PANEL = L"IDC_CHOOSE_MODE_PANEL";
+const wchar_t* IDC_GENERATION_MODE_BUTTON = L"IDC_GENERATION_MODE_BUTTON";
+const wchar_t* IDC_UPDATE_MODE_BUTTON = L"IDC_UPDATE_MODE_BUTTON";
+const wchar_t* IDC_UPDATE_MODE_PANEL = L"IDC_UPDATE_MODE_PANEL";
+const wchar_t* IDC_FEATURE_SET_PATH_LABEL = L"IDC_FEATURE_SET_PATH_LABEL";
+const wchar_t* IDC_BUTTON_LOAD_FEATURE_SET = L"IDC_BUTTON_LOAD_FEATURE_SET";
+const wchar_t* IDC_MESSAGE_POPUP = L"IDC_MESSAGE_POPUP";
+const wchar_t* IDC_LABEL_MASSEGE_TEXT = L"IDC_LABEL_MASSEGE_TEXT";
+const wchar_t* IDC_BUTTON_MESSAGE_CLOSE = L"IDC_BUTTON_MESSAGE_CLOSE";
+const wchar_t* IDC_GENERATION_MODE_PANEL = L"IDC_GENERATION_MODE_PANEL";
+const wchar_t* IDC_BUTTON_CHOOSE_FEATURE_SET_PATH = L"IDC_BUTTON_CHOOSE_FEATURE_SET_PATH";
+const wchar_t* IDC_BUTTON_CHOOSE_IMAGE_FOLDER = L"IDC_BUTTON_CHOOSE_IMAGE_FOLDER";
+const wchar_t* IDC_CHOOSE_IMAGE_FOLDER_LABEL = L"IDC_CHOOSE_IMAGE_FOLDER_LABEL";
+const wchar_t* IDC_CREATE_FEATRUE_SET_LABEL = L"IDC_CREATE_FEATRUE_SET_LABEL";
+
// limitations under the License.
//
+#include "AppResourceId.h"
#include "FeatureManagerForm.h"
#include "MainForm.h"
FeatureManagerForm::OnActionPerformed (const Tizen::Ui::Control &source, int actionId)
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
SceneManager* pSceneManager = SceneManager::GetInstance();
AppAssert(pSceneManager);
FeatureManagerForm::GetItemCount(void)
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
if (pForm)
{
{
IconListViewItem* pIconListViewItem = new IconListViewItem();
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
if (pForm->GetFeatureManager())
{
const Tizen::Uix::Vision::ImageFeatureInfo* pFeature = pForm->GetFeatureManager()->GetImageFeatureInfo(index);
// limitations under the License.
//
+#include "AppResourceId.h"
#include "GeneratePanel.h"
#include "MainForm.h"
#include "FileManagerForm.h"
bool
GeneratePanel::Initialize()
{
- Panel::Construct(L"IDC_GENERATION_MODE_PANEL");
+ Panel::Construct(IDC_GENERATION_MODE_PANEL);
return true;
}
Button *pButton = null;
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
Rectangle clienRect = pForm->GetClientAreaBounds();
this->SetBounds(clienRect);
- pButton = static_cast<Button*>(GetControl(L"IDC_BUTTON_CHOOSE_IMAGE_FOLDER", true));
+ pButton = static_cast<Button*>(GetControl(IDC_BUTTON_CHOOSE_IMAGE_FOLDER, true));
if (pButton)
{
pButton->SetActionId(ID_BUTTON_CHOOSE_IMAGE_FOLDER_PATH);
pButton->AddActionEventListener(*this);
}
- pButton = static_cast<Button*>(GetControl(L"IDC_BUTTON_CHOOSE_FEATURE_SET_PATH", true));
+ pButton = static_cast<Button*>(GetControl(IDC_BUTTON_CHOOSE_FEATURE_SET_PATH, true));
if (pButton)
{
pButton->SetActionId(ID_BUTTON_CHOOSE_FEATURE_SET_PATH);
}
Label* pLabel = null;
- pLabel = static_cast<Label*>(GetControl(L"IDC_CREATE_FEATRUE_SET_LABEL", true));
+ pLabel = static_cast<Label*>(GetControl(IDC_CREATE_FEATRUE_SET_LABEL, true));
if (pLabel)
{
pLabel->SetText(__currentFeaturePath);
}
- pLabel = static_cast<Label*>(GetControl(L"IDC_CHOOSE_IMAGE_FOLDER_LABEL", true));
+ pLabel = static_cast<Label*>(GetControl(IDC_CHOOSE_IMAGE_FOLDER_LABEL, true));
if (pLabel)
{
pLabel->SetText(__currentImagePath);
GeneratePanel::OnImageProcessed(int imNo, int total)
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
pForm->OnImageProcessed(imNo, total);
}
GeneratePanel::OnFinish(void)
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
result res = pForm->GetFeatureManager()->Flush(&__currentFeaturePath);
case GeneratePanel::REQUEST_GENERATE_FEATURE_SET:
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
pForm->GetFeatureManager()->DeleteAllFeatures();
pForm->AppendImageFolder(__currentImagePath, this);
break;
//
#include <FApp.h>
+#include "AppResourceId.h"
#include "MainForm.h"
#include "FileManagerForm.h"
#include "GeneratePanel.h"
bool
MainForm::Initialize(void)
{
- Construct(L"IDF_FORM");
+ Construct(IDF_FORM);
return true;
}
__pRadioGroupMode = new RadioGroup();
__pRadioGroupMode->Construct();
- pCheckButton = static_cast<CheckButton*>(GetControl(L"IDC_UPDATE_MODE_BUTTON", true));
+ pCheckButton = static_cast<CheckButton*>(GetControl(IDC_UPDATE_MODE_BUTTON, true));
if (pCheckButton)
{
pCheckButton->AddActionEventListener(*this);
__pRadioGroupMode->Add(*pCheckButton);
}
- pCheckButton = static_cast<CheckButton*>(GetControl(L"IDC_GENERATION_MODE_BUTTON", true));
+ pCheckButton = static_cast<CheckButton*>(GetControl(IDC_GENERATION_MODE_BUTTON, true));
if (pCheckButton)
{
__pFeatureManager->Construct();
__pMessagePopup = new Popup();
- __pMessagePopup->Construct("IDC_MESSAGE_POPUP");
- __pMessageLabel = static_cast<Label*>(__pMessagePopup->GetControl("IDC_LABEL_MASSEGE_TEXT", true));
+ __pMessagePopup->Construct(IDC_MESSAGE_POPUP);
+ __pMessageLabel = static_cast<Label*>(__pMessagePopup->GetControl(IDC_LABEL_MASSEGE_TEXT, true));
__pContextMenu = new ContextMenu();
__pContextMenu->Construct(Point(50, 1200), CONTEXT_MENU_STYLE_LIST);
__pContextMenu->AddItem(L"Delete Features", ID_CONTEXT_MENU_DELETE);
__pContextMenu->AddActionEventListener(*this);
- Button* pButton = static_cast<Button*>(__pMessagePopup->GetControl("IDC_BUTTON_MESSAGE_CLOSE", true));
+ Button* pButton = static_cast<Button*>(__pMessagePopup->GetControl(IDC_BUTTON_MESSAGE_CLOSE, true));
if (pButton)
{
pButton->AddActionEventListener(*this);
case ID_FOOTER_ITEM_GENERATE:
{
- Panel* pPanel = static_cast<Panel*>(this->GetControl("IDC_GENERATION_MODE_PANEL", true));
+ Panel* pPanel = static_cast<Panel*>(this->GetControl(IDC_GENERATION_MODE_PANEL, true));
if (pPanel)
{
pPanel->SendUserEvent(GeneratePanel::REQUEST_GENERATE_FEATURE_SET, null);
break;
case ID_FOOTER_ITEM_UPDATE:
{
- Panel* pPanel = static_cast<Panel*>(this->GetControl("IDC_UPDATE_MODE_PANEL", true));
+ Panel* pPanel = static_cast<Panel*>(this->GetControl(IDC_UPDATE_MODE_PANEL, true));
if (pPanel)
{
pPanel->SendUserEvent(UpdatePanel::REQUEST_UPDATE, null);
break;
case ID_CONTEXT_MENU_ADD:
{
- Panel* pPanel = static_cast<Panel*>(this->GetControl("IDC_UPDATE_MODE_PANEL", true));
+ Panel* pPanel = static_cast<Panel*>(this->GetControl(IDC_UPDATE_MODE_PANEL, true));
if (pPanel)
{
pPanel->SendUserEvent(UpdatePanel::REQUEST_ADD, null);
break;
case ID_CONTEXT_MENU_DELETE:
{
- Panel* pPanel = static_cast<Panel*>(this->GetControl("IDC_UPDATE_MODE_PANEL", true));
+ Panel* pPanel = static_cast<Panel*>(this->GetControl(IDC_UPDATE_MODE_PANEL, true));
if (pPanel)
{
pPanel->SendUserEvent(UpdatePanel::REQUEST_DELETE, null);
// limitations under the License.
//
+#include "AppResourceId.h"
#include "UpdatePanel.h"
#include "FileManagerForm.h"
#include "MainForm.h"
bool
UpdatePanel::Initialize()
{
- Panel::Construct(L"IDC_UPDATE_MODE_PANEL");
+ Panel::Construct(IDC_UPDATE_MODE_PANEL);
return true;
}
Button *pButton = null;
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
Rectangle clienRect = pForm->GetClientAreaBounds();
this->SetBounds(clienRect);
- pButton = static_cast<Button*>(GetControl(L"IDC_BUTTON_LOAD_FEATURE_SET", true));
+ pButton = static_cast<Button*>(GetControl(IDC_BUTTON_LOAD_FEATURE_SET, true));
if (pButton)
{
pButton->SetActionId(ID_BUTTON_LOAD_FEATURE_SET);
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
Footer* pFooter = pForm->GetFooter();
if ((previousSceneId == "ChooseImageScene") && pArgs)
Label* pLabel = null;
- pLabel = static_cast<Label*>(GetControl(L"IDC_FEATURE_SET_PATH_LABEL", true));
+ pLabel = static_cast<Label*>(GetControl(IDC_FEATURE_SET_PATH_LABEL, true));
if (pLabel)
{
pLabel->SetText(__currentFeaturePath);
UpdatePanel::OnImageProcessed(int imNo, int total)
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
pForm->OnImageProcessed(imNo, total);
}
UpdatePanel::OnFinish(void)
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
__currentImagePath = "";
Button* pButtonPath = static_cast<Button*>(GetControl(L"IDC_BUTTON_UPDATE_IMAGE_FOLDER", true));
case UpdatePanel::REQUEST_MESSAGE_AFTER_DELETE:
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
Tizen::Base::String message;
message.Format(80, L"Deleted %i features.", __prevFeaturesCount - pForm->GetFeatureManager()->GetTotalNumberOfFeatures());
case UpdatePanel::REQUEST_UPDATE:
{
Tizen::Ui::Controls::Frame *pFrame = Tizen::App::Application::GetInstance()->GetAppFrame()->GetFrame();
- MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(L"IDF_FORM", true));
+ MainForm* pForm = static_cast<MainForm*>(pFrame->GetControl(IDF_FORM, true));
//Disabling update button
Footer* pFooter = pForm->GetFooter();