--- /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 StAccessibilityForm.h
+ * @brief This is the header file for AccessibilityForm class.
+ */
+
+#ifndef _ST_ACCESSIBILITY_FORM_H_
+#define _ST_ACCESSIBILITY_FORM_H_
+
+#include <FSystem.h>
+#include "StBaseForm.h"
+
+class AccessibilityForm
+ : public BaseForm
+{
+public:
+ AccessibilityForm(void);
+ virtual ~AccessibilityForm(void);
+
+ void CreateFooter(void);
+ void AppControlFontResult(void);
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth);
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth);
+ virtual int GetDefaultGroupItemHeight(void);
+ virtual int GetDefaultItemHeight(void);
+ virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ virtual int GetGroupCount(void);
+ virtual int GetItemCount(int groupIndex);
+ virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem);
+ virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+
+ virtual void OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated);
+ virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status);
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ void RefreshGroupAt(int groupIndex);
+ void RefreshGroupItemAt(int groupIndex);
+ void RefreshAllItem(void);
+
+private:
+ int ttsSpeechRate;
+};
+
+#endif // _ST_ACCESSIBILITY_FORM_H_
\ No newline at end of file
private:
CertificatePresentationModel* __pCertificatePresentationModelInstance;
Tizen::Ui::Controls::Popup*__installFromSDCardPopup;
+ bool __isPopupVisible;
};
#endif // _ST_CERTIFICATE_USER_FORM_H_
\ No newline at end of file
extern const wchar_t* IDSCN_FONT;
extern const wchar_t* IDSCN_FONT_SIZE;
extern const wchar_t* IDSCN_DISPLAY;
+extern const wchar_t* IDSCN_ACCESSIBILITY;
extern const wchar_t* IDSCN_DATE_TIME;
extern const wchar_t* IDSCN_LOCALE;
extern const wchar_t* IDSCN_LOCALE_LANGUAGE;
extern const wchar_t* IDC_FORM_FONT;
extern const wchar_t* IDC_FORM_FONT_SIZE;
extern const wchar_t* IDC_FORM_DISPLAY;
+extern const wchar_t* IDC_FORM_ACCESSIBILITY;
extern const wchar_t* IDC_FORM_DATE_TIME;
extern const wchar_t* IDC_FORM_LOCALE;
extern const wchar_t* IDC_FORM_LOCALE_LANGUAGE;
extern const wchar_t* IDB_DISPLAY;
extern const wchar_t* IDB_HOME_SCREEN;
extern const wchar_t* IDB_AUTO_ROTATE_SCREEN;
+extern const wchar_t* IDB_ACCESSIBILITY;
extern const wchar_t* IDB_DATE_AND_TIME;
extern const wchar_t* IDB_LANGUAGE;
extern const wchar_t* IDB_KEYBOARD;
extern const wchar_t* SETTING_INFO_KEY_USB_DEBUGGING;
extern const wchar_t* SETTING_INFO_KEY_FORCE_GPU_RENDERING;
extern const wchar_t* SETTING_INFO_KEY_DEVICE_NAME;
+extern const wchar_t* SETTING_INFO_KEY_TTS;
+extern const wchar_t* SETTING_INFO_KEY_TTS_RATE;
+
+//Runtime Information key
extern const wchar_t* RUNTIME_INFO_KEY_CPU_USAGE;
extern const wchar_t* RUNTIME_INFO_KEY_WALLPAPER_SCREEN;
extern const wchar_t* RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK;
__pReceivedForm->SendUserEvent( __requestId, pData);
}
-
PhoneInfoForm::PhoneInfoForm(void)
: __pEditField(null)
, __CpuUsageGetInfoResultListener(null)
wchar_t element;
__pEditField->GetText().GetCharAt(i, element);
- if (element != ISSPACE )
+ if (element != ISSPACE)
{
showEmptyMessageBox = false;
break;
--- /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 StAccessibilityForm.cpp
+ * @brief This is the implementation file for AccessibilityForm class.
+ */
+
+#include "StAccessibilityForm.h"
+#include "StResourceManager.h"
+#include "StTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const int ID_GROUP_SCREEN_READER = 0;
+static const int ID_ITEM_SCREEN_READER = 0;
+static const int ID_ITEM_RATE_SPEECH_RATE = 1;
+static const int ID_GROUP_SCREEN_READER_ITEM_COUNT = 2;
+
+static const int ID_GROUP_SPEECH_RATE_LIST = 1;
+static const int ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW = 0;
+static const int ID_ITEM_RATE_SPEECH_RATE_SLOW = 1;
+static const int ID_ITEM_RATE_SPEECH_RATE_NORMAL = 2;
+static const int ID_ITEM_RATE_SPEECH_RATE_FAST = 3;
+static const int ID_ITEM_RATE_SPEECH_RATE_VERY_FAST = 4;
+static const int ID_GROUP_SPEECH_RATE_ITEM_COUNT = 5;
+
+static const int ID_GROUP_SPEED_AT_WHICH_THE_TEXT_IS_SPOKEN = 2;
+
+static const int ID_GROUP_COUNT = 3;
+static const int REFRESH_GROUP_INDEX = -1;
+static const int DEVIDE_BY_TWO = 2;
+
+AccessibilityForm::AccessibilityForm(void)
+ : ttsSpeechRate(0)
+{
+}
+
+AccessibilityForm::~AccessibilityForm(void)
+{
+}
+
+void
+AccessibilityForm::CreateFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ AppAssert(pFooter);
+
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
+ pFooter->SetBackButton();
+ pFooter->AddActionEventListener(*this);
+
+ SetFormBackEventListener(this);
+}
+
+result
+AccessibilityForm::OnInitializing(void)
+{
+ CreateHeader(L"Accessibility");
+ CreateFooter();
+ CreateTableView();
+
+ AppLogDebug("ENTER");
+
+ return E_SUCCESS;
+}
+
+result
+AccessibilityForm::OnTerminating(void)
+{
+ __pTableView = null;
+
+ SetFormBackEventListener(null);
+ return E_SUCCESS;
+}
+
+void
+AccessibilityForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+{
+ result r = E_FAILURE;
+
+ if (pArgs != null)
+ {
+ delete pArgs;
+ }
+
+ __pTableView->UpdateTableView();
+
+ bool ttsStatus = false;
+ if ((r = SettingInfo::GetValue(SETTING_INFO_KEY_TTS, ttsStatus)) != E_SUCCESS)
+ {
+ AppLogDebug("GetValue fail.. TTS Result [%s]", GetErrorMessage(r));
+ }
+
+ __pTableView->SetItemChecked(0, 0, ttsStatus);
+
+ int ttsRate = 0;
+ if (SettingInfo::GetValue(SETTING_INFO_KEY_TTS_RATE, ttsRate) == E_SUCCESS)
+ {
+ AppLogDebug("GetValue Success.. TTS Rate Result [%s]", GetErrorMessage(r));
+
+ for (int count = 0; count < __pTableView->GetItemCountAt(ID_GROUP_SPEECH_RATE_LIST); count++)
+ {
+ bool check = ((count == ttsRate)?(true):(false));
+ __pTableView->SetItemChecked(ID_GROUP_SPEECH_RATE_LIST, count, check);
+ }
+ }
+ else
+ {
+ AppLogDebug("GetValue fail.. TTS Rate Result [%s]", GetErrorMessage(r));
+ }
+ __pTableView->CollapseGroup(ID_GROUP_SPEECH_RATE_LIST);
+}
+
+void
+AccessibilityForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+}
+
+void
+AccessibilityForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
+}
+
+int
+AccessibilityForm::GetGroupCount(void)
+{
+ AppLogDebug("ENTER");
+ return ID_GROUP_COUNT;
+}
+
+int
+AccessibilityForm::GetItemCount(int groupIndex)
+{
+ int itemCount = 0;
+
+ switch (groupIndex)
+ {
+ case ID_GROUP_SCREEN_READER:
+ {
+ itemCount = ID_GROUP_SCREEN_READER_ITEM_COUNT;
+ }
+ break;
+
+ case ID_GROUP_SPEECH_RATE_LIST:
+ {
+ itemCount = ID_GROUP_SPEECH_RATE_ITEM_COUNT;
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("GetItemCount %d", itemCount);
+
+ return itemCount;
+}
+
+TableViewGroupItem*
+AccessibilityForm::CreateGroupItem(int groupIndex, int itemWidth)
+{
+ AppLogDebug("ENTER");
+
+ int itemHeight = H_GROUP_INDEX_NO_TITLE_DEFAULT;
+ int yItemOffset = H_GROUP_INDEX_HELP_TEXT_TOP_GAP;
+ LabelTextStyle style = LABEL_TEXT_STYLE_NORMAL;
+ Rectangle itemRectangle;
+ int fontSize = GetFontSize();
+ String groupText;
+ Label* pLabel = null;
+
+ TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
+
+ switch (groupIndex)
+ {
+ case ID_GROUP_SPEED_AT_WHICH_THE_TEXT_IS_SPOKEN:
+ {
+ groupText = L"Speed at which the text is spoken";
+ yItemOffset = H_GROUP_INDEX_HELP_TEXT_TOP_GAP;
+ itemHeight = GetHeightForStringArea(groupText, itemWidth, fontSize);
+ }
+ break;
+
+ default:
+ {
+ yItemOffset = 0;
+ itemHeight = 0;
+ }
+ break;
+ }
+
+ itemRectangle.x = X_GROUP_ITEM_DEFAULT_LABEL;
+ itemRectangle.y = yItemOffset;
+ itemRectangle.width = itemWidth;
+ itemRectangle.height = itemHeight;
+
+ RelativeLayout relativeLayout;
+ relativeLayout.Construct();
+
+ pItem->Construct(relativeLayout, Dimension(itemWidth, itemHeight));
+ pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT);
+
+ pLabel = new (std::nothrow) Label();
+ pLabel->Construct(itemRectangle, groupText);
+ pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
+ pLabel->SetTextConfig(fontSize, style);
+ pLabel->SetTextColor(COLOR_HELP_TEXT_TYPE_01);
+
+ pItem->AddControl(*pLabel);
+ pItem->SetEnabled(false);
+ relativeLayout.SetMargin(*pLabel, itemRectangle.x, 0, 0, 0);
+ relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+
+ return pItem;
+}
+
+TableViewItem*
+AccessibilityForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
+{
+ AppLogDebug("group[%d] index[%d]", groupIndex, itemIndex);
+
+ Rectangle itemRectangle;
+ Rectangle itemSecondLineTextRect;
+ TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ String itemText;
+ String secondLineText;
+ String fontReturnValue;
+ Label* pLabel = null;
+ int fontSize = GetFontSize();
+ int startGap = 0;
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+
+ ItemTypeOneLine(itemRectangle);
+
+ switch (groupIndex)
+ {
+ case ID_GROUP_SCREEN_READER:
+ {
+ switch (itemIndex)
+ {
+ case ID_ITEM_SCREEN_READER:
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
+ itemText = L"Screen reader (TTS)";
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE:
+ {
+ result r = E_FAILURE;
+ ItemTypeTwoLine(itemRectangle, itemSecondLineTextRect, fontSize);
+ itemText = L"Speech rate";
+
+ int ttsRate = 0;
+
+ if ((r = SettingInfo::GetValue(SETTING_INFO_KEY_TTS_RATE, ttsRate)) == E_SUCCESS)
+ {
+ switch (ttsRate)
+ {
+ case ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW:
+ {
+ secondLineText = L"Very slow";
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_SLOW:
+ {
+ secondLineText = L"Slow";
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_NORMAL:
+ {
+ secondLineText = ResourceManager::GetString(L"IDS_ST_BODY_FONTTYPE_NORMAL");
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_FAST:
+ {
+ secondLineText = L"Fast";
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_VERY_FAST:
+ {
+ secondLineText = L"Very fast";
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ AppLogDebug("GetValue Fail.. TTS rate Result[%s]", GetErrorMessage(r));
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ case ID_GROUP_SPEECH_RATE_LIST:
+ {
+ style = TABLE_VIEW_ANNEX_STYLE_RADIO;
+ startGap = RELATIVE_LAYOUT_LEFT_MARGIN;
+
+ switch (itemIndex)
+ {
+ case ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW:
+ {
+ itemText = L"Very slow";
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_SLOW:
+ {
+ itemText = L"Slow";
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_NORMAL:
+ {
+ itemText = ResourceManager::GetString(L"IDS_ST_BODY_FONTTYPE_NORMAL");
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_FAST:
+ {
+ itemText = L"Fast";
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_VERY_FAST:
+ {
+ itemText = L"Very fast";
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ RelativeLayout relativeLayout;
+ relativeLayout.Construct();
+
+ pItem->Construct(relativeLayout, Dimension(itemWidth, H_GROUP_ITEM_DEFAULT), style);
+ pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT);
+
+ pLabel = new (std::nothrow) Label();
+ pLabel->Construct(itemRectangle, itemText);
+ pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+
+ pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
+ pLabel->SetTextColor(COLOR_MAIN_TEXT);
+
+ pItem->AddControl(*pLabel);
+
+ relativeLayout.SetMargin(*pLabel, startGap, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
+ relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+
+ if (secondLineText.IsEmpty() == false)
+ {
+ pLabel = new (std::nothrow) Label();
+ pLabel->Construct(itemSecondLineTextRect, secondLineText);
+ pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabel->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL);
+ pLabel->SetTextColor(COLOR_SUB_TEXT);
+
+ pItem->AddControl(*pLabel);
+
+ relativeLayout.SetMargin(*pLabel, 0, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
+ relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ }
+
+ return pItem;
+}
+
+bool
+AccessibilityForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
+{
+ AppLogDebug("ENTER");
+
+ delete pItem;
+ pItem = null;
+
+ return true;
+}
+
+bool
+AccessibilityForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
+{
+ AppLogDebug("ENTER");
+
+ delete pItem;
+ pItem = null;
+
+ return true;
+}
+
+void
+AccessibilityForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
+{
+ AppLogDebug("group[%d] index[%d]", groupIndex, itemIndex);
+
+ result r = E_FAILURE;
+
+ switch (groupIndex)
+ {
+ case ID_GROUP_SCREEN_READER:
+ {
+ switch (itemIndex)
+ {
+ case ID_ITEM_SCREEN_READER:
+ {
+ bool itemStatus = tableView.IsItemChecked(groupIndex, itemIndex);
+
+ if ((r = SettingInfo::SetValue(SETTING_INFO_KEY_TTS, itemStatus)) == E_SUCCESS)
+ {
+ tableView.SetItemChecked(groupIndex, itemIndex, itemStatus);
+ }
+ else
+ {
+ AppLogDebug("SetValue Fail.. TTS Result[%s]", GetErrorMessage(r));
+ }
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE:
+ {
+ if (tableView.IsGroupExpanded(ID_GROUP_SPEECH_RATE_LIST) == false)
+ {
+ tableView.ExpandGroup(ID_GROUP_SPEECH_RATE_LIST);
+ }
+ else
+ {
+ tableView.CollapseGroup(ID_GROUP_SPEECH_RATE_LIST);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ case ID_GROUP_SPEECH_RATE_LIST:
+ {
+ int itemCount = tableView.GetItemCountAt(ID_GROUP_SPEECH_RATE_LIST);
+
+ for (int count = 0; count < itemCount; count++)
+ {
+ bool check = ((count == itemIndex)?(true):(false));
+ tableView.SetItemChecked(groupIndex, count, check);
+
+ if (check == true)
+ {
+ r = SettingInfo::SetValue(SETTING_INFO_KEY_TTS_RATE, count);
+ AppLogDebug("SetValue. TTS Rate Result[%s] ", GetErrorMessage(r));
+ tableView.RefreshItem(ID_GROUP_SCREEN_READER, ID_ITEM_RATE_SPEECH_RATE,TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ }
+ RefreshGroupItemAt(ID_GROUP_SPEECH_RATE_LIST);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+int
+AccessibilityForm::GetDefaultGroupItemHeight(void)
+{
+ return H_GROUP_INDEX_NO_TITLE_DEFAULT;
+}
+
+int
+AccessibilityForm::GetDefaultItemHeight(void)
+{
+ return H_GROUP_ITEM_DEFAULT;
+}
+
+void
+AccessibilityForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem)
+{
+}
+
+void
+AccessibilityForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+ switch (groupIndex)
+ {
+ case ID_GROUP_SCREEN_READER:
+ {
+ if (itemIndex == ID_ITEM_RATE_SPEECH_RATE)
+ {
+ result r = E_FAILURE;
+ Label* secondLine = static_cast<Label*>(pItem->GetControl(ID_ITEM_RATE_SPEECH_RATE));
+ String secondLineText;
+
+ int ttsRate = 0;
+
+ if ((r = SettingInfo::GetValue(SETTING_INFO_KEY_TTS_RATE, ttsRate)) == E_SUCCESS)
+ {
+ switch (ttsRate)
+ {
+ case ID_ITEM_RATE_SPEECH_RATE_VERY_SLOW:
+ {
+ secondLineText = L"Very slow";
+ secondLine->SetText(secondLineText);
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_SLOW:
+ {
+ secondLineText = L"Slow";
+ secondLine->SetText(secondLineText);
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_NORMAL:
+ {
+ secondLineText = ResourceManager::GetString(L"IDS_ST_BODY_FONTTYPE_NORMAL");
+ secondLine->SetText(secondLineText);
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_FAST:
+ {
+ secondLineText = L"Fast";
+ secondLine->SetText(secondLineText);
+ }
+ break;
+
+ case ID_ITEM_RATE_SPEECH_RATE_VERY_FAST:
+ {
+ secondLineText = L"Very fast";
+ secondLine->SetText(secondLineText);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ secondLine->Invalidate(false);
+ }
+ }
+ else
+ {
+ pItem->Invalidate(false);
+ }
+ }
+ break;
+
+ case ID_GROUP_SPEECH_RATE_LIST:
+ {
+ pItem->Invalidate(false);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+AccessibilityForm::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
+{
+}
+
+void
+AccessibilityForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
+{
+}
+
+void
+AccessibilityForm::RefreshAllItem(void)
+{
+ int groupCount = __pTableView->GetGroupCount();
+
+ for (int count = 0; count < groupCount; count++)
+ {
+ RefreshGroupAt(count);
+ }
+}
+
+void
+AccessibilityForm::RefreshGroupAt(int groupIndex)
+{
+ __pTableView->RefreshItem(groupIndex, REFRESH_GROUP_INDEX, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+}
+
+void
+AccessibilityForm::RefreshGroupItemAt(int groupIndex)
+{
+ int itemCount = __pTableView->GetItemCountAt(groupIndex);
+
+ for (int count = 0; count < itemCount; count++)
+ {
+ __pTableView->RefreshItem(groupIndex, count, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
+}
+
+void
+AccessibilityForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ Invalidate(true);
+}
\ No newline at end of file
{
AppLogDebug("bitmap is null ");
AppLogDebug("separator id [%ls]", pItemNode->GetId().GetPointer());
- }
-
+ }
+
RelativeLayout relativeLayout;
relativeLayout.Construct();
pItem->Construct(relativeLayout, Dimension(itemWidth, itemRectangle.height), TABLE_VIEW_ANNEX_STYLE_NORMAL);
Invalidate(true);
return;
}
+
int loopCount = pParent->GetChildCount() + itemTag->GetItemIndex() + APPSETTING_DEFAULT_COUNT;
for (int pos = itemTag->GetItemIndex() + APPSETTING_DEFAULT_COUNT; pos < loopCount; pos++)
}
__pTableView->RefreshItem(itemTag->GetGroupIndex(), itemTag->GetItemIndex(), TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
Invalidate(true);
-
}
else if (pItemNode->GetType().Equals(ID_APPSETTING_ITEM_TYPE_BOOL, false))
{
{
return H_GROUP_INDEX_NO_TITLE_DEFAULT;
}
+
int
AppSettingForm::GetDefaultItemHeight(void)
{
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
{
int intgerValue = 0;
result r = Integer::Parse(value, intgerValue);
- if(IsFailed(r))
+ if (IsFailed(r))
{
AppLogDebug("Integer::Parse fail");
return 0;
ElementNode* pElementNode = dynamic_cast<ElementNode*>(pParentOfNewNode);
if (pElementNode != null)
{
- if(xmlStrcasecmp(name, (const xmlChar*) "separator") == 0)
+ if (xmlStrcasecmp(name, (const xmlChar*) "separator") == 0)
{
String separatorId;
separatorId.Format(20, L"IDSP_%d", separatorCount);
}
delete pBuf;
}
- if(xmlStrcasecmp(name, (const xmlChar*) "separator") == 0)
+ if (xmlStrcasecmp(name, (const xmlChar*) "separator") == 0)
+ {
+ if (pCurrentNode != null)
{
- if (pCurrentNode != null)
- {
- pCurrentNode->AddAttribute(appSettingNodeAttributeDelimit[1], L"separator");
- pCurrentNode->AddAttribute(appSettingNodeAttributeDelimit[2], L"true");
- }
+ pCurrentNode->AddAttribute(appSettingNodeAttributeDelimit[1], L"separator");
+ pCurrentNode->AddAttribute(appSettingNodeAttributeDelimit[2], L"true");
}
+ }
}
if (reader)
width -= W_HUGE_SIZE_PORTRAIT_TEXT_GAP;
}
else if (((orientationStatus == ORIENTATION_STATUS_LANDSCAPE)
- || (orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
- && (fontSize == FONT_MAIN_TEXT_SIZE_HUGE))
+ || (orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE))
+ && (fontSize == FONT_MAIN_TEXT_SIZE_HUGE))
{
width -= W_HUGE_SIZE_LANDSCAPE_TEXT_GAP;
}
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
-#define BLUETOOTH_TEST_CODE
-
static const int ID_BLUETOOTH_DETAIL_GROUP_COUNT_DEFAULT = 1;
static const int ID_BLUETOOTH_DETAIL_ITEM_COUNT_DEFAULT = 2;
static const int ID_BLUETOOTH_DETAIL_INITIALIZE_VALUE = -1;
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
-#define BLUETOOTH_TEST_CODE
-
static const char APPCONTROL_REQUEST_DEFAULT = 0x00;
static const char APPCONTROL_REQUEST_BLUETOOTH = 0x20;
return;
}
- switch(__groupIndexTranslateTable[groupIndex])
+ switch (__groupIndexTranslateTable[groupIndex])
{
case BLUETOOTH_GROUP_ITEM_AVAILABLE_DEVICES:
{
return;
}
- switch(__groupIndexTranslateTable[groupIndex])
+ switch (__groupIndexTranslateTable[groupIndex])
{
case BLUETOOTH_GROUP_ITEM_TURN_ON_OFF_STATUS:
{
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
{
int foundDeviceListCount = 0;
- if ( IsBluetoothActivated() == false || __pFoundRemoteDeviceList == null)
+ if (IsBluetoothActivated() == false || __pFoundRemoteDeviceList == null)
{
if (__pFoundRemoteDeviceList == null)
{
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
}
hexString.Remove(hexString.GetLength() - DEFAULT_COUNT, DEFAULT_COUNT);
-
delete pBuffer;
return hexString;
}
\ No newline at end of file
CertificateUserForm::CertificateUserForm(void)
: __pCertificatePresentationModelInstance(null)
, __installFromSDCardPopup(null)
+ , __isPopupVisible(false)
{
}
delete __installFromSDCardPopup;
__installFromSDCardPopup = null;
__pTableView = null;
+ __isPopupVisible = false;
SetFormBackEventListener(null);
return E_SUCCESS;
void
CertificateUserForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
{
+ __isPopupVisible = false;
if (__pTableView != null)
{
int tableViewControlCount = __pTableView->GetControlCount();
{
case IDA_CERTIFICATE_USER_FORM_FOOTER_INSTALL:
{
- CreateAlertPopup();
- ShowAlertPopup();
+ if (__isPopupVisible == false)
+ {
+ CreateAlertPopup();
+ ShowAlertPopup();
+ }
}
break;
}
return r;
}
+
int
CertificateUserForm::GetUserCertificateStoreCount(void)
{
void
CertificateUserForm::ShowAlertPopup(void)
{
+ __isPopupVisible = true;
__installFromSDCardPopup->SetShowState(true);
__installFromSDCardPopup->Show();
}
void
CertificateUserForm::HideAlertPopup(void)
{
+ __isPopupVisible = false;
__installFromSDCardPopup->SetShowState(false);
__installFromSDCardPopup->Invalidate(true);
}
\ No newline at end of file
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
{
bool timeFormat = false;
- switch(itemIndex)
+ switch (itemIndex)
{
case ID_ITEM_DATE_AND_TIME_FORMAT_12_HOURS:
{
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
-static const int ID_GROUP_DEVELOPER_USB_DEBUGGING = 0;
+static const int ID_GROUP_DEVELOPER_GPU_RENDERING = 0;
+static const int ID_GROUP_DEVELOPER_GPU_RENDERING_ITEM_COUNT = 1;
+static const int ID_ITEM_DEVELOPER_GPU_RENDERING = 0;
+
+static const int ID_GROUP_DEVELOPER_GPU_RENDERING_HELP = 1;
+static const int ID_GROUP_DEVELOPER_GPU_RENDERING_HELP_ITEM_COUNT = 0;
+
+static const int ID_GROUP_DEVELOPER_USB_DEBUGGING = 2;
static const int ID_GROUP_DEVELOPER_MAIN_ITEM_COUNT = 1;
static const int ID_ITEM_DEVELOPER_USB_DEBUGGING = 0;
-static const int ID_GROUP_DEVELOPER_CPU = 1;
+static const int ID_GROUP_DEVELOPER_CPU = 3;
static const int ID_GROUP_DEVELOPER_CPU_ITEM_COUNT = 0;
static const int ID_ITEM_DEVELOPER_CPU_USAGE = 0;
-static const int ID_GROUP_DEVELOPER_GPU_RENDERING = 2;
-static const int ID_GROUP_DEVELOPER_GPU_RENDERING_ITEM_COUNT = 1;
-static const int ID_ITEM_DEVELOPER_GPU_RENDERING = 0;
-
-static const int ID_GROUP_DEVELOPER_CPU_RENDERING = 3;
+static const int ID_GROUP_DEVELOPER_CPU_RENDERING = 4;
static const int ID_GROUP_DEVELOPER_CPU_RENDERING_ITEM_COUNT = 1;
static const int ID_ITEM_DEVELOPER_CPU_RENDERING = 0;
-static const int ID_GROUP_DEVELOPER_LIMIT_PROCESS = 4;
+static const int ID_GROUP_DEVELOPER_LIMIT_PROCESS = 5;
static const int ID_GROUP_DEVELOPER_LIMIT_PROCESS_ITEM_COUNT = 1;
static const int ID_ITEM_DEVELOPER_LIMIT_PROCESS = 0;
static const int IDA_USB_DEBUGGING_POPUP_CANCEL = 200;
static const int ID_GROUP_COUNT = 2;
-static const int ID_GROUP_MAX_ITEM_COUNT = ID_GROUP_DEVELOPER_LIMIT_PROCESS_ITEM_COUNT;
+static const int ID_GROUP_MAX_ITEM_COUNT = ID_GROUP_DEVELOPER_GPU_RENDERING_ITEM_COUNT;
static const int H_HELP_TEXT_GAP = 3;
static const int W_RESIZE_LABEL_GAP = 170;
switch (groupIndex)
{
+ case ID_GROUP_DEVELOPER_GPU_RENDERING_HELP:
+ {
+ style = LABEL_TEXT_STYLE_NORMAL;
+ yItemOffset = H_GROUP_INDEX_HELP_TEXT_TOP_GAP;
+ itemHeight = ((H_GROUP_INDEX_HELP_TEXT * LINE_COUNT_2) + H_GROUP_INDEX_NO_TITLE_TEXT_GAP);
+ groupText = ResourceManager::GetString(L"IDS_ST_BODY_USE_2D_HARDWARE_ACCELERATION_IN_APPLICATIONS_ABB");
+ }
+ break;
+
case ID_GROUP_DEVELOPER_USB_DEBUGGING:
{
yItemOffset = Y_GROUP_INDEX_DEFAULT;
pLabel = new (std::nothrow) Label();
pLabel->Construct(itemRectangle, itemText);
pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
- pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD);
+ pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
pLabel->SetTextColor(COLOR_MAIN_TEXT);
pItem->AddControl(*pLabel);
}
else
{
- AppLogDebug("rendering result[%s]", GetErrorMessage(GetLastResult()));
+ AppLogDebug("rendering result[%s]", GetErrorMessage(r));
__pTableView->SetItemChecked(ID_GROUP_DEVELOPER_GPU_RENDERING, ID_ITEM_DEVELOPER_GPU_RENDERING, false);
}
}
break;
}
AppLogDebug("Set UsbDebugging result [%s] ", GetErrorMessage(r));
-
}
break;
{
case ID_GROUP_FONT:
{
- if(__pTableView->IsGroupExpanded(ID_GROUP_FONT_LIST))
+ if (__pTableView->IsGroupExpanded(ID_GROUP_FONT_LIST))
{
__pTableView->CollapseGroup(ID_GROUP_FONT_LIST);
}
formatTok.GetNextToken(token);
}
- if (token.Equals("ttf",false) || token.Equals("ttc",false))
+ if (token.Equals("ttf", false) || token.Equals("ttc", false))
{
String fullName;
fullName.Append(FONT_DIR_PATH[i]);
String fontSize(L"medium");
- switch(itemIndex)
+ switch (itemIndex)
{
case ID_ITEM_FONT_SIZE_GIANT:
{
SettingInfo::GetValue(SETTING_INFO_KEY_FONT_TYPE, value);
hashMap->Add(*(new (std::nothrow) String(L"category")), *(new (std::nothrow) String(L"FontType")));
hashMap->Add(*(new (std::nothrow) String(L"type")), *(new (std::nothrow) String(value)));
-
}
else if (__categoryCheck == L"category:FontSize")
{
*/
#include "StAboutPhoneForm.h"
+#include "StAccessibilityForm.h"
#include "StAppSettingForm.h"
#include "StBluetoothForm.h"
#include "StBluetoothDetailForm.h"
const wchar_t* IDSCN_FONT = L"Font";
const wchar_t* IDSCN_FONT_SIZE = L"FontSize";
const wchar_t* IDSCN_DISPLAY = L"Display";
+const wchar_t* IDSCN_ACCESSIBILITY = L"Accessibility";
const wchar_t* IDSCN_DATE_TIME = L"DateTime";
const wchar_t* IDSCN_LOCALE = L"Locale";
const wchar_t* IDSCN_LOCALE_LANGUAGE = L"LocaleLanguage";
const wchar_t* IDC_FORM_FONT = L"FontForm";
const wchar_t* IDC_FORM_FONT_SIZE = L"FontSizeForm";
const wchar_t* IDC_FORM_DISPLAY = L"DisplayForm";
+const wchar_t* IDC_FORM_ACCESSIBILITY = L"AccessibilityForm";
const wchar_t* IDC_FORM_DATE_TIME = L"DateTimeForm";
const wchar_t* IDC_FORM_LOCALE = L"LocaleForm";
const wchar_t* IDC_FORM_LOCALE_LANGUAGE = L"LocaleLanguageForm";
pSceneManager->AddSceneEventListener(sceneId, *pForm);
pNewForm = pForm;
}
+ else if (formId == IDC_FORM_ACCESSIBILITY)
+ {
+ AccessibilityForm* pForm = new (std::nothrow) AccessibilityForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
else if (formId == IDC_FORM_DATE_TIME)
{
DateTimeForm* pForm = new (std::nothrow) DateTimeForm();
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
{
AppLogDebug("SetInputMethod(appId(%ls)) failed(%s)", pInputMethodInfo->GetAppId().GetPointer(), GetErrorMessage(r));
}
- pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);\r
+ pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
}
break;
static const int ID_GROUP_MAX_ITEM_COUNT = ID_GROUP_LANGUAGE_AND_REGION_MAIN_ITEM_COUNT;
static const int H_HELP_TEXT_GAP = 4;
-static const int ID_GROUP_LANGUAGE_ITEM_COUNT = 49;
+static const int ID_GROUP_LANGUAGE_ITEM_COUNT = 51;
static const int DEFAULT_COUNT = 1;
static const int FIRST_CONTROL = 0;
static const int SECOND_CONTROL = 1;
L"eng_GB",
L"eng_US",
L"eng_PH",
+ L"ara_AE",
L"hye_AM",
L"aze_AZ",
L"eus_ES",
L"kat_GE",
L"deu_DE",
L"ell_GR",
+ L"hin_IN",
L"hun_HU",
L"isl_IS",
L"gle_IE",
data = L"";
key = languageCode[i++];
+ displayName = ResourceManager::GetString(L"IDS_IME_BODY_ARABIC");
+ data.Append(displayName + L"/" + key);
+ __languageDataList->Add(*(new (std::nothrow) String(data)));
+
+ data = L"";
+ key = languageCode[i++];
displayName = ResourceManager::GetString(L"IDS_IME_BODY_ARMENIAN");
data.Append(displayName + L"/" + key);
__languageDataList->Add(*(new (std::nothrow) String(data)));
data = L"";
key = languageCode[i++];
displayName = ResourceManager::GetString(L"IDS_IME_OPT_LANG_FRENCH");
- displayName.Append(L" (" + ResourceManager::GetString(L"IDS_WCL_BODY_CANADA") + L")");
+ displayName.Append(L"(");
+ displayName.Append(ResourceManager::GetString(L"IDS_WCL_BODY_CANADA"));
+ displayName.Append(L")");
data.Append(displayName + L"/" + key);
__languageDataList->Add(*(new (std::nothrow) String(data)));
data = L"";
key = languageCode[i++];
+ displayName = ResourceManager::GetString(L"IDS_IME_BODY_LANG_HINDI");
+ data.Append(displayName + L"/" + key);
+ __languageDataList->Add(*(new (std::nothrow) String(data)));
+
+ data = L"";
+ key = languageCode[i++];
displayName = ResourceManager::GetString(L"IDS_IME_OPT_LANG_HUNGARIAN");
data.Append(displayName + L"/" + key);
__languageDataList->Add(*(new (std::nothrow) String(data)));
data = L"";
key = languageCode[i++];
displayName = ResourceManager::GetString(L"IDS_IME_POP_LANG_PORTUGUESE");
- displayName.Append(L" (" + ResourceManager::GetString(L"IDS_WCL_BODY_BRAZIL") + L")");
+ displayName.Append(L" ");
+ displayName.Append(ResourceManager::GetString(L"IDS_WCL_BODY_BRAZIL"));
data.Append(displayName + L"/" + key);
__languageDataList->Add(*(new (std::nothrow) String(data)));
data = L"";
key = languageCode[i++];
displayName = ResourceManager::GetString(L"IDS_IME_OPT_LANG_SPANISH");
- displayName.Append(L" (" + ResourceManager::GetString(L"IDS_WCL_BODY_MEXICO") + L")");
+ displayName.Append(L"(");
+ displayName.Append(ResourceManager::GetString(L"IDS_WCL_BODY_MEXICO"));
+ displayName.Append(L")");
data.Append(displayName + L"/" + key);
__languageDataList->Add(*(new (std::nothrow) String(data)));
static const int ID_GROUP_COUNT = 1;
static const int ITEM_WIDTH_GAP = 100;
-static const int ID_GROUP_LANGUAGE_ITEM_COUNT = 49;
-
LocaleLanguageForm::LocaleLanguageForm(void)
: __pLanguageDataList(null)
{
Rectangle itemRectangle;
String groupText;
Label* pLabel = null;
-
+
TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
yItemOffset = H_GROUP_INDEX_NO_HELP_TEXT_GAP;
SetOrientationAutoMode();
-
return E_SUCCESS;
}
pSceneManager->RegisterScene(IDSCN_SCREEN_MODE, IDC_FORM_SCREEN_MODE, L"");
pSceneManager->RegisterScene(IDSCN_MANAGE_APPLICATION, IDC_FORM_MANAGE_APPLICATION, L"");
pSceneManager->RegisterScene(IDSCN_MANAGE_APPLICATION_INFO, IDC_FORM_MANAGE_APPLICATION_INFO, L"");
+ pSceneManager->RegisterScene(IDSCN_ACCESSIBILITY, IDC_FORM_ACCESSIBILITY, L"");
pSceneManager->RegisterScene(IDSCN_ACCOUNTS, IDC_FORM_ACCOUNTS, L"");
pSceneManager->RegisterScene(IDSCN_PHONE, IDC_FORM_PHONE, L"");
static const int ID_ITEM_DEVICE_SOUND = 1;
static const int ID_ITEM_DEVICE_LOCATION = 2;
static const int ID_ITEM_DEVICE_CALL_SETTING = 3;
-static const int ID_ITEM_DEVICE_DATE_TIME = 4;
-static const int ID_ITEM_DEVICE_LANGUAGE_KEYBOARD = 5;
-static const int ID_GROUP_DEVICE_ITEM_COUNT = 6;
+static const int ID_ITEM_DEVICE_ACCESSIBILITY = 4;
+static const int ID_ITEM_DEVICE_DATE_TIME = 5;
+static const int ID_ITEM_DEVICE_LANGUAGE_KEYBOARD = 6;
+static const int ID_GROUP_DEVICE_ITEM_COUNT = 7;
static const int ID_GROUP_SYSTEM = 3;
static const int ID_ITEM_SYSTEM_MANAGE_APPLICATION = 0;
-static const int ID_ITEM_SYSTEM_DEVELOPER_OPTION = 2;
-static const int ID_ITEM_SYSTEM_ABOUT_PHONE = 1;
-static const int ID_GROUP_SYSTEM_ITEM_COUNT = 2;
+static const int ID_ITEM_SYSTEM_DEVELOPER_OPTION = 1;
+static const int ID_ITEM_SYSTEM_ABOUT_PHONE = 2;
+static const int ID_GROUP_SYSTEM_ITEM_COUNT = 3;
static const int ID_GROUP_APPSETTING = 4;
static const int ID_GROUP_NO_APPSETTING = 4;
}
break;
+ case ID_ITEM_DEVICE_ACCESSIBILITY:
+ {
+ pBitmap = ResourceManager::GetBitmapN(IDB_ACCESSIBILITY);
+ itemText = L"Accessibility";
+ }
+ break;
+
case ID_ITEM_DEVICE_DATE_TIME:
{
pBitmap = ResourceManager::GetBitmapN(IDB_DATE_AND_TIME);
AppLogDebug("Construct fail [%s]", GetErrorMessage(r));
break;
}
+
switch (itemIndex)
{
case ID_ITEM_PERSONAL_HOME_SCREEN:
{
pArgs->Add(*(new (std::nothrow) String(Integer::ToString(itemIndex))));
- AppLogTag("MyWallpaper", "");
}
break;
case ID_ITEM_PERSONAL_LOCK_SCREEN:
{
pArgs->Add(*(new (std::nothrow) String(Integer::ToString(itemIndex))));
- AppLogTag("MyWallpaper", "");
}
break;
+
+ default:
+ break;
}
}
break;
}
break;
+ case ID_ITEM_DEVICE_ACCESSIBILITY:
+ {
+ pScene = IDSCN_ACCESSIBILITY;
+ }
+ break;
+
case ID_ITEM_DEVICE_DATE_TIME:
{
pScene = IDSCN_DATE_TIME;
}
void
-ManageApplicationForm::CreateHeaderStyleTab()
+ManageApplicationForm::CreateHeaderStyleTab(void)
{
#ifdef HEADER_HAS_THREE_TAB
Header* pHeader = GetHeader();
LoadPackageInfoList();
}
-
result
ManageApplicationForm::OnInitializing(void)
{
int itemCount = 0;
- switch(groupIndex)
+ switch (groupIndex)
{
case ID_GROUP_APPLICATION_NAME:
{
if (((appSize+dataSize) / KILOBYTE_TO_MEGABYTE) >= 1)
{
- secondLineText = Double::ToString(((appSize+dataSize)/KILOBYTE_TO_MEGABYTE));
+ secondLineText = Double::ToString(((appSize+dataSize) / KILOBYTE_TO_MEGABYTE));
secondLineText.Append(L" MB");
}
else
if ((totalSize / KILOBYTE_TO_MEGABYTE) >= 1)
{
- secondLineText = Double::ToString((totalSize/KILOBYTE_TO_MEGABYTE));
+ secondLineText = Double::ToString((totalSize / KILOBYTE_TO_MEGABYTE));
secondLineText.Append(L" MB");
}
else
if (isCommandButton == true)
{
String appId;
- firstLineRectangle.height -= (H_ITEM_TYPE_1_LABEL/ DIVIDE_BY_TWO);
+ firstLineRectangle.height -= (H_ITEM_TYPE_1_LABEL / DIVIDE_BY_TWO);
pItem->Construct(Dimension(itemWidth, firstLineRectangle.height), style);
pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT);
uninstallButtonRect = firstLineRectangle;
uninstallButtonRect.x = (itemWidth / DIVIDE_BY_TWO);
- uninstallButtonRect.width = (itemWidth / DIVIDE_BY_TWO)- COMMAND_BUTTON_GAP;
+ uninstallButtonRect.width = (itemWidth / DIVIDE_BY_TWO) - COMMAND_BUTTON_GAP;
pStopButton = new (std::nothrow) Button();
pStopButton->Construct(stopButtonRect, ResourceManager::GetString(L"IDS_ST_BUTTON_FORCE_STOP"));
Button* pStopButton = static_cast<Button*>(pItem->GetControl(0));
Button* pUninstallButton = static_cast<Button*>(pItem->GetControl(1));
- pStopButton->SetBounds(0, 0, (clientRect.width/DIVIDE_BY_TWO -COMMAND_BUTTON_GAP), pItemRect.height);
- pUninstallButton->SetBounds((clientRect.width/DIVIDE_BY_TWO), 0, (clientRect.width/DIVIDE_BY_TWO -COMMAND_BUTTON_GAP), pItemRect.height);
+ pStopButton->SetBounds(0, 0, (clientRect.width / DIVIDE_BY_TWO - COMMAND_BUTTON_GAP), pItemRect.height);
+ pUninstallButton->SetBounds((clientRect.width / DIVIDE_BY_TWO), 0, (clientRect.width / DIVIDE_BY_TWO - COMMAND_BUTTON_GAP), pItemRect.height);
String appId = *(static_cast<String*>(__applicationData->GetAt(DATA_TYPE_APPLICATION_ID)));
AppManager* pAppManager = AppManager::GetInstance();
pCancelButton->AddActionEventListener(*this);
__pProgressPopup = new (std::nothrow) ProgressPopup();
- __pProgressPopup->Construct(false,false);
+ __pProgressPopup->Construct(false, false);
__pProgressPopup->SetTitleText(applicationName);
__pProgressPopup->SetBounds(clientRect);
case ID_ITEM_CONNECTIVITY_NFC:
{
- AppLogTag("MyNfc", "ddlknalksdf %d", status);
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_NFC, SCENE_TRANSITION_ANIMATION_TYPE_LEFT));
}
break;
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
break;
case ID_GROUP_NETWORK:
- {
- if (itemIndex == ID_ITEM_NETWORK_NETWORK_MODE)
{
- itemText = ResourceManager::GetString(L"IDS_ST_BODY_NETWORK_MODE");
+ if (itemIndex == ID_ITEM_NETWORK_NETWORK_MODE)
+ {
+ itemText = ResourceManager::GetString(L"IDS_ST_BODY_NETWORK_MODE");
+ }
}
- }
- break;
+ break;
case ID_GROUP_NETWORK_MODE_SUB:
{
__pNfcPredefinedItemPresentationModelInstance = NfcPredefinedItemPresentationModel::GetInstance();
}
- __pNfcPredefinedItemPresentationModelInstance->InitReservedPushCandidatesList();
- __pResevedPushCandidatesAppidList = __pNfcPredefinedItemPresentationModelInstance->GetAllListReservedPushCandidatesAppIdList();
- if (__pResevedPushCandidatesAppidList->GetCount() > 0)
+ if (__pNfcPredefinedItemPresentationModelInstance != null)
{
- __isPredefinedItem = true;
+ __pNfcPredefinedItemPresentationModelInstance->InitReservedPushCandidatesList();
+ __pResevedPushCandidatesAppidList = __pNfcPredefinedItemPresentationModelInstance->GetAllListReservedPushCandidatesAppIdList();
+ if (__pResevedPushCandidatesAppidList->GetCount() > 0)
+ {
+ __isPredefinedItem = true;
+ }
}
__pTableView->UpdateTableView();
- bool nfcActivated = __pNfcPresentationModelInstance->IsNfcActivated();
- __pTableView->SetItemChecked(0, 0, nfcActivated);
- __pTableView->SetItemEnabled(ID_GROUP_NFC_PREDEFINED_ITEM, 0, nfcActivated);
+ if (__pNfcPresentationModelInstance != null)
+ {
+ bool nfcActivated = __pNfcPresentationModelInstance->IsNfcActivated();
+ __pTableView->SetItemChecked(0, 0, nfcActivated);
+ __pTableView->SetItemEnabled(ID_GROUP_NFC_PREDEFINED_ITEM, 0, nfcActivated);
+ }
if (__isPredefinedItem)
{
bool NfcReservedPushActivated = __pNfcPredefinedItemPresentationModelInstance->IsNfcReservedPushActivated();
void
NfcForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
{
+ AppLogDebug("groupIndex [%d] itemIndex [%d]", groupIndex, itemIndex);
if ((groupIndex != 0)
&& (itemIndex != 0))
{
AppLogDebug("OnGroupedTableViewGroupItemStateChanged is Error");
return;
}
+ if (__pNfcPresentationModelInstance == null)
+ {
+ AppLogDebug("__pNfcPresentationModelInstance is null");
+ return;
+ }
+
switch (groupIndex)
{
case ID_GROUP_NFC:
{
__pNfcPresentationModelInstance->ActivateNfc();
}
- r = __pTableView->SetItemEnabled(ID_GROUP_NFC_PREDEFINED_ITEM, 0, true);
+ if (__isPredefinedItem)
+ {
+ r = __pTableView->SetItemEnabled(ID_GROUP_NFC_PREDEFINED_ITEM, 0, true);
+ AppLogDebug("r = %s", GetErrorMessage(r));
+ }
}
else
{
{
__pNfcPresentationModelInstance->DeactivateNfc();
}
- r = __pTableView->SetItemEnabled(ID_GROUP_NFC_PREDEFINED_ITEM, 0, false);
+ if (__isPredefinedItem)
+ {
+ r = __pTableView->SetItemEnabled(ID_GROUP_NFC_PREDEFINED_ITEM, 0, false);
+ AppLogDebug("r = %s", GetErrorMessage(r));
+ }
}
__pTableView->UpdateTableView();
- AppLogDebug("r = %s", GetErrorMessage(r));
}
break;
+
case ID_GROUP_NFC_PREDEFINED_ITEM:
{
bool NfcReservedPushActivated = __pNfcPredefinedItemPresentationModelInstance->IsNfcReservedPushActivated();
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_NFC_PREDEFINED_ITEM, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), null);
}
break;
+
default:
{
AppLogDebug("OnGroupedTableViewItemStateChanged is error");
NfcForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
{
__pTableView->RefreshItem(ID_GROUP_NFC_HELP, ID_GROUP_NFC_HELP_TEXT_LABEL, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
- __pTableView->RefreshItem(ID_GROUP_NFC_PREDEFINED_ITEM_HELP, ID_GROUP_NFC_PREDEFINED_ITEM_HELP_TEXT_LABEL, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ if (__isPredefinedItem)
+ {
+ __pTableView->RefreshItem(ID_GROUP_NFC_PREDEFINED_ITEM_HELP, ID_GROUP_NFC_PREDEFINED_ITEM_HELP_TEXT_LABEL, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ }
Invalidate(true);
}
\ No newline at end of file
void\r
NfcPredefinedItemPresentationModel::OnNdefPushMessageSent(result r)\r
{\r
-\r
}\r
\r
NfcPredefinedItemPresentationModel*\r
pLabel->SetTextColor(COLOR_MAIN_TEXT);
pItem->AddControl(*pLabel);
-
+
relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
relativeLayout.SetRelation(*pLabel, *pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
-//
+//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Flora License, Version 1.0 (the License);
}
}
break;
+
+ default:
+ break;
}
pLabel = new (std::nothrow) Label();
if (SettingInfo::GetValue(SETTING_INFO_KEY_SOUND_SYSTEM_VOLUME, systemVolume) != E_SUCCESS)
{
pSlider->SetValue(GROUP_ITEM_SLIDER_DEFAULT_VALUE);
-
}
else
{
{
__timeZoneSearchList->RemoveAll();
- for(int count = 0; count < __timeZoneTotalList->GetCount(); count++)
+ for (int count = 0; count < __timeZoneTotalList->GetCount(); count++)
{
TimeZoneData* pData = null;
pData = static_cast<TimeZoneData*>(__timeZoneTotalList->GetAt(count));
return null;
}
-
result
TimeZoneForm::InitTimeZoneLocaleList(void)
{
const wchar_t* IDB_DISPLAY = L"settings_74_display.png";
const wchar_t* IDB_HOME_SCREEN = L"settings_74_home_lock.png";
const wchar_t* IDB_AUTO_ROTATE_SCREEN = L"settings_74_auto_rate.png";
+const wchar_t* IDB_ACCESSIBILITY = L"settings_74_accessibility.png";
const wchar_t* IDB_DATE_AND_TIME = L"settings_74_date_and_time.png";
const wchar_t* IDB_LANGUAGE = L"A01-1_icon_Display_Language.png";
const wchar_t* IDB_KEYBOARD = L"settings_74_keyboard.png";
const wchar_t* SETTING_INFO_KEY_USB_DEBUGGING = L"http://tizen.org/setting/developer.usb_debugging";
const wchar_t* SETTING_INFO_KEY_FORCE_GPU_RENDERING = L"http://tizen.org/setting/developer.forced_gpu_rendering";
const wchar_t* SETTING_INFO_KEY_DEVICE_NAME = L"http://tizen.org/setting/device_name";
+const wchar_t* SETTING_INFO_KEY_TTS = L"http://tizen.org/setting/speech.tts.screen";
+const wchar_t* SETTING_INFO_KEY_TTS_RATE = L"http://tizen.org/setting/speech.tts.screen.rate";
+
const wchar_t* RUNTIME_INFO_KEY_CPU_USAGE = L"http://tizen.org/runtime/cpu.core.all.usage";
const wchar_t* RUNTIME_INFO_KEY_WALLPAPER_SCREEN = L"http://tizen.org/setting/screen.wallpaper";
const wchar_t* RUNTIME_INFO_KEY_WALLPAPER_SCREEN_LOCK = L"http://tizen.org/setting/screen.wallpaper.lock";
pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
}
+
void
WallpaperAlbumListForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
{
{
itemRectLineSize = MAX_OVER_FILE_SIZE;
}
- Rectangle rectFirst(ICON_CAP+FOLDER_CAP, ICON_CAP,
+ Rectangle rectFirst(ICON_CAP + FOLDER_CAP, ICON_CAP,
ICON_CAP * DOUBLE_NUMBER + ICON_SIZE * TRIPLE_NUMBER,
ICON_CAP * DOUBLE_NUMBER + ICON_SIZE * TRIPLE_NUMBER);
canvas.FillRectangle(COLOR_BG_GROUP_ITEM_DEFAULT, canvasRect);
}
String
-WallpaperAlbumListPresentationModel::GetDirectoryNameFromFullPath(const String& fullPath)const
+WallpaperAlbumListPresentationModel::GetDirectoryNameFromFullPath(const String& fullPath) const
{
AppLogDebug("ENTER");
if (fullPath == null)
}
IList*
-WallpaperAlbumListPresentationModel::GetContentIdListInDirectoryN(const String& directoryPath)const
+WallpaperAlbumListPresentationModel::GetContentIdListInDirectoryN(const String& directoryPath) const
{
AppLogDebug("ENTER");