diff --git a/Hotel_Management.pro.user b/Hotel_Management.pro.user index 4f4b51f..dc57382 100644 --- a/Hotel_Management.pro.user +++ b/Hotel_Management.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -243,7 +243,6 @@ true false true - F:/git/Hotel_Management/build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Debug 1 diff --git a/add.jpg b/add.jpg new file mode 100644 index 0000000..391bed5 Binary files /dev/null and b/add.jpg differ diff --git a/add_administration.cpp b/add_administration.cpp index bc868b1..705c52e 100644 --- a/add_administration.cpp +++ b/add_administration.cpp @@ -7,6 +7,14 @@ add_administration::add_administration(QWidget *parent) : ui(new Ui::add_administration) { ui->setupUi(this); + QIcon logo(":/image/icon/logo.png"); + this->setWindowIcon(logo); + this->setWindowTitle("提示"); + this->setFixedSize(400,300); + bg = new QLabel(this); + bg->setScaledContents(true); + bg->setPixmap(QPixmap(":/image/bg/add.jpg")); + bg->lower(); } @@ -15,14 +23,20 @@ add_administration::~add_administration() delete ui; } +void add_administration::paintEvent(QPaintEvent*) +{ + bg->resize(ui->widget->size()); +} + void add_administration::on_pushButton_clicked() { - administration *ad = new administration; + //administration *ad = new administration; QSqlQuery query((db)); - query.prepare("INSERT into room VALUES(:n,1,1,1,1,NULL,NULL);"); - query.bindValue(":n",ui->lineEdit->text()); - query.exec(); - QMessageBox::information(this,tr("提示"),("添加成功,请刷新")); + query.prepare("INSERT into room VALUES(:n,1,1,1,1,NULL,NULL);"); + query.bindValue(":n",ui->lineEdit->text()); + query.exec(); + QMessageBox::information(this,tr("提示"),("添加成功,请刷新")); + this->hide(); } diff --git a/add_administration.h b/add_administration.h index 9ebeb51..2ff37fb 100644 --- a/add_administration.h +++ b/add_administration.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace Ui { class add_administration; @@ -17,12 +18,16 @@ public: explicit add_administration(QWidget *parent = nullptr); ~add_administration(); +protected: + void paintEvent(QPaintEvent*); + private slots: void on_pushButton_clicked(); private: Ui::add_administration *ui; QSqlDatabase db; + QLabel *bg; }; #endif // ADD_ADMINISTRATION_H diff --git a/add_administration.ui b/add_administration.ui index 76f00a0..76aaa0e 100644 --- a/add_administration.ui +++ b/add_administration.ui @@ -13,40 +13,62 @@ Dialog - + - 140 - 240 - 80 - 19 + 0 + 0 + 400 + 300 - - 确定 - - - - - - 90 - 90 - 191 - 81 - - - - - - - 房间号: - - - - - - - + + + + 50 + 90 + 301 + 81 + + + + + + + + 12 + true + + + + 房间号: + + + + + + + + 12 + + + + + + + + + + 150 + 230 + 100 + 30 + + + + 确定 + + diff --git a/administration.cpp b/administration.cpp index 464ddfe..ff2dc2c 100644 --- a/administration.cpp +++ b/administration.cpp @@ -142,7 +142,7 @@ void administration::on_Del_clicked() QTableWidgetItem *item = ui->AcounTable->currentItem(); QString n = 0; n = ui->AcounTable->model()->index(item->row(),0).data().toString(); - int num = n.toInt(); + //int num = n.toInt(); query.prepare("DELETE from customer where account = :num "); query.bindValue(":num",n); query.exec(); diff --git a/administration.ui b/administration.ui index 2c8650c..79605bd 100644 --- a/administration.ui +++ b/administration.ui @@ -58,6 +58,9 @@ 24 + + Qt::NoFocus + background-color: rgb(85, 170, 255); border-radius:15px; @@ -80,6 +83,9 @@ border-radius:15px; 24 + + Qt::NoFocus + background-color: rgb(85, 170, 255); border-radius:15px; @@ -146,6 +152,9 @@ color: rgb(255, 255, 255); 24 + + Qt::NoFocus + background-color: rgb(85, 170, 255); border-radius:15px; @@ -189,6 +198,9 @@ border-radius:15px; 24 + + Qt::NoFocus + background-color: rgb(85, 170, 255); border-radius:15px; @@ -211,6 +223,9 @@ border-radius:15px; 24 + + Qt::NoFocus + background-color: rgb(85, 170, 255); border-radius:15px; diff --git a/customer.ui b/customer.ui index 1acc359..29850e1 100644 --- a/customer.ui +++ b/customer.ui @@ -45,6 +45,9 @@ 60 + + Qt::TabFocus + 退 @@ -213,6 +216,9 @@ color: rgb(255, 255, 255); 25 + + Qt::NoFocus + image:url(:/image/icon/resetcode.png); background-color: rgba(0, 0, 0, 0); diff --git a/customerbackground.webp b/customerbackground.webp deleted file mode 100644 index 24f95da..0000000 Binary files a/customerbackground.webp and /dev/null differ diff --git a/login.cpp b/login.cpp index 134cd74..11da9fa 100644 --- a/login.cpp +++ b/login.cpp @@ -50,31 +50,6 @@ void login::on_btn_info_clicked() QMessageBox::about(this, tr("关于我们"), tr("《宾馆客房管理系统》\n\n开发团队:Cyber Pigeon\n\n产品经理:雷张炜\n界面设计:雷张炜\n美术设计:雷张炜、周海康\n系统测试:余朴\n软件分析:曹坤\n程序总监:雷张炜、周海康\n程序设计:雷张炜、周海康、余朴、曹坤\n\nCopyright© 2023 Cyber Pigeon® All Right Reserved.")); } - -void login::on_pushButton_2_clicked() -{ - customer *cus = new customer; - this->hide(); - cus->show(); -} - - -void login::on_pushButton_3_clicked() -{ - receptionist *rec = new receptionist; - this->hide(); - rec->show(); -} - - -void login::on_pushButton_4_clicked() -{ - administration *admin = new administration; - this->hide(); - admin->show(); -} - - void login::on_btn_login_clicked() { bool isfind = false; diff --git a/login.h b/login.h index 55d1774..4a0b7b7 100644 --- a/login.h +++ b/login.h @@ -27,12 +27,6 @@ protected: private slots: void on_btn_info_clicked(); - void on_pushButton_2_clicked(); - - void on_pushButton_3_clicked(); - - void on_pushButton_4_clicked(); - void on_btn_login_clicked(); void on_btn_register_clicked(); diff --git a/login.ui b/login.ui index 8bb8452..9eecaa2 100644 --- a/login.ui +++ b/login.ui @@ -86,6 +86,9 @@ 16 + + Qt::NoFocus + radius:15px; @@ -188,66 +191,6 @@ background-color: rgba(0, 0, 0, 0); - - - - 40 - 290 - 501 - 271 - - - - - 50 - - - - color: rgb(255, 255, 255); - - - 测试用 - - - - - - 130 - 570 - 151 - 41 - - - - 客户 - - - - - - 130 - 620 - 151 - 41 - - - - 前台 - - - - - - 130 - 670 - 151 - 41 - - - - 管理 - - diff --git a/orderoom.ui b/orderoom.ui index d503af3..260ae3f 100644 --- a/orderoom.ui +++ b/orderoom.ui @@ -101,6 +101,9 @@ 12 + + Qt::NoFocus + 新建客户 @@ -126,6 +129,9 @@ 12 + + Qt::NoFocus + 订房 diff --git a/res.qrc b/res.qrc index d4ca0c0..d8c9b3c 100644 --- a/res.qrc +++ b/res.qrc @@ -1,11 +1,10 @@ login.png - customerbackground.webp sea.jpg - stone.jpg register.jpg order.png + add.jpg info.png diff --git a/stone.jpg b/stone.jpg deleted file mode 100644 index fa1f6de..0000000 Binary files a/stone.jpg and /dev/null differ