-
Notifications
You must be signed in to change notification settings - Fork 0
/
internalmessages.h
45 lines (40 loc) · 1.31 KB
/
internalmessages.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
44
45
#ifndef INTERNALMESSAGES_H
#define INTERNALMESSAGES_H
#include <QMetaType>
#include <QString>
namespace InternalMessages{
struct TournamentChangedData{
TournamentChangedData(){}
TournamentChangedData(const TournamentChangedData& data){
pk = data.pk;
currentRoundIndex = data.currentRoundIndex;
currentGame = data.currentGame;
name = data.name;
eventType = data.eventType;
subscribed = data.subscribed;
}
~TournamentChangedData(){}
TournamentChangedData(int pk, int currentRoundIndex, QString name, QString eventType, bool subscribed):pk(pk),currentRoundIndex(currentRoundIndex),name(name),eventType(eventType),subscribed(subscribed){}
int pk;
int currentRoundIndex = 1;
int currentGame = 1;
QString name;
QString eventType;
bool subscribed;
};}
Q_DECLARE_METATYPE(InternalMessages::TournamentChangedData)
namespace InternalMessages {
struct RoundChangedData{
RoundChangedData(){}
RoundChangedData(const RoundChangedData& data){
pk = data.pk;
gamesPerMatch = data.gamesPerMatch;
}
~RoundChangedData(){}
RoundChangedData(int pk, int gamesPerMatch = 1):pk(pk),gamesPerMatch(gamesPerMatch){}
int pk;
int gamesPerMatch;
};
}
Q_DECLARE_METATYPE(InternalMessages::RoundChangedData)
#endif // INTERNALMESSAGES_H