class NaviFrameController;
class MsgSettings;
+ /**
+ * Visual representation of "Messages on SIM" list.
+ */
class MsgOnSimCard
: public FrameController
, private IHwButtonListener
virtual ~MsgOnSimCard();
public:
+ /**
+ * @brief Switches to(from) selection mode.
+ * @param[in] show if true switches to selection mode, otherwise switches to normal mode.
+ * @param[in] resetCheck if true forces "Select all" checkbox to be unchecked by default.
+ */
void showSelectAllItem(bool show, bool resetCheck = true);
private:
class MsgSettings;
class IMsgSettingsListener;
+ /**
+ * A core-class responsible for a whole lifecycle of settings-module and for managing
+ * sub-components of message settings.
+ */
class Settings
: public FrameController
, private IListViewListener
, private ISystemSettingsManager
{
public:
+ /**
+ * @brief A constructor of Settings object based on outside parent object.
+ * @param[in] parent an object responsible for automatic removing of Settings instance.
+ */
Settings(NaviFrameController &parent);
virtual ~Settings();
{
class Settings;
+ /**
+ * Visual representation of particular element of message-settings list.
+ */
class SettingsListItem
: public SettingsListViewItem
{
public:
- typedef void (Settings::*MethodHandler)(SettingsListItem &item);
+ typedef void (Settings::*MethodHandler)(SettingsListItem &item); /**< A delegate fired when user taps on particular settings list element. */
public:
+ /**
+ * @brief Constructs settings list item based on style and "on-tap" handler passed from outside.
+ * @param[in] style a style to be applied to settings list item
+ * @param[in] method to handle tap on this settings list element.
+ */
inline SettingsListItem(const ListItemStyleRef &style, MethodHandler method);
virtual ~SettingsListItem() {};
+ /**
+ * @brief gets "on-tap" handler.
+ * @return a handler to be returned.
+ */
inline MethodHandler getHandler() const;
private:
{
class MsgSettings;
+ /**
+ * This class is aimed to launch preinstalled utility from settings-app that allows to chose message-alert sound.
+ */
class SettingsSound
{
public:
+ /**
+ * @brief Constructs an instance of SettingsSound based on message-service settings wrapper passed from outside.
+ * @param[in] settingsHandle an instance of message-settings api wrapper.
+ */
SettingsSound(MsgSettings &settingsHandle);
~SettingsSound();
+ /**
+ * @brief launches preinstalled sound-picker utility via app-control.
+ */
void launchSoundPicker();
private:
namespace Msg
{
+ /**
+ * Visual representation of an element in "Messages on SIM" list.
+ */
class SimListViewItem
: public ListItem
{
public:
+ /**
+ * @brief Creates element of "Messages on SIM" list based on message-service structure and genlist item type passed from outside.
+ * @param[in] msg a reference to message-service structure wrapped into class from Common module.
+ * @param[in] type type of genlist-item.
+ */
SimListViewItem(const MessageSMS &msg, Elm_Genlist_Item_Type type = ELM_GENLIST_ITEM_NONE);
virtual ~SimListViewItem();
+ /**
+ * @brief gets message-id
+ * @return id of message associated with current list-element.
+ */
MsgId getMsgId() const;
protected:
namespace Msg
{
+ /**
+ * Visual representation of grouping settings list items(a genlist item with "group_index" style).
+ */
class SettingsGroupListViewItem
: public ListItem
{
public:
+ /**
+ * @brief Constructs genlist-item with "group_index style" and title based on text passed from outside.
+ * @param title a text to be displayed.
+ */
SettingsGroupListViewItem(const std::string &title);
virtual ~SettingsGroupListViewItem();
{
class ISettingsListViewItemListener;
+ /**
+ * Generic visual representation of messages-settings list element.
+ */
class SettingsListViewItem
: public ListItem
{
public:
- static ListItemStyleRef multiLineStyle;
- static ListItemStyleRef multiLineIconStyle;
- static ListItemStyleRef oneLineIconStyle;
+ static ListItemStyleRef multiLineStyle; /**< style for "multiline" genlist-item. */
+ static ListItemStyleRef multiLineIconStyle; /**< style for "multiline + icon" genlist-item. */
+ static ListItemStyleRef oneLineIconStyle; /**< style for "single-line + icon" genlist-item. */
public:
+ /**
+ * @brief Constructs list-item style based on a genlist-item style passed from outside.
+ * @param[in] style to be applied.
+ */
SettingsListViewItem(const ListItemStyleRef &style);
virtual ~SettingsListViewItem();
+ /**
+ * @brief Manages visibility of check-button at the moment when user creates it.
+ * @param[in] show if true shows check-button, otherwise hides it.
+ */
void showCheckButton(bool show);
+
+ /**
+ * @brief Enables\disables check-button at moment of it's creation. Nothing happens if showCheckButton(false) was called before.
+ * @param[in] disabled if true, check-button is created disabled, if false - check-button is enabled.
+ */
void disabledCheckButton(bool disabled);
+
+ /**
+ * @brief checks\unchecks check-button at moment of it's creation. Nothing happens if showCheckButton(false) was called before.
+ * @param[in] state if true, check-button is created checked, if false - check-button is unchecked.
+ */
void setCheckButtonState(bool state);
+
+ /**
+ * @brief Gets state of check-button.
+ * @return true if check-button is checked, otherwise false. Also returns false if no check-button was created.
+ */
bool getCheckButtonState() const;
+
+ /**
+ * @brief Switches state of check-button to opposite(checked/unchecked).
+ */
void changeCheckButtonState();
+
+ /**
+ * @brief Sets text to "elm.text" part.
+ * @param[in] text a text to be set.
+ */
void setMainText(const std::string &text);
+
+ /**
+ * @brief Sets text to "elm.text.multiline" part. If instance of SettingsListViewItem have single-line style nothing happens.
+ * @param[in] text a text to be set.
+ */
void setSubText(const std::string &text);
+
+ /**
+ * Sets a listener to notify subscriber about list-item events.
+ * @param[in] listener a listener to be notified.
+ */
void setListener(ISettingsListViewItemListener *listener);
private:
ISettingsListViewItemListener *m_pListener;
};
+ /**
+ * Listener to send list-item events to subscribers.
+ */
class ISettingsListViewItemListener
{
public:
virtual ~ISettingsListViewItemListener(){}
+
+ /**
+ * @brief raised when state of check-button has been changed.
+ * @param[in] item an item that owns a check-button with state modified.
+ */
virtual void onCheckButtonChanged(SettingsListViewItem &item) {};
};
}
namespace Msg
{
+ /**
+ * Represents a layout of "Messages on SIM" view.
+ */
class SimMsgLayout
: public DefaultLayout
{
public:
+ /**
+ * @brief Constructs an instance of SimMsgLayout based on parent passed from outside.
+ * @param[in] an object responsible for automatic destroying of SimMsgLayout instance.
+ */
SimMsgLayout(Evas_Object *parent);
virtual ~SimMsgLayout();
+ /**
+ * @brief populates itself according to list passed from outside.
+ * @param[in] list to be placed on layout.
+ */
void setSimMsgList(Evas_Object *list);
+
+ /**
+ * @brief acquires a layout for "No content" mode.
+ * @param[in] bg a background layout that will be shown if list of messages on SIM is empty.
+ */
void setNoContent(Evas_Object *bg);
+
+ /**
+ * @brief Shows/hides "No content" layout.
+ * @param[in] show if true no list is shown, but "No messages on SIM card" text, if false hides "No content" layout.
+ */
void setNoContentLayoutVisible(bool show);
+
+ /**
+ * @brief Shows/hides list of messages on SIM.
+ * @param[in] show if true the list is shown, otherwise list is hidden.
+ */
void setSimMsgListVisible(bool show);
private:
void create(Evas_Object *parent);