From 17bdf0e302d0244720204423f0c9535ce53586bd Mon Sep 17 00:00:00 2001 From: red_ears <704943031@qq.com> Date: Tue, 9 Jul 2024 07:17:58 +0000 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=20'Pull=20Request=20!20=20:?= =?UTF-8?q?=20client=E4=BF=AE=E6=94=B9'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/companyinfoview.ui | 41 +++--- client/datatbase/desktop.ini | 4 - client/datatbase/system.db | Bin 16384 -> 16384 bytes client/homewidget.cpp | 23 +--- client/homewidget.h | 7 +- client/loginwidget.cpp | 2 +- client/optlogview.cpp | 3 - client/optlogview.ui | 29 ++-- client/syssettingview.ui | 249 ++++++++++++++++++++++++++++++++++- client/usermanageview.cpp | 48 ++++++- client/usermanageview.h | 10 +- 11 files changed, 344 insertions(+), 72 deletions(-) delete mode 100644 client/datatbase/desktop.ini diff --git a/client/companyinfoview.ui b/client/companyinfoview.ui index a92e1e1..31df395 100644 --- a/client/companyinfoview.ui +++ b/client/companyinfoview.ui @@ -6,26 +6,37 @@ 0 0 - 400 - 300 + 538 + 498 Form - - - - 50 - 40 - 72 - 15 - - - - 公司简介 - - + + + + + 公司简介 + + + + + + + 本公司是一家专业的汽车维修服务提供商,致力于为广大车主提供高品质、快捷的汽车维修服务。公司成立于2020年,经过多年的发展,已经成为当地知名的汽车维修品牌。 + +本公司拥有一支专业的维修团队,团队成员均具有丰富的汽车维修经验和专业技能。我们采用先进的检测设备和技术,确保维修质量可靠,同时提供24小时紧急救援服务,随时为车主解决用车问题。 + +我们的服务涵盖了多个领域,包括汽车保养、维修、检测、美容等。我们提供全面的维修套餐,满足不同车主的需求。同时,我们还提供个性化的定制服务,根据车主的需求和预算,为其量身定制最合适的维修方案。 + +我们注重每一个细节,严格把控服务质量。我们与多个知名汽车零部件品牌建立了合作关系,确保使用的配件品质可靠。同时,我们还提供原厂认证的维修和保养服务,确保车主的车辆得到最好的呵护。 + +作为一家专业的汽车维修服务提供商,我们将继续秉承“客户至上,质量为本”的服务理念,不断提升服务水平和技术实力,为广大车主提供更加专业、便捷的汽车维修服务。我们相信,在未来的发展中,本公司将成为更多车主的信赖之选。 + + + + diff --git a/client/datatbase/desktop.ini b/client/datatbase/desktop.ini deleted file mode 100644 index d957fd1..0000000 --- a/client/datatbase/desktop.ini +++ /dev/null @@ -1,4 +0,0 @@ -[ViewState] -Mode= -Vid= -FolderType=Generic diff --git a/client/datatbase/system.db b/client/datatbase/system.db index 9e559e4d20196faf307d6b394f68a260a1420d7d..545d29cccffa15d9c3f9e27a27bd7e52b32d9a82 100644 GIT binary patch delta 37 scmZo@U~Fh$oFL7pK2gS*QGH{=G -#include + #include #include #include "socket_data.h" - HomeWidget::HomeWidget(QWidget *parent) : QWidget(parent) , ui(new Ui::HomeWidget) @@ -71,8 +69,6 @@ HomeWidget::HomeWidget(QWidget *parent) ui->stackedWidget->setCurrentWidget(m_companyinfoview); - m_optLogView = new OptLogView(); - connect(ui->pushButtonOptLog,&QPushButton::clicked,this,&HomeWidget::handleOptLogBtnClicked); } HomeWidget::~HomeWidget() @@ -85,7 +81,7 @@ HomeWidget::~HomeWidget() void HomeWidget::handleSendSocketData(const QJsonObject &body) { - m_client->connectToHost("192.168.1.5", 10086); + m_client->connectToHost("192.168.246.151", 10086); qDebug() << "-----------------"; if (m_client->waitForConnected()) { // json对象转为字符串 @@ -157,19 +153,12 @@ void HomeWidget::changePage() } -void HomeWidget::handleOptLogBtnClicked() + + +void HomeWidget::on_pushButtonExitLogin_clicked() { this->hide(); + m_loginWidget->show(); - m_optLogView->setGeometry(0,0,1000,800); - QRect screenRect = QApplication::desktop()->screenGeometry(); - int centerX = (screenRect.width() - m_optLogView->width()) / 2; - int centerY = (screenRect.height() - m_optLogView->height()) / 2; - m_optLogView->move(centerX, centerY); - - m_optLogView->show(); - if(!m_optLogView->isVisible()){ - this->show(); - } } diff --git a/client/homewidget.h b/client/homewidget.h index d786498..53cc992 100644 --- a/client/homewidget.h +++ b/client/homewidget.h @@ -19,7 +19,6 @@ #include "systemwarning.h" #include "clientmanage.h" -#include "optlogview.h" QT_BEGIN_NAMESPACE namespace Ui { class HomeWidget; } @@ -38,7 +37,8 @@ private slots: void changePage(); - void handleOptLogBtnClicked(); + void on_pushButtonExitLogin_clicked(); + signals: void loginRes(bool); private: @@ -58,8 +58,5 @@ private: QMap pageMap; QList buttonList; - -private: - OptLogView* m_optLogView; }; #endif // HOMEWIDGET_H diff --git a/client/loginwidget.cpp b/client/loginwidget.cpp index 80fe040..0187e32 100644 --- a/client/loginwidget.cpp +++ b/client/loginwidget.cpp @@ -13,7 +13,7 @@ LoginWidget::LoginWidget(QWidget *parent) : { ui->setupUi(this); m_db = QSqlDatabase::addDatabase("QSQLITE"); - m_db.setDatabaseName("..\\client\\datatbase"); + m_db.setDatabaseName("..\\client\\datatbase\\system.db"); if (!m_db.open()) { return; } diff --git a/client/optlogview.cpp b/client/optlogview.cpp index 7372b23..5ee8c35 100644 --- a/client/optlogview.cpp +++ b/client/optlogview.cpp @@ -1,7 +1,6 @@ #include "optlogview.h" #include "ui_optlogview.h" - OptLogView::OptLogView(QWidget *parent) : QWidget(parent), ui(new Ui::OptLogView) @@ -13,5 +12,3 @@ OptLogView::~OptLogView() { delete ui; } - - diff --git a/client/optlogview.ui b/client/optlogview.ui index 2ee1399..b7707dc 100644 --- a/client/optlogview.ui +++ b/client/optlogview.ui @@ -13,22 +13,19 @@ Form - - - - - - - 操作日志 - - - - - - - - - + + + + 90 + 80 + 72 + 15 + + + + 操作日志 + + diff --git a/client/syssettingview.ui b/client/syssettingview.ui index 81ea50d..d854543 100644 --- a/client/syssettingview.ui +++ b/client/syssettingview.ui @@ -6,26 +6,263 @@ 0 0 - 400 - 300 + 430 + 525 Form - + - 130 - 110 + 20 + 10 72 15 - 设置界面 + 系统设置 + + + + 30 + 50 + 321 + 381 + + + + + + + + + 字体设置: + + + + + + + + 微软雅黑 + + + + + 黑体 + + + + + 宋体 + + + + + 仿宋 + + + + + 楷体 + + + + + 行楷 + + + + + + + + + + + + 大小设置: + + + + + + + + 初号 + + + + + 小初 + + + + + 一号 + + + + + 小一 + + + + + 二号 + + + + + 小二 + + + + + 三号 + + + + + 小三 + + + + + 四号 + + + + + 小四 + + + + + 五号 + + + + + 小五 + + + + + 六号 + + + + + 小六 + + + + + 七号 + + + + + 八号 + + + + + 5 + + + + + 5.5 + + + + + 6.5 + + + + + 7.5 + + + + + 8 + + + + + + + + + + + + 颜色设置: + + + + + + + + 红色 + + + + + 橙色 + + + + + 黄色 + + + + + 蓝色 + + + + + 绿色 + + + + + 青色 + + + + + 紫色 + + + + + 黑色 + + + + + 白色 + + + + + + + + diff --git a/client/usermanageview.cpp b/client/usermanageview.cpp index 25be1ab..19961fd 100644 --- a/client/usermanageview.cpp +++ b/client/usermanageview.cpp @@ -1,14 +1,54 @@ #include "usermanageview.h" #include "ui_usermanageview.h" +#include +#include + UserManageView::UserManageView(QWidget *parent) : - QWidget(parent), - ui(new Ui::UserManageView) + QWidget(parent) + //ui(new Ui::UserManageView) { - ui->setupUi(this); + //ui->setupUi(this); + + QVBoxLayout *layout = new QVBoxLayout(this); + + QLabel *titleLabel = new QLabel("User Management", this); + titleLabel->setAlignment(Qt::AlignCenter); + layout->addWidget(titleLabel); + + usernameEdit = new QLineEdit(this); + usernameEdit->setPlaceholderText("Enter username"); + layout->addWidget(usernameEdit); + + addButton = new QPushButton("Add User", this); + layout->addWidget(addButton); + + + QHBoxLayout *headerLayout = new QHBoxLayout(); + + QLabel *idLabel = new QLabel("1. ID", this); + headerLayout->addWidget(idLabel); + + QLabel *usernameLabel = new QLabel("2. Username", this); + headerLayout->addWidget(usernameLabel); + + QLabel *roleLabel = new QLabel("3. Role", this); + headerLayout->addWidget(roleLabel); + + QLabel *lastTimeLabel = new QLabel("4. Last Time", this); + headerLayout->addWidget(lastTimeLabel); + + layout->addLayout(headerLayout); + + + userTable = new QTableWidget(4, 4, this); + userTable->setHorizontalHeaderLabels({"ID", "Username", "password", "Last Time", "", "", ""}); // Adjusted headers + layout->addWidget(userTable); + + setLayout(layout); } UserManageView::~UserManageView() { - delete ui; + //delete ui; } diff --git a/client/usermanageview.h b/client/usermanageview.h index 6ce3417..d500165 100644 --- a/client/usermanageview.h +++ b/client/usermanageview.h @@ -3,6 +3,10 @@ #include +#include +#include +#include + namespace Ui { class UserManageView; } @@ -16,7 +20,11 @@ public: ~UserManageView(); private: - Ui::UserManageView *ui; + + QLineEdit *usernameEdit; + QPushButton *addButton; + QTableWidget *userTable; + //Ui::UserManageView *ui; }; #endif // USERMANAGEVIEW_H -- Gitee