-
Notifications
You must be signed in to change notification settings - Fork 4
/
mainwindow.h
88 lines (79 loc) · 2.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
87
88
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QPushButton>
#include <QStringList>
#include "globalconfig.h"
#include <QItemSelection>
class QTime;
class QSqlTableModel;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void showCreateCustomerDialog();
void showCreateStylistDialog();
void showCreateServiceDialog();
void showCreateUserDialog();
void showEditCustomerDialog();
void showEditStylistDialog();
void showEditServiceDialog();
void showEditUserDialog();
void showEditAppointmentDialog();
void create_daily_appt();
void create_employee_appt();
//Exporter la liste des utilisateurs
void generateApptbyStylistReport(QString date, QString stylist_name, QString pdfFileName);
void tableSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected);
void deleteSelectedAppt();
void editSelectedAppt();
void addAppt();
void tabChanged(int current);
void SendEmail();
void showEmailConfigDialog();
void mailSent(QString status);
void showCompanyConfigDialog();
void updateCompanyInformation();
void showAboutDialog();
void showApptStylistReportDialog();
private:
GlobalConfig global_config;
Ui::MainWindow *ui;
QSqlTableModel *stylist_model;
void make_connections();
int getApptDurationInMinutes(QTime begin_time, QTime end_time);
//About Email
QString serverName,username,password,subject,message,rcpt;
int port;
//About Company
QString companyName,companyPhone,companySlogan,companyAddress,companyState,companyCity,companyEmail,companyLogoFile;
//Save/Load User Preferences members
/**
* @brief Saves user preferences.
*
* Saves user preferences such as window position, window size, user modified fields. This function is called always\n
* that this windows is closed using the Ok button. For more information about how it works see the QSettings documentation.
*/
void saveUserPreferences();
/**
* @brief Loads user preferences.
*
* Loads user preferences such as window position, window size, user modified fields. This function is called always\n
* that this windows is closed using the Ok button. For more information about how it works see the QSettings documentation.
*/
void loadUerPreferences();
/**
* @brief Window close event.
*
* This Event is called always that this windows is closed. This function is used to perform saving of user preferences.
* @param event QCloseEvent object.
*/
void closeEvent(QCloseEvent *event);
};
#endif // MAINWINDOW_H