Commit 044ca68e authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: qml cleanup

parent d1e45079
import Qt 4.6 import Qt 4.6
import Bauhaus 1.0 import Bauhaus 1.0
GroupBox { QWidget {
maximumHeight: 240; layout: QVBoxLayout {
topMargin: 0
bottomMargin: 0
leftMargin: 0
rightMargin: 0
spacing: 0
finished: finishedNotify;
caption: "Image";
layout: VerticalLayout { GroupBox {
maximumHeight: 240;
FileWidget { finished: finishedNotify;
enabled: isBaseState || backendValues.id.value != ""; caption: "Image";
maximumWidth: 250;
text: "Source";
fileName: backendValues.source.value;
onFileNameChanged: {
backendValues.source.value = fileName;
}
}
layout: VerticalLayout {
IntEditor { FileWidget {
id: pixelSize; enabled: isBaseState || backendValues.id.value != "";
backendValue: backendValues.border_left; maximumWidth: 250;
caption: "Left" text: "Source";
baseStateFlag: isBaseState; fileName: backendValues.source.value;
onFileNameChanged: {
backendValues.source.value = fileName;
}
}
step: 1;
minimumValue: 0;
maximumValue: 2000;
}
IntEditor { IntEditor {
backendValue: backendValues.border_right; id: pixelSize;
caption: "Right" backendValue: backendValues.border_left;
baseStateFlag: isBaseState; caption: "Left"
baseStateFlag: isBaseState;
step: 1; step: 1;
minimumValue: 0; minimumValue: 0;
maximumValue: 2000; maximumValue: 2000;
} }
IntEditor { IntEditor {
backendValue: backendValues.border_top; backendValue: backendValues.border_right;
caption: "Top" caption: "Right"
baseStateFlag: isBaseState; baseStateFlag: isBaseState;
step: 1; step: 1;
minimumValue: 0; minimumValue: 0;
maximumValue: 2000; maximumValue: 2000;
} }
IntEditor { IntEditor {
backendValue: backendValues.border_bottom; backendValue: backendValues.border_top;
caption: "Bottom" caption: "Top"
baseStateFlag: isBaseState; baseStateFlag: isBaseState;
step: 1; step: 1;
minimumValue: 0; minimumValue: 0;
maximumValue: 2000; maximumValue: 2000;
}
IntEditor {
backendValue: backendValues.border_bottom;
caption: "Bottom"
baseStateFlag: isBaseState;
step: 1;
minimumValue: 0;
maximumValue: 2000;
}
}
} }
} }
} }
import Qt 4.6 import Qt 4.6
import Bauhaus 1.0 import Bauhaus 1.0
GroupBox { QWidget {
maximumHeight: 200; layout: QVBoxLayout {
topMargin: 0
bottomMargin: 0
leftMargin: 0
rightMargin: 0
spacing: 0
GroupBox {
finished: finishedNotify;
caption: "Grid";
id: gridSpecifics;
layout: QVBoxLayout { GroupBox {
maximumHeight: 200;
finished: finishedNotify;
caption: "Grid";
id: gridSpecifics;
layout: QVBoxLayout {
topMargin: 18; topMargin: 18;
bottomMargin: 2; bottomMargin: 2;
leftMargin: 8; leftMargin: 8;
rightMargin: 8; rightMargin: 8;
IntEditor { IntEditor {
id: spacing; id: spacing;
backendValue: backendValues.spacing; backendValue: backendValues.spacing;
caption: "Spacing" caption: "Spacing"
baseStateFlag: isBaseState; baseStateFlag: isBaseState;
step: 1; step: 1;
minimumValue: 0; minimumValue: 0;
maximumValue: 200; maximumValue: 200;
}
}
} }
}
} }
}
...@@ -100,9 +100,9 @@ QWidget { //This is a special doubleSpinBox that does color coding for states ...@@ -100,9 +100,9 @@ QWidget { //This is a special doubleSpinBox that does color coding for states
onFocusChanged: { onFocusChanged: {
if (focus) if (focus)
doubleSpinBox.backendValue.lock(); transaction.start();
else else
doubleSpinBox.backendValue.unlock(); transaction.end();
} }
} }
} }
......
import Qt 4.6 import Qt 4.6
import Bauhaus 1.0 import Bauhaus 1.0
GroupBox { QWidget {
finished: finishedNotify;
caption: "Flickable";
layout: QVBoxLayout { layout: QVBoxLayout {
topMargin: 15; topMargin: 0
bottomMargin: 6; bottomMargin: 0
leftMargin: 0; leftMargin: 0
rightMargin: 0; rightMargin: 0
spacing: 0
QWidget { GroupBox {
id: contentWidget;
maximumHeight: 220;
layout: QHBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 10;
rightMargin: 10;
QWidget {
layout: QVBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
QLabel {
minimumHeight: 20;
text: "Horizontal Velocity:"
font.bold: true;
}
QLabel {
minimumHeight: 20;
text: "Vertical Velocity:"
font.bold: true;
}
QLabel { GroupBox {
minimumHeight: 20; finished: finishedNotify;
text: "Maximum Flick Velocity:" caption: "Flickable";
font.bold: true;
}
QLabel { layout: QVBoxLayout {
minimumHeight: 20; topMargin: 15;
text: "Over Shoot:" bottomMargin: 6;
font.bold: true; leftMargin: 0;
} rightMargin: 0;
}
}
QWidget { QWidget {
layout: QVBoxLayout { id: contentWidget;
topMargin: 0; maximumHeight: 220;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
DoubleSpinBox {
id: horizontalVelocitySpinBox;
objectName: "horizontalVelocitySpinBox";
backendValue: backendValues.horizontalVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox { layout: QHBoxLayout {
id: verticalVelocitySpinBox; topMargin: 0;
objectName: "verticalVelocitySpinBox"; bottomMargin: 0;
backendValue: backendValues.verticalVelocity; leftMargin: 10;
minimumWidth: 30; rightMargin: 10;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox { QWidget {
id: maximumVelocitySpinBox; layout: QVBoxLayout {
objectName: "maximumVelocitySpinBox"; topMargin: 0;
backendValue: backendValues.maximumFlickVelocity; bottomMargin: 0;
minimumWidth: 30; leftMargin: 0;
minimum: 0.1 rightMargin: 0;
maximum: 10 QLabel {
singleStep: 0.1 minimumHeight: 20;
baseStateFlag: isBaseState; text: "Horizontal Velocity:"
} font.bold: true;
}
QLabel {
minimumHeight: 20;
text: "Vertical Velocity:"
font.bold: true;
}
QLabel {
minimumHeight: 20;
text: "Maximum Flick Velocity:"
font.bold: true;
}
QLabel {
minimumHeight: 20;
text: "Over Shoot:"
font.bold: true;
}
}
}
QWidget {
layout: QVBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
DoubleSpinBox {
id: horizontalVelocitySpinBox;
objectName: "horizontalVelocitySpinBox";
backendValue: backendValues.horizontalVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox {
id: verticalVelocitySpinBox;
objectName: "verticalVelocitySpinBox";
backendValue: backendValues.verticalVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
DoubleSpinBox {
id: maximumVelocitySpinBox;
objectName: "maximumVelocitySpinBox";
backendValue: backendValues.maximumFlickVelocity;
minimumWidth: 30;
minimum: 0.1
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
}
CheckBox { CheckBox {
id: overshootCheckBox; id: overshootCheckBox;
text: "overshoot"; text: "overshoot";
backendValue: backendValues.overShoot; backendValue: backendValues.overShoot;
baseStateFlag: isBaseState; baseStateFlag: isBaseState;
checkable: true; checkable: true;
}
}
}
} }
} }
} }
} }
} }
} }
}
import Qt 4.6 import Qt 4.6
import Bauhaus 1.0 import Bauhaus 1.0
GroupBox { QWidget {
maximumHeight: 200; layout: QVBoxLayout {
topMargin: 0
bottomMargin: 0
leftMargin: 0
rightMargin: 0
spacing: 0
GroupBox {
finished: finishedNotify;
} GroupBox {
maximumHeight: 200;
finished: finishedNotify;
}
}
}
import Qt 4.6 import Qt 4.6
import Bauhaus 1.0 import Bauhaus 1.0
QWidget {
layout: QVBoxLayout {
topMargin: 0
bottomMargin: 0
leftMargin: 0
rightMargin: 0
spacing: 0
GroupBox {
GroupBox { GroupBox {
maximumHeight: 200; maximumHeight: 200;
...@@ -47,3 +57,6 @@ GroupBox { ...@@ -47,3 +57,6 @@ GroupBox {
} }
} }
} }
}
}
import Qt 4.6 import Qt 4.6
import Bauhaus 1.0 import Bauhaus 1.0
GroupBox {
maximumHeight: 240;
finished: finishedNotify; import Qt 4.6
caption: "Image"; import Bauhaus 1.0
layout: VerticalLayout {
FileWidget { QWidget {
enabled: isBaseState || backendValues.id.value != ""; layout: QVBoxLayout {
text: "Source: "; topMargin: 0
fileName: backendValues.source.value; bottomMargin: 0
onFileNameChanged: { leftMargin: 0
backendValues.source.value = fileName; rightMargin: 0
} spacing: 0
} GroupBox {
maximumHeight: 240;
QWidget { finished: finishedNotify;
layout: HorizontalLayout { caption: "Image";
Label {
text: "Fill Mode" layout: VerticalLayout {
}
ComboBox { FileWidget {
baseStateFlag: isBaseState enabled: isBaseState || backendValues.id.value != "";
items : { ["Stretch", "PreserveAspectFit", "PreserveAspectCrop", "Tile", "TileVertically", "TileHorizontally"] } text: "Source: ";
currentText: backendValues.fillMode.value; fileName: backendValues.source.value;
onItemsChanged: { onFileNameChanged: {
currentText = backendValues.fillMode.value; backendValues.source.value = fileName;
} }
backendValue: backendValues.fillMode
} }
}
}
QWidget { QWidget {
layout: HorizontalLayout { layout: HorizontalLayout {
Label { Label {
text: "Antialiasing:" text: "Fill Mode"
}
ComboBox {
baseStateFlag: isBaseState
items : { ["Stretch", "PreserveAspectFit", "PreserveAspectCrop", "Tile", "TileVertically", "TileHorizontally"] }
currentText: backendValues.fillMode.value;
onItemsChanged: {
currentText = backendValues.fillMode.value;
}
backendValue: backendValues.fillMode
}
}
} }
CheckBox { QWidget {
text: "Smooth"; layout: HorizontalLayout {
backendValue: backendValues.smooth Label {