-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.h
86 lines (61 loc) · 1.74 KB
/
MainWindow.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
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include "pages.h"
#include "func.h"
/* These are already included in "pages.h"
#include <QtGui/QGridLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QVBoxLayout>
*/
#include <QtCore/QDir>
#include <QtCore/QCoreApplication>
#include <QtGui/QListWidget>
#include <QtGui/QListWidgetItem>
#include <QtGui/QTableWidget>
#include <QtGui/QTableWidgetItem>
#include <QtGui/QHeaderView>
#include <QtGui/QStackedWidget>
#include <QtGui/QDialog>
#include <QDebug>
class MainWindow : public QWidget
{
Q_OBJECT
friend class ChargePage;
friend class ConsumePage;
public:
MainWindow();
int initializeLoadData();
void listUsers();
User* getContentUserPtr();
private:
QLabel *searchTitleLabel;
QLineEdit *searchLineEdit;
QTableWidget *userTableWidget;
QListWidget *funcListWidget;
QLabel *nameTitleLabel;
QLabel *numberTitleLayout;
QLabel *moneyTitleLabel;
QLabel *nameValueLabel;
QLabel *numberValueLabel;
QLabel *moneyValueLabel;
QStackedWidget *pageWidget;
ConsumePage *consumePage;
ChargePage *chargePage;
AddUserPage *addUserPage;
DeleteUserPage *deleteUserPage;
void createUI();
void createIcons();
private slots:
void changePage(QListWidgetItem *current, QListWidgetItem *previous);
void searchUser(const QString& subtext);
void selectUser(int tableWidgetRow, int tableWidgetCol);
void showUserDetail();
void unselectUser();
void setEnableOperations(bool enableOrNot);
void showAddFinished(unsigned int userNum, QString userName, double userMoney);
public slots:
void showAllUser();
void showUsers(vector<unsigned int> indexVec);
};
void setDirs();
#endif