-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathpdfapi.h
More file actions
42 lines (35 loc) · 1.1 KB
/
pdfapi.h
File metadata and controls
42 lines (35 loc) · 1.1 KB
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
#ifndef PDFAPI_H
#define PDFAPI_H
#include <QObject>
#include <QMutex>
#include <QStringList>
#include <QPrinter>
class PdfAPI : public QObject
{
Q_OBJECT
private:
explicit PdfAPI(QObject *parent = 0);
static PdfAPI *_instance;
QStringList html;
public:
static PdfAPI *Instance() {
static QMutex mutex;
if (!_instance) {
QMutexLocker locker(&mutex);
if (!_instance) {
_instance = new PdfAPI;
}
}
return _instance;
}
void SavePdf(QString fileName, QString title, QString subTitle,
QList<QString> columnNames, QList<int> columnWidths,
QStringList content, bool landscape, bool check,
QPrinter::PageSize pageSize = QPrinter::A4);
void SavePdf(QString fileName, QString title,
QList<QString> columnNames, QList<int> columnWidths,
QStringList subTitle1, QStringList subTitle2,
QStringList content, bool landscape, bool check,
QPrinter::PageSize pageSize = QPrinter::A4);
};
#endif // PDFAPI_H