2290867136 2 years ago
parent 08dfe9c660
commit 7b4196485c

@ -1,7 +1,12 @@
#ifndef CUSTOMER_H #ifndef CUSTOMER_H
#define CUSTOMER_H #define CUSTOMER_H
#include "login.h"
#include <QMainWindow> #include <QMainWindow>
#include <QLabel>
#include <QIcon>
#include <QMessageBox>
#include <QTableWidgetItem>
namespace Ui { namespace Ui {
class customer; class customer;
@ -14,9 +19,44 @@ class customer : public QMainWindow
public: public:
explicit customer(QWidget *parent = nullptr); explicit customer(QWidget *parent = nullptr);
~customer(); ~customer();
void addrow(QString name,QString gender,int age,QString bornplace);
void findall();
void flush_data(QVector<QVector<QString>>&userinfo);
bool find_byname(QString name);
private slots:
void on_checking_out1_clicked();
void on_Reservation1_clicked();
void on_commandLinkButton_clicked();
void on_toolButton_2_clicked();
void on_checkBox_clicked(bool checked);
void on_checkBox_2_clicked(bool checked);
void on_checkBox_3_clicked(bool checked);
void on_radioButton_clicked(bool checked);
void on_radioButton_2_clicked(bool checked);
void on_tableWidget_itemClicked(QTableWidgetItem *item);
void on_search_clicked();
private: private:
Ui::customer *ui; Ui::customer *ui;
QLabel *labelone;
login *lg;
QSqlDatabase db;
QVector<QVector<QString>>userinfo;
}; };
#endif // CUSTOMER_H #endif // CUSTOMER_H

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>1920</width>
<height>600</height> <height>1080</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,12 +17,293 @@
<widget class="QWidget" name="widget" native="true"> <widget class="QWidget" name="widget" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>20</x>
<y>0</y> <y>-50</y>
<width>1920</width> <width>1920</width>
<height>1080</height> <height>1080</height>
</rect> </rect>
</property> </property>
<widget class="QToolButton" name="Reservation1">
<property name="geometry">
<rect>
<x>1620</x>
<y>400</y>
<width>40</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>订</string>
</property>
</widget>
<widget class="QToolButton" name="checking_out1">
<property name="geometry">
<rect>
<x>1620</x>
<y>310</y>
<width>40</width>
<height>40</height>
</rect>
</property>
<property name="text">
<string>退</string>
</property>
</widget>
<widget class="QLabel" name="operation">
<property name="geometry">
<rect>
<x>1600</x>
<y>230</y>
<width>80</width>
<height>40</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>操作</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QLabel" name="sign">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>281</width>
<height>151</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>70</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(85, 255, 255);</string>
</property>
<property name="text">
<string>宜客酒店</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QToolButton" name="toolButton_2">
<property name="geometry">
<rect>
<x>1280</x>
<y>100</y>
<width>160</width>
<height>60</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>显示全部</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_2">
<property name="geometry">
<rect>
<x>1580</x>
<y>100</y>
<width>160</width>
<height>60</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>1470</x>
<y>100</y>
<width>81</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>房间号:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
<widget class="QCommandLinkButton" name="commandLinkButton">
<property name="geometry">
<rect>
<x>20</x>
<y>980</y>
<width>201</width>
<height>81</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>30</pointsize>
</font>
</property>
<property name="text">
<string>返回</string>
</property>
<property name="iconSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
</widget>
<widget class="QTableWidget" name="tableWidget">
<property name="geometry">
<rect>
<x>150</x>
<y>300</y>
<width>1400</width>
<height>600</height>
</rect>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>1570</x>
<y>600</y>
<width>131</width>
<height>221</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>行表头</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_2">
<property name="text">
<string>列表头</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_3">
<property name="text">
<string>交替背景色</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QPushButton" name="search">
<property name="geometry">
<rect>
<x>1760</x>
<y>100</y>
<width>100</width>
<height>60</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text">
<string>搜索</string>
</property>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>1350</x>
<y>190</y>
<width>211</width>
<height>101</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>15</pointsize>
</font>
</property>
<property name="text">
<string>当前选中的行:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>1570</x>
<y>440</y>
<width>151</width>
<height>151</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QRadioButton" name="radioButton">
<property name="text">
<string>选择单格</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_2">
<property name="text">
<string>选择行</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">
@ -30,8 +311,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>1920</width>
<height>17</height> <height>18</height>
</rect> </rect>
</property> </property>
</widget> </widget>

Loading…
Cancel
Save