From f6231d5a64d64fde5da27e3c8c691521a087d26e Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Mon, 2 Oct 2017 17:53:11 +0100 Subject: [PATCH] Move Progress Bar from Devel to Public API Change-Id: I1ed524b218dc31f6c59cbd34d9bcc9a25bb7470a --- .../src/dali-toolkit/utc-Dali-ProgressBar.cpp | 3 +- build/tizen/dali-toolkit/Makefile.am | 6 +-- dali-toolkit/dali-toolkit.h | 1 + dali-toolkit/devel-api/file.list | 4 -- .../controls/progress-bar/progress-bar-impl.h | 2 +- .../controls/progress-bar/progress-bar.cpp | 4 +- .../controls/progress-bar/progress-bar.h | 51 ++++++++++++++++------ dali-toolkit/public-api/file.list | 4 ++ 8 files changed, 50 insertions(+), 25 deletions(-) rename dali-toolkit/{devel-api => public-api}/controls/progress-bar/progress-bar.cpp (92%) rename dali-toolkit/{devel-api => public-api}/controls/progress-bar/progress-bar.h (86%) diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp index 4b965c8..3f2fc27 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/build/tizen/dali-toolkit/Makefile.am b/build/tizen/dali-toolkit/Makefile.am index 25bdf75..ae70d5e 100644 --- a/build/tizen/dali-toolkit/Makefile.am +++ b/build/tizen/dali-toolkit/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright (c) 2016 Samsung Electronics Co., Ltd. +# Copyright (c) 2017 Samsung Electronics Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -143,7 +143,6 @@ develapiscrollbardir = $(develapicontrolsdir)/scroll-bar develapinavigationviewdir = $(develapicontrolsdir)/navigation-view develapipageturnviewdir = $(develapicontrolsdir)/page-turn-view develapipopupdir = $(develapicontrolsdir)/popup -develapiprogressbardir = $(develapicontrolsdir)/progress-bar develapishadowviewdir = $(develapicontrolsdir)/shadow-view develapisuperblurviewdir = $(develapicontrolsdir)/super-blur-view develapifocusmanagerdir = $(develapidir)/focus-manager @@ -176,7 +175,6 @@ develapimagnifier_HEADERS = $(devel_api_magnifier_header_files) develapinavigationview_HEADERS = $(devel_api_navigation_view_header_files) develapipageturnview_HEADERS = $(devel_api_page_turn_view_header_files) develapipopup_HEADERS = $(devel_api_popup_header_files) -develapiprogressbar_HEADERS = $(devel_api_progress_bar_header_files) develapivisualfactory_HEADERS = $(devel_api_visual_factory_header_files) develapivisuals_HEADERS = $(devel_api_visuals_header_files) develapiscripting_HEADERS = $(devel_api_scripting_header_files) @@ -201,6 +199,7 @@ publicapiflexcontainerdir = $(publicapicontrolsdir)/flex-container publicapiimageviewdir = $(publicapicontrolsdir)/image-view publicapivideoviewdir = $(publicapicontrolsdir)/video-view publicapimodel3dviewdir = $(publicapicontrolsdir)/model3d-view +publicapiprogressbardir = $(publicapicontrolsdir)/progress-bar publicapiscrollbardir = $(publicapicontrolsdir)/scroll-bar publicapiscrollabledir = $(publicapicontrolsdir)/scrollable publicapiscrollviewdir = $(publicapicontrolsdir)/scrollable/scroll-view @@ -226,6 +225,7 @@ publicapiimageview_HEADERS = $(public_api_image_view_header_files) publicapivideoview_HEADERS = $(public_api_video_view_header_files) publicapiitemview_HEADERS = $(public_api_item_view_header_files) publicapimodel3dview_HEADERS = $(public_api_model3d_view_header_files) +publicapiprogressbar_HEADERS = $(public_api_progress_bar_header_files) publicapiscrollbar_HEADERS = $(public_api_scroll_bar_header_files) publicapiscrollable_HEADERS = $(public_api_scrollable_header_files) publicapiscrollview_HEADERS = $(public_api_scroll_view_header_files) diff --git a/dali-toolkit/dali-toolkit.h b/dali-toolkit/dali-toolkit.h index 1812c4d..fe666f7 100644 --- a/dali-toolkit/dali-toolkit.h +++ b/dali-toolkit/dali-toolkit.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include diff --git a/dali-toolkit/devel-api/file.list b/dali-toolkit/devel-api/file.list index 85275d9..58711f9 100644 --- a/dali-toolkit/devel-api/file.list +++ b/dali-toolkit/devel-api/file.list @@ -18,7 +18,6 @@ devel_api_src_files = \ $(devel_api_src_dir)/controls/page-turn-view/page-turn-view.cpp \ $(devel_api_src_dir)/controls/popup/confirmation-popup.cpp \ $(devel_api_src_dir)/controls/popup/popup.cpp \ - $(devel_api_src_dir)/controls/progress-bar/progress-bar.cpp \ $(devel_api_src_dir)/controls/shadow-view/shadow-view.cpp \ $(devel_api_src_dir)/controls/super-blur-view/super-blur-view.cpp \ $(devel_api_src_dir)/controls/text-controls/text-selection-popup.cpp \ @@ -94,9 +93,6 @@ devel_api_popup_header_files = \ $(devel_api_src_dir)/controls/popup/confirmation-popup.h \ $(devel_api_src_dir)/controls/popup/popup.h -devel_api_progress_bar_header_files = \ - $(devel_api_src_dir)/controls/progress-bar/progress-bar.h - devel_api_visual_factory_header_files = \ $(devel_api_src_dir)/visual-factory/transition-data.h \ $(devel_api_src_dir)/visual-factory/visual-factory.h \ diff --git a/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h b/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h index 5c98cb0..5b0ffd2 100755 --- a/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h +++ b/dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h @@ -22,7 +22,7 @@ // INTERNAL INCLUDES #include #include -#include +#include #include namespace Dali diff --git a/dali-toolkit/devel-api/controls/progress-bar/progress-bar.cpp b/dali-toolkit/public-api/controls/progress-bar/progress-bar.cpp similarity index 92% rename from dali-toolkit/devel-api/controls/progress-bar/progress-bar.cpp rename to dali-toolkit/public-api/controls/progress-bar/progress-bar.cpp index cfc4dfe..d34a5a8 100644 --- a/dali-toolkit/devel-api/controls/progress-bar/progress-bar.cpp +++ b/dali-toolkit/public-api/controls/progress-bar/progress-bar.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ */ // CLASS HEADER -#include +#include // INTERNAL INCLUDES #include diff --git a/dali-toolkit/devel-api/controls/progress-bar/progress-bar.h b/dali-toolkit/public-api/controls/progress-bar/progress-bar.h similarity index 86% rename from dali-toolkit/devel-api/controls/progress-bar/progress-bar.h rename to dali-toolkit/public-api/controls/progress-bar/progress-bar.h index 4c39a87..4a6ce3a 100644 --- a/dali-toolkit/devel-api/controls/progress-bar/progress-bar.h +++ b/dali-toolkit/public-api/controls/progress-bar/progress-bar.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_PROGRESS_BAR_H /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,10 @@ namespace Internal DALI_INTERNAL { class ProgressBar; } +/** + * @addtogroup dali_toolkit_controls_progress_bar + * @{ + */ /** * @brief ProgressBar is a control to give the user an indication of the progress of an operation. @@ -55,11 +59,12 @@ class ProgressBar; * ============================================= * * Also progress value percentage is shown as text inside the progress bar. - * * Signals * | %Signal Name | Method | * |-------------------|-------------------------------| * | valueChanged | @ref ValueChangedSignal() | + * + * @SINCE_1_2.60 */ class DALI_IMPORT_API ProgressBar : public Control @@ -70,24 +75,26 @@ public: /** * @brief The start and end property ranges for this control. + * @SINCE_1_2.60 */ enum PropertyRange { - PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< Start Index - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< Start Index. @SINCE_1_2.60 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices. @SINCE_1_2.60 }; /** * @brief An enumeration of properties belonging to the ProgressBar class. + * @SINCE_1_2.60 */ struct Property { enum { - /** * @brief The progress value of progress bar, progress runs form 0 to 1. * @details Name "progressValue", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. If not supplied, the default is 0. * @note Value should be between 0 to 1. * @note If Value is set to 0, progress bar will be set to beginning. @@ -99,6 +106,7 @@ public: /** * @brief The secondary progress value of progress bar, secondary progress runs form 0 to 1. * @details Name "secondaryProgressValue", type Property::FLOAT. + * @SINCE_1_2.60 * @note Optional. If not supplied, the default is 0. * @note Value should be between 0 to 1. * @note If Value is set to 0, progress bar will be set secondary progress to beginning. @@ -109,41 +117,47 @@ public: /** * @brief Sets the progress-bar as \e indeterminate state. - * @details name "indeterminate", type bool + * @details name "indeterminate", type Property::BOOLEAN. + * @SINCE_1_2.60 */ INDETERMINATE, /** * @brief The track Visual value of progress bar, it's a full progress area and it's shown behind PROGRESS_VISUAL. - * @details Name "trackVisual", type Property::STRING if it is a url, map otherwise. + * @details Name "trackVisual", type Property::MAP or Property::STRING (url to image). + * @SINCE_1_2.60 * @note Optional. If not supplied, the default track visual will be shown. */ TRACK_VISUAL, /** * @brief The progress Visual value of progress bar, size of the progress visual is changed based on PROGRESS_VALUE. - * @details Name "progressVisual", type Property::STRING if it is a url, map otherwise. + * @details Name "progressVisual", type Property::MAP or Property::STRING (url to image). + * @SINCE_1_2.60 * @note Optional. If not supplied, the default progress visual will be shown. */ PROGRESS_VISUAL, /** * @brief The secondary progress visual of progress bar, size of the secondary progress visual is changed based on SECONDARY_PROGRESS_VALUE. - * @details Name "secondaryProgressVisual", type Property::STRING if it is a url, map otherwise. + * @details Name "secondaryProgressVisual", type Property::MAP or Property::STRING (url to image). + * @SINCE_1_2.60 * @note Optional. If not supplied, the secondary progress visual will not be shown. */ SECONDARY_PROGRESS_VISUAL, /** * @brief The indeterminate visual of progress bar. - * @details Name "inditerminateVisual", type Property::STRING if it is a url, map otherwise. - * @note Optional. If not supplied, the default inditerminate visual will be shown. + * @details Name "inditerminateVisual", type Property::MAP or Property::STRING (url to image). + * @SINCE_1_2.60 + * @note Optional. If not supplied, the default indeterminate visual will be shown. */ INDETERMINATE_VISUAL, /** * @brief The transition data for indeterminate visual animation. - * @details Name "indeterminateVisualAnimation", type Property::STRING. + * @details Name "indeterminateVisualAnimation", type Property::MAP or Property::ARRAY. + * @SINCE_1_2.60 * @note Optional. If not supplied, default animation will be played. */ INDETERMINATE_VISUAL_ANIMATION, @@ -151,6 +165,7 @@ public: /** * @brief The Label visual of progress bar. * @details Name "labelVisual", type Property::MAP. + * @SINCE_1_2.60 */ LABEL_VISUAL, }; @@ -160,12 +175,14 @@ public: /** * @brief Creates the ProgressBar control. + * @SINCE_1_2.60 * @return A handle to the ProgressBar control */ static ProgressBar New(); /** * @brief Creates an empty ProgressBar handle. + * @SINCE_1_2.60 */ ProgressBar(); @@ -173,6 +190,7 @@ public: * @brief Copy constructor. * * Creates another handle that points to the same real object. + * @SINCE_1_2.60 */ ProgressBar( const ProgressBar& handle ); @@ -180,6 +198,7 @@ public: * @brief Assignment operator. * * Changes this handle to point to another real object. + * @SINCE_1_2.60 */ ProgressBar& operator=( const ProgressBar& handle ); @@ -187,6 +206,7 @@ public: * @brief Destructor. * * This is non-virtual since derived Handle types must not contain data or virtual methods. + * @SINCE_1_2.60 */ ~ProgressBar(); @@ -195,6 +215,7 @@ public: * * If handle points to a ProgressBar the * downcast produces valid handle. If not the returned handle is left uninitialized. + * @SINCE_1_2.60 * @param[in] handle Handle to an object * @return handle to a ProgressBar or an uninitialized handle */ @@ -204,6 +225,7 @@ public: // Signals /** * @brief Value changed signal type. + * @SINCE_1_2.60 */ typedef Signal< void ( ProgressBar, float, float ) > ValueChangedSignalType; @@ -214,11 +236,11 @@ public: // Signals * @code * void YourCallbackName( ProgressBar progressBar, float progressValue, float secondaryProgressValue ); * @endcode + * @SINCE_1_2.60 * @return The signal to connect to */ ValueChangedSignalType& ValueChangedSignal(); - public: // Not intended for application developers /// @cond internal @@ -236,6 +258,9 @@ public: // Not intended for application developers /// @endcond }; +/** + * @} + */ } // namespace Toolkit } // namespace Dali diff --git a/dali-toolkit/public-api/file.list b/dali-toolkit/public-api/file.list index 861f2de..a922cfc 100755 --- a/dali-toolkit/public-api/file.list +++ b/dali-toolkit/public-api/file.list @@ -11,6 +11,7 @@ public_api_src_files = \ $(public_api_src_dir)/controls/flex-container/flex-container.cpp \ $(public_api_src_dir)/controls/image-view/image-view.cpp \ $(public_api_src_dir)/controls/model3d-view/model3d-view.cpp \ + $(public_api_src_dir)/controls/progress-bar/progress-bar.cpp \ $(public_api_src_dir)/controls/scroll-bar/scroll-bar.cpp \ $(public_api_src_dir)/controls/scrollable/item-view/default-item-layout.cpp \ $(public_api_src_dir)/controls/scrollable/item-view/item-layout.cpp \ @@ -74,6 +75,9 @@ public_api_image_loader_header_files = \ $(public_api_src_dir)/image-loader/async-image-loader.h \ $(public_api_src_dir)/image-loader/sync-image-loader.h +public_api_progress_bar_header_files = \ + $(public_api_src_dir)/controls/progress-bar/progress-bar.h + public_api_scrollable_header_files = \ $(public_api_src_dir)/controls/scrollable/scrollable.h -- 2.7.4