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

0001 /*
0002  *  SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KISDECORATEDNODEINTERFACE_H
0008 #define KISDECORATEDNODEINTERFACE_H
0009 
0010 #include "kritaimage_export.h"
0011 
0012 /**
0013  * A special interface for layer that have a "decorations",
0014  * that is, a data that is written into layer stack, but is
0015  * not a part of user's image.
0016  */
0017 class KRITAIMAGE_EXPORT KisDecoratedNodeInterface
0018 {
0019 public:
0020     virtual ~KisDecoratedNodeInterface();
0021 
0022     /**
0023      * \return true is the layer is allowed to write
0024      * its decorative information into the stack. The
0025      * value should be "true" by default.
0026      */
0027     virtual bool decorationsVisible() const = 0;
0028 
0029     /**
0030      * Enable or disable writing decorative information into
0031      * layer stack.
0032      */
0033     virtual void setDecorationsVisible(bool value, bool update) = 0;
0034 
0035     /**
0036      * Convenience override for setDecorationsVisible()
0037      */
0038     void setDecorationsVisible(bool value);
0039 };
0040 
0041 #endif // KISDECORATEDNODEINTERFACE_H