File indexing completed on 2024-05-12 15:59:54

0001 /*
0002  *  SPDX-FileCopyrightText: 2020 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef KOCANVASRESOURCESINTERFACE_H
0007 #define KOCANVASRESOURCESINTERFACE_H
0008 
0009 #include "kritaresources_export.h"
0010 #include <QSharedPointer>
0011 
0012 class QVariant;
0013 
0014 #include <kritaresources_export.h>
0015 
0016 /**
0017  * @brief An abstract class for providing access to canvas resources
0018  * like current gradient and Fg/Bg colors.
0019  *
0020  * Specific implementations may forward the requests either to
0021  * KoCanvasResourceProvider or to a local storage.
0022  */
0023 class KRITARESOURCES_EXPORT KoCanvasResourcesInterface
0024 {
0025 public:
0026     virtual ~KoCanvasResourcesInterface();
0027 
0028     virtual QVariant resource(int key) const = 0;
0029 };
0030 
0031 using KoCanvasResourcesInterfaceSP = QSharedPointer<KoCanvasResourcesInterface>;
0032 
0033 #endif // KOCANVASRESOURCESINTERFACE_H