69 lines
1.7 KiB
C++
69 lines
1.7 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
|
|
|
|
Q_PROPERTY(QString playerName1 READ playerName1 NOTIFY playerName1Changed)
|
|
Q_PROPERTY(QString playerName2 READ playerName2 NOTIFY playerName2Changed)
|
|
Q_PROPERTY(QString playerName3 READ playerName3 NOTIFY playerName3Changed)
|
|
Q_PROPERTY(QString playerName4 READ playerName4 NOTIFY playerName4Changed)
|
|
Q_PROPERTY(QString playerName5 READ playerName5 NOTIFY playerName5Changed)
|
|
Q_PROPERTY(QString playerName6 READ playerName6 NOTIFY playerName6Changed)
|
|
Q_PROPERTY(QString playerName7 READ playerName7 NOTIFY playerName7Changed)
|
|
|
|
public:
|
|
explicit PlayerAreaModel(QObject *parent = nullptr);
|
|
QString playerName1();
|
|
QString playerName2();
|
|
QString playerName3();
|
|
QString playerName4();
|
|
QString playerName5();
|
|
QString playerName6();
|
|
QString playerName7();
|
|
enum BetType {
|
|
RED,
|
|
BLACK,
|
|
ODD,
|
|
EVEN,
|
|
LOW,
|
|
HIGH,
|
|
DOZEN,
|
|
STREET,
|
|
SINGLE,
|
|
SPLIT
|
|
};
|
|
|
|
Q_ENUM(BetType)
|
|
|
|
signals:
|
|
void playerName1Changed();
|
|
void playerName2Changed();
|
|
void playerName3Changed();
|
|
void playerName4Changed();
|
|
void playerName5Changed();
|
|
void playerName6Changed();
|
|
void playerName7Changed();
|
|
|
|
public slots:
|
|
void setPlayerName(QString s, int n);
|
|
void bet(BetType b, int n);
|
|
|
|
private:
|
|
QString playerName1Text;
|
|
QString playerName2Text;
|
|
QString playerName3Text;
|
|
QString playerName4Text;
|
|
QString playerName5Text;
|
|
QString playerName6Text;
|
|
QString playerName7Text;
|
|
};
|