{
public:
VconfTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType,
- std::string subMenuLabel, std::string showingStateVconfKey);
+ std::string subMenuLabel, std::string showingStateVconfKey, RepetitionPolicy repetitionPolicy);
std::string getName() const override;
public:
VconfIntTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType,
std::string vconfStateKey,
- std::string subMenuLabel = {}, std::string showingStateVconfKey = {});
+ std::string subMenuLabel = {}, std::string showingStateVconfKey = {}, RepetitionPolicy repetitionPolicy = RepetitionPolicy::single);
size_t getIndex() const override;
public:
VconfBoolTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType,
std::vector<std::string> vconfStateKeys,
- std::string subMenuLabel = {}, std::string showingStateVconfKey = {});
+ std::string subMenuLabel = {}, std::string showingStateVconfKey = {}, RepetitionPolicy repetitionPolicy = RepetitionPolicy::single);
size_t getIndex() const override;
std::vector<std::string> vconfStateKeys;
};
+class QuickpanelTypeMenuItem : public MenuItem
+{
+public:
+ QuickpanelTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType);
+
+ std::string getName() const override;
+};
-MenuItem::MenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType, std::string subMenuLabel, std::string showingStateVconfKey)
+MenuItem::MenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType, std::string subMenuLabel,
+ std::string showingStateVconfKey, RepetitionPolicy repetitionPolicy)
: names(std::move(names)), iconPath(std::move(iconPath)), activityType(std::move(activityType)),
- subMenuLabel(std::move(subMenuLabel)), showingStateVconfKey(std::move(showingStateVconfKey)) {}
+ subMenuLabel(std::move(subMenuLabel)), showingStateVconfKey(std::move(showingStateVconfKey)), repetitionPolicy(repetitionPolicy) {}
std::string MenuItem::getName() const
{
return showingStateVconfKey;
}
+bool MenuItem::isRepeatable() const
+{
+ return static_cast<bool>(repetitionPolicy);
+}
+
VconfTypeMenuItem::VconfTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType,
- std::string subMenuLabel, std::string showingStateVconfKey)
- : MenuItem(std::move(names), std::move(iconPath), std::move(activityType), std::move(subMenuLabel), std::move(showingStateVconfKey)), index(0)
+ std::string subMenuLabel, std::string showingStateVconfKey, RepetitionPolicy repetitionPolicy)
+ : MenuItem(std::move(names), std::move(iconPath), std::move(activityType), std::move(subMenuLabel), std::move(showingStateVconfKey), repetitionPolicy),
+ index(0)
{
ASSERT(!this->names.empty(), "Forbidden VconfTypeMenuItem");
}
}
VconfIntTypeMenuItem::VconfIntTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType,
- std::string vconfStateKey,
- std::string subMenuLabel, std::string showingStateVconfKey)
- : VconfTypeMenuItem(std::move(names), std::move(iconPath), std::move(activityType), std::move(subMenuLabel), std::move(showingStateVconfKey)),
+ std::string vconfStateKey, std::string subMenuLabel, std::string showingStateVconfKey, RepetitionPolicy repetitionPolicy)
+ : VconfTypeMenuItem(std::move(names), std::move(iconPath), std::move(activityType), std::move(subMenuLabel), std::move(showingStateVconfKey), repetitionPolicy),
vconfStateKey(std::move(vconfStateKey))
{
index = getIndex();
VconfBoolTypeMenuItem::VconfBoolTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType,
std::vector<std::string> vconfStateKeys,
- std::string subMenuLabel, std::string showingStateVconfKey)
- : VconfTypeMenuItem(std::move(names), std::move(iconPath), std::move(activityType), std::move(subMenuLabel), std::move(showingStateVconfKey)),
+ std::string subMenuLabel, std::string showingStateVconfKey, RepetitionPolicy repetitionPolicy)
+ : VconfTypeMenuItem(std::move(names), std::move(iconPath), std::move(activityType), std::move(subMenuLabel), std::move(showingStateVconfKey), repetitionPolicy),
vconfStateKeys(std::move(vconfStateKeys))
{
index = getIndex();
return static_cast<size_t>(idx);
}
-class QuickpanelTypeMenuItem : public MenuItem
-{
-public:
- QuickpanelTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType);
-
- std::string getName() const override;
-};
-
QuickpanelTypeMenuItem::QuickpanelTypeMenuItem(std::vector<std::string> names, std::string iconPath, std::string activityType)
: MenuItem(std::move(names), std::move(iconPath), std::move(activityType))
{}
auto increase = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_INCREASE"},
defaultImg,
- std::string {"INCREASE_UI_ELEMENT_VALUE"});
+ std::string {"INCREASE_UI_ELEMENT_VALUE"},
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto decrease = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_DECREASE"},
defaultImg,
- std::string {"DECREASE_UI_ELEMENT_VALUE"});
+ std::string {"DECREASE_UI_ELEMENT_VALUE"},
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto selectionMode = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_SELECTION_MODE"},
defaultImg);
std::vector<std::string> {"IDS_SOUND", "IDS_VIBRATION", "IDS_MUTE"},
defaultImg,
"CHANGE_SOUND_PROFILE_ACTIVITY",
- std::vector<std::string> {VCONF_KEY_SOUND_ENABLED, VCONF_KEY_VIBRATION_ENABLED});
+ std::vector<std::string> {VCONF_KEY_SOUND_ENABLED, VCONF_KEY_VIBRATION_ENABLED},
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto lock = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_LOCK"},
defaultImg,
auto speedUpScaning = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_SPEED_UP_SCANING"},
defaultImg,
- std::string{"SPEED_UP_AUTO_SCAN_ACTIVITY"});
+ std::string{"SPEED_UP_AUTO_SCAN_ACTIVITY"},
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto slowDownScaning = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_SLOW_DOWN_SCANING"},
defaultImg,
- std::string{"SLOW_DOWN_AUTO_SCAN_ACTIVITY"});
+ std::string{"SLOW_DOWN_AUTO_SCAN_ACTIVITY"},
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto scanMethod = std::make_shared<VconfIntTypeMenuItem>(
std::vector<std::string> {"IDS_ROW_SCAN", "IDS_POINT_SCAN"},
defaultImg,
auto ringtoneVolIncrease = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_RINGTONE_VOLUME_INC"},
defaultImg,
- "INCREASE_RINGTONE_VOLUME");
+ "INCREASE_RINGTONE_VOLUME",
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto ringtoneVolDecrease = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_RINGTONE_VOLUME_DEC"},
defaultImg,
- "DECREASE_RINGTONE_VOLUME");
+ "DECREASE_RINGTONE_VOLUME",
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto mediaVolumeIncrease = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_MEDIA_VOLUME_INC"},
defaultImg,
- "INCREASE_MEDIA_VOLUME");
+ "INCREASE_MEDIA_VOLUME",
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto mediaVolumeDecrease = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_MEDIA_VOLUME_DEC"},
defaultImg,
- "DECREASE_MEDIA_VOLUME");
+ "DECREASE_MEDIA_VOLUME",
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto tapHomeButtonx2 = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_TAP_HOME_BUTTON_X2"},
defaultImg,
auto notiVolumeIncrease = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_NOTI_VOLUME_INC"},
defaultImg,
- "INCREASE_NOTIFICATIONS_VOLUME");
+ "INCREASE_NOTIFICATIONS_VOLUME",
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto notiVolumeDecrease = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_NOTI_VOLUME_DEC"},
defaultImg,
- "DECREASE_NOTIFICATIONS_VOLUME");
+ "DECREASE_NOTIFICATIONS_VOLUME",
+ std::string {},
+ std::string {},
+ RepetitionPolicy::multiple);
auto autoScroll = std::make_shared<MenuItem>(
std::vector<std::string> {"IDS_AUTO_SCROLL"},
defaultImg,