From 24248abd67d1947e7a5b3c499c8f031168310860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Fri, 14 Dec 2012 17:09:16 +0100 Subject: [PATCH] Doxygenize CheckBox Had to move most of the documentation to DualStateButton, since this is where the documented elements are. --- .../plasmacomponents/qml/CheckBox.qml | 41 +++++--------- .../qml/private/DualStateButton.qml | 54 +++++++------------ 2 files changed, 34 insertions(+), 61 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/CheckBox.qml b/declarativeimports/plasmacomponents/qml/CheckBox.qml index d6556338a..13659440e 100644 --- a/declarativeimports/plasmacomponents/qml/CheckBox.qml +++ b/declarativeimports/plasmacomponents/qml/CheckBox.qml @@ -17,36 +17,23 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/**Documented API -Inherits: - The private DualStateButton -Imports: - QtQuick 1.0 - org.kde.plasma.core - -Description: - A check box is a component that can be switched on (checked) or off (unchecked). Check boxes are typically used to represent features in an application that can be enabled or disabled without affecting others, but different types of behavior can be implemented. When a check box is checked or unchecked it sends a clicked signal for the application to handle. - When a check box has the focus, its state can be toggled using the Qt.Key_Select, Qt.Key_Return, and Qt.Key_Enter hardware keys that send the clicked signal. - -Properties: - bool checked: - If the button is checked, its checked property is true; otherwise false. The property is false by default. - - bool pressed: - If the button is pressed, its pressed property is true. - See also clicked. - - string text: - The text is shown beside the check box. By default text is an empty string. -Signals: - clicked(): - Emitted when the user clicked a mouse button over the checkbox (or tapped on the touch screen) -**/ - import QtQuick 1.0 import org.kde.plasma.core 0.1 as PlasmaCore import "private" as Private +/** + * A check box is a component that can be switched on (checked) or off + * (unchecked). Check boxes are typically used to represent features in an + * application that can be enabled or disabled without affecting others, but + * different types of behavior can be implemented. When a check box is checked + * or unchecked it sends a clicked signal for the application to handle. + * + * When a check box has the focus, its state can be toggled using the + * Qt.Key_Select, Qt.Key_Return, and Qt.Key_Enter hardware keys that send the + * clicked signal. + * + * All properties of this component are defined in DualStateButton, its base component. + */ Private.DualStateButton { id: checkBox view: PlasmaCore.FrameSvgItem { @@ -76,4 +63,4 @@ Private.DualStateButton { } shadow: Private.ButtonShadow {} -} \ No newline at end of file +} diff --git a/declarativeimports/plasmacomponents/qml/private/DualStateButton.qml b/declarativeimports/plasmacomponents/qml/private/DualStateButton.qml index db799bec3..6cef3c1c2 100644 --- a/declarativeimports/plasmacomponents/qml/private/DualStateButton.qml +++ b/declarativeimports/plasmacomponents/qml/private/DualStateButton.qml @@ -17,53 +17,39 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/**Documented API -Inherits: - Item - -Imports: - QtQuick 1.0 - org.kde.plasma.core - -Description: - TODO i need more info here - -Properties: - bool checked: - Returns if the Button is checked or not. - - alias pressed: - TODO i need more info here - - alias text: - Sets the text for the button - - QtObject theme: - TODO needs info - - alias view: - TODO needs info - - alias shadow: - TODO needs info -Signals: - clicked: - The signal is emited when the button is clicked! -**/ - import QtQuick 1.0 import org.kde.plasma.core 0.1 as PlasmaCore +/** + * Private base component for several public components. Any element documented here + * can be used in components inheriting from DualStateButton. + */ Item { id: dualButton // Common API + /** + * If the button is checked, its checked property is true; otherwise false. The property is false by default. + */ property bool checked + + /** + * type:bool + * If the button is pressed, its pressed property is true. + * @see clicked + */ property alias pressed: mouseArea.pressed + /** + * Emitted when the user clicked a mouse button over the button (or + * tapped on the touch screen) + */ signal clicked() // Plasma API + /** + * The text is shown beside the button. By default text is an empty string. + */ property alias text: label.text // TODO: Not yet part of the common API property alias view: surfaceLoader.sourceComponent property alias shadow: shadowLoader.sourceComponent