5 Star 12 Fork 3

curriculum-design / 快递驿站系统GUI

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
expresspay.cpp 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
把实验报告投到ECIR 提交于 2019-12-30 22:03 . 源文件审计完成
#include "expresspay.h"
#include "ui_expresspay.h"
#include"express.h"
#include"dataOperation.h"
#include<QStandardItem>
expresspay::expresspay(QWidget *parent) :
QWidget(parent),
ui(new Ui::expresspay)
{
zhifu=new payment();
ItemModel=new QStandardItemModel();
ui->setupUi(this);
connect(ui->listView,SIGNAL(clicked(QModelIndex)),this,SLOT(clickItem(QModelIndex)));
connect(zhifu,SIGNAL(fresh()),this,SLOT(refresh()));
connect(zhifu,SIGNAL(showpay()),this,SLOT(_showpay()));
this->setWindowTitle("快递驿站系统");
}
void expresspay::refresh()
{
ItemModel->clear();
allUnpaidExpress=dataOperation::getAllUnpaidExpress();
for(express* e : allUnpaidExpress)
{
QStandardItem* item=new QStandardItem ( QString::fromStdString(e->getExpressBill()));
ItemModel->appendRow(item);
}
ui->listView->setModel(ItemModel);
}
void expresspay::clickItem(QModelIndex Index)
{
zhifu->show(allUnpaidExpress[Index.row()]);
}
void expresspay::_showpay()
{
this->show();
}
expresspay::~expresspay()
{
delete ui;
}
void expresspay::on_pushButton_clicked()
{
this->hide();
emit showMain();
}
C++
1
https://gitee.com/curriculum-design/express_station_system_gui.git
git@gitee.com:curriculum-design/express_station_system_gui.git
curriculum-design
express_station_system_gui
快递驿站系统GUI
master

搜索帮助