File indexing completed on 2024-05-19 04:36:36
0001 /* This file is part of the TikZKit project. 0002 * 0003 * Copyright (C) 2018 Dominik Haumann <dhaumann@kde.org> 0004 * 0005 * This library is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU Library General Public License as published 0007 * by the Free Software Foundation, either version 2 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, see 0017 * <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef TIKZ_UI_UID_PROPERTY_MANAGER_H 0021 #define TIKZ_UI_UID_PROPERTY_MANAGER_H 0022 0023 #include <QtAbstractPropertyManager> 0024 #include <tikz/core/Uid.h> 0025 0026 namespace tikz { 0027 namespace ui { 0028 0029 class UidPropertyManagerPrivate; 0030 0031 class UidPropertyManager : public QtAbstractPropertyManager 0032 { 0033 Q_OBJECT 0034 public: 0035 UidPropertyManager(QObject *parent = nullptr); 0036 ~UidPropertyManager(); 0037 0038 tikz::core::Uid value(const QtProperty *property) const; 0039 bool isReadOnly(const QtProperty *property) const; 0040 0041 public Q_SLOTS: 0042 void setValue(QtProperty *property, const tikz::core::Uid & val); 0043 void setReadOnly(QtProperty *property, bool readOnly); 0044 Q_SIGNALS: 0045 void valueChanged(QtProperty *property, const tikz::core::Uid & val); 0046 void readOnlyChanged(QtProperty *property, bool readOnly); 0047 protected: 0048 QString valueText(const QtProperty *property) const override; 0049 void initializeProperty(QtProperty *property) override; 0050 void uninitializeProperty(QtProperty *property) override; 0051 private: 0052 UidPropertyManagerPrivate *d_ptr; 0053 Q_DECLARE_PRIVATE(UidPropertyManager) 0054 Q_DISABLE_COPY(UidPropertyManager) 0055 }; 0056 0057 } 0058 } 0059 0060 #endif // TIKZ_UI_UID_PROPERTY_MANAGER_H 0061 0062 // kate: indent-width 4; replace-tabs on;