From 8a0251115845c720af14e6839878ae9b8d1da06d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Thu, 13 Dec 2012 17:01:04 +0100 Subject: [PATCH] Doxygenize BusyIndicator and Button --- .../plasmacomponents/qml/BusyIndicator.qml | 43 +++--- .../plasmacomponents/qml/Button.qml | 124 +++++++++--------- 2 files changed, 81 insertions(+), 86 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/BusyIndicator.qml b/declarativeimports/plasmacomponents/qml/BusyIndicator.qml index aa303763d..e08e95f8e 100644 --- a/declarativeimports/plasmacomponents/qml/BusyIndicator.qml +++ b/declarativeimports/plasmacomponents/qml/BusyIndicator.qml @@ -18,41 +18,32 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/**Documented API -Inherits: - Item - -Imports: - org.kde.plasma.core - QtQuick 1.1 - -Description: - It is just a simple Busy Indicator, it is used to indicate a task which duration is unknown. If the task duration/number of steps is known, a ProgressBar should be used instead. - TODO An image has to be added! - -Properties: - - bool running: - This property holds whether the busy animation is running. - The default value is false. - - bool smoothAnimation: - Set this property if you don't want to apply a filter to smooth - the busy icon while animating. - Smooth filtering gives better visual quality, but is slower. - The default value is true. -**/ - import QtQuick 1.1 import org.kde.plasma.core 0.1 as PlasmaCore +/** + * A simple busy indicator, + * It is used to indicate a task whose duration is unknown. If the task + * duration/number of steps is known, a ProgressBar should be used instead. + */ Item { id: busy - // Common API + /** + * This property holds whether the busy animation is running. + * + * The default value is false. + */ property bool running: false // Plasma API + /** + * Set this property if you don't want to apply a filter to smooth + * the busy icon while animating. + * Smooth filtering gives better visual quality, but is slower. + * + * The default value is true. + */ property bool smoothAnimation: true implicitWidth: 52 diff --git a/declarativeimports/plasmacomponents/qml/Button.qml b/declarativeimports/plasmacomponents/qml/Button.qml index 2d5277c76..5bfb8d74e 100644 --- a/declarativeimports/plasmacomponents/qml/Button.qml +++ b/declarativeimports/plasmacomponents/qml/Button.qml @@ -20,66 +20,14 @@ */ -/**Documented API -Inherits: - Item - -Imports: - org.kde.plasma.core - QtQuick 1.0 - -Description: - A simple button, with optional label and icon which uses the plasma theme. - This button component can also be used as a checkable button by using the checkable - and checked properties for that. - Plasma theme is the theme which changes via the systemsetting-workspace appearance - -desktop theme. - -Properties: - * bool checked: - This property holds whether this button is checked or not. - The button must be in the checkable state for enable users check or uncheck it. - The default value is false. - See also checkable property. - - * bool checkable: - This property holds if the button is acting like a checkable button or not. - The default value is false. - - * bool pressed: - This property holds if the button is pressed or not. - Read-only. - - * string text: - This property holds the text label for the button. - For example,the ok button has text 'ok'. - The default value for this property is an empty string. - - * url iconSource: - This property holds the source url for the Button's icon. - The default value is an empty url, which displays no icon. - It can be any image from any protocol supported by the Image element, or a freedesktop-compatible icon name - - * font font: - This property holds the font used by the button label. - See also Qt documentation for font type. - -Signals: - * clicked(): - This handler is called when there is a click. - - -Plasma properties: - - * real minimumWidth: - This property holds the smallest width this button can be to show all the contents - - * real minimumHeight: - This property holds the smallest height this button can be to show all the contents - - -**/ - +/** + * A button with optional label and icon which uses the plasma theme. + * + * This button component can also be used as a checkable button by using + * the checkable and checked properties for that. Plasma theme is the + * theme which changes via the systemsetting-workspace appearance -desktop + * theme. + */ import QtQuick 1.1 import org.kde.plasma.core 0.1 as PlasmaCore @@ -88,18 +36,74 @@ import "private" as Private Item { id: button + // Commmon API + /** + * This property holds whether this button is checked or not. + * The button must be in the checkable state to enable users to check or + * uncheck it. + * + * The default value is false. + * + * @see checkable + */ property bool checked: false + + /** + * This property holds if the button is acting like a checkable button or + * not. + * + * The default value is false. + */ property bool checkable: false + + /** + * type:bool + * This property holds if the button is pressed or not. + * Read-only. + */ property alias pressed: mouse.pressed + + /** + * type:string + * This property holds the text label for the button. + */ property alias text: label.text + + /** + * type:string + * + * This property holds the source url for the Button's icon. + * It can be any image from any protocol supported by the Image element, or + * a freedesktop-compatible icon name + * + * The default value is an empty url, which displays no icon. + */ property alias iconSource: icon.source + + /** + * type:font + * + * This property holds the font used by the button label. + * + * See also Qt documentation for font type. + */ property alias font: label.font //icon + label + left margin + right margin + spacing between icon and text + /** + * Smallest width this button can be to show all the contents + */ property real minimumWidth: icon.width + label.preferredWidth + surfaceNormal.margins.left + surfaceNormal.margins.right + ((icon.valid) ? surfaceNormal.margins.left : 0) + + /** + * Smallest height this button can be to show all the contents + */ property real minimumHeight: Math.max(theme.smallIconSize, label.paintedHeight) + surfaceNormal.margins.top + surfaceNormal.margins.bottom + /** + * This signal is emitted when the button is clicked. + */ signal clicked() implicitWidth: {