ff7tk  1.0.0.16
Work with Final Fantasy 7 game data
EncounterTableWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2009 - 2022 Arzel Jérôme <myst6re@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #pragma once
5 
6 #include <QGroupBox>
7 #include <ff7tkqtwidgets_export.h>
8 
9 class QLabel;
10 class QSpinBox;
11 class QSlider;
12 
13 class FF7TKQTWIDGETS_EXPORT EncounterTableWidget : public QGroupBox
14 {
15  Q_OBJECT
16 public:
17  explicit EncounterTableWidget(const QString &title, QWidget *parent = nullptr);
18  QList<int> battleIdsValues();
19  QList<int> battleProbasValues();
20  int rateValue();
21  void setBattleIdsValues(const QList<int> &ids);
22  void setBattleProbasValues(const QList<int> &probas);
23  void setRateValue(int value);
24 public slots:
25  void changePercent();
26  void changeProbaCount();
27 private:
28  static void setProbaLabelColor(QLabel *label, qint16 points);
29  QLabel *rateLabel = nullptr;
30  QLabel *probaLabel = nullptr;
31  QLabel *probaLabel2 = nullptr;
32  QSlider *mainRate = nullptr;
33  QGroupBox *group = nullptr;
34  QList<QSpinBox*> battleIds;
35  QList<QSpinBox*> battleProbas;
36  inline static const QStringList specialBattleNames = QStringList{ QT_TR_NOOP("Back Attack 1"), QT_TR_NOOP("Back Attack 2"), QT_TR_NOOP("Side Attack"), QT_TR_NOOP("Attack From Both Sides")};
37 };
EncounterTableWidget
Definition: EncounterTableWidget.h:13