12 import "private/AppManager.js" as Utils
13 import "." 2.0 as PlasmaComponents
33 property alias title: titleLabel.text
41 property alias content: contentItem.children
54 property int status: PlasmaComponents.DialogStatus.Closed
55 property alias acceptButtonText: acceptButton.text
56 property alias rejectButtonText: rejectButton.text
62 property alias acceptButton: acceptButton
68 property alias rejectButton: rejectButton
70 property alias privateTitleHeight: titleBar.height
71 property alias privateButtonsHeight: buttonsRow.height
100 dialog.visible =
true 101 dialog.requestActivate()
112 if (status == DialogStatus.Open) {
113 dialog.visible =
false 125 if (status == DialogStatus.Open) {
126 dialog.visible =
false 135 dialog.visible =
false 143 location: PlasmaCore.Types.BottomEdge
147 property Item rootItem
153 status = PlasmaComponents.DialogStatus.Open
155 status = PlasmaComponents.DialogStatus.Closed
161 width: PlasmaCore.Theme.mSize(PlasmaCore.Theme.defaultFont).width * 40
162 height: Math.max(titleBar.childrenRect.height + contentItem.childrenRect.height + buttonsRow.childrenRect.height + 8, PlasmaCore.Theme.mSize(PlasmaCore.Theme.defaultFont).height * 25)
165 Keys.onPressed: event.accepted =
true 166 Keys.onReleased: event.accepted =
true 168 PlasmaCore.FrameSvgItem {
170 imagePath:
"widgets/extender-dragger" 172 anchors.left: parent.left
173 anchors.right: parent.right
175 height: titleLabel.paintedHeight + margins.top + margins.bottom
178 id: titleLayoutHelper
184 bottom: parent.bottom
185 leftMargin: parent.margins.
left 186 rightMargin: parent.margins.
right 187 topMargin: parent.margins.top
188 bottomMargin: parent.margins.bottom
191 PlasmaComponents.Label {
193 elide: Text.ElideRight
194 height: paintedHeight
195 font.pointSize: PlasmaCore.Theme.defaultFont.pointSize * 1.1
196 font.weight: Font.Bold
198 styleColor:
Qt.rgba(1,1,1,0.8)
203 horizontalAlignment: Text.AlignHCenter
204 verticalAlignment: Text.AlignVCenter
212 onChildrenRectChanged: mainItem.width = Math.max(childrenRect.width, buttonsRow.childrenRect.width)
219 bottom: buttonsRow.top
228 bottom: parent.bottom
229 horizontalCenter: parent.horizontalCenter
231 bottomMargin: PlasmaCore.Theme.mSize(PlasmaCore.Theme.defaultFont).height*0.6
234 PlasmaComponents.Button {
239 PlasmaComponents.Button {
246 Component.onCompleted: {
247 rootItem = Utils.rootObject(
this)
QTextStream & left(QTextStream &s)
QTextStream & right(QTextStream &s)