Skip to content
GitLab
Menu
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
0ebb52ca
Commit
0ebb52ca
authored
Feb 22, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.propertyEditor: tweaking SponBox.qml
parent
f2e2d920
Changes
1
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qmldesigner/propertyeditor/Qt/SpinBox.qml
View file @
0ebb52ca
...
...
@@ -25,6 +25,9 @@ QWidget { //This is a special spinBox that does color coding for states
Script
{
function
evaluate
()
{
print
(
"
evaluate
"
)
print
(
baseStateFlag
)
print
(
backendValue
.
isInModel
)
if
(
baseStateFlag
)
{
if
(
backendValue
!=
null
&&
backendValue
.
isInModel
)
box
.
setStyleSheet
(
"
color: white;
"
);
...
...
@@ -38,6 +41,18 @@ QWidget { //This is a special spinBox that does color coding for states
}
}
}
property
bool
isInModel
:
(
backendValue
===
undefined
||
backendValue
===
null
)
?
false
:
backendValue
.
isInModel
;
onIsInModelChanged
:
{
evaluate
();
}
property
bool
isInSubState
:
(
backendValue
===
undefined
||
backendValue
===
null
)
?
false
:
backendValue
.
isInSubState
;
onIsInSubStateChanged
:
{
evaluate
();
}
layout
:
HorizontalLayout
{
...
...
@@ -48,12 +63,13 @@ QWidget { //This is a special spinBox that does color coding for states
id
:
box
;
enabled
:
backendValue
===
undefined
||
backendValue
.
isBound
===
undefined
||
backendValue
.
isBound
===
null
?
false
:
!
backendValue
.
isBound
property
bool
readingFromBackend
:
false
;
property
int
valueFromBackend
:
(
spinBox
.
backendValue
===
undefined
||
spinBox
.
backendValue
==
null
)
property
int
valueFromBackend
:
(
spinBox
.
backendValue
===
undefined
||
spinBox
.
backendValue
==
null
||
spinBox
.
backendValue
.
value
===
undefined
)
?
.
0
:
spinBox
.
backendValue
.
value
;
onValueFromBackendChanged
:
{
readingFromBackend
=
true
;
value
=
valueFromBackend
if
(
!
(
valueFromBackend
===
undefined
))
value
=
valueFromBackend
;
readingFromBackend
=
false
;
evaluate
();
}
...
...
@@ -69,6 +85,10 @@ QWidget { //This is a special spinBox that does color coding for states
else
spinBox
.
backendValue
.
unlock
();
}
onEditingFinished
:
{
focus
=
false
;
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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