Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_locked_properties.cc
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com>
3 * SPDX-FileCopyrightText: 2014 Mohit Goyal <mohit.bits2011@gmail.com>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 */
8
9
14
18
23
25{
26 QMapIterator<QString, QVariant> i(p->getProperties());
27 while (i.hasNext()) {
28 i.next();
29 m_lockedProperties->setProperty(i.key(), QVariant(i.value()));
30 }
31}
32
37
39{
41 QMapIterator<QString, QVariant> i(m_lockedProperties->getProperties());
42 while (i.hasNext()) {
43 i.next();
44 temp->setProperty(i.key(), QVariant(i.value()));
45 }
46 m_lockedProperties->clearProperties();
47 QMapIterator<QString, QVariant> j(temp->getProperties());
48 while (j.hasNext()) {
49 j.next();
50 if (!p->hasProperty(j.key())) {
51 m_lockedProperties->setProperty(j.key(), QVariant(j.value()));
52 }
53
54 }
55}
56
58{
59 return m_lockedProperties->hasProperty(p);
60}
61
66
67
const Params2D p
KisPropertiesConfigurationSP m_lockedProperties
bool hasProperty(const QString &p)
void addToLockedProperties(KisPropertiesConfigurationSP p)
void removeFromLockedProperties(KisPropertiesConfigurationSP p)
KisPropertiesConfigurationSP lockedProperties()