ff7tk  1.2.0.13
Work with Final Fantasy 7 game data
SaveIcon.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2010 Arzel Jérôme <myst6re@gmail.com>
2 // SPDX-FileCopyrightText: 2012 - 2023 Chris Rizzitello <sithlord48@gmail.com>
3 // SPDX-License-Identifier: LGPL-3.0-or-later
4 
5 #pragma once
6 
7 #include <QObject>
8 #include <QPixmap>
9 #include <ff7tkdata_export.h>
10 
14 class FF7TKDATA_EXPORT SaveIcon : public QObject
15 {
16  Q_OBJECT
17 public:
19  SaveIcon();
20 
26  SaveIcon(const QByteArray &data, quint8 nbFrames = 1);
27 
32  SaveIcon(const QList<QByteArray> &data);
33 
39  void setAll(const QByteArray &data, quint8 nbFrames = 1);
40 
44  void setAll(const QList<QByteArray> &data);
45 
50  const QByteArray &save();
51 
56  QPixmap icon(bool chocobo_world_icon = false);
57 signals:
58  void nextIcon(QPixmap);
59 private:
60 
64  QPixmap chocoWorldIcon();
65 
69  void nextFrame();
70  QPixmap psxIcon();
71  QByteArray m_data;
72  quint8 m_nbFrames;
73  quint8 m_curFrame = 0;
74  static QTimer m_timer;
75 };
SaveIcon
PSX icon data as a QPixmap.
Definition: SaveIcon.h:14