-
Notifications
You must be signed in to change notification settings - Fork 4
/
settingsdialog.h
executable file
·46 lines (38 loc) · 1.2 KB
/
settingsdialog.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
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include <QDialog>
#include <QSqlQueryModel>
namespace Ui {
class SettingsDialog;
}
class SettingsDialog : public QDialog
{
Q_OBJECT
public:
explicit SettingsDialog(QSqlDatabase *db, QWidget *parent = 0);
void initializeModels();
void setupModels();
void setupUsersTabModel();
void setupMaterialsTabModel();
void setupRawMaterialsTabModel();
void setupEmployeesTabModel();
bool doesRawMaterialExists(const QString &material);
bool doesUserExists(const QString &username);
bool doesSellingMaterialExists(const QString &material);
bool doesEmployeeExists(const QString &employee);
~SettingsDialog();
private slots:
void on_tabWidget_tabBarClicked(int index);
void on_addrawmaterial_button_clicked();
void on_adduser_button_clicked();
void on_addsellingmaterial_button_clicked();
void on_addemployee_pushbutton_clicked();
private:
Ui::SettingsDialog *ui;
QSqlQueryModel *user_model;
QSqlQueryModel *rawmaterial_model;
QSqlQueryModel *material_model;
QSqlQueryModel *employee_model;
QSqlDatabase *db;
};
#endif // SETTINGSDIALOG_H