ff7tk  0.02
Toolkit for making FF7 Tools
SlotPreview.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // copyright 2012 - 2016 Chris Rizzitello <sithlord48@gmail.com> //
3 // //
4 // This file is part of FF7tk //
5 // //
6 // FF7tk is free software: you can redistribute it and/or modify //
7 // it under the terms of the GNU General Public License as published by //
8 // the Free Software Foundation, either version 3 of the License, or //
9 // (at your option) any later version. //
10 // //
11 // FF7tk is distributed in the hope that it will be useful, //
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14 // GNU General Public License for more details. //
15 /****************************************************************************/
16 #ifndef SLOTPREVIEW_H
17 #define SLOTPREVIEW_H
18 
19 #include "qglobal.h"
20 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
21  #include <QtWidgets>
22 #else
23  #include <QtGui>
24 #endif
25 
26 //set path to save icon class
27 #include "../data/SaveIcon.h"
28 
34 class SlotPreview : public QLabel
35 {
36  Q_OBJECT
37 public:
40  SlotPreview(int index=0,qreal Scale=1,QWidget *parent = 0);
41  int index(void);
42  void setParty(QPixmap p1,QPixmap p2,QPixmap p3);
43  void setParty(QString p1_style,QString p2_style,QString p3_style);
44  void setName(QString);
45  void setLevel(int);
46  void setLocation(QString);
47  void setGil(int);
48  void setTime(int hour,int min);
49  void setPsxIcon(QByteArray icon_data,quint8 frames=1);
50  void setPsxIcon(QList<QByteArray> icon_data);
51  void setMode(int mode);
52 
53 private slots:
54  void setIndex(int index);
55  //raw pix map for labels
56  void set_Party1(QPixmap);
57  void set_Party2(QPixmap);
58  void set_Party3(QPixmap);
59  void set_Party1(QString style);
60  void set_Party2(QString style);
61  void set_Party3(QString style);
62  void removed(void);
63  void copy(void);
64  void paste(void);
65  void set_ff7_save(void);
66  void set_empty(void);
67  void set_psx_game(void);
68 
69 private:
70  void init_display(void);
71  QLabel *party1;
72  QLabel *party2;
73  QLabel *party3;
74  QLabel *name;
75  QLabel *lbl_Slot;
76  QLabel *lbl_time;
77  QLabel *lbl_level;
78  QLabel *location;
79  QLabel *lbl_gil;
80  QPushButton *btn_copy;
81  QPushButton *btn_paste;
82  QPushButton *btn_remove;
84  QHBoxLayout * btnLayout;
85  QVBoxLayout * Final;
86  QVBoxLayout *top_layout;
87  bool not_pc;
88  qreal scale;
89 protected:
90  void mousePressEvent(QMouseEvent *ev);
91 signals:
92  void clicked(int);
93  void btn_remove_clicked(int);
94  void btn_copy_clicked(int);
95  void btn_paste_clicked(int);
96 };
97 
98 #endif
void set_empty(void)
Definition: SlotPreview.cpp:76
Preview a Single Slot on a Psx memory card or FF7 Save file.
Definition: SlotPreview.h:34
void btn_paste_clicked(int)
Signal: User Clicked on paste .
void set_Party1(QPixmap)
QVBoxLayout * Final
Definition: SlotPreview.h:85
QLabel * party1
Definition: SlotPreview.h:71
void setPsxIcon(QByteArray icon_data, quint8 frames=1)
QLabel * lbl_level
Definition: SlotPreview.h:77
FF7 Save in slot.
Definition: SlotPreview.h:39
void set_ff7_save(void)
QPushButton * btn_copy
Definition: SlotPreview.h:80
void mousePressEvent(QMouseEvent *ev)
PSX Game or linked block.
Definition: SlotPreview.h:39
qreal scale
Definition: SlotPreview.h:88
void setLocation(QString)
void setTime(int hour, int min)
void removed(void)
void setMode(int mode)
Definition: SlotPreview.cpp:67
void setIndex(int index)
QLabel * location
Definition: SlotPreview.h:78
void copy(void)
QLabel * party2
Definition: SlotPreview.h:72
void paste(void)
QLabel * lbl_time
Definition: SlotPreview.h:76
QPushButton * btn_remove
Definition: SlotPreview.h:82
QLabel * lbl_Slot
Definition: SlotPreview.h:75
void setGil(int)
void setName(QString)
QLabel * party3
Definition: SlotPreview.h:73
void btn_copy_clicked(int)
Signal: User Clicked on copy .
int index(void)
void set_Party3(QPixmap)
void init_display(void)
Definition: SlotPreview.cpp:29
QHBoxLayout * btnLayout
Definition: SlotPreview.h:84
SaveIcon * icon
Definition: SlotPreview.h:83
void clicked(int)
Signal: User Clicked on preview .
QLabel * lbl_gil
Definition: SlotPreview.h:79
QLabel * name
Definition: SlotPreview.h:74
void setLevel(int)
void setParty(QPixmap p1, QPixmap p2, QPixmap p3)
void set_psx_game(void)
Definition: SlotPreview.cpp:94
PSX icon data as a QPixmap.
Definition: SaveIcon.h:26
void btn_remove_clicked(int)
Signal: User Clicked on remove .
QVBoxLayout * top_layout
Definition: SlotPreview.h:86
SlotPreview(int index=0, qreal Scale=1, QWidget *parent=0)
Definition: SlotPreview.cpp:17
QPushButton * btn_paste
Definition: SlotPreview.h:81
void set_Party2(QPixmap)