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

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISDELAYEDUPDATENODEINTERFACE_H
0008 #define KISDELAYEDUPDATENODEINTERFACE_H
0009 
0010 #include "kritaimage_export.h"
0011 
0012 
0013 /**
0014  * @brief The KisDelayedUpdateNodeInterface class is an interface for
0015  * nodes that dealy their real updates with KisSignalCompressor. Some
0016  * operations need explicit regeneration before they can proceed.
0017  */
0018 class KRITAIMAGE_EXPORT KisDelayedUpdateNodeInterface
0019 {
0020 public:
0021     virtual ~KisDelayedUpdateNodeInterface();
0022 
0023     /**
0024      * @brief forceUpdateTimedNode forrces the node to regenerate its project. The update might
0025      * be asynchronous, so you should call image->waitForDone() after that.
0026      */
0027     virtual void forceUpdateTimedNode() = 0;
0028 
0029     /**
0030      * @return true if forceUpdateTimedNode() is going to
0031      * produce any real updates, that is the node has any
0032      * updates still pending
0033      */
0034     virtual bool hasPendingTimedUpdates() const = 0;
0035 };
0036 
0037 #endif // KISDELAYEDUPDATENODEINTERFACE_H