Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
9e94ca06
Commit
9e94ca06
authored
Feb 04, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.propertyEditor: activate new color editing
parent
a215012c
Changes
5
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qmldesigner/propertyeditor/Qt/Extended.qml
View file @
9e94ca06
...
...
@@ -2,194 +2,194 @@ import Qt 4.6
import
Bauhaus
1.0
GroupBox
{
caption
:
"
Effect
"
id
:
Extended
;
maximumHeight
:
260
;
layout
:
VerticalLayout
{
property
var
effect
:
backendValues
.
effect
property
var
complexNode
:
effect
.
complexNode
QWidget
{
maximumHeight
:
40
;
layout
:
HorizontalLayout
{
Label
{
text
:
"
Effect
"
;
}
QComboBox
{
enabled
:
isBaseState
;
property
var
type
:
backendValues
.
effect
.
complexNode
.
type
property
var
dirty
;
id
:
effectComboBox
;
items
:
{
[
"
None
"
,
"
Blur
"
,
"
Opacity
"
,
"
Colorize
"
,
"
DropShadow
"
]
}
onCurrentTextChanged
:
{
if
(
dirty
)
//avoid recursion;
return
;
if
(
backendValues
.
effect
.
complexNode
.
exists
)
backendValues
.
effect
.
complexNode
.
remove
();
if
(
currentText
==
"
None
"
)
{
;
}
else
if
(
backendValues
.
effect
.
complexNode
!=
null
)
{
backendValues
.
effect
.
complexNode
.
add
(
"
Qt/
"
+
currentText
);
}
}
onTypeChanged
:
{
dirty
=
true
;
if
(
backendValues
.
effect
.
complexNode
.
exists
)
currentText
=
backendValues
.
effect
.
complexNode
.
type
;
else
currentText
=
"
None
"
;
dirty
=
false
;
}
}
QWidget
{
caption
:
"
Effect
"
id
:
Extended
;
maximumHeight
:
260
;
layout
:
VerticalLayout
{
property
var
effect
:
backendValues
.
effect
property
var
complexNode
:
effect
.
complexNode
QWidget
{
maximumHeight
:
40
;
layout
:
HorizontalLayout
{
Label
{
text
:
"
Effect
"
;
}
QComboBox
{
enabled
:
isBaseState
;
property
var
type
:
backendValues
.
effect
.
complexNode
.
type
property
var
dirty
;
id
:
effectComboBox
;
items
:
{
[
"
None
"
,
"
Blur
"
,
"
Opacity
"
,
"
Colorize
"
,
"
DropShadow
"
]
}
onCurrentTextChanged
:
{
if
(
dirty
)
//avoid recursion;
return
;
if
(
backendValues
.
effect
.
complexNode
.
exists
)
backendValues
.
effect
.
complexNode
.
remove
();
if
(
currentText
==
"
None
"
)
{
;
}
else
if
(
backendValues
.
effect
.
complexNode
!=
null
)
{
backendValues
.
effect
.
complexNode
.
add
(
"
Qt/
"
+
currentText
);
}
}
onTypeChanged
:
{
dirty
=
true
;
if
(
backendValues
.
effect
.
complexNode
.
exists
)
currentText
=
backendValues
.
effect
.
complexNode
.
type
;
else
currentText
=
"
None
"
;
dirty
=
false
;
}
}
QWidget
{
fixedWidth
:
100
}
}
}
// QWidget
property
var
properties
:
complexNode
==
null
?
null
:
complexNode
.
properties
QWidget
{
minimumHeight
:
20
;
layout
:
QVBoxLayout
{
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Blur
"
;
layout
:
QVBoxLayout
{
topMargin
:
12
;
IntEditor
{
id
:
blurRadius
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
blurRadius
:
null
;
caption
:
"
Blur Radius:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
}
}
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Opacity
"
;
layout
:
QVBoxLayout
{
DoubleSpinBox
{
id
:
OpcacityEffectSpinBox
;
objectName
:
"
OpcacityEffectSpinBox
"
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
opacity
:
null
;
minimum
:
0
;
maximum
:
1
;
singleStep
:
0.1
;
baseStateFlag
:
isBaseState
;
}
}
}
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Colorize
"
;
layout
:
QVBoxLayout
{
property
var
colorProp
:
properties
==
null
?
null
:
properties
.
color
ColorWidget
{
id
:
ColorizeColor
;
text
:
"
Color:
"
;
minimumHeight
:
20
;
minimumWidth
:
20
;
color
:
(
colorProp
==
null
)
?
"
black
"
:
colorProp
.
value
;
onColorChanged
:
{
colorProp
.
value
=
strColor
;
}
// QWidget
property
var
properties
:
complexNode
==
null
?
null
:
complexNode
.
properties
QWidget
{
minimumHeight
:
20
;
layout
:
QVBoxLayout
{
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Blur
"
;
layout
:
QVBoxLayout
{
topMargin
:
12
;
IntEditor
{
id
:
blurRadius
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
blurRadius
:
null
;
caption
:
"
Blur Radius:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
}
}
}
}
}
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Pixelize
"
;
layout
:
QVBoxLayout
{
topMargin
:
12
;
IntEditor
{
id
:
pixelSize
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
pixelSize
:
null
;
caption
:
"
Pixel Size:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
}
}
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
DropShadow
"
;
layout
:
QVBoxLayout
{
topMargin
:
12
;
IntEditor
{
id
:
blurRadiusShadow
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
blurRadius
:
null
;
caption
:
"
Blur Radius:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Opacity
"
;
layout
:
QVBoxLayout
{
DoubleSpinBox
{
id
:
OpcacityEffectSpinBox
;
objectName
:
"
OpcacityEffectSpinBox
"
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
opacity
:
null
;
minimum
:
0
;
maximum
:
1
;
singleStep
:
0.1
;
baseStateFlag
:
isBaseState
;
}
}
}
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Colorize
"
;
layout
:
QVBoxLayout
{
property
var
colorProp
:
properties
==
null
?
null
:
properties
.
color
ColorLabel
{
text
:
"
Color
"
}
ColorGroupBox
{
finished
:
finishedNotify
ColorWidget
{
id
:
DropShadowColor
;
maximumHeight
:
40
;
text
:
"
Color:
"
;
minimumHeight
:
20
;
minimumWidth
:
20
;
color
:
properties
==
null
||
properties
.
color
==
null
?
"
black
"
:
properties
.
color
.
value
onColorChanged
:
{
if
(
properties
!=
null
&&
properties
.
color
!=
null
)
properties
.
color
.
value
=
strColor
;
backendColor
:
properties
.
color
}
}
}
}
IntEditor
{
id
:
xOffset
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
xOffset
:
null
;
caption
:
"
x Offset:
"
baseStateFlag
:
isBaseState
;
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
Pixelize
"
;
layout
:
QVBoxLayout
{
topMargin
:
12
;
IntEditor
{
id
:
pixelSize
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
pixelSize
:
null
;
caption
:
"
Pixel Size:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
}
}
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
QWidget
{
visible
:
effectComboBox
.
currentText
==
"
DropShadow
"
;
layout
:
QVBoxLayout
{
topMargin
:
12
;
IntEditor
{
id
:
blurRadiusShadow
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
blurRadius
:
null
;
caption
:
"
Blur Radius:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
ColorLabel
{
text
:
"
Color
"
}
IntEditor
{
id
:
yOffset
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
yOffset
:
null
;
caption
:
"
y Offset:
"
baseStateFlag
:
isBaseState
;
ColorGroupBox
{
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
finished
:
finishedNotify
backendColor
:
properties
.
color
}
IntEditor
{
id
:
xOffset
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
xOffset
:
null
;
caption
:
"
x Offset:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
IntEditor
{
id
:
yOffset
;
backendValue
:
backendValues
.
effect
.
complexNode
.
exists
?
backendValues
.
effect
.
complexNode
.
properties
.
yOffset
:
null
;
caption
:
"
y Offset:
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
20
;
}
}
}
}
}
}
}
}
}
//QVBoxLayout
}
}
//QVBoxLayout
}
//GroupBox
share/qtcreator/qmldesigner/propertyeditor/Qt/FontGroupBox.qml
View file @
9e94ca06
...
...
@@ -15,7 +15,7 @@ GroupBox {
QWidget
{
id
:
parentWidget
minimumWidth
:
180
minimumHeight
:
2
4
minimumHeight
:
2
6
QFontComboBox
{
width
:
parentWidget
.
width
height
:
parentWidget
.
height
...
...
share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleSpecifics.qml
View file @
9e94ca06
import
Qt
4.6
import
Bauhaus
1.0
GroupBox
{
finished
:
finishedNotify
;
caption
:
"
Rect
"
maximumHeight
:
340
;
layout
:
VerticalLayout
{
IntEditor
{
backendValue
:
backendValues
.
radius
caption
:
"
Radius
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
100
;
}
IntEditor
{
id
:
borderWidth
;
backendValue
:
backendValues
.
border_width
===
undefined
?
0
:
backendValues
.
border_width
caption
:
"
Pen Width
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
100
;
}
ColorWidget
{
text
:
"
Color
"
;
color
:
backendValues
.
color
===
undefined
?
null
:
backendValues
.
color
.
value
;
onColorChanged
:
{
backendValues
.
color
.
value
=
strColor
;
}
//modelNode: backendValues.color.modelNode;
complexGradientNode
:
backendValues
.
color
===
undefined
?
null
:
backendValues
.
color
.
complexNode
//showGradientButton: true;
}
ColorWidget
{
text
:
"
Tint color
"
;
color
:
backendValues
.
tintColor
===
undefined
?
"
black
"
:
backendValues
.
tintColor
.
value
onColorChanged
:
{
backendValues
.
color
.
value
=
strColor
;
QWidget
{
layout
:
QVBoxLayout
{
topMargin
:
0
bottomMargin
:
0
leftMargin
:
0
rightMargin
:
0
spacing
:
0
RectangleColorGroupBox
{
}
GroupBox
{
finished
:
finishedNotify
;
caption
:
"
Rectangle
"
layout
:
VerticalLayout
{
IntEditor
{
backendValue
:
backendValues
.
radius
caption
:
"
Radius
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
100
;
}
IntEditor
{
id
:
borderWidth
;
backendValue
:
backendValues
.
border_width
===
undefined
?
0
:
backendValues
.
border_width
caption
:
"
Pen Width
"
baseStateFlag
:
isBaseState
;
step
:
1
;
minimumValue
:
0
;
maximumValue
:
100
;
}
}
}
ColorWidget
{
id
:
PenColor
;
text
:
"
Pen Color
"
;
minimumHeight
:
20
;
minimumWidth
:
20
;
color
:
backendValues
.
border_color
.
value
;
onColorChanged
:
{
backendValues
.
border_color
.
value
=
strColor
;
}
}
QScrollArea
{
}
}
}
share/qtcreator/qmldesigner/propertyeditor/Qt/StandardTextGroupBox.qml
View file @
9e94ca06
...
...
@@ -67,21 +67,29 @@ GroupBox {
}
}
}
ColorWidget
{
text
:
"
Color:
"
;
color
:
backendValues
.
color
.
value
;
onColorChanged
:
{
backendValues
.
color
.
value
=
strColor
;
}
ColorLabel
{
text
:
"
Color
"
}
ColorWidget
{
visible
:
showStyleColor
text
:
"
Style color:
"
;
color
:
(
backendValues
.
styleColor
===
undefined
||
backendValues
.
styleColor
===
null
)
?
"
#000000
"
:
backendValues
.
styleColor
.
value
;
onColorChanged
:
{
backendValues
.
styleColor
.
value
=
strColor
;
}
ColorGroupBox
{
finished
:
finishedNotify
backendColor
:
backendValues
.
color
}
ColorLabel
{
visible
:
showStyleColor
text
:
"
Style Color
"
}
ColorGroupBox
{
visible
:
showStyleColor
finished
:
finishedNotify
backendColor
:
backendValues
.
styleColor
||
null
}
}
}
share/qtcreator/qmldesigner/propertyeditor/Qt/TextInputGroupBox.qml
View file @
9e94ca06
...
...
@@ -7,24 +7,28 @@ GroupBox {
caption
:
"
Text Input
"
;
layout
:
VerticalLayout
{
ColorWidget
{
text
:
"
Selection Color:
"
;
color
:
backendValues
.
selectionColor
.
value
;
onColorChanged
:
{
backendValues
.
selectionColor
.
value
=
strColor
;
}
ColorLabel
{
text
:
"
Selection Color
"
}
ColorWidget
{
text
:
"
Selected Text Color:
"
;
color
:
backendValues
.
selectedTextColor
.
value
;
onColorChanged
:
{
backendValues
.
selectedTextColor
.
value
=
strColor
;
}
ColorGroupBox
{
finished
:
finishedNotify
backendColor
:
backendValues
.
selectionColor
}
ColorLabel
{
text
:
"
Selected Text Color
"
}
ColorGroupBox
{
finished
:
finishedNotify
backendColor
:
backendValues
.
selectedTextColor
}
QWidget
{
layout
:
HorizontalLayout
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment