Commit 43215c83 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.propertyEditor: changing layout

parent b08ecda9
......@@ -10,6 +10,7 @@ QExtGroupBox {
property var startupCollapse: selectionChanged;
property var firstTime: true;
property var caption: ""
onFinishedChanged: {
oldMaximumHeight = maximumHeight;
......@@ -92,7 +93,7 @@ QExtGroupBox {
rightMargin: 10;
Label {
text: "Hex. Code"
text: colorGroupBox.caption
}
LineEdit {
......@@ -109,6 +110,8 @@ QExtGroupBox {
minimumWidth: 18;
onClicked: {
if (colorGroupBox.animated)
return;
if (checked) {
colorGroupBox.collapsed = false;
colorButtonWidget.visible = true;
......
......@@ -17,11 +17,9 @@ QScrollArea {
rightMargin: 0;
spacing: 0;
WidgetLoader {
id: specificsOne;
source: specificsUrl;
}
Visibility {}
Transformation {}
QScrollArea {
}
}
......
......@@ -44,16 +44,14 @@ PropertyFrame {
spacing: 0;
Type {
}
Geometry {
WidgetLoader {
id: specificsOne;
source: specificsUrl;
}
Modifiers {
}
QScrollArea {
}
......
......@@ -12,7 +12,7 @@ GroupBox {
property var targetLabelWidth: 90 - 20 - 26
layout: VerticalLayout {
QLabel {
Label {
text: "Anchors"
}
QWidget {
......
......@@ -16,6 +16,11 @@ QScrollArea {
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
spacing: 0
Geometry {
}
Layout {
id: layoutBox;
}
......
import Qt 4.6
import Bauhaus 1.0
PropertyFrame {
layout: QVBoxLayout {
topMargin: 0;
bottomMargin: 0;
leftMargin: 0;
rightMargin: 0;
spacing: 0;
Switches {
}
QScrollArea {
horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff";
id: standardPane;
content: properyEditorStandard;
QFrame {
minimumHeight: 400;
id: properyEditorStandard
layout: QVBoxLayout {
topMargin: 2;
bottomMargin: 2;
leftMargin: 2;
rightMargin: 2;
Type {
}
HorizontalLine {
}
Geometry {
}
Modifiers {
}
QScrollArea {
}
} // layout
} //QWidget
} //QScrollArea
QScrollArea {
horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff";
id: specialPane;
visible: false;
visible: false;
content: properyEditorSpecial;
QFrame {
minimumHeight: 200;
id: properyEditorSpecial
layout: QVBoxLayout {
topMargin: 2;
bottomMargin: 2;
leftMargin: 2;
rightMargin: 2;
Type {
}
QScrollArea {
}
}
}
}
ExtendedPane {
id: extendedPane;
}
LayoutPane {
id: layoutPane;
}
ResetPane {
id: resetPane;
}
}
}
......@@ -4,6 +4,6 @@ import Bauhaus 1.0
WidgetFrame {
id: propertyFrame;
minimumWidth: 340;
minimumWidth: 360;
styleSheetFile: "propertyEditor.css";
}
......@@ -6,25 +6,18 @@ GroupBox {
caption: "Colors"
layout: VerticalLayout {
ColorLabel {
text: " Color"
}
layout: VerticalLayout {
ColorGroupBox {
caption: "Color"
finished: finishedNotify
backendColor: backendValues.color
}
ColorLabel {
text: " Border Color"
}
}
ColorGroupBox {
caption: "Border Color"
finished: finishedNotify
backendColor: backendValues.border_color
......
import Qt 4.6
import Bauhaus 1.0
GroupBox {
id: standardTextColorGroupBox
property bool showStyleColor: false
property bool showSelectionColor: false
property bool showSelectedTextColor: false
caption: "Color"
layout: VerticalLayout {
ColorGroupBox {
caption: "Text"
finished: finishedNotify
backendColor: backendValues.color
}
ColorGroupBox {
caption: "Style"
visible: showStyleColor
finished: finishedNotify
backendColor: backendValues.styleColor
}
ColorGroupBox {
caption: "Selection"
visible: showSelectionColor
finished: finishedNotify
backendColor: backendValues.selectionColor
}
ColorGroupBox {
visible: showSelectedTextColor
caption: "Selected Text"
finished: finishedNotify
backendColor: backendValues.selectedTextColor
}
}
}
......@@ -6,7 +6,6 @@ GroupBox {
caption: "Text";
property bool showStyleColor: false
property bool showIsWrapping: false
property bool showVerticalAlignment: false
......@@ -48,30 +47,6 @@ GroupBox {
AlignmentHorizontalButtons {}
AlignmentVerticalButtons { visible: showVerticalAlignment }
}
}
ColorLabel {
text: " Color"
}
ColorGroupBox {
finished: finishedNotify
backendColor: backendValues.color
}
ColorLabel {
visible: showStyleColor
text: " Style Color"
}
ColorGroupBox {
visible: showStyleColor
finished: finishedNotify
backendColor: backendValues.styleColor || null
}
}
}
}
......@@ -20,7 +20,7 @@ QFrame {
id: standardMode;
toolTip: "general item properties";
//iconFromFile: "images/rect-icon.png";
text: "Common"
text: backendValues.className.value
onClicked: {
extendedMode.checked = false;
layoutMode.checked = false;
......@@ -30,35 +30,38 @@ QFrame {
layoutPane.visible = false;
}
}
QPushButton {
id: extendedMode;
toolTip: "extended properties";
QPushButton {
id: layoutMode;
checkable: true;
checked: false;
text: "Advanced"
toolTip: "layout properties";
text: "Geometry";
onClicked: {
extendedMode.checked = false;
standardMode.checked = false;
layoutMode.checked = false;
checked = true;
standardPane.visible = false;
extendedPane.visible = true;
layoutPane.visible = false;
extendedPane.visible = false;
layoutPane.visible = true;
}
}
QPushButton {
id: layoutMode;
id: extendedMode;
toolTip: "extended properties";
checkable: true;
checked: false;
toolTip: "layout properties";
text: "Anchor";
text: "Advanced"
onClicked: {
extendedMode.checked = false;
standardMode.checked = false;
layoutMode.checked = false;
checked = true;
standardPane.visible = false;
extendedPane.visible = false;
layoutPane.visible = true;
extendedPane.visible = true;
layoutPane.visible = false;
}
}
}
}
......@@ -15,6 +15,12 @@ QWidget {
finished: finishedNotify;
}
StandardTextColorGroupBox {
finished: finishedNotify;
showSelectionColor: true;
showSelectedTextColor: true;
}
GroupBox {
caption: "Text Edit"
finished: finishedNotify;
......
......@@ -6,29 +6,7 @@ GroupBox {
id: textInputGroupBox
caption: "Text Input";
layout: VerticalLayout {
ColorLabel {
text: " Selection Color"
}
ColorGroupBox {
finished: finishedNotify
backendColor: backendValues.selectionColor
}
ColorLabel {
text: " Selected Text Color"
}
ColorGroupBox {
finished: finishedNotify
backendColor: backendValues.selectedTextColor
}
layout: VerticalLayout {
QWidget {
layout: HorizontalLayout {
......
......@@ -13,7 +13,12 @@ QWidget {
StandardTextGroupBox {
finished: finishedNotify;
}
StandardTextColorGroupBox {
finished: finishedNotify;
showSelectionColor: true;
showSelectedTextColor: true;
}
FontGroupBox {
......
......@@ -11,8 +11,13 @@ QWidget {
rightMargin: 0
spacing: 0
StandardTextGroupBox {
StandardTextColorGroupBox {
showStyleColor: true
finished: finishedNotify;
}
StandardTextGroupBox {
showIsWrapping: true
showVerticalAlignment: true
finished: finishedNotify;
......
import Qt 4.6
import Bauhaus 1.0
GroupBox {
finished: finishedNotify;
caption: "Transformation"
maximumHeight: 200;
id: transformation;
layout: VerticalLayout {
QWidget {
layout: HorizontalLayout {
Label {
text: "Origin";
}
ComboBox {
minimumWidth: 20
baseStateFlag: isBaseState
backendValue: backendValues.transformOrigin
items : { [
"TopLeft", "Top", "TopRight", "Left", "Center", "Right", "BottomLeft", "Bottom",
"BottomRight"
] }
currentText: backendValues.transformOrigin.value;
onItemsChanged: {
currentText = backendValues.transformOrigin.value;
}
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: "Scale"
}
DoubleSpinBox {
text: ""
id: scaleSpinBox;
backendValue: backendValues.scale;
property var backendValueValue: backendValues.scale.value;
minimumWidth: 60;
minimum: 0.01
maximum: 10
singleStep: 0.1
baseStateFlag: isBaseState;
onBackendValueValueChanged: {
scaleSlider.value = backendValue.value * 10;
}
}
SliderWidget {
id: scaleSlider;
backendValue: backendValues.scale;
minimum: 1;
maximum: 100;
singleStep: 1;
onValueChanged: {
backendValues.scale.value = value / 10;
}
}
}
}
IntEditor {
backendValue: backendValues.rotation
caption: "Rotation"
baseStateFlag: isBaseState;
step: 10;
minimumValue: 0;
maximumValue: 360;
}
IntEditor {
backendValue: backendValues.z == undefined ? 0 : backendValues.z
caption: "z"
baseStateFlag: isBaseState;
step: 1;
minimumValue: -100;
maximumValue: 100;
}
}
}
import Qt 4.6
import Bauhaus 1.0
GroupBox {
finished: finishedNotify;
caption: "Visiblity"
maximumHeight: 200;
id: visibility;
layout: VerticalLayout {
QWidget {
layout: HorizontalLayout {
Label {
text: "Visibility"
}
CheckBox {
id: visibleCheckBox;
text: "Is visible";
backendValue: backendValues.visible === undefined ? false : backendValues.visible;
baseStateFlag: isBaseState;
checkable: true;
}
CheckBox {
id: clipCheckBox;
text: "Clip Content";
backendValue: backendValues.clip === undefined ? false : backendValues.clip;
baseStateFlag: isBaseState;
checkable: true;
}
}
}
QWidget {
layout: HorizontalLayout {
Label {
text: "Opacity"
}
DoubleSpinBox {
text: ""
id: opacitySpinBox;
backendValue: backendValues.opacity === undefined ? null : backendValues.opacity
property var backendValueValue: backendValues.opacity.value;
minimumWidth: 60;
minimum: 0;
maximum: 1;
singleStep: 0.1
baseStateFlag: isBaseState;
onBackendValueValueChanged: {
opacitySlider.value = backendValue.value * 100;
}
}
SliderWidget {
id: opacitySlider
minimum: 0
maximum: 100
singleStep: 5;
backendValue: backendValues.opacity === undefined ? null : backendValues.opacity
onValueChanged: {
if (backendValues.opacity !== undefined)
backendValues.opacity.value = value / 100;
}
}
}
}
}
}