diff --git a/Hotel_Management.pro b/Hotel_Management.pro new file mode 100644 index 0000000..980cc68 --- /dev/null +++ b/Hotel_Management.pro @@ -0,0 +1,36 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++17 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + administration.cpp \ + customer.cpp \ + main.cpp \ + login.cpp \ + receptionist.cpp + +HEADERS += \ + administration.h \ + customer.h \ + login.h \ + receptionist.h + +FORMS += \ + administration.ui \ + customer.ui \ + login.ui \ + receptionist.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +RESOURCES += \ + res.qrc diff --git a/Hotel_Management.pro.user b/Hotel_Management.pro.user new file mode 100644 index 0000000..ee397a5 --- /dev/null +++ b/Hotel_Management.pro.user @@ -0,0 +1,426 @@ + + + + + + EnvironmentId + {3704a204-3728-4298-b1a4-bef037da6219} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 8 + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop Qt 5.15.2 MinGW 64-bit + Desktop Qt 5.15.2 MinGW 64-bit + qt.qt5.5152.win64_mingw81_kit + 0 + 0 + 0 + + 0 + F:\Documents\qt\Hotel_Management\..\build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Debug + F:/Documents/qt/build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + F:\Documents\qt\Hotel_Management\..\build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Release + F:/Documents/qt/build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + F:\Documents\qt\Hotel_Management\..\build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Profile + F:/Documents/qt/build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + 部署 + 部署 + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + Qt4ProjectManager.Qt4RunConfiguration:F:/Documents/qt/Hotel_Management/Hotel_Management.pro + F:/Documents/qt/Hotel_Management/Hotel_Management.pro + false + true + true + false + true + F:/Documents/qt/build-Hotel_Management-Desktop_Qt_5_15_2_MinGW_64_bit-Debug + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop + 桌面 + 桌面 + {6973527e-3e45-46d9-b5b3-3fa7130f50c5} + 0 + 0 + 0 + + 0 + F:\Documents\qt\Hotel_Management\..\build-Hotel_Management-unknown-Debug + F:/Documents/qt/build-Hotel_Management-unknown-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + F:\Documents\qt\Hotel_Management\..\build-Hotel_Management-unknown-Release + F:/Documents/qt/build-Hotel_Management-unknown-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + F:\Documents\qt\Hotel_Management\..\build-Hotel_Management-unknown-Profile + F:/Documents/qt/build-Hotel_Management-unknown-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + 部署 + 部署 + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + true + + 2 + + ProjectExplorer.CustomExecutableRunConfiguration + + false + true + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/administration.cpp b/administration.cpp new file mode 100644 index 0000000..533315f --- /dev/null +++ b/administration.cpp @@ -0,0 +1,14 @@ +#include "administration.h" +#include "ui_administration.h" + +administration::administration(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::administration) +{ + ui->setupUi(this); +} + +administration::~administration() +{ + delete ui; +} diff --git a/administration.h b/administration.h new file mode 100644 index 0000000..9611be1 --- /dev/null +++ b/administration.h @@ -0,0 +1,22 @@ +#ifndef ADMINISTRATION_H +#define ADMINISTRATION_H + +#include + +namespace Ui { +class administration; +} + +class administration : public QMainWindow +{ + Q_OBJECT + +public: + explicit administration(QWidget *parent = nullptr); + ~administration(); + +private: + Ui::administration *ui; +}; + +#endif // ADMINISTRATION_H diff --git a/administration.ui b/administration.ui new file mode 100644 index 0000000..137b1c0 --- /dev/null +++ b/administration.ui @@ -0,0 +1,42 @@ + + + administration + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 1920 + 1080 + + + + + + + + 0 + 0 + 800 + 17 + + + + + + + + diff --git a/customer.cpp b/customer.cpp new file mode 100644 index 0000000..49d0cc7 --- /dev/null +++ b/customer.cpp @@ -0,0 +1,14 @@ +#include "customer.h" +#include "ui_customer.h" + +customer::customer(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::customer) +{ + ui->setupUi(this); +} + +customer::~customer() +{ + delete ui; +} diff --git a/customer.h b/customer.h new file mode 100644 index 0000000..ea9f291 --- /dev/null +++ b/customer.h @@ -0,0 +1,22 @@ +#ifndef CUSTOMER_H +#define CUSTOMER_H + +#include + +namespace Ui { +class customer; +} + +class customer : public QMainWindow +{ + Q_OBJECT + +public: + explicit customer(QWidget *parent = nullptr); + ~customer(); + +private: + Ui::customer *ui; +}; + +#endif // CUSTOMER_H diff --git a/customer.ui b/customer.ui new file mode 100644 index 0000000..8aa8121 --- /dev/null +++ b/customer.ui @@ -0,0 +1,42 @@ + + + customer + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 1920 + 1080 + + + + + + + + 0 + 0 + 800 + 17 + + + + + + + + diff --git a/info.png b/info.png new file mode 100644 index 0000000..d4037f0 Binary files /dev/null and b/info.png differ diff --git a/login.cpp b/login.cpp new file mode 100644 index 0000000..931b280 --- /dev/null +++ b/login.cpp @@ -0,0 +1,60 @@ +#include "login.h" +#include "ui_login.h" +#include "customer.h" +#include "administration.h" +#include "receptionist.h" + +login::login(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::login) +{ + ui->setupUi(this); + QIcon logo(":/image/icon/logo.png"); + this->setWindowIcon(logo); + setWindowTitle("宜客酒店"); + this->setFixedSize(1920,1080); + bg = new QLabel(this); + bg->setScaledContents(true); + bg->setPixmap(QPixmap(":/image/bg/login.png")); + bg->lower(); +} + +login::~login() +{ + delete ui; +} + +void login::paintEvent(QPaintEvent*) +{ + bg->resize(ui->widget->size()); +} + +void login::on_pushButton_clicked() +{ + QMessageBox::about(this, tr("关于我们"), tr("《宾馆客房管理系统》\n\n开发团队:\n\n项目总监:\n美术设计:\n程序设计: \n界面设计:\n系统测试:\n\nCopyright© 2023 xxx 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(); +} + diff --git a/login.h b/login.h new file mode 100644 index 0000000..0e2f956 --- /dev/null +++ b/login.h @@ -0,0 +1,37 @@ +#ifndef LOGIN_H +#define LOGIN_H + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE +namespace Ui { class login; } +QT_END_NAMESPACE + +class login : public QMainWindow +{ + Q_OBJECT + +public: + login(QWidget *parent = nullptr); + ~login(); + +protected: + void paintEvent(QPaintEvent*); + +private slots: + void on_pushButton_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_3_clicked(); + + void on_pushButton_4_clicked(); + +private: + Ui::login *ui; + QLabel *bg; +}; +#endif // LOGIN_H diff --git a/login.png b/login.png new file mode 100644 index 0000000..dded68c Binary files /dev/null and b/login.png differ diff --git a/login.ui b/login.ui new file mode 100644 index 0000000..41b983a --- /dev/null +++ b/login.ui @@ -0,0 +1,255 @@ + + + login + + + + 0 + 0 + 1920 + 1080 + + + + login + + + + true + + + + + 0 + 0 + 1920 + 1080 + + + + + + 1200 + 0 + 771 + 341 + + + + + 华康方圆体W7(P) + 80 + + + + color: rgb(170, 255, 255); + + + 宜客酒店 + + + + + + 1300 + 600 + 160 + 60 + + + + + 16 + + + + 登录 + + + + + true + + + + 1600 + 600 + 160 + 60 + + + + + 16 + + + + 注册 + + + + + + 1250 + 350 + 140 + 80 + + + + + 24 + + + + color: rgb(255, 255, 255); + + + 账号: + + + + + + 1250 + 450 + 140 + 80 + + + + + 24 + + + + color: rgb(255, 255, 255); + + + 密码: + + + + + + 1400 + 365 + 400 + 50 + + + + + 15 + + + + + + + 1400 + 465 + 400 + 50 + + + + + 15 + + + + + + + 1800 + 970 + 71 + 71 + + + + image: url(:/image/icon/info.png); +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 + + + + 管理 + + + + + + + + 0 + 0 + 1920 + 17 + + + + + + + + diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..96f9f58 Binary files /dev/null and b/logo.png differ diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..271188c --- /dev/null +++ b/main.cpp @@ -0,0 +1,11 @@ +#include "login.h" + +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + login w; + w.show(); + return a.exec(); +} diff --git a/receptionist.cpp b/receptionist.cpp new file mode 100644 index 0000000..6a3f896 --- /dev/null +++ b/receptionist.cpp @@ -0,0 +1,14 @@ +#include "receptionist.h" +#include "ui_receptionist.h" + +receptionist::receptionist(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::receptionist) +{ + ui->setupUi(this); +} + +receptionist::~receptionist() +{ + delete ui; +} diff --git a/receptionist.h b/receptionist.h new file mode 100644 index 0000000..93e7011 --- /dev/null +++ b/receptionist.h @@ -0,0 +1,22 @@ +#ifndef RECEPTIONIST_H +#define RECEPTIONIST_H + +#include + +namespace Ui { +class receptionist; +} + +class receptionist : public QMainWindow +{ + Q_OBJECT + +public: + explicit receptionist(QWidget *parent = nullptr); + ~receptionist(); + +private: + Ui::receptionist *ui; +}; + +#endif // RECEPTIONIST_H diff --git a/receptionist.ui b/receptionist.ui new file mode 100644 index 0000000..a45c9ff --- /dev/null +++ b/receptionist.ui @@ -0,0 +1,42 @@ + + + receptionist + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 1920 + 1080 + + + + + + + + 0 + 0 + 800 + 17 + + + + + + + + diff --git a/res.qrc b/res.qrc new file mode 100644 index 0000000..8cebefd --- /dev/null +++ b/res.qrc @@ -0,0 +1,9 @@ + + + login.png + + + info.png + logo.png + +