-
Notifications
You must be signed in to change notification settings - Fork 0
/
controltab_vieweditteamwindow.h
87 lines (57 loc) · 1.91 KB
/
controltab_vieweditteamwindow.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
#ifndef CONTROLTAB_VIEWEDITTEAMWINDOW_H
#define CONTROLTAB_VIEWEDITTEAMWINDOW_H
#include <QWidget>
#include <QtSql>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSql>
#include <QMessageBox>
#include <QDebug>
#include <QTableWidget>
#include <databaseconnection.h>
#include <iostream>
#include <QSound>
namespace Ui {
class ControlTab_ViewEditTeamWindow;
}
class ControlTab_ViewEditTeamWindow : public QWidget
{
Q_OBJECT
public:
explicit ControlTab_ViewEditTeamWindow(QWidget *parent = nullptr);
~ControlTab_ViewEditTeamWindow();
void set_fields(QVector<QString> fields);
void set_db_table_refs(QTableWidget *employeeTable, QTableWidget *teamTable);
void resetMemberTable();
void resetProjTable();
void resetTeamTable();
void resetEmployeeTable();
void closeEvent(QCloseEvent *event);
private slots:
void on_pushButton_editMode_clicked();
void on_pushButton_saveChanges_clicked();
void on_pushButton_addNew_clicked();
void on_pushButton_remove_clicked();
void on_pushButton_assign_clicked();
void on_pushButton_changeStatus_clicked();
void on_pushButton_removeProj_clicked();
void on_pushButton_CannotRemove_clicked();
void on_pushButton_DuplicateProject_clicked();
void on_pushButton_EmployeeTaken_clicked();
void on_pushButton_InvalidID_clicked();
void on_pushButton_NegHours_clicked();
void on_pushButton_NoProjSelected_clicked();
void on_pushButton_NotOnTeam_clicked();
void on_pushButton_TeamExists_clicked();
void on_pushButton_TeamNameLen_clicked();
void on_pushButton_TooManyProj_clicked();
private:
Ui::ControlTab_ViewEditTeamWindow *ui;
QSqlDatabase dbVet;
QString curTeamId, curTeamName;
int numCurProjects = 0, numProjectsAssigned = 0, numProjectsCompleted = 0;
QTableWidget *employeeDB;
QTableWidget *teamDB;
QSound *sound;
};
#endif // CONTROLTAB_VIEWEDITTEAMWINDOW_H