1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/curriculum-design-express_station_system_gui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
expressmail.cpp 2.7 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
怎样 Отправлено 06.01.2021 15:16 af2f1d3
#include "expressmail.h"
#include "ui_expressmail.h"
#include "packagein.h"
#include "express.h"
#include "dataOperation.h"
#include <QMessageBox>
#include "payment.h"
#include "text.h"
#include "help.h"
expressmail::expressmail(QWidget *parent) :
QWidget(parent),
ui(new Ui::expressmail)
{
displayBill=new text;
zhifu=new payment;
ui->setupUi(this);
connect(displayBill,SIGNAL(showpay()),this,SLOT(_showpay()));
ui->fahuo->setPlaceholderText("输入发货人");
ui->shouhuo->setPlaceholderText("输入收货人");
ui->name->setPlaceholderText("输入名字");
ui->value->setPlaceholderText("输入价格");
ui->volum->setPlaceholderText("输入体积");
ui->weight->setPlaceholderText("输入重量");
this->setWindowTitle("快递驿站系统");
}
expressmail::~expressmail()
{
delete ui;
}
void expressmail::on_clear_clicked()
{
ui->fahuo->clear();
ui->shouhuo->clear();
ui->name->clear();
ui->value->clear();
ui->volum->clear();
ui->weight->clear();
}
void expressmail::on_pushButton_3_clicked()
{
this->hide();
emit showMain();
}
void expressmail::on_confirm_clicked()
{
if(ui->fahuo->text()==""||ui->shouhuo->text()==""||ui->name->text()==""||ui->weight->text()==""
||ui->volum->text()==""||ui->value->text()=="")
{
help::msgbox(this,"提示","请填写信息");
return;
}
string consigner=ui->fahuo->text().toStdString();
string consignee=ui->shouhuo->text().toStdString();
string name=ui->name->text().toStdString();
float weight=ui->weight->text().toFloat();
float volume=ui->volum->text().toFloat();
float value=ui->value->text().toFloat();
express tmp=express(consigner,consignee,name, weight,volume,value,help::refreshTime());
dataOperation::allExpress.push_back(tmp);
shared_ptr<table> expresses=tableManager::tablemanager->loadTable("allExpress");
expresses->add({typeHelper::strToBasic("'"+tmp.getCourierNumber()+"'"),
typeHelper::strToBasic("'"+consigner+"'"),
typeHelper::strToBasic("'"+consignee+"'"),
typeHelper::strToBasic("'"+name+"'"),
typeHelper::strToBasic(to_string(weight)),
typeHelper::strToBasic(to_string(volume)),
typeHelper::strToBasic(to_string(value)),
typeHelper::strToBasic("false")});
tableManager::tablemanager->doManage();
on_clear_clicked();
express *e=&dataOperation::allExpress.back();
zhifu->setSelectExpress(e);
string expbill=e->getExpressBill();
displayBill->show(QString::fromStdString(expbill));
}
void expressmail::_showpay()
{
zhifu->QWidget::show();
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/curriculum-design-express_station_system_gui.git
git@api.gitlife.ru:oschina-mirror/curriculum-design-express_station_system_gui.git
oschina-mirror
curriculum-design-express_station_system_gui
curriculum-design-express_station_system_gui
master