roulette-payout/PlayerAreaModel.h
2024-06-01 13:19:32 +01:00

60 lines
1 KiB
C++

#pragma once
#include <QQuickView>
#include <QtGui/qwindow.h>
#include <qobject.h>
#include <qqmlintegration.h>
#include <qtmetamacros.h>
class PlayerAreaModel : public QObject
{
Q_OBJECT
QML_NAMED_ELEMENT(PlayerAreaModel)
QML_SINGLETON
public:
explicit PlayerAreaModel(QObject *parent = nullptr);
enum BetType {
RED,
BLACK,
ODD,
EVEN,
LOW,
HIGH,
DOZEN,
STREET,
SINGLE,
SPLIT
};
Q_ENUM(BetType)
public slots:
void setPlayerName(QString s, int n);
void bet(BetType b, int n);
QString getPlayerName(int n);
void setFocusedPlayer(int n);
private:
QList<QString> playerNames;
uint player1Bet1;
uint player1Bet2;
uint player2Bet1;
uint player2Bet2;
uint player3Bet1;
uint player3Bet2;
uint player4Bet1;
uint player4Bet2;
uint player5Bet1;
uint player5Bet2;
uint player6Bet1;
uint player6Bet2;
uint player7Bet1;
uint player7Bet2;
int focusedPlayer;
};