Doxygenize CheckBox

Had to move most of the documentation to DualStateButton, since this is
where the documented elements are.
This commit is contained in:
Aurélien Gâteau 2012-12-14 17:09:16 +01:00
parent 22c18e2d1e
commit 24248abd67
2 changed files with 34 additions and 61 deletions

View File

@ -17,36 +17,23 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 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 QtQuick 1.0
import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.core 0.1 as PlasmaCore
import "private" as Private 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 { Private.DualStateButton {
id: checkBox id: checkBox
view: PlasmaCore.FrameSvgItem { view: PlasmaCore.FrameSvgItem {

View File

@ -17,53 +17,39 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 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 QtQuick 1.0
import org.kde.plasma.core 0.1 as PlasmaCore 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 { Item {
id: dualButton id: dualButton
// Common API // Common API
/**
* If the button is checked, its checked property is true; otherwise false. The property is false by default.
*/
property bool checked property bool checked
/**
* type:bool
* If the button is pressed, its pressed property is true.
* @see clicked
*/
property alias pressed: mouseArea.pressed property alias pressed: mouseArea.pressed
/**
* Emitted when the user clicked a mouse button over the button (or
* tapped on the touch screen)
*/
signal clicked() signal clicked()
// Plasma API // 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 text: label.text // TODO: Not yet part of the common API
property alias view: surfaceLoader.sourceComponent property alias view: surfaceLoader.sourceComponent
property alias shadow: shadowLoader.sourceComponent property alias shadow: shadowLoader.sourceComponent