File indexing completed on 2025-01-26 04:05:51
0001 /* 0002 * SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef __KIS_PAINTOP_LOD_LIMITATIONS_H 0008 #define __KIS_PAINTOP_LOD_LIMITATIONS_H 0009 0010 #include <KoID.h> 0011 #include <QVector> 0012 #include <QMetaType> 0013 #include <boost/operators.hpp> 0014 0015 inline uint qHash(const KoID &id) { 0016 return qHash(id.id()); 0017 } 0018 0019 class KisPaintopLodLimitations 0020 : public boost::orable<KisPaintopLodLimitations>, 0021 public boost::equality_comparable<KisPaintopLodLimitations> 0022 { 0023 public: 0024 inline friend bool operator==(const KisPaintopLodLimitations &lhs, const KisPaintopLodLimitations &rhs) { 0025 return lhs.limitations == rhs.limitations && 0026 lhs.blockers == rhs.blockers; 0027 } 0028 0029 KisPaintopLodLimitations& operator|=(const KisPaintopLodLimitations &rhs) { 0030 limitations |= rhs.limitations; 0031 blockers |= rhs.blockers; 0032 return *this; 0033 } 0034 0035 QSet<KoID> limitations; 0036 QSet<KoID> blockers; 0037 }; 0038 0039 Q_DECLARE_METATYPE(KisPaintopLodLimitations); 0040 0041 #endif /* __KIS_PAINTOP_LOD_LIMITATIONS_H */