33 lines
646 B
C
33 lines
646 B
C
|
#ifndef CUSTOM_H
|
||
|
#define CUSTOM_H
|
||
|
|
||
|
#include <QWidget>
|
||
|
#include <QLineEdit>
|
||
|
#include <QPushButton>
|
||
|
#include <QLabel>
|
||
|
#include <QDebug>
|
||
|
|
||
|
class Custom : public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
private:
|
||
|
QLineEdit *nameEdit; // 菜品
|
||
|
QLineEdit *nEdit; // 数量
|
||
|
QPushButton *toOrderBtn; // 下单
|
||
|
QLabel *eatStateLable; // 开吃状态
|
||
|
|
||
|
public slots:
|
||
|
void toOrderHandle(); // 处理按钮的点击事件
|
||
|
void okOrderHandle(); // 店家上菜信号的处理函数
|
||
|
|
||
|
|
||
|
signals:
|
||
|
void toOrderSignal(QString name,int n);
|
||
|
|
||
|
public:
|
||
|
Custom(QWidget *parent = nullptr);
|
||
|
~Custom();
|
||
|
};
|
||
|
#endif // CUSTOM_H
|