ff7tk  1.2.0.24
Work with Final Fantasy 7 game data
ChocoboEditor.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2012 - 2023 Chris Rizzitello <sithlord48@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <QWidget>
7 #include <QEvent>
8 #include <ff7tkwidgets_export.h>
9 #include <Type_FF7CHOCOBO>
10 
11 class QCheckBox;
12 class QComboBox;
13 class QFrame;
14 class QGridLayout;
15 class QLabel;
16 class QLineEdit;
17 class QSpinBox;
18 
19 class FF7TKWIDGETS_EXPORT ChocoboEditor : public QWidget
20 {
21  Q_OBJECT
22 protected:
23  void resizeEvent(QResizeEvent *ev);
24  void changeEvent(QEvent *e);
25 public:
26  explicit ChocoboEditor(QWidget *parent = nullptr);
27  void SetChocobo(FF7CHOCOBO choco, const QString &Processed_Name = nullptr, bool cant_mate = false, quint16 stamina = 0, quint8 rating = 0);
28 public slots:
29  void updateText();
30  void setSprint(int);
31  void setMsprint(int);
32  void setSpeed(int);
33  void setMspeed(int);
34  void setStamina(int);
35  void setAccel(int);
36  void setCoop(int);
37  void setIntelligence(int);
38  void setPersonality(int);
39  void setPcount(int);
40  void setWins(int);
41  void setSex(int);
42  void setType(int);
43  void setName(const QString &);
44  void setCantMate(bool);
45  void setRating(int);
46  void setAdvancedMode(bool);
47 signals:
48  void sprintChanged(quint16);
49  void mSprintChanged(quint16);
50  void speedChanged(quint16);
51  void mSpeedChanged(quint16);
52  void staminaChanged(quint16);
53  void accelChanged(quint8);
54  void coopChanged(quint8);
55  void intelligenceChanged(quint8);
56  void personalityChanged(quint8);
57  void pCountChanged(quint8);
58  void winsChanged(quint8);
59  void sexChanged(quint8);
60  void typeChanged(quint8);
61  void nameChanged(QString);
62  void cantMateChanged(bool);
63  void ratingChanged(quint8);
64 private:
65  void init_connections();
66  void getRank(void);
67  QSpinBox *makeSpinBox(int maxValue);
68  //Widgets
69  QFrame *advancedModeBox = nullptr;
70  QLabel *lbl_rank = nullptr;
71  QLabel *lbl_speed = nullptr;
72  QLabel *lbl_sprint = nullptr;
73  QLabel *lbl_accel = nullptr;
74  QLabel *lbl_stamina = nullptr;
75  QLabel *lbl_wins = nullptr;
76  QLabel *lbl_coop = nullptr;
77  QLabel *lbl_intel = nullptr;
78  QLabel *lbl_pCount = nullptr;
79  QLabel *lbl_personality = nullptr;
80  QLabel *lbl_rating = nullptr;
81  QLabel *lblSpeedWarning = nullptr;
82  QComboBox *combo_sex = nullptr;
83  QComboBox *combo_type = nullptr;
84  QComboBox *combo_rating = nullptr;
85  QCheckBox *cb_cantMate = nullptr;
86  QLineEdit *line_name = nullptr;
87  QSpinBox *sb_speed = nullptr;
88  QSpinBox *sb_mSpeed = nullptr;
89  QSpinBox *sb_sprint = nullptr;
90  QSpinBox *sb_mSprint = nullptr;
91  QSpinBox *sb_stamina = nullptr;
92  QSpinBox *sb_accel = nullptr;
93  QSpinBox *sb_wins = nullptr;
94  QSpinBox *sb_coop = nullptr;
95  QSpinBox *sb_pCount = nullptr;
96  QSpinBox *sb_intel = nullptr;
97  QSpinBox *sb_personality = nullptr;
98  QGridLayout *Final = nullptr;
99  //Data
100  FF7CHOCOBO choco_data;
101  QString choco_name;
102  quint16 choco_stamina;
103  bool choco_cant_mate;
104  quint8 choco_rating;
105 };
106 
Definition: ChocoboEditor.h:20
void staminaChanged(quint16)
void accelChanged(quint8)
void ratingChanged(quint8)
void mSpeedChanged(quint16)
void cantMateChanged(bool)
void winsChanged(quint8)
void sexChanged(quint8)
void pCountChanged(quint8)
void speedChanged(quint16)
void intelligenceChanged(quint8)
void personalityChanged(quint8)
void sprintChanged(quint16)
void typeChanged(quint8)
void nameChanged(QString)
void mSprintChanged(quint16)
void coopChanged(quint8)
a chocobo in save game