• 大小: 2.14MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-13
  • 语言: 其他
  • 标签: 斗地主  

资源简介

斗地主界面程序(Qt5.7版本),简单的模仿了发牌的界面,没有深入解决其他。

资源截图

代码片段和文件信息

#include “basewidget.h“
#include 

baseWidget::baseWidget(QWidget *parent) : QWidget(parent)
{
    verDesktop=new VerDesktop(this);
    ver=verDesktop->getVerDesktop();
    setbaseWidgetSizeAndBackground();
    setCardbaseWidgetOnbaseWidget();
    setPersonPixmapLabel();
    connect(cardbaseWidgetSIGNAL(hideCardssssLabel())thisSLOT(getHideCardsss()));
    connect(openGameButtonSIGNAL(clicked(bool))thisSLOT(openGameButtonSlot()));
    connect(getDizhuButtonSIGNAL(clicked(bool))thisSLOT(getDizhuButtonSlot()));
    connect(abandonDizhuButtonSIGNAL(clicked(bool))SLOT(abandonDizhuButtonSlot()));
    connect(chupaiButtonSIGNAL(clicked(bool))thisSLOT(chupaiButtonSlot()));
    connect(buyaoButtonSIGNAL(clicked(bool))thisSLOT(buyaoButtonSlot()));
}
void baseWidget::setbaseWidgetSizeAndBackground()
{
    this->setGeometry(5*ver5*ver1300*ver900*ver);
    this->setMinimumSize(1300*ver900*ver);
    this->setMaximumSize(1300*ver900*ver);
}
void baseWidget::changebaseBackgroundPicture()
{
}
void baseWidget::setNormalbaseBackgroundPicture()
{
}
void baseWidget::paintEvent(QPaintEvent *event)
{
    Q_UNUSED(event);
    QPixmap background0;
    background0.load(“:/res/image/basebackground0.png“);
    background0.scaled(1300*ver900*ver);
    QPainter painter(this);
    painter.save();
    painter.drawPixmap(001300*ver900*verbackground0);
    painter.restore();
}
void baseWidget::setPersonPixmapLabel()
{
    dizhuLabel=new QLabel(this);
    nongmin0Label=new QLabel(this);
    nongmin1Label=new QLabel(this);
    cardsAllLabel=new QLabel(this);
    openGameButton=new QPushButton(this);
    rightCardAllLabel=new QLabel(this);
    leftCardAllLabel=new QLabel(this);
    leftCardSizeWidget=new QWidget(this);
    leftCardSizeLabel=new QLabel(leftCardSizeWidget);
    rightCardSizeWidget=new QWidget(this);
    rightCardSizeLabel=new QLabel(rightCardSizeWidget);
    getDizhuButton=new QPushButton(this);
    abandonDizhuButton=new QPushButton(this);
    chupaiButton=new QPushButton(this);
    buyaoButton=new QPushButton(this);
    QPixmap nongmin0Pix(“:/res/image/nongmin0.png“);
    nongmin0Label->setGeometry(0280*ver155*ver210*ver);
    nongmin0Label->setPixmap(nongmin0Pix.scaled(155*ver210*ver));
    QPixmap nongmin1Pix(“:/res/image/nongmin1.png“);
    nongmin1Label->setGeometry(1148*ver280*ver155*ver210*ver);
    nongmin1Label->setPixmap(nongmin1Pix.scaled(155*ver210*ver));
    QPixmap dizhuPix(“:/res/image/dizhu.png“);
    dizhuLabel->setGeometry(10*ver603*ver170*ver240*ver);
    dizhuLabel->setPixmap(dizhuPix);
    QPixmap cardsssPix(“:/res/image/cardsss.png“);
    cardsAllLabel->setGeometry(550*ver370*ver150*ver150*ver);
    cardsAllLabel->setPixmap(cardsssPix.scaled(150*ver150*ver));
    cardsAllLabel->setScaledContents(true);
    QPixmap rightCardsssPix(“:/res/image/rightcardsss.png“);
    rightCardAllLabel->setPixmap(rightCardsssPix.scal

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-04-23 15:57  Doudizhu\
     文件         705  2017-03-07 16:47  Doudizhu\Doudizhu.pro
     文件       64098  2017-04-23 15:57  Doudizhu\Doudizhu.pro.user
     文件        9830  2017-03-07 17:02  Doudizhu\basewidget.cpp
     文件        2354  2017-03-04 11:57  Doudizhu\basewidget.h
     文件        1814  2017-03-13 15:07  Doudizhu\cardsbasewidget.cpp
     文件         839  2017-03-04 23:22  Doudizhu\cardsbasewidget.h
     文件        2229  2017-03-07 16:19  Doudizhu\cardwidget.cpp
     文件        1328  2017-03-04 11:00  Doudizhu\cardwidget.h
     目录           0  2017-03-02 09:17  Doudizhu\image\
     文件     1895115  2017-02-28 12:08  Doudizhu\image\basebackground0.png
     文件        7528  2017-02-28 15:05  Doudizhu\image\card.png
     文件      108499  2017-03-03 10:16  Doudizhu\image\cards.png
     文件       39573  2017-03-01 21:01  Doudizhu\image\cardsss.png
     文件       55347  2017-02-28 13:45  Doudizhu\image\dizhu.png
     文件       22920  2017-03-02 09:11  Doudizhu\image\leftcardsss.png
     文件       46972  2017-02-28 13:38  Doudizhu\image\nongmin0.png
     文件       39329  2017-02-28 13:42  Doudizhu\image\nongmin1.png
     文件       17115  2017-03-02 09:11  Doudizhu\image\rightcardsss.png
     文件         436  2017-03-02 09:18  Doudizhu\image.qrc
     文件         183  2017-02-28 11:01  Doudizhu\main.cpp
     文件        1349  2017-03-02 14:48  Doudizhu\mainwindow.cpp
     文件         648  2017-02-28 15:50  Doudizhu\mainwindow.h
     文件         989  2017-02-28 11:02  Doudizhu\mainwindow.ui
     文件         157  2017-03-07 17:03  Doudizhu\mythreadbackgroundcarddata.cpp
     文件         374  2017-03-07 17:02  Doudizhu\mythreadbackgroundcarddata.h
     文件         924  2017-03-02 19:11  Doudizhu\mythreadrandomnum.cpp
     文件         368  2017-03-02 19:11  Doudizhu\mythreadrandomnum.h
     文件         237  2017-02-11 20:35  Doudizhu\verdesktop.cpp
     文件         290  2017-02-05 14:03  Doudizhu\verdesktop.h

评论

共有 条评论