-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
115 lines (77 loc) · 2.73 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
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTableWidget>
#include <QTableWidgetItem>
#include <QList>
#include <QFileInfo>
#include <QFile>
#include <iostream>
#include <fstream>
#include "KitDialog.h"
#include "MaterialDialog.h"
#include "EnsureDialog.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
/*GENERAL STORE ITEM TAB*/
void on_AddItemButton_clicked(bool checked);
void on_RemoveItemButton_clicked(bool checked);
void on_EditItemButton_clicked(bool checked);
void on_GeneralStoreList_cellClicked(int row, int column);
/*KITS TAB*/
void on_AddKitButton_clicked(bool checked);
void on_RemoveKitButton_clicked(bool checked);
void on_EditKitButton_clicked(bool checked);
void on_KitList_cellClicked(int row, int column);
void on_AddStoreItemButton_clicked(bool checked);
void on_RemoveSelectedStoreItemButton_clicked(bool checked);
void on_KitContentList_cellClicked(int row, int column);
/*SAVE BUTTON*/
void on_SaveButton_clicked(bool checked);
private:
// Window User Interface File
Ui::MainWindow *ui;
QList<GeneralStoreItemType> GeneralStoreItems;
QList<KitType> Kits;
/***************************************************
* GENERAL STORE TAB
***************************************************/
int CurrentStoreItemIndex = -1;
// Update General Store Tab Item List
void UpdateGeneralStoreItemList();
// Show selected store item data on first window
void UpdateSelectedStoreItemData(QString name, QString unitName, QString unitCost, QString description);
// Clear selected store item widgets
void ClearSelectedStoreItemData();
/***************************************************
* KITS TAB
***************************************************/
int CurrentKitIndex = -1;
int CurrentKitContentIndex = -1;
void UpdateKitList();
void UpdataKitContentList();
void ClearKitContentList();
/***************************************************
* ALERT WIDGETS
***************************************************/
void SetAlertOn();
void SetAlertOff();
/***************************************************
* FILE REGISTRATION
***************************************************/
bool RegisterFileExists();
void DeleteRegisterFile();
void RegisterSave();
void RegisterRead();
/* Ensure Dialog */
int EnsureDialogOpen();
};
#endif // MAINWINDOW_H