-
Notifications
You must be signed in to change notification settings - Fork 2
/
moresettingframe.h
125 lines (101 loc) · 2.51 KB
/
moresettingframe.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#ifndef MORESETTINGFRAME_H
#define MORESETTINGFRAME_H
#include <QFrame>
#include <QComboBox>
#include "OrderData.h"
#include "gridlayoutex.h"
#include "cookingtimeframe.h"
#include "vkeyboardex.h"
#include "flavorsettingframe.h"
class MoreSettingFrame;
/**
拆单 输入窗口
*/
class SplitOrderFrame : public QFrame {
Q_OBJECT
public:
explicit SplitOrderFrame(QWidget* target, QWidget* parent) ;
~SplitOrderFrame() override;
public:
void resizeEvent(QResizeEvent* e) override;
void showEvent(QShowEvent* e) override;
public slots:
void onKeyDown(const QString& k);
void onVKeyDown(const QString& k);
signals:
void done(int count);
private:
void init();
private:
GridLayoutEx* _layout;
VKeyboardEx* _vkb;
LineEditEx* _number;
QWidget* _target;
};
/**********
* 折扣下拉扩展
* */
class DiscountFrame : public QFrame {
Q_OBJECT
public:
explicit DiscountFrame(QWidget* target, QWidget* parent) ;
~DiscountFrame() override;
public:
void resizeEvent(QResizeEvent* e) override;
void retranslateUI();
private:
void init();
private:
GridLayoutEx* _layout;
QWidget* _target;
};
class DiscountComboBox : public QComboBox
{
Q_OBJECT
public:
explicit DiscountComboBox(MoreSettingFrame* pWnd, QWidget* parent) ;
~DiscountComboBox() override ;
public:
void showPopup() override;
signals:
void showDiscountFrame();
private:
MoreSettingFrame* _pWnd;
};
class MoreSettingFrame : public QFrame
{
Q_OBJECT
public:
explicit MoreSettingFrame(OrderBean* order, QWidget *parent = nullptr);
~MoreSettingFrame() override ;
public:
void resizeEvent(QResizeEvent *) override;
void showEvent(QShowEvent* e) override;
void hideEvent(QHideEvent* e) override;
void updateOrder(OrderBean* ob);
void retranslateUI();
public slots:
void onCookTimeClicked();
void onKeyDown(const QString&);
void showDiscountFrame();
void onCookingTimeSet(const QString&);
void onSaveConsumerAddrClicked();
//分单完成
void onDoneSplit(int);
void flavorSettingDone(const QString& flavor );
signals:
void onMoreDone();
private:
void init();
private:
OrderBean* _order;
VKeyItemButton* _done;
VKeyItemButton* _cancel;
CookingTimeFrame* _cookingTimeFrm; //预约下厨时间
DiscountFrame* _discountFrm; //折扣
DiscountComboBox *_discount;
FlavorSettingFrame* _flavorFrm;
SplitOrderFrame* _splitOrderFrm; //分单
GridLayoutEx* _layout;
};
#endif // MORESETTINGFRAME_H