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