-
Notifications
You must be signed in to change notification settings - Fork 2
/
ordersmanagerframe.h
65 lines (48 loc) · 1.4 KB
/
ordersmanagerframe.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
#ifndef ORDERSMANAGERFRAME_H
#define ORDERSMANAGERFRAME_H
/**
订单管理,即可以删除,修改订单状态
*/
#include <QFrame>
#include <QTableView>
#include "vkeyboardex.h"
#include "tabviewpagerframe.h"
#include "OrderData.h"
#include "gridlayoutex.h"
class OrdersModel;
class OrdersManagerModel : public OrdersModel
{
public:
OrdersManagerModel(QObject *parent = {});
public:
int columnCount(const QModelIndex &) const override;
QVariant headerData(int section,
Qt::Orientation orientation,
int role) const override;
QVariant data(const QModelIndex &index, int role) const override ;
// QVariant headerData(int section, Qt::Orientation orientation, int role) const override ;
};
class OrdersManagerFrame : public QFrame
{
Q_OBJECT
public:
explicit OrdersManagerFrame(QWidget *parent = nullptr);
~OrdersManagerFrame();
public:
void resizeEvent(QResizeEvent *) override;
void showEvent(QShowEvent *) override;
void updateOrders(int pageId);
private:
void init();
void initOrderDetail(OrderBean &ob);
public slots:
void toPage(int pageid);
void onClicked(const QModelIndex &index);
void rowSelected(const QModelIndex &index);
private:
QTableView *_odTab;
OrdersManagerModel *_model;
TabViewPagerFrame *_pager;
GridLayoutEx *_orderdetailLayout;
};
#endif // ORDERSMANAGERFRAME_H