whyclwt
2022-05-18 ab72c6e114d7c4e83564194367ba623ca23bf09d
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
#ifndef DATALIST_PAGE_H
#define DATALIST_PAGE_H
 
#include "Common/app_define.h"
#include <QDateTime>
#include "WorkThread/work_thread.h"
#include "CustomClass/custom_dialog.h"
#include "filemanage.h"
 
 
namespace Ui {
class DataList_Page;
}
 
class DataList_Page : public custom_dialog
{
    Q_OBJECT
 
public:
    explicit DataList_Page(QWidget *parent = 0, Work_Thread *workthread = 0);
    ~DataList_Page();
 
    void showDataListPage(void);
 
    static bool isMemoryIsFull(void);
 
private:
    Ui::DataList_Page *ui;
 
    QPushButton *listNameButton[8];
    QPushButton *listCheckButton[8];
    bool checkFlag[8];
 
    FileManage fileManage;
    Work_Thread *work_thread;
    QTimer *t_timer;
 
    QVector<QString> stopType;
    QVector<QString> chargeType;
 
    static const int File_Count_Max = 800;
 
    static const int DataNumEachPage = 8;
 
 
 
private:
    QString data_name;
    QStringList nameList;           //数据列表
    int nameNum;                    //数据总数
    int currentDataPageIndex;       //当前数据页
    int pageNum;                    //总页数
 
    int dataNumOnCurrentPage;              //当前页数据数量
 
    QStringList dataTypeList;
    quint8 dataTypeIndex;
 
    bool checkedDischarge;
    bool checkedCharge;
    bool checkedCycle;
    bool checkedAllSelect;
 
    bool dataAllShow;
 
private :
    void initUi();
 
    void updateDataNameList(void);
    void updateDataListButton();
    void initDataListButton();
 
    QStringList getCheckDataList(void);
    void usbSaveCheckData(void);
    void deleteCheckData(void);
 
    void popBox(QString msg);
 
    void checkIcon();
 
    void set_MemoryRest();
 
    void closeDataListPage(void);
 
 
public slots:
    void DataBtnSlot();
    void SystemTime(void);
 
};
 
#endif // DATALIST_PAGE_H