aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@digia.com>2014-04-23 17:20:16 +0200
committerMarco Bubke <marco.bubke@digia.com>2014-04-24 16:22:39 +0200
commit5ddf4f7c7f03f106a9d10b69da31d9c776f7d22c (patch)
tree084f741c0f2084e7b9f97d80d730f5ea7aa4707b /src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp
parenta599ea57efbd14d2c8612bb727f39cfa0775a89c (diff)
QmlDesigner: Refactor anchor lines
Change-Id: I594b8255e1515f1307eb6c669e26f0a4045484ed Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Diffstat (limited to 'src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp')
-rw-r--r--src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp b/src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp
index ac5c69af4b..54aa062f3f 100644
--- a/src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/anchorindicator.cpp
@@ -98,28 +98,28 @@ void AnchorIndicator::setItems(const QList<FormEditorItem *> &itemList)
if (!sourceQmlItemNode.modelNode().isRootNode()) {
QmlAnchors qmlAnchors = sourceQmlItemNode.anchors();
- if (qmlAnchors.modelHasAnchor(AnchorLine::Top)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineTop)) {
m_indicatorTopShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorTopShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Top),
- qmlAnchors.modelAnchor(AnchorLine::Top));
+ m_indicatorTopShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineTop),
+ qmlAnchors.modelAnchor(AnchorLineTop));
}
- if (qmlAnchors.modelHasAnchor(AnchorLine::Bottom)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineBottom)) {
m_indicatorBottomShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorBottomShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Bottom),
- qmlAnchors.modelAnchor(AnchorLine::Bottom));
+ m_indicatorBottomShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineBottom),
+ qmlAnchors.modelAnchor(AnchorLineBottom));
}
- if (qmlAnchors.modelHasAnchor(AnchorLine::Left)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineLeft)) {
m_indicatorLeftShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorLeftShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Left),
- qmlAnchors.modelAnchor(AnchorLine::Left));
+ m_indicatorLeftShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineLeft),
+ qmlAnchors.modelAnchor(AnchorLineLeft));
}
- if (qmlAnchors.modelHasAnchor(AnchorLine::Right)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineRight)) {
m_indicatorRightShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorRightShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Right),
- qmlAnchors.modelAnchor(AnchorLine::Right));
+ m_indicatorRightShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineRight),
+ qmlAnchors.modelAnchor(AnchorLineRight));
}
}
}
@@ -133,38 +133,38 @@ void AnchorIndicator::updateItems(const QList<FormEditorItem *> &itemList)
if (!sourceQmlItemNode.modelNode().isRootNode()) {
QmlAnchors qmlAnchors = formEditorItem->qmlItemNode().anchors();
- if (qmlAnchors.modelHasAnchor(AnchorLine::Top)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineTop)) {
if (m_indicatorTopShape.isNull())
m_indicatorTopShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorTopShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Top),
- qmlAnchors.modelAnchor(AnchorLine::Top));
+ m_indicatorTopShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineTop),
+ qmlAnchors.modelAnchor(AnchorLineTop));
} else {
delete m_indicatorTopShape;
}
- if (qmlAnchors.modelHasAnchor(AnchorLine::Bottom)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineBottom)) {
if (m_indicatorBottomShape.isNull())
m_indicatorBottomShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorBottomShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Bottom),
- qmlAnchors.modelAnchor(AnchorLine::Bottom));
+ m_indicatorBottomShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineBottom),
+ qmlAnchors.modelAnchor(AnchorLineBottom));
} else {
delete m_indicatorBottomShape;
}
- if (qmlAnchors.modelHasAnchor(AnchorLine::Left)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineLeft)) {
if (m_indicatorLeftShape.isNull())
m_indicatorLeftShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorLeftShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Left),
- qmlAnchors.modelAnchor(AnchorLine::Left));
+ m_indicatorLeftShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineLeft),
+ qmlAnchors.modelAnchor(AnchorLineLeft));
} else {
delete m_indicatorLeftShape;
}
- if (qmlAnchors.modelHasAnchor(AnchorLine::Right)) {
+ if (qmlAnchors.modelHasAnchor(AnchorLineRight)) {
if (m_indicatorRightShape.isNull())
m_indicatorRightShape = new AnchorIndicatorGraphicsItem(m_layerItem.data());
- m_indicatorRightShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLine::Right),
- qmlAnchors.modelAnchor(AnchorLine::Right));
+ m_indicatorRightShape->updateAnchorIndicator(AnchorLine(sourceQmlItemNode, AnchorLineRight),
+ qmlAnchors.modelAnchor(AnchorLineRight));
} else {
delete m_indicatorRightShape;
}