File indexing completed on 2024-04-14 03:59:23

0001 /******************************************************************************
0002 *   KBlocks, a falling blocks game by KDE                                     *
0003 *   SPDX-FileCopyrightText: 2010-2020 Mauricio Piacentini <mauricio@tabuleiro.com>      *
0004 *                           Zhongjie Cai <squall.leonhart.cai@gmail.com>      *
0005 *                           Julian Helfferich <julian.helfferich@mailbox.org> *
0006 *                                                                             *
0007 *   SPDX-License-Identifier: GPL-2.0-or-later
0008 ******************************************************************************/
0009 #ifndef KBLOCKSGRAPHICS_H
0010 #define KBLOCKSGRAPHICS_H
0011 
0012 #include <QSvgRenderer>
0013 #include <QPixmap>
0014 
0015 #include "GraphicsInterface.h"
0016 
0017 class KBlocksGraphics : public GraphicsInterface
0018 {
0019 public:
0020     explicit KBlocksGraphics(const KGameTheme *theme);
0021     ~KBlocksGraphics() override;
0022 
0023 public:
0024     bool loadTheme(const KGameTheme *theme) override;
0025     void readThemeValues(const KGameTheme *theme) override;
0026     QSvgRenderer *renderer() const override
0027     {
0028         return m_renderer;
0029     }
0030 
0031 private:
0032     QSvgRenderer *m_renderer = nullptr;
0033 
0034     //QPixmap renderElement(int width, int height, const QString & elementid);
0035     //QString pixmapCacheNameFromElementId(int width, int height, const QString & elementid);
0036 };
0037 
0038 #endif