Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.0 KB
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2015 Dmitry Kazakov <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef __KIS_PAINTOP_LOD_LIMITATIONS_H
#define __KIS_PAINTOP_LOD_LIMITATIONS_H

#include <KoID.h>
#include <QMetaType>
#include <boost/operators.hpp>

inline uint qHash(const KoID &id) {
    return qHash(id.id());
}

class KisPaintopLodLimitations
    : public boost::orable<KisPaintopLodLimitations>,
      public boost::equality_comparable<KisPaintopLodLimitations>
{
public:
    inline friend bool operator==(const KisPaintopLodLimitations &lhs, const KisPaintopLodLimitations &rhs) {
            return lhs.limitations == rhs.limitations &&
            lhs.blockers == rhs.blockers;
    }

    KisPaintopLodLimitations& operator|=(const KisPaintopLodLimitations &rhs) {
        limitations |= rhs.limitations;
        blockers |= rhs.blockers;
        return *this;
    }

    QSet<KoID> limitations;
    QSet<KoID> blockers;
};

Q_DECLARE_METATYPE(KisPaintopLodLimitations);

#endif /* __KIS_PAINTOP_LOD_LIMITATIONS_H */