msgid "IDS_ACCS_UNIVERSAL_SWITCH_ADD_SWITCH_CAMERA_GROUP_HEAD_MOUTH"
msgstr "Open mouth"
-msgid "IDS_ACCS_ACCESSIBILITY_LAUNCHER"
-msgstr "Accessibility launcher"
-
-msgid "IDS_ACCS_ACCESSIBILITY_LAUNCHER_HINT"
-msgstr "Add shortcuts to specific settings and functions."
-
-msgid "IDS_ACCS_ACCESSIBILITY_LAUNCHER_COMMENT"
-msgstr "Open your accessibility settings by pressing the home key three times in quick succession."
-
-msgid "IDS_ACCS_ACCESSIBILITY_LAUNCHER_ON"
-msgstr "On"
-
-msgid "IDS_ACCS_ACCESSIBILITY_LAUNCHER_OFF"
-msgstr "Off"
-
msgid "IDS_ACCS_SELECT_ITEMS"
msgstr "Select items"
+++ /dev/null
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- *
- * 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 "AccessibilityLauncherModel.hpp"
-
-#include "Singleton.hpp"
-
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_STATE "db/setting/accessibility/accessibility-launcher"
-#define VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_LAUNCH "db/setting/accessibility/accessibility-launcher/launch"
-
-AccessibilityLauncherModel::AccessibilityLauncherModel()
-{
- stateHandle_ = Singleton<VConfInterface>::instance().registerAndGet<bool>(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_STATE, false, [this](auto val) {
- state_ = val;
- });
-
- state_.attach([](auto val) {
- Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_STATE, val);
- });
-
- launchedHandle_ = Singleton<VConfInterface>::instance().registerAndGet<int>(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_LAUNCH, 0, [this](auto val) {
- bool a = val & 0x1;
- if (a != accessibilityLaunched_.value())
- accessibilityLaunched_ = a;
-
- bool sr = val & 0x2;
- if (sr != screenReaderLaunched_.value())
- screenReaderLaunched_ = sr;
-
- bool us = val & 0x4;
- if (us != universalSwitchLaunched_.value())
- universalSwitchLaunched_ = us;
- });
-
- auto calculateLauncherState = [this]() {
- int a = accessibilityLaunched_.value() ? 0x1 : 0x0;
- int sr = screenReaderLaunched_.value() ? 0x2 : 0x0;
- int us = universalSwitchLaunched_.value() ? 0x4 : 0x0;
-
- return us | sr | a;
- };
-
- accessibilityLaunched_.attach([this, calculateLauncherState](auto val) {
- Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_LAUNCH, calculateLauncherState());
- });
- screenReaderLaunched_.attach([this, calculateLauncherState](auto val) {
- Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_LAUNCH, calculateLauncherState());
- });
- universalSwitchLaunched_.attach([this, calculateLauncherState](auto val) {
- Singleton<VConfInterface>::instance().set(VCONFKEY_SETAPPL_ACCESSIBILITY_ACCESSIBILITY_LAUNCHER_LAUNCH, calculateLauncherState());
- });
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright 2019 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
- *
- * 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 ACCESSIBILITY_LAUNCHER_MODEL_HPP
-#define ACCESSIBILITY_LAUNCHER_MODEL_HPP
-
-#include "ObservableProperty.hpp"
-#include "VConf.hpp"
-
-class AccessibilityLauncherModel
-{
- public:
- AccessibilityLauncherModel();
-
- ObservableProperty<bool> state_;
- ObservableProperty<bool> accessibilityLaunched_;
- ObservableProperty<bool> screenReaderLaunched_;
- ObservableProperty<bool> universalSwitchLaunched_;
-
- private:
- VConfInterface::CallbackHandle stateHandle_;
- VConfInterface::CallbackHandle launchedHandle_;
-};
-
-#endif
+++ /dev/null
-/*
- * Copyright 2018 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
-
- * 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 "AccessibilityLauncherPagePresenter.hpp"
-
-#include "AccessibilitySettingLog.hpp"
-#include "AppContext.hpp"
-#include "Button.hpp"
-#include "Genlist.hpp"
-#include "Singleton.hpp"
-#include "VConf.hpp"
-#include "utils.hpp"
-
-#include <app.h>
-#include <string>
-#include <vconf.h>
-
-AccessibilityLauncherPagePresenter::AccessibilityLauncherPagePresenter()
- : ListPresenter("IDS_ACCS_ACCESSIBILITY_LAUNCHER")
-{
- model_.state_.attach([this](auto val) {
- groups_[0].items_[0]->title_ = val ? "IDS_ACCS_ACCESSIBILITY_LAUNCHER_ON" : "IDS_ACCS_ACCESSIBILITY_LAUNCHER_OFF";
- groups_[0].items_[0]->widgetState_ = val;
- });
-
- groups_.emplace_back("");
-
- groups_.back().items_.push_back(std::make_unique<ListItem>(
- model_.state_.value() ? "IDS_ACCS_ACCESSIBILITY_LAUNCHER_ON" : "IDS_ACCS_ACCESSIBILITY_LAUNCHER_OFF",
- std::string{},
- [this](auto item) {
- model_.state_ = item->widgetState_.value();
- },
- ListItem::WidgetType::toggle));
- groups_.back().items_.back()->widgetState_ = model_.state_.value();
-
- groups_.back().items_.push_back(std::make_unique<ListItem>(std::string{}, "IDS_ACCS_ACCESSIBILITY_LAUNCHER_COMMENT"));
-
- groups_.emplace_back("");
-
- groups_.back().items_.push_back(std::make_unique<ListItem>("IDS_ST_BODY_ACCESSIBILITY",
- std::string{},
- [this](auto item) { model_.accessibilityLaunched_ = item->widgetState_.value(); },
- ListItem::WidgetType::toggle));
- groups_.back().items_.back()->enabled_ = groups_[0].items_[0]->widgetState_.value();
- groups_.back().items_.push_back(std::make_unique<ListItem>("IDS_ST_MBODY_SCREEN_READER_HTTS",
- std::string{},
- [this](auto item) { model_.screenReaderLaunched_ = item->widgetState_.value(); },
- ListItem::WidgetType::toggle));
- groups_.back().items_.back()->enabled_ = groups_[0].items_[0]->widgetState_.value();
- groups_.back().items_.push_back(std::make_unique<ListItem>("IDS_ACCS_UNIVERSAL_SWITCH",
- std::string{},
- [this](auto item) { model_.universalSwitchLaunched_ = item->widgetState_.value(); },
- ListItem::WidgetType::toggle));
- groups_.back().items_.back()->enabled_ = groups_[0].items_[0]->widgetState_.value();
-
- groups_[0].items_[0]->widgetState_.attach([this](auto val) {
- for (auto &it : groups_[1].items_)
- it->enabled_ = val;
- });
-}
+++ /dev/null
-/*
- * Copyright 2018 Samsung Electronics Co., Ltd
- *
- * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
-
- * 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 ACCESSIBILITY_LAUNCHER_PAGE_PRESENTER_HPP
-#define ACCESSIBILITY_LAUNCHER_PAGE_PRESENTER_HPP
-
-#include "AccessibilityLauncherModel.hpp"
-#include "ListPresenter.hpp"
-
-#include <vector>
-
-class AccessibilityLauncherPagePresenter : public ListPresenter
-{
- public:
- AccessibilityLauncherPagePresenter();
-
- private:
- AccessibilityLauncherModel model_;
-};
-
-#endif
"IDS_ACCS_UNIVERSAL_SWITCH",
"IDS_ACCS_UNIVERSAL_SWITCH_HINT",
[this](auto item) { Singleton<AppContext>::instance().push(std::make_unique<UniversalSwitchPagePresenter>()); }));
- groups_.back().items_.push_back(std::make_unique<ListItem>(
- "IDS_ACCS_ACCESSIBILITY_LAUNCHER",
- "IDS_ACCS_ACCESSIBILITY_LAUNCHER_HINT",
- [this](auto item) { Singleton<AppContext>::instance().push(std::make_unique<AccessibilityLauncherPagePresenter>()); }));
onPopCallback_ = [this]() {
screenReaderStateHandle_ = {};
#ifndef MAIN_PAGE_PRESENTER_HPP
#define MAIN_PAGE_PRESENTER_HPP
-#include "AccessibilityLauncherPagePresenter.hpp"
#include "ListPresenter.hpp"
#include "ScreenReaderModel.hpp"
#include "UniversalSwitchPagePresenter.hpp"
MainPagePresenter();
private:
- std::unique_ptr<AccessibilityLauncherPagePresenter> accessibilityLauncherPage_;
VConfInterface::CallbackHandle screenReaderStateHandle_;
ScreenReaderModel model_;
};