代码拉取完成,页面将自动刷新
同步操作将从 ibc-dabing/Landlords 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#include "buttongroup.h"
#include "ui_buttongroup.h"
ButtonGroup::ButtonGroup(QWidget *parent) :
QWidget(parent),
ui(new Ui::ButtonGroup)
{
ui->setupUi(this);
}
ButtonGroup::~ButtonGroup()
{
delete ui;
}
void ButtonGroup::initButtons()
{
ui->start->setImage(":/images/start-1.png", ":/images/start-3.png", ":/images/start-2.png");
ui->playCard->setImage(":/images/chupai_btn-1.png", ":/images/chupai_btn-3.png", ":/images/chupai_btn-2.png");
ui->playCard1->setImage(":/images/chupai_btn-1.png", ":/images/chupai_btn-3.png", ":/images/chupai_btn-2.png");
ui->pass->setImage(":/images/pass_btn-1.png", ":/images/pass_btn-3.png", ":/images/pass_btn-2.png");
ui->giveup->setImage(":/images/buqiang-1.png", ":/images/buqiang-3.png", ":/images/buqiang-2.png");
ui->oneScore->setImage(":/images/1fen-1.png", ":/images/1fen-3.png", ":/images/1fen-2.png");
ui->twoScore->setImage(":/images/2fen-1.png", ":/images/2fen-3.png", ":/images/2fen-2.png");
ui->threeScore->setImage(":/images/3fen-1.png", ":/images/3fen-3.png", ":/images/3fen-2.png");
QVector<MyButton*> btns;
btns << ui->start << ui->playCard << ui->playCard1 << ui->pass
<< ui->giveup << ui->oneScore << ui->twoScore << ui->threeScore;
for(int i=0; i<btns.size(); ++i)
{
btns[i]->setFixedSize(90, 45);
}
connect(ui->start, &MyButton::clicked, this, &ButtonGroup::startGame);
connect(ui->playCard, &MyButton::clicked, this, &ButtonGroup::playHand);
connect(ui->playCard1, &MyButton::clicked, this, &ButtonGroup::playHand);
connect(ui->pass, &MyButton::clicked, this, &ButtonGroup::pass);
connect(ui->giveup, &MyButton::clicked, this, [=]()
{
emit betPoint(0);
});
connect(ui->oneScore, &MyButton::clicked, this, [=]()
{
emit betPoint(1);
});
connect(ui->twoScore, &MyButton::clicked, this, [=]()
{
emit betPoint(2);
});
connect(ui->threeScore, &MyButton::clicked, this, [=]()
{
emit betPoint(3);
});
}
void ButtonGroup::selectPanel(Panel type, int bet)
{
ui->stackedWidget->setCurrentIndex(type);
if(type != CallLord)
{
return;
}
if(bet == 0)
{
ui->oneScore->setVisible(true);
ui->twoScore->setVisible(true);
ui->threeScore->setVisible(true);
}
else if(bet == 1)
{
ui->oneScore->setVisible(false);
ui->twoScore->setVisible(true);
ui->threeScore->setVisible(true);
}
else if(bet == 2)
{
ui->oneScore->setVisible(false);
ui->twoScore->setVisible(false);
ui->threeScore->setVisible(true);
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。