mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-12 20:05:55 -05:00
Add level distribution chart, more adjustments
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "encountertablemodel.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QtCharts>
|
||||
|
||||
namespace Ui {
|
||||
class WildMonChart;
|
||||
@@ -18,11 +19,40 @@ public:
|
||||
|
||||
public slots:
|
||||
void setTable(const EncounterTableModel *table);
|
||||
void updateChart();
|
||||
void createCharts();
|
||||
|
||||
private:
|
||||
Ui::WildMonChart *ui;
|
||||
const EncounterTableModel *table;
|
||||
|
||||
QStringList groupNames;
|
||||
QMap<int, QString> tableIndexToGroupName;
|
||||
|
||||
struct Summary {
|
||||
double speciesFrequency = 0.0;
|
||||
QMap<int, double> levelFrequencies;
|
||||
};
|
||||
|
||||
int tableMinLevel;
|
||||
int tableMaxLevel;
|
||||
|
||||
// GroupedData maps a group name ("old_rod", "good_rod"...)
|
||||
// to any summarized data needed for the charts.
|
||||
typedef QMap<QString, Summary> GroupedData;
|
||||
|
||||
QMap<QString, GroupedData> speciesToGroupedData;
|
||||
|
||||
QStringList getSpeciesNames() const;
|
||||
double getSpeciesFrequency(const QString&, const QString&) const;
|
||||
QMap<int, double> getLevelFrequencies(const QString &, const QString &) const;
|
||||
bool usesGroupLabels() const;
|
||||
|
||||
void clearTableData();
|
||||
void readTable();
|
||||
void createSpeciesDistributionChart();
|
||||
void createLevelDistributionChart();
|
||||
|
||||
void stopChartAnimation();
|
||||
};
|
||||
|
||||
#endif // WILDMONCHART_H
|
||||
|
||||
Reference in New Issue
Block a user