Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLockedProperties Class Reference

#include <kis_locked_properties.h>

+ Inheritance diagram for KisLockedProperties:

Public Member Functions

void addToLockedProperties (const KisPropertiesConfiguration *p)
 
void addToLockedProperties (KisPropertiesConfigurationSP p)
 
bool hasProperty (const QString &p)
 
 KisLockedProperties ()
 
KisPropertiesConfigurationSP lockedProperties ()
 
void removeFromLockedProperties (const KisPropertiesConfiguration *p)
 
void removeFromLockedProperties (KisPropertiesConfigurationSP p)
 
 ~KisLockedProperties ()
 
- Public Member Functions inherited from KisShared
bool deref ()
 
bool ref ()
 
int refCount ()
 
QAtomicInt * sharedWeakReference ()
 

Private Attributes

KisPropertiesConfigurationSP m_lockedProperties
 

Additional Inherited Members

- Protected Member Functions inherited from KisShared
 KisShared ()
 
 ~KisShared ()
 

Detailed Description

This class maintains a list of all the PaintOp Options that are supposed to be constant across all paintops and presets. addToLockedProperties() adds all the settings mentioned in the parameter to the list removeFromLockedProperties() removes a particular set of properties from the list hasProperty() checks for a particular property in the list

Definition at line 19 of file kis_locked_properties.h.

Constructor & Destructor Documentation

◆ KisLockedProperties()

KisLockedProperties::KisLockedProperties ( )

◆ ~KisLockedProperties()

KisLockedProperties::~KisLockedProperties ( )

Definition at line 15 of file kis_locked_properties.cc.

16{
17}

Member Function Documentation

◆ addToLockedProperties() [1/2]

void KisLockedProperties::addToLockedProperties ( const KisPropertiesConfiguration * p)

Definition at line 24 of file kis_locked_properties.cc.

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}
const Params2D p

References m_lockedProperties, and p.

◆ addToLockedProperties() [2/2]

void KisLockedProperties::addToLockedProperties ( KisPropertiesConfigurationSP p)

Whenever any setting is made locked

Definition at line 19 of file kis_locked_properties.cc.

20{
22}
void addToLockedProperties(KisPropertiesConfigurationSP p)

References addToLockedProperties(), and p.

◆ hasProperty()

bool KisLockedProperties::hasProperty ( const QString & p)

Definition at line 57 of file kis_locked_properties.cc.

58{
59 return m_lockedProperties->hasProperty(p);
60}

References m_lockedProperties, and p.

◆ lockedProperties()

KisPropertiesConfigurationSP KisLockedProperties::lockedProperties ( )

Definition at line 62 of file kis_locked_properties.cc.

63{
64 return m_lockedProperties;
65}

References m_lockedProperties.

◆ removeFromLockedProperties() [1/2]

void KisLockedProperties::removeFromLockedProperties ( const KisPropertiesConfiguration * p)

Definition at line 38 of file kis_locked_properties.cc.

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}

References m_lockedProperties, and p.

◆ removeFromLockedProperties() [2/2]

void KisLockedProperties::removeFromLockedProperties ( KisPropertiesConfigurationSP p)

Whenever any property is unlocked

Definition at line 33 of file kis_locked_properties.cc.

34{
36}
void removeFromLockedProperties(KisPropertiesConfigurationSP p)

References p, and removeFromLockedProperties().

Member Data Documentation

◆ m_lockedProperties

KisPropertiesConfigurationSP KisLockedProperties::m_lockedProperties
private

Definition at line 38 of file kis_locked_properties.h.


The documentation for this class was generated from the following files: