1 /*
2     SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com>
3 
4     SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QObject>
10 #include <QPainter>
11 #include <QRect>
12 class QPrinter;
13 
14 class LogViewWidget;
15 
16 class LogViewExport : public QObject
17 {
18     Q_OBJECT
19 
20 public:
21     explicit LogViewExport(QWidget *parent, LogViewWidget *logViewWidget);
22 
23     ~LogViewExport() override;
24 
25     void copyToClipboard();
26 
27     void fileSave();
28 
29     void sendMail();
30 
31     void printSelection();
32 
33     void printPreview();
34 Q_SIGNALS:
35     void statusBarChanged(const QString &message);
36 
37 private:
38     void printPageNumber(QPainter &painter, QRect &printView, int movement, int page, int margin);
39 
40     QWidget *const mParent;
41 
42     LogViewWidget *const mLogViewWidget;
43     void print(QPrinter *printer);
44 };
45 
46