-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathreportsdialog.h
57 lines (48 loc) · 1.27 KB
/
reportsdialog.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
#ifndef REPORTSDIALOG_H
#define REPORTSDIALOG_H
#include <QDialog>
#include <QSqlDatabase>
#include <QSqlQueryModel>
#include <QSqlQuery>
#include <QPrinter>
#include <QPainter>
#include <QDebug>
#include "tableprinter.h"
#include <QPrintPreviewDialog>
namespace Ui {
class ReportsDialog;
}
class ReportsDialog : public QDialog
{
Q_OBJECT
public:
explicit ReportsDialog(QSqlDatabase *db,QWidget *parent = 0);
void initializeDateEdits();
void initializeModels();
void setupModels();
void setupConnections();
void setupDealerTabModel();
void setupSupplierTabModel();
void setupDrawingVariables();
~ReportsDialog();
public slots:
void loadDealerPayments();
void loadSupplierPayments();
void dealerUglyPrint(QPrinter *printer);
void supplierUglyPrint(QPrinter *printer);
private slots:
void on_printDealerPayment_toolButton_clicked();
void on_printsupplierpayments_toolbutton_clicked();
private:
Ui::ReportsDialog *ui;
QSqlDatabase *db;
QSqlQueryModel *dealer_model;
QSqlQueryModel *supplier_model;
QSqlQueryModel *dealer_payments_model;
QSqlQueryModel *supplier_payments_model;
//for reports
QVector<int> colStretch;
QVector<QString> headers;
QString _factoryName;
};
#endif // REPORTSDIALOG_H