World Clock: Doxygen update. 53/105453/4
authorRadoslaw Czerski <r.czerski@samsung.com>
Thu, 29 Dec 2016 09:42:43 +0000 (10:42 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Thu, 5 Jan 2017 14:02:28 +0000 (06:02 -0800)
Change-Id: I97b2d3d24bd51eff84404dabff6936ee1df348e0
Signed-off-by: Radoslaw Czerski <r.czerski@samsung.com>
clock/inc/Model/WorldClock.h
clock/inc/Model/WorldClockEvents.h
clock/inc/Presenter/WorldClockDeletePresenter.h
clock/inc/Presenter/WorldClockPresenter.h
clock/inc/Presenter/WorldClockReorderPresenter.h
clock/inc/View/WorldClockDeleteItemsView.h
clock/inc/View/WorldClockReorderView.h
clock/inc/View/WorldClockView.h

index d698c6a..2dea587 100644 (file)
@@ -40,6 +40,7 @@ namespace model {
 
                        /**
                         * @brief enumeration for signals that passes parameter
+                        *
                         * @details Only const model::Location & parameter type is allowed
                         */
                        enum class ParameterSignalType {
@@ -82,6 +83,7 @@ namespace model {
 
                        /**
                         * @brief Sets user locations list.
+                        *
                         * @remarks It emits CUSTOM_LIST_CHANGED signal
                         */
                        void SetUserLocations(std::vector<const model::Location *> locations);
@@ -148,6 +150,7 @@ namespace model {
 
                        /**
                         * @brief Retrieve time zone for specified offset
+                        *
                         * @param[in] offset offset in minutes between GMT 0 and returned time zone
                         *
                         * @return time zone that match specified offset
@@ -158,7 +161,7 @@ namespace model {
                         * @brief Gets location using its no in locations_ list
                         * @remarks This function is for temporary usage and will be removed before final version
                         *
-                        * param[no] location number
+                        * @param[no] location number
                         *
                         * @return location
                         */
@@ -166,13 +169,14 @@ namespace model {
 
                        /**
                         * @brief Sets next on the left to current time zone as current
-                        * param[in] direction direction to change current time zone to
+                        *
+                        * @param[in] direction direction to change current time zone to
                         */
                        void MoveCurrentTimezone(Direction direction);
 
                        /**
                         * @brief Registers signal handler
-                        * @brief func must have one parameter. For now only const model::Location & type is supported
+                        * @details func must have one parameter. For now only const model::Location & type is supported
                         *
                         * @param signal signal type
                         * @param func function to be called when registered signal is emitted.
@@ -197,7 +201,7 @@ namespace model {
 
                        /**
                         * @brief Currently set time zone.
-                        * It means the time zone to be displayed on world map and its details will be displayed below the map
+                        * @details It means the time zone to be displayed on world map and its details will be displayed below the map
                         */
                        const Timezone *current_tz_;
 
@@ -217,6 +221,7 @@ namespace model {
 
                        /**
                         * @brief Saves items list state using app_preferences API
+                        *
                         * @details It saves every particular item(location)
                         */
                        void SaveItemsList();
@@ -229,14 +234,17 @@ namespace model {
                        /**
                         * @brief Gets key identify given type(location struct field) for no'th item
                         * @details The key is used while storing data using preferences API
+                        *
                         * @param type type of location struct field( see ItemKeyType enum)
                         * @param no order number of item
+                        *
                         * @return created key
                         */
                        const char *GetItemKey(int type, int no);
 
                        /**
                         * @brief Saves single location using app_preferences API
+                        *
                         * @param[in] item location to save
                         * @param[in] i order number of the item
                         */
@@ -244,6 +252,7 @@ namespace model {
 
                        /**
                         * @brief Loads single location using app_preferences API
+                        *
                         * @param[in] i order number of the item
                         *
                         * @return user location
@@ -257,6 +266,7 @@ namespace model {
 
                        /**
                         * @brief Emits signal s
+                        *
                         * @param s signal
                         * @param location location to pass to function registered for given signal
                         */
@@ -264,6 +274,7 @@ namespace model {
 
                        /**
                         * @brief Emits signal s
+                        *
                         * @param s signal
                         * @param location location to pass to function registered for given signal
                         */
index e7a501a..dfde0ba 100644 (file)
 
 namespace model {
 
+       /**
+        * @brief class for exact Event firing.
+        */
        class WorldClockDeleteRequestEvent: public utils::Event {
        };
 
+       /**
+        * @brief class for exact Event firing.
+        */
        class WorldClockReorderRequestEvent: public utils::Event {
        };
 }
index e55e179..b3d5298 100644 (file)
@@ -51,12 +51,14 @@ namespace presenter {
 
                        /**
                         * @brief Invoked when "Cancel" button is clicked.
+                        *
                         * @details Pops page.
                         */
                        void OnCancelClicked();
 
                        /**
                         * @brief Invoked when "Delete" button is clicked.
+                        *
                         * @details Deletes selected items. Pops page.
                         */
                        void OnDeleteClicked();
index 57f8ad0..1e9d42b 100644 (file)
 
 namespace presenter {
 
+/**
+ * @brief Class for world clock presenter
+ *
+ * @details it manages map, timezone details, locations lists and "more" options popup.
+ */
        class WorldClockPresenter {
                public:
 
-               /**
-                * @brief Limits
-                */
-               enum  Limits {
-                       USER_LOCATIONS_LIMIT = 20
-               };
+                       /**
+                        * @brief Limits
+                        */
+                       enum  Limits {
+                               USER_LOCATIONS_LIMIT = 20
+                       };
 
+                       /**
+                        * @brief Object Constructor
+                        *
+                        * @param[in] view World Clock tab view object
+                        *
+                        * @param[in] model World Clock tab model
+                        */
                        WorldClockPresenter(view::WorldClockView *view, model::WorldClock *model);
+
+                       /**
+                        * @brief Destructs class object
+                        */
                        ~WorldClockPresenter();
 
                private:
@@ -44,10 +60,31 @@ namespace presenter {
 
                        std::vector<utils::Listener> listeners_;
 
+                       /**
+                        * @brief Updates background of locations list. If list is empty proper message is displayed
+                        */
                        void UpdateEmptyListBackground();
 
+                       /**
+                        * @brief Invoked when left arrow on map is clicked.
+                        *
+                        * @details It updates Map view including time zone details.
+                        */
                        void OnLeftArrowButtonClicked();
+
+                       /**
+                        * @brief Invoked when right arrow on map is clicked.
+                        *
+                        * @details It updates Map view including time zone details.
+                        */
                        void OnRightArrowButtonClicked();
+
+
+                       /**
+                        * @brief Invoked when user clicked on any location item on locaton list.
+                        *
+                        * @details It updates Map view including time zone details.
+                        */
                        void OnCustomListItemClicked();
 
                        /**
@@ -57,21 +94,33 @@ namespace presenter {
 
                        /**
                         * @brief Invoked when Delete option is chosen on "more" popup.
+                        *
                         * @details Created Delete View
                         */
                        void OnMoreDeleteButtonClicked();
 
 /**
                         * @brief Invoked when Reorder option is chosen on "more" popup.
+                        *
                         * @details Created Reorder View
                         */
                        void OnMoreReorderButtonClicked();
 
+                       /**
+                        * @brief Updates map view including timezone details.
+                        */
                        void OnMapViewUpdateRequest();
+
+                       /**
+                        * @brief Invoked after location picker app(for no it is libug-worldclock-efl) sends launch replay.
+                        *
+                        * @details It adds location item to the model and view and updates map view.
+                        */
                        void OnItemAdded();
 
                        /**
                         * @brief Deletes location from user locations list.
+                        *
                         * @param location location to delete
                         */
                        void OnItemDeleted(const model::Location &location);
index f3d4112..ab70086 100644 (file)
@@ -56,6 +56,7 @@ namespace presenter {
 
                        /**
                         * @brief Invoked when "back arrow" button is clicked.
+                        *
                         * @details Pops Reorder View page
                         */
                        void OnBackClicked();
index 339042f..ed1addd 100644 (file)
 #include "Utils/Time.h"
 
 namespace view {
-
+       /**
+        * @brief Class representing World Clock delete subview and is responsible for UI layer of the view.
+        *
+        * @detail It allow to delete any of location list items.
+        * It communicates with external classes by sending signals and do
+        * not touch any external resources directly except utils.
+        */
        class WorldClockDeleteItemsView: public PageView {
 
                public:
@@ -52,12 +58,14 @@ namespace view {
 
                        /**
                         * @brief Gets evas object of the page content -> genlist
+                        *
                         * @return the object
                         */
                        Evas_Object *GetEvasObject() override;
 
                        /**
                         * @brief Registers signals
+                        *
                         * @param s signal enumerator
                         * @param func function invoked when the signal will be emitted
                         */
@@ -65,7 +73,9 @@ namespace view {
 
                        /**
                         * @brief Appends items(Locations) from given list to delete View genlist
+                        *
                         * @details The list is identical with user_locations_ list
+                        *
                         * @param locations list of locations
                         */
                        void AppendItems(std::vector<const model::Location *> locations);
@@ -77,25 +87,30 @@ namespace view {
 
                        /**
                         * @brief Sets items checkbox state
+                        *
                         * @param state state to set
                         */
                        void SetAllItems(bool state);
 
                        /**
                         * @brief Sets state of "Select All" checkbox
+                        *
                         * @details It is useful when all items are selected manually
+                        *
                         * @param state state to set
                         */
                        void SetSelectAllCheckbox(bool state);
 
                        /**
                         * @brief Gets list of items selected to be deleted from user_locations_ list
-                        * @return
+                        *
+                        * @return List of locations selected to delete
                         */
                        std::vector<const model::Location *> GetSelectedItems();
 
                        /**
                         * @brief Gets state of "Select All" item checkbox
+                        *
                         * @return state of "Select All" item checkbox
                         */
                        bool GetSelectAllState();
@@ -155,6 +170,7 @@ namespace view {
 
                        /**
                         * @brief Callback invoked when any item of list is clicked
+                        *
                         * @param data user data
                         * @param obj obj
                         * @param event_info event_info
@@ -163,24 +179,29 @@ namespace view {
 
                        /**
                         * @brief Gets content for genlist item part
+                        *
                         * @param data user data
                         * @param obj item object
                         * @param part part related to content to get
+                        *
                         * @return Object of content that will be swallowed to the part
                         */
                        static Evas_Object *ContentGet(void *data, Evas_Object *obj, const char *part);
 
                        /**
                         * @brief Gets text for genlist item part
+                        *
                         * @param data user data
                         * @param obj item object
                         * @param part part related to text to get
+                        *
                         * @return text to set to the textblock part
                         */
                        static char *TextGet(void *data, Evas_Object *obj, const char *part);
 
                        /**
                         * @brief Deletes all resources of the item that cannot be deleted automatically
+                        *
                         * @param data user data
                         * @param obj item object
                         */
@@ -188,21 +209,27 @@ namespace view {
 
                        /**
                         * @brief Creates evas object for time
+                        *
                         * @param parent parent
+                        *
                         * @return the object
                         */
                        static Evas_Object *CreateTimeObject(Evas_Object *parent, utils::Time t);
 
                        /**
                         * @brief Creates evas object for meridiem
+                        *
                         * @param parent parent
+                        *
                         * @return the object
                         */
                        static Evas_Object *CreateXMeridiemObject(Evas_Object *parent, utils::Time t);
 
                        /**
                         * @brief Creates evas object for padding
+                        *
                         * @param parent parent
+                        *
                         * @return the object
                         */
                        static Evas_Object *CreatePaddingObject(Evas_Object *parent, int width);
@@ -214,25 +241,30 @@ namespace view {
 
                        /**
                         * @brief emits signal
+                        *
                         * @details it cause invocation of registered function
+                        *
                         * @param s signal enumerator
                         */
                        void EmitSignal(SignalType s);
 
                        /**
                         * @brief Emits BUTTON_CANCEL_CLICKED signal.
+                        *
                         * @details Invoked when "Cancel" button is clicked
                         */
                        static void OnCancelButtonClicked(void *data, Evas_Object *obj, void *event_info);
 
                        /**
                         * @brief Emits BUTTON_DELETE_CLICKED signal.
+                        *
                         * @details Invoked when "Delete" button is clicked
                         */
                        static void OnDeleteButtonClicked(void *data, Evas_Object *obj, void *event_info);
 
                        /**
                         * @brief Emits CHECKBOX_SELECT_ALL_CLICKED signal and toggle "Select all" checkbox state.
+                        *
                         * @details Invoked when "Select all" item or checkbox is clicked
                         */
                        static void OnSelectAllClicked(void *data, Evas_Object *obj, void *event_info);
@@ -244,7 +276,9 @@ namespace view {
 
                        /**
                         * @brief Timer callback for time updates.
+                        *
                         * @param data user data
+                        *
                         * @return EINA_BOOL to allow next invocation of callback, EINA_FALSE otherwise
                         */
                        static Eina_Bool TimeUpdateCb(void *data);
index bb5a23d..f94f795 100644 (file)
 
 namespace view {
 
+       /**
+        * @brief Class representing World Clock reorder subview and is responsible for UI layer of the view.
+        *
+        * @detail It allows reorder of location list items.
+        * It communicates with external classes by sending signals and do
+        * not touch any external resources directly except utils.
+        */
        class WorldClockReorderView: public PageView {
 
                public:
@@ -48,6 +55,7 @@ namespace view {
 
                        /**
                         * @brief Gets evas object of the page content -> genlist
+                        *
                         * @return the object
                         */
                        Evas_Object *GetEvasObject() override;
@@ -62,7 +70,9 @@ namespace view {
 
                        /**
                         * @brief Appends items(Locations) from given list to delete View genlist
+                        *
                         * @details The list is identical with user_locations_ list
+                        *
                         * @param locations list of locations
                         */
                        void AppendItems(std::vector<const model::Location *> locations);
@@ -114,24 +124,29 @@ namespace view {
 
                        /**
                         * @brief Gets content for genlist item part
+                        *
                         * @param data user data
                         * @param obj item object
                         * @param part part related to content to get
+                        *
                         * @return Object of content that will be swallowed to the part
                         */
                        static Evas_Object *ContentGet(void *data, Evas_Object *obj, const char *part);
 
                        /**
                         * @brief Gets text for genlist item part
+                        *
                         * @param data user data
                         * @param obj item object
                         * @param part part related to text to get
+                        *
                         * @return text to set to the textblock part
                         */
                        static char *TextGet(void *data, Evas_Object *obj, const char *part);
 
                        /**
                         * @brief Deletes all resources of the item that cannot be deleted automatically
+                        *
                         * @param data user data
                         * @param obj item object
                         */
@@ -139,47 +154,59 @@ namespace view {
 
                        /**
                         * @brief Creates evas object for time
+                        *
                         * @param parent parent
+                        *
                         * @return the object
                         */
                        static Evas_Object *CreateTimeObject(Evas_Object *parent, utils::Time t);
 
                        /**
                         * @brief Creates evas object for meridiem
+                        *
                         * @param parent parent
+                        *
                         * @return the object
                         */
                        static Evas_Object *CreateXMeridiemObject(Evas_Object *parent, utils::Time t);
 
                        /**
                         * @brief Creates evas object for padding
+                        *
                         * @param parent parent
+                        *
                         * @return the object
                         */
                        static Evas_Object *CreatePaddingObject(Evas_Object *parent, int width);
 
                        /**
                         * @brief emits signal
+                        *
                         * @details it cause invocation of registered function
+                        *
                         * @param s signal enumerator
                         */
                        void EmitSignal(Signals s);
 
                        /**
                         * @brief Emits LIST_REORDERED signal
+                        *
                         * @remarks Invoked everytime list is reordered
                         */
                        static void OnListReordered(void *data, Evas_Object *obj, void *event_info);
 
                        /**
                         * @brief Emits BUTTON_BACK_CLICKED signal
+                        *
                         * @remarks Invoked by clicking BACK naviframe button or back hardware key
                         */
                        static void OnBackButtonClicked(void *data, Evas_Object *obj, void *event_info);
 
                        /**
                         * @brief Timer callback for time updates.
+                        *
                         * @param data user data
+                        *
                         * @return EINA_BOOL to allow next invocation of callback, EINA_FALSE otherwise
                         */
                        static Eina_Bool TimeUpdateCb(void *data);
index f825b76..8d5b8bd 100644 (file)
@@ -28,6 +28,9 @@
 
 namespace view {
 
+       /**
+        * @brief Enumeration for callbacks signals
+        */
        enum class WorldClockSignals {
                BUTTON_LEFT_ARROW_CLICKED,
                BUTTON_RIGHT_ARROW_CLICKED,
@@ -42,7 +45,12 @@ namespace view {
                MAX
        };
 
-
+       /**
+        * @brief Class representing World Clock view and is responsible for UI layer of the view.
+        *
+        * @detail It communicates with external classes by sending signals and do
+        * not touch any external resources directly except utils.
+        */
        class WorldClockView: public ui::IView {
                public:
 
@@ -55,16 +63,47 @@ namespace view {
                                REORDER_OPTION_ENABLED = 0x2
                        };
 
+                       /**
+                        * @brief Constructor
+                        *
+                        * @param main parent of the world clock view object
+                        */
                        WorldClockView(ui::IView &main);
+
                        ~WorldClockView();
 
+                       /**
+                        * @brief Returns evas object of the view
+                        */
                        Evas_Object *GetEvasObject(){return world_clock_main_;};
 
+                       /**
+                        * @brief Registers signals
+                        *
+                        * @param[in] func function invoked when the signal will be emitted
+                        * @param[in] s signal enumerator
+                        */
                        void RegisterSignal(std::function<void(void)>func, view::WorldClockSignals signal);
 
+                       /**
+                        * @brief Updates map area and timezone details
+                        *
+                        * @param[in] timezone timezone to be set on map and in timezone details area.
+                        */
                        void UpdateMapAndTimezoneDetails(const model::Timezone *timezone);
 
+                       /**
+                        * @brief Adds location item to list in view
+                        *
+                        * @param[in] location location to add
+                        */
                        void AppendItemToCustomList(const model::Location *location);
+
+                       /**
+                        * @brief Removes location item from location list
+                        *
+                        * @param[in] location location to remove
+                        */
                        void RemoveItem(const model::Location &location);
 
                        /**
@@ -72,14 +111,41 @@ namespace view {
                         */
                        void ClearAllItems();
 
+                       /**
+                        * @brief Gets last clicked item
+                        *
+                        * @return clicked location
+                        */
+
                        const model::Location *GetLastClickedItem();
+
+                       /**
+                        * @brief Gets location to add.
+                        *
+                        * @detail The location comes from location picker app.
+                        *
+                        * @return location to add
+                        */
                        const model::Location *GetLocationToAdd();
 
+                       /**
+                        * @brief Shows "empty list" label
+                        */
                        void ShowEmptyListLabel();
+
+                       /**
+                        * @brief Hides "empty list" label
+                        */
                        void HideEmptyListLabel();
+
+                       /**
+                        * @brief Displays popup informing that location chosen in location
+                        * picker app already exists in the list.
+                        */
                        void PostItemExistMessage();
                        /**
                         * @brief Shows more popup.
+                        *
                         * @param options options mask (see MoreMenuOptions enum)
                         */
                        void ShowMorePopup(MoreMenuOptions options);
@@ -129,7 +195,9 @@ namespace view {
 
                        /**
                         * @brief Timer callback for time updates.
+                        *
                         * @param data user data
+                        *
                         * @return EINA_BOOL to allow next invocation of callback, EINA_FALSE otherwise
                         */
                        static Eina_Bool TimeUpdateCb(void *data);