Commit 5faf74b0 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Rename KisCloneInfo into KisNodeUuidInfo

(now it is used not only in the clone layers, but also in mime
 handling in the timeline model)
parent b6c39175
......@@ -139,7 +139,7 @@ set(kritaimage_LIB_SRCS
kis_base_node.cpp
kis_base_processor.cpp
kis_bookmarked_configuration_manager.cc
kis_clone_info.cpp
kis_node_uuid_info.cpp
kis_clone_layer.cpp
kis_colorspace_convert_visitor.cpp
kis_config_widget.cpp
......
......@@ -51,7 +51,7 @@ struct Q_DECL_HIDDEN KisCloneLayer::Private
KisLodCapableLayerOffset offset;
KisLayerSP copyFrom;
KisCloneInfo copyFromInfo;
KisNodeUuidInfo copyFromInfo;
CopyLayerType type;
};
......@@ -294,12 +294,12 @@ CopyLayerType KisCloneLayer::copyType() const
return m_d->type;
}
KisCloneInfo KisCloneLayer::copyFromInfo() const
KisNodeUuidInfo KisCloneLayer::copyFromInfo() const
{
return m_d->copyFrom ? KisCloneInfo(m_d->copyFrom) : m_d->copyFromInfo;
return m_d->copyFrom ? KisNodeUuidInfo(m_d->copyFrom) : m_d->copyFromInfo;
}
void KisCloneLayer::setCopyFromInfo(KisCloneInfo info)
void KisCloneLayer::setCopyFromInfo(KisNodeUuidInfo info)
{
Q_ASSERT(!m_d->copyFrom);
m_d->copyFromInfo = info;
......
......@@ -23,7 +23,7 @@
#include "kis_layer.h"
#include <kritaimage_export.h>
#include "kis_clone_info.h"
#include "kis_node_uuid_info.h"
class KisNodeVisitor;
......@@ -94,8 +94,8 @@ public:
* from layer is set when all layers have been created, not during
* loading.
*/
void setCopyFromInfo(KisCloneInfo info);
KisCloneInfo copyFromInfo() const;
void setCopyFromInfo(KisNodeUuidInfo info);
KisNodeUuidInfo copyFromInfo() const;
void setCopyFrom(KisLayerSP layer);
KisLayerSP copyFrom() const;
......
......@@ -17,31 +17,31 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "kis_clone_info.h"
#include "kis_node_uuid_info.h"
#include "kis_debug.h"
KisCloneInfo::KisCloneInfo()
KisNodeUuidInfo::KisNodeUuidInfo()
{
}
KisCloneInfo::KisCloneInfo(const QUuid& uuid)
KisNodeUuidInfo::KisNodeUuidInfo(const QUuid& uuid)
{
m_uuid = uuid;
}
KisCloneInfo::KisCloneInfo(const QString& name)
KisNodeUuidInfo::KisNodeUuidInfo(const QString& name)
{
m_name = name;
}
KisCloneInfo::KisCloneInfo(KisNodeSP node)
KisNodeUuidInfo::KisNodeUuidInfo(KisNodeSP node)
{
m_uuid = node->uuid();
m_name = node->name();
}
KisNodeSP KisCloneInfo::findNode(KisNodeSP rootNode)
KisNodeSP KisNodeUuidInfo::findNode(KisNodeSP rootNode)
{
if (check(rootNode))
return rootNode;
......@@ -56,7 +56,7 @@ KisNodeSP KisCloneInfo::findNode(KisNodeSP rootNode)
return node;
}
bool KisCloneInfo::check(KisNodeSP node)
bool KisNodeUuidInfo::check(KisNodeSP node)
{
if (m_uuid == node->uuid()) // every node has valid uuid
return true;
......
......@@ -17,22 +17,22 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef KIS_CLONE_INFO_H
#define KIS_CLONE_INFO_H
#ifndef kis_node_uuid_info_H
#define kis_node_uuid_info_H
#include <QUuid>
#include <QString>
#include "kritaimage_export.h"
#include "kis_node.h"
class KRITAIMAGE_EXPORT KisCloneInfo
class KRITAIMAGE_EXPORT KisNodeUuidInfo
{
public:
KisCloneInfo();
KisCloneInfo(const QUuid& uuid);
KisCloneInfo(const QString& name);
KisCloneInfo(KisNodeSP node);
KisNodeUuidInfo();
KisNodeUuidInfo(const QUuid& uuid);
KisNodeUuidInfo(const QString& name);
KisNodeUuidInfo(KisNodeSP node);
public:
QUuid uuid()
......@@ -56,4 +56,4 @@ private:
QString m_name;
};
#endif // KIS_CLONE_INFO_H
#endif // kis_node_uuid_info_H
......@@ -53,7 +53,7 @@
#include <QApplication>
#include "kis_processing_applicator.h"
#include <KisImageBarrierLockerWithFeedback.h>
#include "kis_clone_info.h"
#include "kis_node_uuid_info.h"
struct TimelineFramesModel::Private
......@@ -634,7 +634,7 @@ bool TimelineFramesModel::dropMimeDataExtended(const QMimeData *data, Qt::DropAc
KisNodeSP srcNode;
if (!nodeUuid.isNull()) {
KisCloneInfo nodeInfo(nodeUuid);
KisNodeUuidInfo nodeInfo(nodeUuid);
srcNode = nodeInfo.findNode(m_d->image->root());
} else {
QModelIndex index = this->index(srcRow, srcColumn);
......
......@@ -952,14 +952,14 @@ KisNodeSP KisKraLoader::loadCloneLayer(const KoXmlElement& element, KisImageSP i
KisCloneLayerSP layer = new KisCloneLayer(0, image, name, opacity);
KisCloneInfo info;
KisNodeUuidInfo info;
if (! (element.attribute(CLONE_FROM_UUID)).isNull()) {
info = KisCloneInfo(QUuid(element.attribute(CLONE_FROM_UUID)));
info = KisNodeUuidInfo(QUuid(element.attribute(CLONE_FROM_UUID)));
} else {
if ((element.attribute(CLONE_FROM)).isNull()) {
return 0;
} else {
info = KisCloneInfo(element.attribute(CLONE_FROM));
info = KisNodeUuidInfo(element.attribute(CLONE_FROM));
}
}
layer->setCopyFromInfo(info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment