TizenRefApp-9422 [Call UI] Add doxygen documentation for View classes 97/152297/1
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 25 Sep 2017 11:58:50 +0000 (14:58 +0300)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 25 Sep 2017 13:13:39 +0000 (16:13 +0300)
Change-Id: Id367a854b3ecacb21214eef43edd8faa92fe5c16

call-ui/view/AcceptRejectWidget.h
call-ui/view/Slider.cpp
call-ui/view/Slider.h
call-ui/view/VolumeControl.cpp
call-ui/view/VolumeControl.h
call-ui/view/helpers.cpp
call-ui/view/helpers.h
call-ui/view/types.h

index a82589b4a62c24472a8f11e5dab9871f31c2999b..ce92277b614160fc90df2584389e1f42ec5c1293 100644 (file)
@@ -29,14 +29,50 @@ namespace callui {
 
        UCL_DECLARE_REF_ALIASES(AcceptRejectWidget);
 
+       /**
+        * @brief Widget for accept / reject calls
+        */
        class AcceptRejectWidget final : public ucl::ElmWidget {
        public:
+
+               /**
+                * @brief Builder builder
+                */
                class Builder {
                public:
+
+                       /**
+                        * @brief Constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets accept event handler
+                        * @param[in] handler Accept event handler
+                        * @return Reference to builder
+                        */
                        Builder &setAcceptEventHandler(const NotiHandler &handler);
+
+                       /**
+                        * @brief Sets reject event handler
+                        * @param[in] handler Reject event handler
+                        * @return Reference to builder
+                        */
                        Builder &setRejectEventHandler(const NotiHandler &handler);
+
+                       /**
+                        * @brief Sets Accept button type
+                        * @param[in] type Accept button type
+                        * @return Reference to builder
+                        */
                        Builder &setAcceptBtnType(AcceptButtonType type);
+
+                       /**
+                        * @brief Creates new instance of AcceptRejectWidget
+                        * @param[in] parent Parent widget
+                        * @return Shared reference to AcceptRejectWidget instance
+                        *  on success or NULL otherwise
+                        */
                        AcceptRejectWidgetSRef build(ucl::ElmWidget &parent) const;
 
                private:
@@ -46,15 +82,50 @@ namespace callui {
                };
 
        public:
+
+               /**
+                * @brief Destructor
+                */
                virtual ~AcceptRejectWidget();
 
+               /**
+                * @brief Starts Bezel Cue animation
+                */
                void startBezelCueAnimation();
+
+               /**
+                * @brief Resets widget to default state
+                */
                void reset();
+
+               /**
+                * @brief Activates rotary to accept rotary events
+                */
                void activateRotary();
+
+               /**
+                * @brief Deactivates rotary to not accept rotary events
+                */
                void deactivateRotary();
+
+               /**
+                * @brief Sets Accept button type
+                * @param[in] type Accept button type
+                */
                void setAcceptBtnType(AcceptButtonType type);
 
+               /**
+                * @brief Gets Access object of Accept button
+                * @remark Use only for Screen Reader feature
+                * @return Pointer to widget on success or NULL otherwise
+                */
                ucl::ElmWidget *getAcceptAo();
+
+               /**
+                * @brief Gets Access object of Reject button
+                * @remark Use only for Screen Reader feature
+                * @return Pointer to widget on success or NULL otherwise
+                */
                ucl::ElmWidget *getRejectAo();
 
        private:
index 09fad5a6f0498c7bf3fc701a7efadb2d3d24689c..9431a5daf55be3a4dd7aeaec9f7881c304959960 100644 (file)
@@ -34,7 +34,7 @@ namespace callui {
 
        Slider::Builder::Builder():
                        m_maxValue(0),
-                       m_curValue(0)
+                       m_value(0)
        {
        }
 
@@ -44,9 +44,9 @@ namespace callui {
                return *this;
        }
 
-       Slider::Builder &Slider::Builder::setValue(int curValue)
+       Slider::Builder &Slider::Builder::setValue(int value)
        {
-               m_curValue = curValue;
+               m_value = value;
                return *this;
        }
 
@@ -59,7 +59,7 @@ namespace callui {
                        LOG_RETURN_VALUE(RES_FAIL, {}, "Layout::build() failed!");
                }
 
-               auto result = makeShared<Slider>(layout, m_maxValue, m_curValue);
+               auto result = makeShared<Slider>(layout, m_maxValue, m_value);
 
                result->bindToEo();
 
index dcc330f2fc199b35b4a28ccc9f67c3853699087a..7e48de4622ffa7bb1d0c59fe691a63670b74d0cc 100644 (file)
@@ -25,24 +25,66 @@ namespace callui {
 
        UCL_DECLARE_REF_ALIASES(Slider);
 
+       /**
+        * @brief Slider widget
+        */
        class Slider : public ucl::ElmWidget {
        public:
+               /**
+                * @brief Slider builder
+                */
                class Builder {
                public:
+
+                       /**
+                        * @brief Constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets max value to display
+                        * @param[in] maxValue Max value to set
+                        * @return Reference to builder
+                        */
                        Builder &setMaxValue(int maxValue);
-                       Builder &setValue(int curValue);
+
+                       /**
+                        * @brief Sets value to display
+                        * @param[in] value Value to set
+                        * @return Reference to builder
+                        */
+                       Builder &setValue(int value);
+
+                       /**
+                        * @brief Creates new instance of Slider
+                        * @param[in] parent Parent widget
+                        * @return Shared reference to Slider instance
+                        *  on success or NULL otherwise
+                        */
                        SliderSRef build(ucl::ElmWidget &parent) const;
 
                private:
                        int m_maxValue;
-                       int m_curValue;
+                       int m_value;
                };
 
        public:
+
+               /**
+                * @brief Destructor
+                */
                virtual ~Slider() = default;
 
+               /**
+                * @brief Sets value to display
+                * @param[in] value Value to set
+                */
                virtual void setValue(int value);
+
+               /**
+                * @brief Sets max value to display
+                * @param[in] maxValue Max value to set
+                */
                virtual void setMaxValue(int maxValue);
 
        protected:
index f0a20b71cd13d46cecaeff7342903d7891542d49..d6ae71ce46907948efed66d0e6db9ef5b1a655ff 100644 (file)
@@ -46,7 +46,7 @@ namespace callui {
 
        VolumeControl::Builder::Builder():
                        m_maxValue(0),
-                       m_curValue(0)
+                       m_value(0)
        {
        }
 
@@ -62,9 +62,9 @@ namespace callui {
                return *this;
        }
 
-       VolumeControl::Builder &VolumeControl::Builder::setValue(int curValue)
+       VolumeControl::Builder &VolumeControl::Builder::setValue(int value)
        {
-               m_curValue = curValue;
+               m_value = value;
                return *this;
        }
 
@@ -87,7 +87,7 @@ namespace callui {
                auto result = makeShared<VolumeControl>(layout,
                                m_info,
                                m_maxValue,
-                               m_curValue,
+                               m_value,
                                m_handler);
 
                result->bindToEo();
index a1cbe9d208c2b4c567b1bf15d2c008af8ba6f4b3..090611095df03e9b828bdec5d43c0047e15f2a37 100644 (file)
@@ -28,45 +28,137 @@ namespace callui {
 
        UCL_DECLARE_REF_ALIASES(VolumeControl);
 
+       /**
+        * @brief Volume Control widget
+        */
        class VolumeControl final : public Slider {
        public:
+
+               /**
+                * @brief Enumeration of event type
+                */
                enum class Event {
-                       INCREASE,
-                       DECREASE
+                       INCREASE,              /**< Increase event type */
+                       DECREASE               /**< Decrease event type */
                };
 
+               /**
+                * @brief Event handler definition
+                */
                using EventHandler = ucl::WeakDelegate<void(Event)>;
        public:
+
+               /**
+                * @brief VolumeControl builder
+                */
                class Builder {
                public:
+
+                       /**
+                        * @brief Constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets information text to display
+                        * @param[in] info Text to set
+                        * @return Reference to builder
+                        */
                        Builder &setInfoText(const ucl::TString &info);
+
+                       /**
+                        * @brief Sets max volume value to display
+                        * @param[in] maxValue Max value to set
+                        * @return Reference to builder
+                        */
                        Builder &setMaxValue(int maxValue);
-                       Builder &setValue(int curValue);
+
+                       /**
+                        * @brief Sets volume value to display
+                        * @param[in] info Value to set
+                        * @return Reference to builder
+                        */
+                       Builder &setValue(int value);
+
+                       /**
+                        * @brief Sets event handler
+                        * @param[in] handler Event handler
+                        * @return Reference to builder
+                        */
                        Builder &setEventHandler(const EventHandler &handler);
+
+                       /**
+                        * @brief Creates new instance of VolumeControl
+                        * @param[in] parent Parent widget
+                        * @return Shared reference to VolumeControl instance
+                        *  on success or NULL otherwise
+                        */
                        VolumeControlSRef build(ucl::ElmWidget &parent) const;
 
                private:
                        ucl::TString m_info;
                        int m_maxValue;
-                       int m_curValue;
+                       int m_value;
                        EventHandler m_handler;
                };
 
        public:
+
+               /**
+                * @brief Destructor
+                */
                virtual ~VolumeControl() = default;
 
+               /**
+                * @brief Sets information text to display
+                * @param[in] info Text to set
+                */
                void setInfoText(const ucl::TString &info);
+
+               /**
+                * @brief Sets decrease volume button enable state
+                * @param[in] isEnable Button state
+                */
                void setDecreaseBtnEnable(bool isEnable);
+
+               /**
+                * @brief Sets increase volume button enable state
+                * @param[in] isEnable Button state
+                */
                void setIncreaseBtnEnable(bool isEnable);
+
+               /**
+                * @brief Sets event handler
+                * @param[in] handler Event handler
+                */
                void setEventHandler(const EventHandler &handler);
 
+               /**
+                * @brief Gets Access object of decrease volume button
+                * @remark Use only for Screen Reader feature
+                * @return Pointer to widget on success or NULL otherwise
+                */
                ucl::ElmWidget *getDecreaseBtn();
+
+               /**
+                * @brief Gets Access object of increase volume button
+                * @remark Use only for Screen Reader feature
+                * @return Pointer to widget on success or NULL otherwise
+                */
                ucl::ElmWidget *getIncreaseBtn();
+
+               /**
+                * @brief Gets Access object of volume value text area
+                * @remark Use only for Screen Reader feature
+                * @return Pointer to widget on success or NULL otherwise
+                */
                ucl::ElmWidget *getValueTxtAo();
 
                // Slider //
 
+               /**
+                * @see Slider::setValue()
+                */
                virtual void setValue(int value) override final;
 
        private:
index ca3e7d38f2fe275e81483d3c73d148c62233592e..4e26d2228518e958017e56055ee411e1a3e34a7c 100644 (file)
@@ -118,9 +118,9 @@ namespace callui { namespace utils {
                return itc;
        }
 
-       ElmWidgetSRef createAccessObject(ElmWidget &parent, Widget &ly)
+       ElmWidgetSRef createAccessObject(ElmWidget &parent, Widget &obj)
        {
-               auto ao = elm_access_object_register(ly, parent);
+               auto ao = elm_access_object_register(obj, parent);
                if (!ao) {
                        LOG_RETURN_VALUE(RES_FAIL, {},
                                        "elm_access_object_register() failed!");
index 30769ab979c55608d9c051e13f6c60dcc14e097f..f6449f3d1c3328c71e8f21cd35909817ba69bdf1 100644 (file)
 
 namespace callui { namespace utils {
 
+       /**
+        * @brief Create circular surface from Naviframe for circular objects
+        * @param[in] navi Naviframe instance
+        * @return RES_OK on success or another result otherwise
+        */
        ucl::Result createCircleSurface(ucl::Naviframe &navi);
 
+       /**
+        * @brief Gets circular surface for widget
+        * @param[in] widget Widget instance
+        * @return Pointer on circular surface
+        */
        Eext_Circle_Surface *getCircleSurface(const ucl::ElmWidget &widget);
 
+       /**
+        * @brief Creates fake Access object
+        * @param[in] parent Parent widget
+        * @return Shared reference to ElmWidget instance
+        *  on success or NULL otherwise
+        */
        ucl::ElmWidgetSRef createFakeAccessObject(ucl::ElmWidget &parent);
 
+       /**
+        * @brief Creates elm_genlist item class according to input params
+        * @param[in] style Item style
+        * @param[in] txtCb Item text callback function
+        * @param[in] contentCb Item content callback function
+        * @param[in] txtCb Item state callback function
+        * @param[in] txtCb Item delete callback function
+        * @return Elementary genlist item class instance
+        */
        Elm_Genlist_Item_Class createGenlistItemClass(const char *style,
                        Elm_Gen_Item_Text_Get_Cb txtCb = nullptr,
                        Elm_Gen_Item_Content_Get_Cb contentCb = nullptr,
                        Elm_Gen_Item_State_Get_Cb stateCb = nullptr,
                        Elm_Gen_Item_Del_Cb delCb = nullptr);
 
+       /**
+        * @brief Creates Access object
+        * @param[in] parent ElmWidget which is used for creating
+        * @param[in] obj Widget to register as an accessible object
+        * @return Shared reference to ElmWidget instance
+        *  on success or NULL otherwise
+        */
        ucl::ElmWidgetSRef createAccessObject(ucl::ElmWidget &parent,
-                       ucl::Widget &ly);
-
+                       ucl::Widget &obj);
+
+       /**
+        * @brief Creates Access object from layout part
+        * @param[in] parent ElmWidget which is used for creating
+        * @param[in] ly Widget which part is used to register as an accessible object
+        * @param[in] lyPart Widget part to register as an accessible object
+        * @return Shared reference to ElmWidget instance
+        *  on success or NULL otherwise
+        */
        ucl::ElmWidgetSRef createAccessObjectFromLyPart(ucl::ElmWidget &parent,
                        ucl::Widget &ly,
                        const ucl::EdjePart &lyPart);
 
+       /**
+        * @brief Destroys Access object
+        * @param[in] ao Access object to destroy
+        */
        void destroyAccessObject(ucl::ElmWidget &ao);
 
+       /**
+        * @brief Sets mirrored mode status
+        * @param[in] isMirroredMode Mirrored mode status
+        */
        void setMirroredMode(bool isMirroredMode);
 
+       /**
+        * @brief Gets mirrored mode status
+        * @return true if mirrored mode is on, false otherwise
+        */
        bool getMirroredMode();
 
 }}
 
 namespace callui {
 
+       /**
+        * @brief Adds rotary event handler
+        * @param[in] func Callback function on rotary events
+        * @param[in] data User data
+        */
        void addRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data);
 
+       /**
+        * @brief Deletes rotary event handler
+        * @param[in] func Callback function on rotary events
+        * @param[in] data User data
+        */
        void delRotaryEventHandler(Eext_Rotary_Handler_Cb func, void *data);
 
+       /**
+        * @brief Converts image file name into image layout theme
+        * @param[in] fileName Image filename
+        * @return Layout theme instance
+        */
        ucl::LayoutTheme getImageTheme(const char *fileName);
 
+       /**
+        * @brief Gets Screen Reader relation type from Screen Reader gesture info
+        * @param[in] gestureInfo Screen Reader gesture info
+        * @return Screen Reader relation type
+        */
        Elm_Atspi_Relation_Type getFlowRelation(Elm_Atspi_Gesture_Info gestureInfo);
 
 }
index eb1296238043446574c3ca9b72f86babcb3223b9..a3bdd99d8940eed4739aa7fdbe560182e5a084ca 100644 (file)
 
 namespace callui {
 
+       /**
+        * @brief Enumeration of Acceept button type for AcceptRejectWidget
+        */
        enum class AcceptButtonType {
-               SIMPLE,
-               BT_HEADSET
+               SIMPLE,                    /**< Normal accept button type */
+               BT_HEADSET                 /**< Accept with BT Headset button type */
        };
 }