File indexing completed on 2024-06-09 04:21:49
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Dmitry Kazakov <dimula73@gmail.com> 0003 * SPDX-FileCopyrightText: 2014 Mohit Goyal <mohit.bits2011@gmail.com> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.1-or-later 0006 */ 0007 0008 #ifndef KIS_LOCKED_PROPERTIES_SERVER_H 0009 #define KIS_LOCKED_PROPERTIES_SERVER_H 0010 0011 #include <brushengine/kis_locked_properties_proxy.h> 0012 #include "kis_properties_configuration.h" 0013 0014 class KisLockedPropertiesProxy; 0015 0016 /** 0017 * The KisLockedPropertiesServer class 0018 * This static class stores an object of KisLockedProperties and generates a KisLockedPropertiesProxy used 0019 * by other classes/objects to access the LockedProperties object. 0020 */ 0021 0022 class KRITAIMAGE_EXPORT KisLockedPropertiesServer: public QObject 0023 { 0024 public: 0025 KisLockedPropertiesServer(); 0026 ~KisLockedPropertiesServer() override; 0027 static KisLockedPropertiesServer* instance(); 0028 0029 KisLockedPropertiesSP lockedProperties(); 0030 void addToLockedProperties(KisPropertiesConfigurationSP p); 0031 void removeFromLockedProperties(KisPropertiesConfigurationSP p); 0032 void setPropertiesFromLocked(bool value); 0033 bool propertiesFromLocked(); 0034 KisLockedPropertiesProxySP createLockedPropertiesProxy(KisPropertiesConfiguration *settings); 0035 KisLockedPropertiesProxySP createLockedPropertiesProxy(KisPropertiesConfigurationSP settings); 0036 bool hasProperty(const QString &p); 0037 0038 private: 0039 0040 KisLockedPropertiesSP m_lockedProperties; 0041 bool m_propertiesFromLocked; 0042 }; 0043 0044 #endif // KIS_LOCKED_PROPERTIES_SERVER_H