File indexing completed on 2024-05-12 15:58:43

0001 /*
0002  *  SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_SPONTANEOUS_JOB_H
0008 #define __KIS_SPONTANEOUS_JOB_H
0009 
0010 #include "kis_runnable_with_debug_name.h"
0011 
0012 /**
0013  * This class represents a simple update just that should be
0014  * executed by the updates system from time to time, without
0015  * any undo support. Just some useful update that
0016  * can be run concurrently with other types updates.
0017  */
0018 class KRITAIMAGE_EXPORT KisSpontaneousJob : public KisRunnableWithDebugName
0019 {
0020 public:
0021     virtual bool overrides(const KisSpontaneousJob *otherJob) = 0;
0022     virtual int levelOfDetail() const = 0;
0023     bool isExclusive() const {
0024         return m_isExclusive;
0025     }
0026 
0027 protected:
0028     void setExclusive(bool value) {
0029         m_isExclusive = value;
0030     }
0031 
0032 private:
0033     bool m_isExclusive = false;
0034 };
0035 
0036 #endif /* __KIS_SPONTANEOUS_JOB_H */