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
01589e48
Commit
01589e48
authored
Feb 16, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.propertyEditor: adding sanity checks to anchoringbackend
parent
46319d71
Changes
1
Show whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/components/propertyeditor/qmlanchorbindingproxy.cpp
View file @
01589e48
...
...
@@ -64,32 +64,32 @@ void QmlAnchorBindingProxy::setup(const QmlItemNode &fxItemNode)
bool
QmlAnchorBindingProxy
::
hasParent
()
{
return
m_fxItemNode
.
hasNodeParent
();
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
hasNodeParent
();
}
bool
QmlAnchorBindingProxy
::
topAnchored
()
{
return
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Top
);
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Top
);
}
bool
QmlAnchorBindingProxy
::
bottomAnchored
()
{
return
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Bottom
);
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Bottom
);
}
bool
QmlAnchorBindingProxy
::
leftAnchored
()
{
return
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Left
);
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Left
);
}
bool
QmlAnchorBindingProxy
::
rightAnchored
()
{
return
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Right
);
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
Right
);
}
bool
QmlAnchorBindingProxy
::
hasAnchors
()
{
return
m_fxItemNode
.
anchors
().
instanceHasAnchors
();
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
anchors
().
instanceHasAnchors
();
}
...
...
@@ -258,18 +258,21 @@ void QmlAnchorBindingProxy::setHorizontalCentered(bool centered)
bool
QmlAnchorBindingProxy
::
verticalCentered
()
{
return
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
VerticalCenter
);
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
VerticalCenter
);
}
bool
QmlAnchorBindingProxy
::
horizontalCentered
()
{
return
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
HorizontalCenter
);
return
m_fxItemNode
.
isValid
()
&&
m_fxItemNode
.
anchors
().
instanceHasAnchor
(
AnchorLine
::
HorizontalCenter
);
}
void
QmlAnchorBindingProxy
::
fill
()
{
m_fxItemNode
.
anchors
().
fill
();
setHorizontalCentered
(
false
);
setVerticalCentered
(
false
);
m_fxItemNode
.
anchors
().
setMargin
(
AnchorLine
::
Right
,
0
);
m_fxItemNode
.
anchors
().
setMargin
(
AnchorLine
::
Left
,
0
);
m_fxItemNode
.
anchors
().
setMargin
(
AnchorLine
::
Top
,
0
);
...
...
Write
Preview
Markdown
is supported
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