Warning, file /plasma/kdeplasma-addons/applets/fifteenPuzzle/plugin/fifteenimageprovider.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * SPDX-FileCopyrightText: 2014 Jeremy Whiting <jpwhiting@kde.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef FIFTEENIMAGEPROVIDER_H
0008 #define FIFTEENIMAGEPROVIDER_H
0009 
0010 #include <QQuickImageProvider>
0011 #include <QString>
0012 #include <QVector>
0013 
0014 class FifteenImageProvider : public QQuickImageProvider
0015 {
0016 public:
0017     FifteenImageProvider();
0018 
0019     QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
0020 
0021 private:
0022     // Update our pixmaps, called when sizes change or boardSize changes
0023     void updatePixmaps();
0024 
0025     QString m_imagePath;
0026     QPixmap m_pixmap;
0027     int m_boardSize;
0028     int m_pieceWidth;
0029     int m_pieceHeight;
0030 
0031     QVector<QPixmap> m_pixmaps;
0032 };
0033 
0034 #endif