bool getSelected() const;
/**
+ * @brief Makes list-item able to be selected.
+ * @param[in] selectable if true makes list-item able to be selected, if false - list-item will ignore selection.
+ */
+ void setSelectable(bool selectable);
+
+ /**
+ * @brief Checks whether list-item is able to be selected or not.
+ * @return true if list-item is selectable, false otherwise.
+ */
+ bool getSelectable() const;
+
+ /**
* @brief Sets the expanded state of an list-item.
* @param[in] expand expanded state.
*/
return elm_genlist_item_selected_get(getElmObjItem());
}
+void ListItem::setSelectable(bool selectable)
+{
+ Elm_Object_Select_Mode mode = selectable ? ELM_OBJECT_SELECT_MODE_DEFAULT : ELM_OBJECT_SELECT_MODE_NONE;
+ elm_genlist_item_select_mode_set(getElmObjItem(), mode);
+}
+
+bool ListItem::getSelectable() const
+{
+ Elm_Object_Select_Mode mode = elm_genlist_item_select_mode_get(getElmObjItem());
+ return mode == ELM_OBJECT_SELECT_MODE_DEFAULT || mode == ELM_OBJECT_SELECT_MODE_ALWAYS;
+}
+
void ListItem::setExpanded(bool expand)
{
elm_genlist_item_expanded_set(getElmObjItem(), expand);
{
SettingsGroupListViewItem *item = new SettingsGroupListViewItem(title);
m_pList->appendItem(*item);
+ item->setSelectable(false);
}
SettingsListItem *Settings::appendItem(ListItemStyleRef style, SettingsListItem::MethodHandler handler,