-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchallongeimporter.h
43 lines (33 loc) · 1.6 KB
/
challongeimporter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef CHALLONGEIMPORTER_H
#define CHALLONGEIMPORTER_H
#include <QObject>
#include <QFile>
#include "database.h"
#include "data.h"
class ChallongeImporter : public QObject
{
public:
ChallongeImporter(QObject* parent = NULL);
void errMsg( const QString& msg ) const;
void importFile( const QString& path, const QString& session_tournament_name, const QMap<QString, QString>& gamertag_replacements ) const;
void import( const QString& data, const QString& session_tournament_name, const QMap<QString, QString>& gamertag_replacements ) const;
void importMatches(const QJsonObject& tournament,
const QString& session_date, const QString& session_name,
const int session_challonge_id, const int session_tournament_id,
const QString& session_url, const QMap<QString, QString>& gamertag_replacements,
QMap<int,PlayerData>& player_data,
std::vector<MatchData>& match_data) const;
private:
void importParticipants_p(const QJsonObject& tournament,
QMap<int,PlayerData>& player_data,
const QMap<QString, QString>& gamertag_replacements) const;
void exportParticipants_p( const QMap<int,PlayerData>& player_data ) const;
void importMatches_p( const QJsonArray matches,
std::vector<MatchData>& match_data,
const QMap<int,PlayerData>& player_data,
const QMap<QString, QString>& gamertag_replacements) const;
PlayerData player_p( const QMap<int,PlayerData>& player_data,
const int p_id ) const;
QWidget* m_mainwindow;
};
#endif // CHALLONGEIMPORTER_H