Doxygenize Sheet
This commit is contained in:
parent
bd9ec5fa67
commit
ade2f1cfc0
@ -40,101 +40,92 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/**Documented API
|
||||
Inherits:
|
||||
Item
|
||||
|
||||
Imports:
|
||||
QtQuick 1.0
|
||||
org.kde.plasma.core
|
||||
|
||||
Description:
|
||||
Provides a top-level window for short-term tasks and brief interaction with the user.
|
||||
Is intended to be for interaction more complex and bigger in size then Dialog. On the desktop its looks is almost identical to Dialog, on touch interfaces is an almost fullscreen sliding Sheet. It is provided mostly for compatibility with mobile implementations
|
||||
|
||||
Properties:
|
||||
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:
|
||||
- DialogStatus.Opening - the dialog is opening
|
||||
- DialogStatus.Open - the dialog is open and visible to the user
|
||||
- DialogStatus.Closing - the dialog is closing
|
||||
- DialogStatus.Closed - the dialog is closed and not visible to the user
|
||||
The dialog's initial status is DialogStatus.Closed.
|
||||
|
||||
string title:
|
||||
The title text of this Sheet.
|
||||
|
||||
Item acceptButton:
|
||||
button that when pressed will close the dialog, representing the user accepting it, accepted() will be called
|
||||
|
||||
Item rejectButton:
|
||||
button that when pressed will close the dialog, representing the user rejecting it, rejected() will be called
|
||||
|
||||
string acceptButtonText:
|
||||
Text of the accept button
|
||||
|
||||
string rejectButtonText:
|
||||
Text of the reject button
|
||||
|
||||
Item visualParent:
|
||||
The item that is dimmed when the dialog opens. By default the root parent object is visualParent.
|
||||
|
||||
Signals:
|
||||
accepted():
|
||||
This signal is emitted when the user accepts the dialog's request or the accept() method is called.
|
||||
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.
|
||||
See also visualParent.
|
||||
|
||||
rejected():
|
||||
This signal is emitted when the user rejects the dialog's request or the reject() method is called.
|
||||
See also accepted().
|
||||
|
||||
Methods:
|
||||
void accept():
|
||||
Accepts the dialog's request without any user interaction. The method emits the accepted() signal and closes the dialog.
|
||||
See also reject().
|
||||
|
||||
void close():
|
||||
Closes the dialog without any user interaction.
|
||||
|
||||
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.
|
||||
See also accept().
|
||||
**/
|
||||
|
||||
import QtQuick 1.0
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import "private/AppManager.js" as Utils
|
||||
import "." 0.1
|
||||
|
||||
/**
|
||||
* Provides a top-level window for short-term tasks and brief interaction with
|
||||
* the user.
|
||||
*
|
||||
* It is intended to be used for interaction more complex and bigger in size
|
||||
* than Dialog. On the desktop its looks is almost identical to Dialog, on
|
||||
* touch interfaces it is an almost fullscreen sliding Sheet. It is provided
|
||||
* mostly for compatibility with mobile implementations.
|
||||
*/
|
||||
Item {
|
||||
id: root
|
||||
|
||||
/**
|
||||
* type:string
|
||||
* The title text of this Sheet.
|
||||
*/
|
||||
property alias title: titleLabel.text
|
||||
|
||||
/**
|
||||
* type:list<Item>
|
||||
* 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.
|
||||
*/
|
||||
property alias content: contentItem.children
|
||||
// property alias visualParent: dialog.visualParent
|
||||
|
||||
/**
|
||||
* Indicates the dialog's phase in its life cycle. The values are as follows:
|
||||
*
|
||||
* - DialogStatus.Opening - the dialog is opening
|
||||
* - DialogStatus.Open - the dialog is open and visible to the user
|
||||
* - DialogStatus.Closing - the dialog is closing
|
||||
* - DialogStatus.Closed - the dialog is closed and not visible to the user
|
||||
*
|
||||
* The dialog's initial status is DialogStatus.Closed.
|
||||
*/
|
||||
property int status: DialogStatus.Closed
|
||||
property alias acceptButtonText: acceptButton.text
|
||||
property alias rejectButtonText: rejectButton.text
|
||||
/**
|
||||
* type:Button
|
||||
* button that when pressed will close the dialog, representing the user
|
||||
* accepting it, accepted() will be called
|
||||
*/
|
||||
property alias acceptButton: acceptButton
|
||||
property alias rejectButton: rejectButton
|
||||
|
||||
/**
|
||||
* type:Button
|
||||
* button that when pressed will close the dialog, representing the user rejecting it, rejected() will be called
|
||||
*/
|
||||
property alias rejectButton: rejectButton
|
||||
|
||||
property alias privateTitleHeight: titleBar.height
|
||||
property alias privateButtonsHeight: buttonsRow.height
|
||||
|
||||
/**
|
||||
* Emitted when the user accepts the dialog's request or the accept()
|
||||
* method is called.
|
||||
*/
|
||||
signal accepted
|
||||
|
||||
/**
|
||||
* Emitted when the user rejects the dialog's request or the reject()
|
||||
* method is called.
|
||||
*
|
||||
* @see accepted()
|
||||
*/
|
||||
signal rejected
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
signal clickedOutside
|
||||
|
||||
/**
|
||||
* Shows the dialog to the user.
|
||||
*/
|
||||
function open()
|
||||
{
|
||||
var pos = dialog.popupPosition(null, Qt.AlignCenter)
|
||||
@ -145,6 +136,12 @@ Item {
|
||||
dialog.activateWindow()
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts the dialog's request without any user interaction. The method
|
||||
* emits the accepted() signal and closes the dialog.
|
||||
*
|
||||
* @see reject()
|
||||
*/
|
||||
function accept()
|
||||
{
|
||||
if (status == DialogStatus.Open) {
|
||||
@ -153,6 +150,12 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rejects the dialog's request without any user interaction. The method
|
||||
* emits the rejected() signal and closes the dialog.
|
||||
*
|
||||
* @see accept()
|
||||
*/
|
||||
function reject() {
|
||||
if (status == DialogStatus.Open) {
|
||||
dialog.visible = false
|
||||
@ -160,6 +163,9 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the dialog without any user interaction.
|
||||
*/
|
||||
function close() {
|
||||
dialog.visible = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user