From: Andrey Klimenko Date: Tue, 19 Jul 2016 12:45:06 +0000 (+0300) Subject: TizenRefApp-6735 - added doxygen comments into settings-module X-Git-Tag: submit/tizen/20160810.144952^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F80697%2F1;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TizenRefApp-6735 - added doxygen comments into settings-module Change-Id: Ic2f3ae4261acb0fb0d6ba16f3aae9c605142a9cb Signed-off-by: Andrey Klimenko --- diff --git a/src/Settings/Controller/inc/MsgOnSimCard.h b/src/Settings/Controller/inc/MsgOnSimCard.h index 02b96d5..b07adaa 100644 --- a/src/Settings/Controller/inc/MsgOnSimCard.h +++ b/src/Settings/Controller/inc/MsgOnSimCard.h @@ -36,6 +36,9 @@ namespace Msg class NaviFrameController; class MsgSettings; + /** + * Visual representation of "Messages on SIM" list. + */ class MsgOnSimCard : public FrameController , private IHwButtonListener @@ -48,6 +51,11 @@ namespace Msg 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: diff --git a/src/Settings/Controller/inc/Settings.h b/src/Settings/Controller/inc/Settings.h index b4b4b7e..a108dfc 100644 --- a/src/Settings/Controller/inc/Settings.h +++ b/src/Settings/Controller/inc/Settings.h @@ -31,6 +31,10 @@ namespace Msg 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 @@ -39,6 +43,10 @@ namespace Msg , 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(); diff --git a/src/Settings/Controller/inc/SettingsListItem.h b/src/Settings/Controller/inc/SettingsListItem.h index 78414ff..ddf6ef7 100644 --- a/src/Settings/Controller/inc/SettingsListItem.h +++ b/src/Settings/Controller/inc/SettingsListItem.h @@ -24,16 +24,28 @@ namespace Msg { 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: diff --git a/src/Settings/Controller/inc/SettingsSound.h b/src/Settings/Controller/inc/SettingsSound.h index ec9f148..ea28cb4 100644 --- a/src/Settings/Controller/inc/SettingsSound.h +++ b/src/Settings/Controller/inc/SettingsSound.h @@ -22,12 +22,22 @@ namespace Msg { 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: diff --git a/src/Settings/Controller/inc/SimListViewItem.h b/src/Settings/Controller/inc/SimListViewItem.h index 16f39bb..8575383 100644 --- a/src/Settings/Controller/inc/SimListViewItem.h +++ b/src/Settings/Controller/inc/SimListViewItem.h @@ -24,13 +24,25 @@ 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: diff --git a/src/Settings/View/inc/SettingsGroupListViewItem.h b/src/Settings/View/inc/SettingsGroupListViewItem.h index 22cb33e..85b9bf5 100644 --- a/src/Settings/View/inc/SettingsGroupListViewItem.h +++ b/src/Settings/View/inc/SettingsGroupListViewItem.h @@ -23,10 +23,17 @@ 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(); diff --git a/src/Settings/View/inc/SettingsListViewItem.h b/src/Settings/View/inc/SettingsListViewItem.h index 86aca81..e6e3af8 100644 --- a/src/Settings/View/inc/SettingsListViewItem.h +++ b/src/Settings/View/inc/SettingsListViewItem.h @@ -24,25 +24,70 @@ namespace Msg { 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: @@ -63,10 +108,18 @@ namespace Msg 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) {}; }; } diff --git a/src/Settings/View/inc/SimMsgLayout.h b/src/Settings/View/inc/SimMsgLayout.h index f7c9959..81c5cab 100644 --- a/src/Settings/View/inc/SimMsgLayout.h +++ b/src/Settings/View/inc/SimMsgLayout.h @@ -23,16 +23,42 @@ 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);