ff7tk  0.02
Toolkit for making FF7 Tools
SaveIcon.h
Go to the documentation of this file.
1 /****************************************************************************
2  **
3  ** Copyright (C) 2010 Arzel Jérôme <myst6re@gmail.com>
4  **
5  ** This program is free software: you can redistribute it and/or modify
6  ** it under the terms of the GNU General Public License as published by
7  ** the Free Software Foundation, either version 3 of the License, or
8  ** (at your option) any later version.
9  **
10  ** This program is distributed in the hope that it will be useful,
11  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
12  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  ** GNU General Public License for more details.
14  **
15  ** You should have received a copy of the GNU General Public License
16  ** along with this program. If not, see <http://www.gnu.org/licenses/>.
17  ****************************************************************************/
18 
19 #ifndef DEF_SAVEICON
20 #define DEF_SAVEICON
21 
22 #include <QtGui>
26 class SaveIcon : public QObject
27 {
28  Q_OBJECT
29 public:
31  SaveIcon();
32 
38  SaveIcon(QByteArray data, quint8 nbFrames=1);
39 
44  SaveIcon(QList<QByteArray> data);
45 
51  void setAll(QByteArray data, quint8 nbFrames=1);
52 
56  void setAll(QList<QByteArray> data);
57 
61  QByteArray sauver();
62 
67  QPixmap icon(bool chocobo_world_icon=false);
68 signals:
69 
70  void nextIcon(QPixmap);
71 private slots:
72  void nextFrame();
73 private:
74  QByteArray data;
75  quint8 nbFrames, curFrame;
76  static QTimer timer;
77 };
78 
79 #endif
QByteArray sauver()
incase you wish to write the icon to a file
Definition: SaveIcon.cpp:63
void setAll(QByteArray data, quint8 nbFrames=1)
fill SaveIcon with data
Definition: SaveIcon.cpp:38
void nextFrame()
get get next icon if more then one frame
Definition: SaveIcon.cpp:147
QPixmap icon(bool chocobo_world_icon=false)
pixmap of your icon
Definition: SaveIcon.cpp:68
SaveIcon()
create a new Save icon
Definition: SaveIcon.cpp:23
static QTimer timer
frame change timer.
Definition: SaveIcon.h:76
QByteArray data
hold our icon data
Definition: SaveIcon.h:74
quint8 curFrame
current Frame
Definition: SaveIcon.h:75
quint8 nbFrames
number of frames
Definition: SaveIcon.h:75
PSX icon data as a QPixmap.
Definition: SaveIcon.h:26
void nextIcon(QPixmap)
Emit Signal: Time to update your QPixmap. connect to object your displaying on to tell it time for a ...