more comments

This commit is contained in:
Marco Martin 2012-01-10 21:39:18 +01:00
parent f8a93ef3ce
commit 1cffdbe741
14 changed files with 91 additions and 41 deletions

View File

@ -65,7 +65,7 @@ Properties:
See also Qt documentation for font type. See also Qt documentation for font type.
Signals: Signals:
* onClicked(): * clicked():
This handler is called when there is a click. This handler is called when there is a click.
**/ **/

View File

@ -50,10 +50,8 @@ Imports:
Description: Description:
A ButtonColumn allows you to group Buttons in a column. It provides a selection-behavior as well. A ButtonColumn allows you to group Buttons in a column. It provides a selection-behavior as well.
Note: This component don't support the enabled property. Note: This component don't support the enabled property.
If you need to disable it you should disable all the buttons inside it. If you need to disable it you should disable all the buttons inside it.
This is an example, This is an example,
<code> <code>
ButtonColumn { ButtonColumn {
@ -66,7 +64,6 @@ Properties:
bool exclusive: bool exclusive:
Specifies the grouping behavior. If enabled, the checked property on buttons contained Specifies the grouping behavior. If enabled, the checked property on buttons contained
in the group will be exclusive.The default value is true. in the group will be exclusive.The default value is true.
Note that a button in an exclusive group will allways be checkable Note that a button in an exclusive group will allways be checkable
Item checkedButton: Item checkedButton:

View File

@ -29,12 +29,15 @@ Description:
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. 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: Properties:
bool checked: If the button is checked, its checked property is true; otherwise false. The property is false by default. 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. bool pressed:
If the button is pressed, its pressed property is true.
See also clicked. See also clicked.
string text: The text is shown beside the check box. By default text is an empty string. string text:
The text is shown beside the check box. By default text is an empty string.
Signals: Signals:
clicked(): clicked():
Emitted when the user clicked a mouse button over the checkbox (or tapped on the touch screen) Emitted when the user clicked a mouse button over the checkbox (or tapped on the touch screen)

View File

@ -59,11 +59,14 @@ Description:
Note: This component is experimental, so it may be changed or removed in future releases. Note: This component is experimental, so it may be changed or removed in future releases.
Properties: Properties:
string titleText: the title of the dialog. string titleText:
the title of the dialog.
string titleIcon: the name or path of the dialog title icon string titleIcon:
the name or path of the dialog title icon
Array variant buttonTexts: the texts of all the buttons Array variant buttonTexts:
the texts of all the buttons
Signals: Signals:
buttonClicked(int index): buttonClicked(int index):

View File

@ -53,40 +53,51 @@ Description:
A dialog floats on the top layer of the application view, usually overlapping the area reserved for the application content. Normally, a dialog provides information and gives warnings to the user, or asks the user to answer a question or select an option. A dialog floats on the top layer of the application view, usually overlapping the area reserved for the application content. Normally, a dialog provides information and gives warnings to the user, or asks the user to answer a question or select an option.
Properties: Properties:
list<Item> buttons: A list of items in the dialog's button area. For example, you can use Row or Button components but you can also use any number of components that are based on Item component. list<Item> buttons:
A list of items in the dialog's button area. For example, you can use Row or Button components but you can also use any number of components that are based on Item component.
list<Item> content: A list of items in the dialog's content area. You can use any component that is based on Item. For example, you can use ListView, so that the user can select from a list of names. list<Item> content:
A list of items in the dialog's content area. You can use any component that is based on Item. For example, you can use ListView, so that the user can select from a list of names.
int status: Indicates the dialog's phase in its life cycle. The values are as follows: int status:
Indicates the dialog's phase in its life cycle. The values are as follows:
- DialogStatus.Opening - the dialog is opening - DialogStatus.Opening - the dialog is opening
- DialogStatus.Open - the dialog is open and visible to the user - DialogStatus.Open - the dialog is open and visible to the user
- DialogStatus.Closing - the dialog is closing - DialogStatus.Closing - the dialog is closing
- DialogStatus.Closed - the dialog is closed and not visible to the user - DialogStatus.Closed - the dialog is closed and not visible to the user
The dialog's initial status is DialogStatus.Closed. The dialog's initial status is DialogStatus.Closed.
list<Item> title: A list of items in the dialog's title area. You can use a Text component but also any number of components that are based on Item. For example, you can use Text and Image components. list<Item> title:
A list of items in the dialog's title area. You can use a Text component but also any number of components that are based on Item. For example, you can use Text and Image components.
Item visualParent: The item that is dimmed when the dialog opens. By default the root parent object is visualParent. Item visualParent:
The item that is dimmed when the dialog opens. By default the root parent object is visualParent.
Signals: Signals:
accepted(): This signal is emitted when the user accepts the dialog's request or the accept() method is called. accepted():
This signal is emitted when the user accepts the dialog's request or the accept() method is called.
See also rejected(). See also rejected().
clickedOutside(): This signal is emitted when the user taps in the area that is inside the dialog's visual parent area but outside the dialog's area. Normally the visual parent is the root object. In that case this signal is emitted if the user taps anywhere outside the dialog's area. clickedOutside(): This signal is emitted when the user taps in the area that is inside the dialog's visual parent area but outside the dialog's area. Normally the visual parent is the root object. In that case this signal is emitted if the user taps anywhere outside the dialog's area.
See also visualParent. See also visualParent.
rejected(): This signal is emitted when the user rejects the dialog's request or the reject() method is called. rejected():
This signal is emitted when the user rejects the dialog's request or the reject() method is called.
See also accepted(). See also accepted().
Methods: Methods:
void accept(): Accepts the dialog's request without any user interaction. The method emits the accepted() signal and closes the dialog. void accept():
Accepts the dialog's request without any user interaction. The method emits the accepted() signal and closes the dialog.
See also reject(). See also reject().
void close(): Closes the dialog without any user interaction. void close():
Closes the dialog without any user interaction.
void open(): Shows the dialog to the user. void open():
Shows the dialog to the user.
void reject(): Rejects the dialog's request without any user interaction. The method emits the rejected() signal and closes the dialog. void reject():
Rejects the dialog's request without any user interaction. The method emits the rejected() signal and closes the dialog.
See also accept(). See also accept().
**/ **/

View File

@ -17,6 +17,32 @@
* 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:
org.kde.plasma.core
QtQuick 1.0
Description:
An item delegate for the primitive ListView component. It's intended to make all listview look coherent
Properties:
* bool checked:
If true makes the list item look as checked or pressed. It has to be set from the code, it won't change by itself.
* bool sectionDelegate:
If true the item will be a delegate for a section, so will look like a "title" for the otems under it.
Signals:
* clicked():
This handler is called when there is a click.
* pressAndHold():
The user pressed the item with the mouse and didn't release it for a certain amount of time.
**/
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

View File

@ -29,12 +29,16 @@ Description:
A radio button component consists of a radio button and a line of text. Only one item in a list may be selected at a time. Once an item is selected, it can be deselected only by selecting another item. Initial item selection may be set at the list creation. If not set, the list is shown without a selection. A radio button component consists of a radio button and a line of text. Only one item in a list may be selected at a time. Once an item is selected, it can be deselected only by selecting another item. Initial item selection may be set at the list creation. If not set, the list is shown without a selection.
Properties: Properties:
bool checked: If the button is checked, its checked property is true; otherwise false. The property is false by default. 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. bool pressed:
If the button is pressed, its pressed property is true.
See also clicked. See also clicked.
string text: The text is shown beside the check box. By default text is an empty string. string text:
The text is shown beside the check box. By default text is an empty string.
Signals: Signals:
clicked(): clicked():
Emitted when the user clicked a mouse button over the checkbox (or tapped on the touch screen) Emitted when the user clicked a mouse button over the checkbox (or tapped on the touch screen)

View File

@ -44,14 +44,12 @@ Inherits:
Imports: Imports:
QtQuick 1.1 QtQuick 1.1
org.kde.plasma.core org.kde.plasma.core
SectionScroller.js
Description: Description:
It's similar to a ScrollBar or a ScrollDecorator. It's similar to a ScrollBar or a ScrollDecorator.
It's interactive and works on ListViews that have section.property set, It's interactive and works on ListViews that have section.property set,
so its contents are categorized. so its contents are categorized.
An indicator will say to what category the user scrolled to. An indicator will say to what category the user scrolled to.
Useful for things like address books or things sorted by date. Useful for things like address books or things sorted by date.
Don't use with models too big (thousands of items) because implies Don't use with models too big (thousands of items) because implies
loading all the items to memory, as well loses precision. loading all the items to memory, as well loses precision.

View File

@ -56,13 +56,14 @@ Description:
The user can choose one item from the list at a time. The user can choose one item from the list at a time.
Properties: Properties:
alias model: listView.model: QtObject: listView.model:
The model of selectionDialog. The model of selectionDialog.
It is just a simple model. Can be a simple model or a custom QAbstractItemModel
int selectedIndex: -1 int selectedIndex: -1
It returns the index that the user has selected. It returns the index that the user has selected.
The default value is -1. The default value is -1.
Component delegate: Component delegate:
This is a common delegate with which,you will choose This is a common delegate with which,you will choose
how your items will be displayed. how your items will be displayed.

View File

@ -36,11 +36,11 @@ Properties:
Returns true if the Button is checked, otherwise Returns true if the Button is checked, otherwise
it returns false. it returns false.
alias pressed: bool pressed:
Returns true if the Button is pressed, otherwise Returns true if the Button is pressed, otherwise
it returns false. it returns false.
alias text: string text:
Sets the text for the switch. Sets the text for the switch.
The default value is empty.No text The default value is empty.No text
will be displayed. will be displayed.

View File

@ -60,7 +60,7 @@ Properties:
This property represends the the content of This property represends the the content of
the TabBarLayout. the TabBarLayout.
property alias layout: tabBarLayout Item tabBarLayout:
This is an alias for the layout of the tabbar. This is an alias for the layout of the tabbar.
**/ **/

View File

@ -98,7 +98,6 @@ Properties:
* enumeration wrapMode: * enumeration wrapMode:
Set this property to wrap the text to the TextArea item's width. The text will only wrap if an explicit width has been set. Set this property to wrap the text to the TextArea item's width. The text will only wrap if an explicit width has been set.
* TextEdit.NoWrap - no wrapping will be performed. * TextEdit.NoWrap - no wrapping will be performed.
If the text contains insufficient newlines, then implicitWidth will exceed a set width. If the text contains insufficient newlines, then implicitWidth will exceed a set width.
* TextEdit.WordWrap - wrapping is done on word boundaries only. * TextEdit.WordWrap - wrapping is done on word boundaries only.

View File

@ -72,15 +72,13 @@ Properties:
* enumeration echoMode: * enumeration echoMode:
This property specifies how the text should be displayed in the TextField. This property specifies how the text should be displayed in the TextField.
The acceptable values are: The acceptable values are:
- TextInput.Normal - Displays the text as it is. (Default)
* TextInput.Normal - Displays the text as it is. (Default) - TextInput.Password - Displays asterixes instead of characters.
* TextInput.Password - Displays asterixes instead of characters. - TextInput.NoEcho - Displays nothing.
* TextInput.NoEcho - Displays nothing. - TextInput.PasswordEchoOnEdit - Displays all but the current character as asterixes.
* TextInput.PasswordEchoOnEdit - Displays all but the current character as asterixes.
The default value is TextInput.Normal The default value is TextInput.Normal
* inputMask: textInput.inputMask * string inputMask:
Allows you to set an input mask on the TextField, restricting the allowable text inputs. Allows you to set an input mask on the TextField, restricting the allowable text inputs.
See QLineEdit::inputMask for further details, as the exact same mask strings are used by TextInput. See QLineEdit::inputMask for further details, as the exact same mask strings are used by TextInput.
@ -93,7 +91,7 @@ Properties:
between 11 and 31 into the text input: between 11 and 31 into the text input:
<code> <code>
import QtQuick 1.0 import QtQuick 1.0
TextInput{ TextInput {
validator: IntValidator{bottom: 11; top: 31;} validator: IntValidator{bottom: 11; top: 31;}
focus: true focus: true
} }
@ -113,7 +111,6 @@ Properties:
validator as a final string (not as an intermediate string). validator as a final string (not as an intermediate string).
This property is read-only. This property is read-only.
Plasma properties:
* bool clearButtonShown: * bool clearButtonShown:
Holds if the button to clear the text from TextField is visible. Holds if the button to clear the text from TextField is visible.

View File

@ -21,6 +21,17 @@
// ToolBarLayout is a container for items on a toolbar that automatically // ToolBarLayout is a container for items on a toolbar that automatically
// implements an appropriate layout for its children. // implements an appropriate layout for its children.
/**Documented API
Inherits:
Row
Imports:
QtQuick 1.1
Description:
ToolBarLayout is a container for items on a toolbar that automatically implements an appropriate layout for its children.
**/
import QtQuick 1.1 import QtQuick 1.1
import "." 0.1 import "." 0.1