You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.4 KiB

#include "cellstatus.h"
#include "ui_cellstatus.h"
#include <QMessageBox>
cellstatus::cellstatus(QWidget *parent) :
QWidget(parent),
ui(new Ui::cellstatus)
{
ui->setupUi(this);
ui->pushButton->setStyleSheet("border:2px groove gray; background-color: rgb(225, 225, 225);"
"border-radius:5px;");
ui->pushButton_2->setStyleSheet("border:2px groove gray; background-color: rgb(225, 225, 225);"
"border-radius:5px;");
ui->pushButton->setFixedSize(25,25);
ui->pushButton_2->setFixedSize(25,25);
ui->gridLayout->setMargin(5);
ui->pushButton->setEnabled(true);
ui->pushButton_2->setEnabled(false);
m_order = new orderoom();
connect(m_order,&orderoom::ordersuccess,this,&cellstatus::onordersuccess);
}
cellstatus::~cellstatus()
{
delete ui;
}
void cellstatus::on_pushButton_clicked()
{
m_order->show();
}
void cellstatus::on_pushButton_2_clicked()
{
QMessageBox::information(this, QString::fromLocal8Bit(" 预定信息 "), QString::fromLocal8Bit(" 退房成功 "));
ui->pushButton->setEnabled(true);
ui->pushButton_2->setEnabled(false);
}
void cellstatus::onordersuccess()
{
QMessageBox::information(this, QString::fromLocal8Bit("预定信息"), QString::fromLocal8Bit("订房成功"));
ui->pushButton->setEnabled(false);
ui->pushButton_2->setEnabled(true);
}