From c8144504e4adaf224aab0817ae0659e63eec1d5e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 22 Dec 2011 19:32:37 +0100 Subject: [PATCH] n for CommonDialog --- .../plasmacomponents/qml/CommonDialog.qml | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/CommonDialog.qml b/declarativeimports/plasmacomponents/qml/CommonDialog.qml index 575dc2b92..b48048198 100644 --- a/declarativeimports/plasmacomponents/qml/CommonDialog.qml +++ b/declarativeimports/plasmacomponents/qml/CommonDialog.qml @@ -45,13 +45,36 @@ import org.kde.plasma.core 0.1 as PlasmaCore import "private" as Private import "." 0.1 + +/**Documented API +Inherits: + Dialog + +Imports: + QtQuick 1.0 + org.kde.plasma.core + +Description: + CommonDialog is a convenience component that provides a dialog with the platform-style title area. You only have to define titleText. CommonDialog handles its layout automatically. + Note: This component is experimental, so it may be changed or removed in future releases. + +Properties: + string titleText: the title of the dialog. + string titleIcon: the name or path of the dialog title icon + Array variant buttonTexts: the texts of all the buttons + +Signals: + buttonClicked(int index): + Emitted when the user clicks on a button + @arg int index: the index of the clicked button: buttonTexts[index] will hold the text of the clicked button. + +**/ Dialog { id: root property alias titleText: titleAreaText.text property string titleIcon property variant buttonTexts: [] - property bool privateCloseIcon: false signal buttonClicked(int index) @@ -105,7 +128,6 @@ Dialog { //FIXME: +5 because of Plasma::Dialog margins height: titleAreaText.paintedHeight + margins.top + margins.bottom - LayoutMirroring.enabled: privateCloseIcon ? false : undefined LayoutMirroring.childrenInherit: true Column {