7 #include <ff7tkwidgets_export.h>
8 #include <Type_FF7CHAR>
36 explicit CharEditor(QWidget *parent =
nullptr);
37 void setChar(
const FF7CHAR &Chardata,
const QString &Processed_Name =
"");
42 bool showPlaceholderMateria();
72 quint8 levelProgress();
85 void changeEvent(QEvent *e)
override;
93 void idChanged(qint8
id);
94 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::idChanged") ]]
void id_changed(qint8);
100 void levelChanged(qint8 level);
101 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::levelChanged") ]]
void level_changed(qint8);
107 void strengthChanged(quint8 strength);
108 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::strengthChanged") ]]
void str_changed(quint8);
114 void vitalityChanged(quint8 vitality);
115 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::vitalityChanged") ]]
void vit_changed(quint8);
121 void magicChanged(quint8 magic);
122 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::magicChanged") ]]
void mag_changed(quint8);
128 void spiritChanged(quint8 spirit);
129 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::spiritChanged") ]]
void spi_changed(quint8);
135 void dexterityChanged(quint8 dexterity);
136 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::dexterityChanged") ]]
void dex_changed(quint8);
141 void luckChanged(quint8 luck);
142 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::luckChanged") ]]
void lck_changed(quint8);
148 void strengthBonusChanged(quint8 strengthBonus);
149 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::strengthBonusChanged") ]]
void strBonus_changed(quint8);
155 void vitalityBonusChanged(quint8 vitalityBonus);
156 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::vitalityBonusChanged") ]]
void vitBonus_changed(quint8);
162 void magicBonusChanged(quint8 magicBonus);
163 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::magicBonusChanged") ]]
void magBonus_changed(quint8);
169 void spiritBonusChanged(quint8 spiritBonus);
170 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::spiritBonusChanged") ]]
void spiBonus_changed(quint8);
176 void dexterityBonusChanged(quint8 dexterityBonus);
177 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::dexterityBonusChanged") ]]
void dexBonus_changed(quint8);
183 void luckBonusChanged(quint8 luckBonus);
184 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::luckBonusChanged") ]]
void lckBonus_changed(quint8);
191 void limitLevelChanged(qint8 limitLevel);
192 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::limitLevelChanged") ]]
void limitLevel_changed(qint8);
198 void limitBarChanged(qint8 limitBar);
199 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::limitBarChanged") ]]
void limitBar_changed(quint8);
205 void nameChanged(QString name);
206 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::nameChanged") ]]
void name_changed(QString);
212 void weaponChanged(quint8 weapon);
213 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::weaponChanged") ]]
void weapon_changed(quint8);
219 void armorChanged(quint8 armor);
220 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::armorChanged") ]]
void armor_changed(quint8);
226 void accessoryChanged(quint8 accessory);
228 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::accessoryChanged") ]]
void accessory_changed(quint8);
234 void curHpChanged(quint16 curHp);
235 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::curHpChanged") ]]
void curHp_changed(quint16);
241 void maxHpChanged(quint16 maxHp);
242 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::maxHpChanged") ]]
void maxHp_changed(quint16);
248 void curMpChanged(quint16 curMp);
249 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::curMpChanged") ]]
void curMp_changed(quint16);
255 void maxMpChanged(quint16 maxMp);
256 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::maxMpChanged") ]]
void maxMp_changed(quint16);
262 void killsChanged(quint16 kills);
263 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::killsChanged") ]]
void kills_changed(quint16);
269 void rowChanged(quint8 row);
270 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::rowChanged") ]]
void row_changed(quint8);
276 void levelProgressChanged(quint8 levelProgress);
277 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::levelProgressChanged") ]]
void levelProgress_changed(quint8);
283 void stateChanged(quint8 state);
284 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::stateChanged") ]]
void sadnessfury_changed(quint8);
290 void limitsChanged(quint16 limits);
291 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::limitsChanged") ]]
void limits_changed(quint16);
297 void times1UsedChanged(quint16 times);
298 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::times1UsedChanged") ]]
void timesused1_changed(quint16);
304 void times2UsedChanged(quint16 times);
305 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::times2UsedChanged") ]]
void timesused2_changed(quint16);
311 void times3UsedChanged(quint16 times);
312 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::times3UsedChanged") ]]
void timesused3_changed(quint16);
318 void baseHpChanged(quint16 baseHp);
319 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::baseHpChanged") ]]
void baseHp_changed(quint16);
325 void baseMpChanged(quint16 baseMp);
326 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::baseMpChanged") ]]
void baseMp_changed(quint16);
332 void expChanged(quint32 exp);
333 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::expChanged") ]]
void exp_changed(quint32);
339 void mslotChanged(
int mslot);
345 void materiaChanged(
materia mat);
346 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::materiaChanged") ]]
void Materias_changed(
materia);
352 void expNextChanged(quint32 expNext);
353 [[ deprecated (
"will be removed in ff7tk 2.0, Use CharEditor::expNextChanged") ]]
void expNext_changed(quint32);
356 void setAutoLevel(
bool);
357 void setAutoStatCalc(
bool);
358 void setEditable(
bool);
359 void setShowPlaceholderMateria(
bool);
360 void setAdvancedMode(
bool);
361 void setToolBoxStyle(
const QString &styleSheet);
362 void setSliderStyle(
const QString &style);
363 void setEditableComboBoxes(
bool);
374 void setStrBonus(
int);
375 void setVitBonus(
int);
376 void setMagBonus(
int);
377 void setSpiBonus(
int);
378 void setDexBonus(
int);
379 void setLckBonus(
int);
380 void setLimitLevel(
int);
381 void setLimitBar(
int);
382 void setName(
const QString &name);
385 void setAccessory(
int);
386 void setRow(
bool front_row);
387 void setLevelProgress(
int);
388 void setSadnessFury(
int);
390 void setTimesused1(
int);
391 void setTimesused2(
int);
392 void setTimesused3(
int);
396 void setExpNext(
int);
402 void cb_fury_toggled(
bool);
403 void cb_sadness_toggled(
bool);
404 void cb_idChanger_toggled(
bool);
405 void calc_limit_value(QModelIndex);
406 void Level_Changed(
int);
407 void Exp_Changed(
int);
408 void materiaSlotClicked(
int slotClicked);
409 void matAp_changed(qint32);
410 void matId_changed(qint8);
412 void init_connections();
413 void disconnectAll();
416 void update_tnl_bar();
417 void elemental_info();
419 void update_materia_slots();
420 void updateMateriaToolTips();
437 QWidget* makeStatWidget(QSpinBox* statBaseSpinBox =
nullptr, QSpinBox* statSourceSpinBox =
nullptr
438 , QLabel* statLabel =
nullptr, QLabel* statMateriaBonusLabel =
nullptr, QLabel* statTotalLabel =
nullptr);
444 QFrame* makeStatFrame();
455 QHBoxLayout * makeMateriaSlotPair(QPushButton* button1 =
nullptr, QPushButton* button2 =
nullptr, QFrame *frame1 =
nullptr, QFrame *frame2 =
nullptr, QLabel* linkLabel =
nullptr);
461 QWidget * makeLimitLayout();
464 bool autolevel{
true};
465 bool autostatcalc{
true};
467 bool showplaceholderMateria{
false};
468 bool advancedMode{
false};
474 QLabel *lblAvatar =
nullptr;
475 QLineEdit *lineName =
nullptr;
476 QSpinBox *sbLevel =
nullptr;
477 QSpinBox *sbCurrentMp =
nullptr;
478 QSpinBox *sbCurrentHp =
nullptr;
480 QLabel *lblBaseHp =
nullptr;
481 QSpinBox *sbBaseHp =
nullptr;
482 QLabel *lblBaseHpBonus =
nullptr;
484 QLabel *lblBaseMp =
nullptr;
485 QSpinBox *sbBaseMp =
nullptr;
486 QLabel *lblBaseMpBonus =
nullptr;
488 QSpinBox *sbKills =
nullptr;
489 QLabel *lblCurrentHp =
nullptr;
490 QLabel *lblMaxHp =
nullptr;
491 QLabel *lblCurrentMp =
nullptr;
492 QLabel *lblMaxMp =
nullptr;
493 QCheckBox *cbFury =
nullptr;
494 QCheckBox *cbSadness =
nullptr;
495 QCheckBox *cbFrontRow =
nullptr;
496 QComboBox *comboId =
nullptr;
498 QSpinBox *sbTotalExp =
nullptr;
499 QLabel *lbl_level_next =
nullptr;
500 QProgressBar *bar_tnl =
nullptr;
501 QLabel *lbl_limit_bar =
nullptr;
502 QSlider *slider_limit =
nullptr;
503 QLCDNumber *lcdLimitValue =
nullptr;
505 QLabel *lblStr =
nullptr;
506 QSpinBox *sbStr =
nullptr;
507 QSpinBox *sbStrSourceUse =
nullptr;
508 QLabel *lblStrMateriaBonus =
nullptr;
509 QLabel *lblStrTotal =
nullptr;
511 QLabel *lblVit =
nullptr;
512 QSpinBox *sbVit =
nullptr;
513 QSpinBox *sbVitSourceUse =
nullptr;
514 QLabel *lblVitMateriaBonus =
nullptr;
515 QLabel *lblVitTotal =
nullptr;
517 QLabel *lblMag =
nullptr;
518 QSpinBox *sbMag =
nullptr;
519 QSpinBox *sbMagSourceUse =
nullptr;
520 QLabel *lblMagMateriaBonus =
nullptr;
521 QLabel *lblMagTotal =
nullptr;
523 QLabel *lblSpi =
nullptr;
524 QSpinBox *sbSpi =
nullptr;
525 QSpinBox *sbSpiSourceUse =
nullptr;
526 QLabel *lblSpiMateriaBonus =
nullptr;
527 QLabel *lblSpiTotal =
nullptr;
529 QLabel *lblDex =
nullptr;
530 QSpinBox *sbDex =
nullptr;
531 QSpinBox *sbDexSourceUse =
nullptr;
532 QLabel *lblDexMateriaBonus =
nullptr;
533 QLabel *lblDexTotal =
nullptr;
535 QLabel *lblLck =
nullptr;
536 QSpinBox *sbLck =
nullptr;
537 QSpinBox *sbLckSourceUse =
nullptr;
538 QLabel *lblLckMateriaBonus =
nullptr;
539 QLabel *lblLckTotal =
nullptr;
541 QSpinBox *sbLimitLevel =
nullptr;
542 QSpinBox *sb_uses_limit_1_1 =
nullptr;
543 QSpinBox *sb_uses_limit_2_1 =
nullptr;
544 QSpinBox *sb_uses_limit_3_1 =
nullptr;
545 QListWidget *list_limits =
nullptr;
546 QLabel *lbl_uses =
nullptr;
547 QLabel *lbl_1_1 =
nullptr;
548 QLabel *lbl_2_1 =
nullptr;
549 QLabel *lbl_3_1 =
nullptr;
550 QLabel *lbl_0x34 =
nullptr;
551 QLabel *lbl_0x35 =
nullptr;
552 QLabel *lbl_0x36 =
nullptr;
553 QLabel *lbl_0x37 =
nullptr;
554 QLabel *lblWeaponStats =
nullptr;
555 QLabel *lblArmorStats =
nullptr;
556 QComboBox *weapon_selection =
nullptr;
557 QComboBox *armor_selection =
nullptr;
558 QComboBox *accessory_selection =
nullptr;
560 QGroupBox *elemental_box =
nullptr;
561 QGroupBox *status_box =
nullptr;
562 QListWidget *elemental_effects =
nullptr;
563 QListWidget *status_effects =
nullptr;
564 QFrame *weapon_materia_box =
nullptr;
565 QFrame *armor_materia_box =
nullptr;
566 QGroupBox *weapon_box =
nullptr;
567 QGroupBox *armor_box =
nullptr;
568 QGroupBox *accessory_box =
nullptr;
569 QList<QFrame *> materiaSlotFrames;
570 QList<QPushButton *> materiaSlots;
571 QLabel *weapon_m_link_1 =
nullptr;
572 QLabel *weapon_m_link_2 =
nullptr;
573 QLabel *weapon_m_link_3 =
nullptr;
574 QLabel *weapon_m_link_4 =
nullptr;
575 QLabel *armor_m_link_1 =
nullptr;
576 QLabel *armor_m_link_2 =
nullptr;
577 QLabel *armor_m_link_3 =
nullptr;
578 QLabel *armor_m_link_4 =
nullptr;
579 QToolBox *toolbox =
nullptr;
580 QFrame *unknown_box =
nullptr;
581 QLCDNumber *lcd_0x34 =
nullptr;
582 QLCDNumber *lcd_0x35 =
nullptr;
583 QLCDNumber *lcd_0x36 =
nullptr;
584 QLCDNumber *lcd_0x37 =
nullptr;
585 QCheckBox *cb_idChanger =
nullptr;
587 const int lineHeight;
588 const QSizePolicy sbSizePolicy;
590 inline static const int quint8Max = 255;
591 inline static const int qint16Max = 32767;
592 inline static const int quint16Max = 65535;
593 inline static const int expMax = 2147483647;
594 inline static const QString comboStyle = QStringLiteral(
"QComboBox { combobox-popup: 0}");
595 inline static const QString transparentBackgroundStyle = QStringLiteral(
"QFrame{background-color:rgba(0,0,0,0);}");