TizenRefApp-9688 [Gallery] Add doxygen documentation to Presenters misc classes 43/157843/5
authorAlexander\ Kovalenko <al.kovalenko@samsung.com>
Thu, 26 Oct 2017 11:34:03 +0000 (14:34 +0300)
committerAlexander\ Kovalenko <al.kovalenko@samsung.com>
Tue, 7 Nov 2017 08:04:02 +0000 (10:04 +0200)
Change-Id: I5515ca4e053869820e9c7f4d290df8d01a51e2a5

gallery/presenters/misc/MoreOptionsPresenter.h
gallery/presenters/misc/ProcessingPresenter.h
gallery/presenters/misc/SelectModePresenter.h
gallery/presenters/misc/helpers.h

index cd0c01dc2abc38bc2823a014adcdc2b9b568222a..a766763681b67ea6802915d8f657948e449b123d 100644 (file)
@@ -27,49 +27,143 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(MoreOptionsPresenter);
 
+       /**
+        * @brief Represents More Options menu
+        */
        class MoreOptionsPresenter final : public ucl::GuiPresenter {
        public:
                UCL_DECLARE_REF_ALIASES(IListener);
 
+               /**
+                * @brief Option entry
+                */
                struct Option final {
-                       int id;
-                       ucl::TString text;
-                       ucl::TString subText;
-                       ucl::LayoutTheme iconTheme;
+                       int id;                      /**< ID*/
+                       ucl::TString text;           /**< Text*/
+                       ucl::TString subText;        /**< Subtext */
+                       ucl::LayoutTheme iconTheme;  /**< Icon theme*/
                };
 
+               /**
+                * @brief Provides set of instruments for creation of
+                *        MoreOptionsPresenter object with set of options
+                */
                class Builder final {
                public:
+
+                       /**
+                        * @brief Default constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Destructor
+                        */
                        ~Builder();
+
+                       /**
+                        * @brief Checks whether options list is empty
+                        * @return true if empty, false if not empty
+                        */
                        bool isEmpty() const;
+
+                       /**
+                        * @brief Clears option list
+                        * @return Reference to Builder object
+                        */
                        Builder &clear();
+
+                       /**
+                        * @brief Adds option to the list
+                        * @param[in] option Option
+                        * @return Reference to Builder object
+                        */
                        Builder &addOption(Option option);
+
+                       /**
+                        * @brief Sets parent widget
+                        * @param[in] parentWidget Widget
+                        * @return Reference to Builder object
+                        */
                        Builder &setParentWidget(const ucl::ElmWidgetSRef &parentWidget);
+
+                       /**
+                        * @brief Creates MoreOptionsPresenter object
+                        * @param[in] parent Parent presenter
+                        * @return Shared reference to MoreOptionsPresenter object
+                        */
                        MoreOptionsPresenterSRef build(GuiPresenter &parent) const;
                private:
                        std::list<Option> m_options;
                        ucl::ElmWidgetSRef m_parentWidget;
                };
 
+               /**
+                * @brief Represents MoreOptions event listener
+                */
                class IListener : protected ucl::NonCopyable {
                public:
+                       /**
+                        * @brief Called when MoreOptions cue clicked.
+                        * @param[in] sender Sender
+                        * @param[in] optionID Option ID
+                        */
                        virtual void onMoreOptionClicked(MoreOptionsPresenter &sender,
                                        int optionId) = 0;
+
+                       /**
+                        * @brief Called when option was selected.
+                        * @param[in] sender Sender
+                        * @param[in] optionID Option ID
+                        */
                        virtual void onMoreOptionSelected(MoreOptionsPresenter &sender,
                                        int optionId) {};
+
+                       /**
+                        * @brief Called when MoreOptions opened.
+                        * @param[in] sender Sender
+                        */
                        virtual void onMoreOptionsOpened(MoreOptionsPresenter &sender) {};
+
+                       /**
+                        * @brief Called when MoreOptions closed.
+                        * @param[in] sender Sender
+                        */
                        virtual void onMoreOptionsClosed(MoreOptionsPresenter &sender) {};
                };
 
        public:
+
+               /**
+                * @brief Sets listener
+                * @param[in] listener Weak reference to listener
+                */
                void setListener(const IListenerWRef &listener);
 
+               /**
+                * @brief Gets widget
+                * @return Widget. @see ucl::Widget
+                */
                ucl::Widget &getWidget();
 
+               /**
+                * @brief Sets opened status
+                * @param[in] isOpened Open status
+                */
                void setOpened(bool isOpened);
+
+               /**
+                * @brief Checks if MoreOptions is opened
+                * @return true if opened, false if not opened
+                */
                bool isOpened() const;
 
+               /**
+                * @brief Sets opened status with delay
+                * @param[in] isOpened Open status
+                * @param[in] timeout Delay timeout. Has effect only if "Open status"
+                *            parameter is set to true
+                */
                void setOpenedDelayed(bool isOpened, double timeout);
 
        private:
index 56b1e9f9bec7809cf3a6e63cb46ef8d66e18c570..5d689b76ee6725ff65f3186a5810e4bef9cdd2f2 100644 (file)
@@ -26,30 +26,74 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(ProcessingPresenter);
 
+       /**
+        * @brief Provides set of instruments to display processing status of some
+        *        operation and its result
+        */
        class ProcessingPresenter final : public ucl::GuiPresenter {
        public:
+               /**
+                * @brief Enumeration of icon types
+                */
                enum class IconType {
-                       NONE,
-                       CHECK
+                       NONE,    /**< No icon*/
+                       CHECK    /**< Check icon*/
                };
 
+               /**
+                * @brief Provides set of instruments for creation of
+                * ProcessingPresenter object with set of options
+                */
                class Builder final {
                public:
+
+                       /**
+                        * @brief Default constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets processing text
+                        * @param[in] text Text
+                        * @return Reference to Builder object
+                        */
                        Builder &setProcessingText(ucl::TString text);
+
+                       /**
+                        * @brief Sets show progress flag
+                        * @param[in] value Show progress flag
+                        * @return Reference to Builder object
+                        */
                        Builder &setForceProgress(bool value);
+
+                       /**
+                        * @brief Creates ProcessingPresenter object
+                        * @return Weak reference to ProcessingPresenter object
+                        */
                        ProcessingPresenterSRef build(ucl::ElmWidget &parent) const;
                private:
                        ucl::TString m_processingText;
                        bool m_forceProgress;
                };
 
+               /**
+                * @brief Dismiss handler type
+                */
                using DismissHandler = ucl::WeakDelegate<void()>;
 
        public:
+               /**
+                * @brief Finalizes processing progress with set text or icon
+                * @param[in] completeText Text
+                * @param[in] iconType Icon type
+                */
                void complete(const ucl::TString &completeText,
                                IconType iconType = IconType::NONE);
 
+               /**
+                * @brief Sets dismiss handler
+                * @param[in] handler Dismiss handlerssss
+                */
                void setDismissHandler(const DismissHandler &handler);
 
        private:
index 20218b898bd62d230c643f5f8179b88c32f0d4be..03309a60c413d25851c66f5445d1dd1b197b86ce 100644 (file)
@@ -27,10 +27,16 @@ namespace gallery {
 
        UCL_DECLARE_REF_ALIASES(SelectModePresenter);
 
+       /**
+        * @brief Provides set of instruments for selecting multiple objects
+        */
        class SelectModePresenter final : public ucl::GuiPresenter {
        public:
                UCL_DECLARE_REF_ALIASES(IListener);
 
+               /**
+                * @brief Enumeration of flags
+                */
                enum {
                        FLAG_NO_BOTTOM_BUTTON = 1,
                        FLAG_NO_MORE_OPTIONS = 2,
@@ -38,39 +44,107 @@ namespace gallery {
                        FLAG_NO_DISMISS_ON_ROTARY = 8
                };
 
+               /**
+                * @brief Provides set of instruments for creation of
+                * SelectModePresenter object with set of options
+                */
                class Builder final {
                public:
+
+                       /**
+                        * @brief Default constructor
+                        */
                        Builder();
+
+                       /**
+                        * @brief Sets flags
+                        * @param[in] flags Flags
+                        * @return Reference to Builder object
+                        */
                        Builder &setFlags(int flags);
+
+                       /**
+                        * @brief Sets page content
+                        * @param[in] content Shared reference to content
+                        * @return Reference to Builder object
+                        */
                        Builder &setPageContent(const PageContentSRef &content);
+
+                       /**
+                        * @brief Creates SelectModePresenter object
+                        * @param[in] parent Parent presenter
+                        * @return Shared reference to SelectModePresenter object
+                        */
                        SelectModePresenterSRef build(GuiPresenter &parent) const;
                private:
                        PageContentSRef m_content;
                        int m_flags;
                };
 
+               /**
+                * @brief Enumeration of events
+                */
                enum class Event {
-                       SELECT_ALL,
-                       DESELECT_ALL,
-                       BOTTOM_BUTTON_CLICK
+                       SELECT_ALL,           /**< Select all*/
+                       DESELECT_ALL,         /**< Deselect all*/
+                       BOTTOM_BUTTON_CLICK   /**< Bottom button clicked*/
                };
 
+               /**
+                * @brief Event listener
+                */
                class IListener : protected ucl::NonCopyable {
                public:
+
+                       /**
+                        * @brief Select mode callback
+                        */
                        virtual void onSelectModeEvent(Event event) = 0;
                };
 
        public:
+
+               /**
+                * @brief Sets listener
+                * @param[in] listener Listener
+                */
                void setListener(const IListenerWRef &listener);
 
+               /**
+                * @brief Sets visibility
+                * @param[in] value Visibility value
+                */
                void setVisible(bool value);
+
+               /**
+                * @brief Checks visibility
+                * @return true if visible, false if invisible
+                */
                bool isVisible() const;
 
+               /**
+                * @brief Gets "Select" button
+                * @return ElmWidget. @see ucl::ElmWidget
+                */
                ucl::ElmWidget &getSelectButton();
+
+               /**
+                * @brief Gets bottom button
+                * @return ElmWidget. @see ucl::ElmWidget
+                */
                ucl::ElmWidget &getBottomButton();
 
+               /**
+                * @brief Sets bottom button text
+                * @param[in] value Text
+                */
                void setBottomButtonText(const ucl::TString &value);
 
+               /**
+                * @brief Updates presenter
+                * @param[in] selectCount Number of selected elements
+                * @param[in] totalCount Overall number of elements
+                */
                void update(int selectCount, int totalCount = -1);
 
        private:
index 8892553b10c5221affc516e1038e20a7826ac886..d903a0a82d7ee59fbd1b93acf27c5b4a0cff89f1 100644 (file)
@@ -24,7 +24,18 @@ namespace gallery {
        constexpr ucl::SmartEvent INSTANCE_PAUSED {"gallery,instance,paused"};
        constexpr ucl::SmartEvent INSTANCE_RESUMED {"gallery,instance,resumed"};
 
+       /**
+        * @brief Sets instance pause
+        * @param[in] win Window
+        * @param[in] value Instance Pause state status
+        */
        void setInstancePaused(ucl::Window &win, bool value);
+
+       /**
+        * @brief Checks if instance is paused
+        * @param[in] win Window
+        * @return true if paused, false if not
+        */
        bool isInstancePaused(const ucl::Window &win);
 }