QmlDesigner: Remove unused files
Change-Id: I5038963f13ab82a58fddbf0dd95fa173d5f07424 Reviewed-by:Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by:
Thomas Hartmann <Thomas.Hartmann@digia.com>
Showing
1.12 KB
826 Bytes
767 Bytes
670 Bytes
/**************************************************************************** | ||
** | ||
** Copyright (C) 2015 The Qt Company Ltd. | ||
** Contact: http://www.qt.io/licensing | ||
** | ||
** This file is part of Qt Creator. | ||
** | ||
** Commercial License Usage | ||
** Licensees holding valid commercial Qt licenses may use this file in | ||
** accordance with the commercial license agreement provided with the | ||
** Software or, alternatively, in accordance with the terms contained in | ||
** a written agreement between you and The Qt Company. For licensing terms and | ||
** conditions see http://www.qt.io/terms-conditions. For further information | ||
** use the contact form at http://www.qt.io/contact-us. | ||
** | ||
** GNU Lesser General Public License Usage | ||
** Alternatively, this file may be used under the terms of the GNU Lesser | ||
** General Public License version 2.1 or version 3 as published by the Free | ||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and | ||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the | ||
** following information to ensure the GNU Lesser General Public License | ||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and | ||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
** | ||
** In addition, as a special exception, The Qt Company gives you certain additional | ||
** rights. These rights are described in The Qt Company LGPL Exception | ||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
** | ||
****************************************************************************/ | ||
//#include "nodeanchors.h" | ||
// | ||
//#include <model.h> | ||
//#include <modelnode.h> | ||
// | ||
//#include "internalnode_p.h" | ||
//#include "internalnodeanchors.h" | ||
//#include "internalnodestate.h" | ||
//#include "invalidargumentexception.h" | ||
// | ||
//using namespace QmlDesigner::Internal; | ||
// | ||
//namespace QmlDesigner { | ||
// | ||
///*! | ||
//\class QmlDesigner::NodeAnchors | ||
//\ingroup CoreModel | ||
//\brief NodeAnchors is a value holder for an anchor | ||
//*/ | ||
// | ||
//NodeAnchors::NodeAnchors(const NodeState &nodeState): | ||
// m_internalNode(nodeState.m_internalNode), | ||
// m_internalNodeState(nodeState.m_internalNodeState), | ||
// m_model(nodeState.m_model) | ||
//{ | ||
//} | ||
// | ||
//NodeAnchors::~NodeAnchors() | ||
//{ | ||
//} | ||
// | ||
//NodeAnchors::NodeAnchors(const NodeAnchors &other) | ||
// :m_internalNode(other.m_internalNode), | ||
// m_model(other.m_model) | ||
//{ | ||
// | ||
//} | ||
// | ||
//NodeAnchors::NodeAnchors(const Internal::InternalNodeStatePointer &internalNodeState, Model *model): | ||
// m_internalNode(internalNodeState->modelNode()), | ||
// m_internalNodeState(internalNodeState), | ||
// m_model(model) | ||
//{ | ||
//} | ||
// | ||
//NodeAnchors &NodeAnchors::operator=(const NodeAnchors &other) | ||
//{ | ||
// m_internalNode = other.m_internalNode; | ||
// m_internalNodeState = other.m_internalNodeState; | ||
// m_model = other.m_model; | ||
// | ||
// return *this; | ||
//} | ||
// | ||
//ModelNode NodeAnchors::modelNode() const | ||
//{ | ||
// return ModelNode(m_internalNode, m_model.data()); | ||
//} | ||
// | ||
//bool NodeAnchors::isValid() const | ||
//{ | ||
// return m_internalNode->isValid() | ||
// && m_internalNodeState->isValid() && | ||
// m_model; | ||
//} | ||
// | ||
//NodeState NodeAnchors::nodeState() const | ||
//{ | ||
// return NodeState(m_internalNodeState, m_internalNode, m_model.data()); | ||
//} | ||
// | ||
//void NodeAnchors::setAnchor(AnchorLine::Type sourceAnchorLineType, | ||
// const ModelNode &targetModelNode, | ||
// AnchorLine::Type targetAnchorLineType) | ||
//{ | ||
// Q_ASSERT(m_internalNode->isValid()); | ||
// Q_ASSERT(m_internalNodeState->isValid()); | ||
// Q_ASSERT(modelNode().isValid()); | ||
// | ||
// m_model->setAnchor(AnchorLine(nodeState(), sourceAnchorLineType), | ||
// AnchorLine(targetModelNode.baseNodeState(), targetAnchorLineType)); | ||
//} | ||
// | ||
//bool NodeAnchors::canAnchor(AnchorLine::Type sourceAnchorLineType, | ||
// const ModelNode & targetModelNode, | ||
// AnchorLine::Type targetAnchorLineType) const | ||
//{ | ||
// if (modelNode() == targetModelNode) | ||
// return false; | ||
// | ||
// return InternalNodeAnchors(m_internalNodeState).canAnchor(sourceAnchorLineType, targetModelNode.baseNodeState().internalNodeState(), targetAnchorLineType); | ||
//} | ||
// | ||
//bool NodeAnchors::canAnchor(const ModelNode & targetModelNode) const | ||
//{ | ||
// if (modelNode() == targetModelNode) | ||
// return false; | ||
// | ||
// if (possibleAnchorLines(AnchorLine::Left, targetModelNode) != AnchorLine::NoAnchor) | ||
// return true; | ||
// else if (possibleAnchorLines(AnchorLine::Top, targetModelNode) != AnchorLine::NoAnchor) | ||
// return true; | ||
// else if (possibleAnchorLines(AnchorLine::Right, targetModelNode) != AnchorLine::NoAnchor) | ||
// return true; | ||
// else if (possibleAnchorLines(AnchorLine::Bottom, targetModelNode) != AnchorLine::NoAnchor) | ||
// return true; | ||
// else if (possibleAnchorLines(AnchorLine::HorizontalCenter, targetModelNode) != AnchorLine::NoAnchor) | ||
// return true; | ||
// else | ||
// return possibleAnchorLines(AnchorLine::VerticalCenter, targetModelNode) != AnchorLine::NoAnchor; | ||
//} | ||
// | ||
//AnchorLine::Type NodeAnchors::possibleAnchorLines(AnchorLine::Type sourceAnchorLineType, | ||
// const ModelNode & targetModelNode) const | ||
//{ | ||
// if (modelNode() == targetModelNode) | ||
// return AnchorLine::NoAnchor; | ||
// | ||
// int anchorTypes = AnchorLine::NoAnchor; | ||
// const InternalNodeAnchors anchors(m_internalNodeState); | ||
// | ||
// if (sourceAnchorLineType & AnchorLine::HorizontalMask) { | ||
// if (anchors.canAnchor(sourceAnchorLineType, targetModelNode.baseNodeState().internalNodeState(), AnchorLine::Left)) | ||
// anchorTypes |= AnchorLine::Left; | ||
// if (anchors.canAnchor(sourceAnchorLineType, targetModelNode.baseNodeState().internalNodeState(), AnchorLine::Right)) | ||
// anchorTypes |= AnchorLine::Right; | ||
// if (anchors.canAnchor(sourceAnchorLineType, targetModelNode.baseNodeState().internalNodeState(), AnchorLine::HorizontalCenter)) | ||
// anchorTypes |= AnchorLine::HorizontalCenter; | ||
// } else if (sourceAnchorLineType & AnchorLine::VerticalMask) { | ||
// if (anchors.canAnchor(sourceAnchorLineType, targetModelNode.baseNodeState().internalNodeState(), AnchorLine::Top)) | ||
// anchorTypes |= AnchorLine::Top; | ||
// if (anchors.canAnchor(sourceAnchorLineType, targetModelNode.baseNodeState().internalNodeState(), AnchorLine::Bottom)) | ||
// anchorTypes |= AnchorLine::Bottom; | ||
// if (anchors.canAnchor(sourceAnchorLineType, targetModelNode.baseNodeState().internalNodeState(), AnchorLine::VerticalCenter)) | ||
// anchorTypes |= AnchorLine::VerticalCenter; | ||
// } | ||
// | ||
// return (AnchorLine::Type) anchorTypes; | ||
//} | ||
// | ||
//AnchorLine NodeAnchors::localAnchor(AnchorLine::Type anchorLineType) const | ||
//{ | ||
// return InternalNodeAnchors(m_internalNodeState).anchor(anchorLineType); | ||
//} | ||
// | ||
//AnchorLine NodeAnchors::anchor(AnchorLine::Type anchorLineType) const | ||
//{ | ||
// Internal::InternalNodeState::Pointer statePointer(m_internalNodeState); | ||
// AnchorLine anchorLine = InternalNodeAnchors(statePointer).anchor(anchorLineType); | ||
< |