Commit 3985c8da authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: aligment controls:

parent 532952b5
import Qt 4.6
import Bauhaus 1.0
QGroupBox {
id: aligmentHorizontalButtons
layout: HorizontalLayout {
topMargin: 6
rightMargin: 10;
QWidget {
fixedHeight: 32
QPushButton {
id: leftButton
checkable: true
fixedWidth: 32
fixedHeight: 32
styleSheetFile: "alignmentleftbutton.css";
checked: backendValues.horizontalAlignment.value == "AlignLeft"
onClicked: {
backendValues.horizontalAlignment.value = "AlignLeft";
checked = true;
centerButton.checked = false;
rightButton.checked = false;
}
}
QPushButton {
id: centerButton
x: 32
checkable: true
fixedWidth: 32
fixedHeight: 32
styleSheetFile: "alignmentcenterhbutton.css";
checked: backendValues.horizontalAlignment.value == "AlignHCenter"
onClicked: {
backendValues.horizontalAlignment.value = "AlignHCenter";
checked = true;
leftButton.checked = false;
rightButton.checked = false;
}
}
QPushButton {
id: rightButton
x: 64
checkable: true
fixedWidth: 32
fixedHeight: 32
styleSheetFile: "alignmentrightbutton.css";
checked: backendValues.horizontalAlignment.value == "AlignRight"
onClicked: {
backendValues.horizontalAlignment.value = "AlignRight";
checked = true;
centerButton.checked = false;
leftButton.checked = false;
}
}
}
}
}
import Qt 4.6
import Bauhaus 1.0
QGroupBox {
id: alignmentVerticalButtons
layout: HorizontalLayout {
topMargin: 6
rightMargin: 10;
QWidget {
fixedHeight: 32
QPushButton {
id: topButton;
checkable: true
fixedWidth: 32
fixedHeight: 32
styleSheetFile: "alignmenttopbutton.css";
checked: backendValues.verticalAlignment.value == "AlignTop"
onClicked: {
backendValues.verticalAlignment.value = "AlignTop";
checked = true;
bottomButton.checked = false;
centerButton.checked = false;
}
}
QPushButton {
x: 32
id: centerButton;
checkable: true
fixedWidth: 32
fixedHeight: 32
styleSheetFile: "alignmentcentervbutton.css";
checked: backendValues.verticalAlignment.value == "AlignVCenter"
onClicked: {
backendValues.verticalAlignment.value = "AlignVCenter";
checked = true;
bottomButton.checked = false;
topButton.checked = false;
}
}
QPushButton {
x: 64
id: bottomButton;
checkable: true
fixedWidth: 32
fixedHeight: 32
styleSheetFile: "alignmentbottombutton.css";
checked: backendValues.verticalAlignment.value == "AlignBottom"
onClicked: {
backendValues.verticalAlignment.value = "AlignBottom";
checked = true;
centerButton.checked = false;
topButton.checked = false;
}
}
}
}
}
QPushButton {
border-image: url(:/qmldesigner/images/button_alignment_bottom_normal.png) 3;
border-width: 3;
}
QPushButton:pressed {
border-image: url(:/qmldesigner/images/button_alignment_bottom_pressed.png) 3;
}
QPushButton:checked {
border-image: url(:/qmldesigner/images/button_alignment_bottom_pressed.png) 3;
}
QPushButton {
border-image: url(:/qmldesigner/images/button_alignment_centerh_normal.png) 3;
border-width: 3;
}
QPushButton:pressed {
border-image: url(:/qmldesigner/images/button_alignment_centerh_pressed.png) 3;
}
QPushButton:checked {
border-image: url(:/qmldesigner/images/button_alignment_centerh_pressed.png) 3;
}
QPushButton {
border-image: url(:/qmldesigner/images/button_alignment_centerv_normal.png) 3;
border-width: 3;
}
QPushButton:pressed {
border-image: url(:/qmldesigner/images/button_alignment_centerv_pressed.png) 3;
}
QPushButton:checked {
border-image: url(:/qmldesigner/images/button_alignment_centerv_pressed.png) 3;
}
QPushButton {
border-image: url(:/qmldesigner/images/button_alignment_left_normal.png) 3;
border-width: 3;
}
QPushButton:pressed {
border-image: url(:/qmldesigner/images/button_alignment_left_pressed.png) 3;
}
QPushButton:checked {
border-image: url(:/qmldesigner/images/button_alignment_left_pressed.png) 3;
}
QPushButton {
border-image: url(:/qmldesigner/images/button_alignment_right_normal.png) 3;
border-width: 3;
}
QPushButton:pressed {
border-image: url(:/qmldesigner/images/button_alignment_right_pressed.png) 3;
}
QPushButton:checked {
border-image: url(:/qmldesigner/images/button_alignment_right_pressed.png) 3;
}
QPushButton {
border-image: url(:/qmldesigner/images/button_alignment_top_normal.png) 3;
border-width: 3;
}
QPushButton:pressed {
border-image: url(:/qmldesigner/images/button_alignment_top_pressed.png) 3;
}
QPushButton:checked {
border-image: url(:/qmldesigner/images/button_alignment_top_pressed.png) 3;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment