Skip to content
Snippets Groups Projects
Commit c3012d0e authored by Tobias Hunger's avatar Tobias Hunger
Browse files

QmlDesigner: Remove unused files


Change-Id: I5038963f13ab82a58fddbf0dd95fa173d5f07424
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 9fef4fb9
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 898 deletions
/****************************************************************************
**
** 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 "formeditornodeinstanceview.h"
#include "formeditorview.h"
#include <modelnode.h>
#include <QDebug>
namespace QmlDesigner {
FormEditorNodeInstanceView::FormEditorNodeInstanceView(QObject * parent) : NodeInstanceView(parent)
{
}
FormEditorNodeInstanceView::~FormEditorNodeInstanceView()
{
}
}
/****************************************************************************
**
** 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 "formeditorsubwindow.h"
namespace QmlDesigner {
FormEditorSubWindow::FormEditorSubWindow()
{
}
} // namespace QmlDesigner
/****************************************************************************
**
** 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.
**
****************************************************************************/
#ifndef MANIPULATORLAYERITEM_H
#define MANIPULATORLAYERITEM_H
class ManipulatorLayerItem
{
public:
ManipulatorLayerItem();
};
#endif // MANIPULATORLAYERITEM_H
src/plugins/qmldesigner/componentsplugin/images/busyindicator.png

1.12 KiB

src/plugins/qmldesigner/componentsplugin/images/busyindicator16.png

826 B

src/plugins/qmldesigner/componentsplugin/images/busyindicatora.png

767 B

src/plugins/qmldesigner/componentsplugin/images/busyindicatora16.png

670 B

/****************************************************************************
**
** 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 "modificationgroupexception.h"
/*!
\class QmlDesigner::ModificationGroupException
\ingroup CoreExceptions
\brief The ModificationGroupException class provides an exception for a
modification group.
*/
namespace QmlDesigner {
/*!
Constructs an exception. \a line uses the __LINE__ macro,
\a function uses the __FUNCTION__ or the Q_FUNC_INFO macro, and \a file uses
the __FILE__ macro.
*/
ModificationGroupException::ModificationGroupException(int line,
const QString &function,
const QString &file)
: Exception(line, function, file)
{
createWarning();
}
/*!
Returns the type of the exception as a string.
*/
QString ModificationGroupException::type() const
{
return "ModificationGroupException";
}
}
/****************************************************************************
**
** 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.
**
****************************************************************************/
#ifndef REPLACEALLOBJECTDEFINITIONSVISITOR_H
#define REPLACEALLOBJECTDEFINITIONSVISITOR_H
#include "qmlrewriter.h"
namespace QmlDesigner {
namespace Internal {
class ReplaceAllObjectDefinitionsVisitor: public QMLRewriter
{
public:
ReplaceAllObjectDefinitionsVisitor(TextModifier &textModifier,
const TextLocation &objectLocation,
const QString &newContent);
protected:
virtual bool visit(QmlJS::AST::UiObjectDefinition *ast);
virtual bool visit(QmlJS::AST::UiObjectBinding *ast);
private:
void replaceMembers(QmlJS::AST::UiObjectInitializer *initializer);
private:
QString m_newContent;
};
} // namespace Internal
} // namespace QmlDesigner
#endif // REPLACEALLOBJECTDEFINITIONSVISITOR_H
/****************************************************************************
**
** 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.
**
****************************************************************************/
#ifndef WIDGETPLUGIN_HELPER_H
#define WIDGETPLUGIN_HELPER_H
#define QMLDESIGNER_REGISTER_WIDGET(TYPE) uiEngine->addObjectCreator(new QUiWidgetCreator<TYPE>(QStringLiteral(#TYPE)));
#define QMLDESIGNER_REGISTER_GRAPHICSWIDGET(TYPE) uiEngine->addObjectCreator(new QUiGraphicsWidgetCreator<TYPE>(QStringLiteral(#TYPE)));
#endif //WIDGETPLUGIN_HELPER
/****************************************************************************
**
** 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 "bytearraymodifier.h"
namespace QmlDesigner {
ByteArrayModifier::ByteArrayModifier(QPlainTextEdit* textEdit):
PlainTextEditModifier(textEdit),
m_textEdit(textEdit)
{
}
ByteArrayModifier::~ByteArrayModifier()
{
delete m_textEdit;
}
void ByteArrayModifier::undo()
{
m_textEdit->undo();
}
void ByteArrayModifier::redo()
{
m_textEdit->redo();
}
ByteArrayModifier* ByteArrayModifier::create(const QString& data)
{
QPlainTextEdit* edit = new QPlainTextEdit;
edit->setPlainText(data);
return new ByteArrayModifier(edit);
}
void ByteArrayModifier::setText(const QString& text)
{
m_textEdit->setPlainText(text);
emit textChanged();
}
}
/****************************************************************************
**
** 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 "modificationgrouptoken.h"
namespace QmlDesigner {
long ModificationGroupToken::uniqueNumberCounter = 0;
ModificationGroupToken::ModificationGroupToken(unsigned depth):
m_depth(depth),
m_uniqueNumber(++uniqueNumberCounter)
{
}
}
/****************************************************************************
**
** 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);
//
// while (!anchorLine.isValid() && statePointer->hasParentState()) {
// statePointer = statePointer->parentState();
// anchorLine = InternalNodeAnchors(statePointer).anchor(anchorLineType);
// }
//
// return anchorLine;
//}
//
//bool NodeAnchors::hasAnchor(AnchorLine::Type sourceAnchorLineType) const
//{
// Internal::InternalNodeState::Pointer statePointer(m_internalNodeState);
// InternalNodeAnchors internalNodeAnchors(statePointer);
// while (!internalNodeAnchors.hasAnchor(sourceAnchorLineType) &&
// statePointer->hasParentState()) {
// statePointer = statePointer->parentState();
// internalNodeAnchors = InternalNodeAnchors(statePointer);
// }
//
// return internalNodeAnchors.hasAnchor(sourceAnchorLineType);
//}
//
//void NodeAnchors::removeAnchor(AnchorLine::Type sourceAnchorLineType)
//{
// if (hasLocalAnchor(sourceAnchorLineType))
// m_model->removeAnchor(AnchorLine(nodeState(), sourceAnchorLineType));
//}
//
//void NodeAnchors::removeMargins()
//{
// removeMargin(AnchorLine::Left);
// removeMargin(AnchorLine::Right);
// removeMargin(AnchorLine::Top);
// removeMargin(AnchorLine::Bottom);
// removeMargin(AnchorLine::HorizontalCenter);
// removeMargin(AnchorLine::VerticalCenter);
// removeMargin(AnchorLine::Baseline);
//}
//
//void NodeAnchors::removeAnchors()
//{
// removeAnchor(AnchorLine::Left);
// removeAnchor(AnchorLine::Right);
// removeAnchor(AnchorLine::Top);
// removeAnchor(AnchorLine::Bottom);
// removeAnchor(AnchorLine::HorizontalCenter);
// removeAnchor(AnchorLine::VerticalCenter);
// removeAnchor(AnchorLine::Baseline);
//}
//
//bool NodeAnchors::hasLocalAnchor(AnchorLine::Type sourceAnchorLineType) const
//{
// return InternalNodeAnchors(m_internalNodeState).hasAnchor(sourceAnchorLineType);
//}
//
//bool NodeAnchors::hasLocalAnchors() const
//{
// return hasLocalAnchor(AnchorLine::Top) ||
// hasLocalAnchor(AnchorLine::Bottom) ||
// hasLocalAnchor(AnchorLine::Left) ||
// hasLocalAnchor(AnchorLine::Right) ||
// hasLocalAnchor(AnchorLine::VerticalCenter) ||
// hasLocalAnchor(AnchorLine::HorizontalCenter) ||
// hasLocalAnchor(AnchorLine::Baseline);
//}
//
//bool NodeAnchors::hasAnchors() const
//{
// return hasAnchor(AnchorLine::Top) ||
// hasAnchor(AnchorLine::Bottom) ||
// hasAnchor(AnchorLine::Left) ||
// hasAnchor(AnchorLine::Right) ||
// hasAnchor(AnchorLine::VerticalCenter) ||
// hasAnchor(AnchorLine::HorizontalCenter) ||
// hasAnchor(AnchorLine::Baseline);
//}
//
//void NodeAnchors::setMargin(AnchorLine::Type sourceAnchorLineType, double margin) const
//{
// m_model->setAnchorMargin(AnchorLine(nodeState(), sourceAnchorLineType), margin);
//}
//
//bool NodeAnchors::hasMargin(AnchorLine::Type sourceAnchorLineType) const
//{
// return InternalNodeAnchors(m_internalNodeState).hasMargin(sourceAnchorLineType);
//}
//
//double NodeAnchors::localMargin(AnchorLine::Type sourceAnchorLineType) const
//{
// return InternalNodeAnchors(m_internalNodeState).margin(sourceAnchorLineType);
//}
//
//double NodeAnchors::margin(AnchorLine::Type sourceAnchorLineType) const
//{
// Internal::InternalNodeState::Pointer statePointer(m_internalNodeState);
// InternalNodeAnchors internalNodeAnchors(statePointer);
// while (!internalNodeAnchors.hasMargin(sourceAnchorLineType) &&
// statePointer->hasParentState()) {
// statePointer = statePointer->parentState();
// internalNodeAnchors = InternalNodeAnchors(statePointer);
// }
//
// return internalNodeAnchors.margin(sourceAnchorLineType);
//}
//
//void NodeAnchors::removeMargin(AnchorLine::Type sourceAnchorLineType)
//{
// m_model->removeAnchorMargin(AnchorLine(nodeState(), sourceAnchorLineType));
//
//}
//
//QDebug operator<<(QDebug debug, const NodeAnchors &anchors)
//{
// debug.nospace() << "NodeAnchors(";
// if (anchors.isValid()) {
// if (anchors.hasAnchor(AnchorLine::Top))
// debug << "top";
// if (anchors.hasMargin(AnchorLine::Top))
// debug.nospace() << "(" << anchors.margin(AnchorLine::Top) << ")";
// if (anchors.hasAnchor(AnchorLine::Bottom))
// debug << "bottom";
// if (anchors.hasMargin(AnchorLine::Bottom))
// debug.nospace() << "(" << anchors.margin(AnchorLine::Bottom) << ")";
// if (anchors.hasAnchor(AnchorLine::Left))
// debug << "left";
// if (anchors.hasMargin(AnchorLine::Left))
// debug.nospace() << "(" << anchors.margin(AnchorLine::Left) << ")";
// if (anchors.hasAnchor(AnchorLine::Right))
// debug << "right";
// if (anchors.hasMargin(AnchorLine::Right))
// debug.nospace() << "(" << anchors.margin(AnchorLine::Right) << ")";
// if (anchors.hasAnchor(AnchorLine::VerticalCenter))
// debug << "verticalCenter";
// if (anchors.hasMargin(AnchorLine::VerticalCenter))
// debug.nospace() << "(" << anchors.margin(AnchorLine::VerticalCenter) << ")";
// if (anchors.hasAnchor(AnchorLine::HorizontalCenter))
// debug << "horizontalCenter";
// if (anchors.hasMargin(AnchorLine::HorizontalCenter))
// debug.nospace() << "(" << anchors.margin(AnchorLine::HorizontalCenter) << ")";
// if (anchors.hasAnchor(AnchorLine::Baseline))
// debug << "baseline";
// if (anchors.hasMargin(AnchorLine::Baseline))
// debug.nospace() << "(" << anchors.margin(AnchorLine::Baseline) << ")";
// } else {
// debug.nospace() << "invalid";
// }
//
// debug.nospace() << ")";
//
// return debug.space();
//}
//
//QTextStream& operator<<(QTextStream &stream, const NodeAnchors &anchors)
//{
// stream << "NodeAnchors(";
// if (anchors.isValid()) {
// if (anchors.hasAnchor(AnchorLine::Top))
// stream << "top";
// if (anchors.hasMargin(AnchorLine::Top))
// stream << "(" << anchors.margin(AnchorLine::Top) << ")";
// if (anchors.hasAnchor(AnchorLine::Bottom))
// stream << "bottom";
// if (anchors.hasMargin(AnchorLine::Bottom))
// stream << "(" << anchors.margin(AnchorLine::Bottom) << ")";
// if (anchors.hasAnchor(AnchorLine::Left))
// stream << "left";
// if (anchors.hasMargin(AnchorLine::Left))
// stream << "(" << anchors.margin(AnchorLine::Left) << ")";
// if (anchors.hasAnchor(AnchorLine::Right))
// stream << "right";
// if (anchors.hasMargin(AnchorLine::Right))
// stream << "(" << anchors.margin(AnchorLine::Right) << ")";
// if (anchors.hasAnchor(AnchorLine::VerticalCenter))
// stream << "verticalCenter";
// if (anchors.hasMargin(AnchorLine::VerticalCenter))
// stream << "(" << anchors.margin(AnchorLine::VerticalCenter) << ")";
// if (anchors.hasAnchor(AnchorLine::HorizontalCenter))
// stream << "horizontalCenter";
// if (anchors.hasMargin(AnchorLine::HorizontalCenter))
// stream << "(" << anchors.margin(AnchorLine::HorizontalCenter) << ")";
// if (anchors.hasAnchor(AnchorLine::Baseline))
// stream << "baseline";
// if (anchors.hasMargin(AnchorLine::Baseline))
// stream << "(" << anchors.margin(AnchorLine::Baseline) << ")";
// } else {
// stream << "invalid";
// }
//
// stream << ")";
//
// return stream;
//}
//
//
//} // namespace QmlDesigner
/****************************************************************************
**
** 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 "objectpropertybinding.h"
namespace QmlDesigner {
ObjectPropertyBinding::ObjectPropertyBinding()
{
}
ObjectPropertyBinding::ObjectPropertyBinding(const ModelNode &node)
: m_node(node)
{
}
ModelNode ObjectPropertyBinding::modelNode() const
{
return m_node;
}
bool ObjectPropertyBinding::isValid() const
{
return m_node.isValid();
}
} // namespace QmlDesigner
/****************************************************************************
**
** 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 "propertybinding.h"
#include "invalidpropertyexception.h"
namespace QmlDesigner {
PropertyBinding::PropertyBinding()
{
}
PropertyBinding::PropertyBinding(const QString &value):
m_value(value)
{
}
PropertyBinding::PropertyBinding(const PropertyBinding &other):
m_value(other.m_value)
{
}
PropertyBinding &PropertyBinding::operator=(const PropertyBinding &other)
{
m_value = other.m_value;
return *this;
}
bool PropertyBinding::isValid() const
{
return !m_value.isEmpty();
}
QString PropertyBinding::value() const
{
return m_value;
}
} // namespace QmlDesigner
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment