digiKam
calprinter.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2008-11-13
7  * Description : printer thread.
8  *
9  * Copyright (C) 2008 by Orgad Shaneh <orgads at gmail dot com>
10  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_CAL_PRINTER_H
25 #define DIGIKAM_CAL_PRINTER_H
26 
27 // Qt includes
28 
29 #include <QMap>
30 #include <QThread>
31 #include <QUrl>
32 
33 class QPrinter;
34 
36 {
37 
38 class CalPainter;
39 
40 class CalPrinter : public QThread
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit CalPrinter(QPrinter* const printer,
47  const QMap<int, QUrl>& months,
48  QObject* const parent);
49 
50  ~CalPrinter() override;
51 
52 protected:
53 
54  void run() override;
55 
56 Q_SIGNALS:
57 
58  void pageChanged(int page);
59  void totalBlocks(int total);
60  void blocksFinished(int finished);
61 
62 public Q_SLOTS:
63 
64  void cancel();
65 
66 private:
67 
68  class Private;
69  Private* const d;
70 };
71 
72 } // namespace Digikam
73 
74 #endif // DIGIKAM_CAL_PRINTER_H
Definition: calprinter.h:41
void cancel()
Definition: calprinter.cpp:110
void run() override
Definition: calprinter.cpp:74
~CalPrinter() override
Definition: calprinter.cpp:68
CalPrinter(QPrinter *const printer, const QMap< int, QUrl > &months, QObject *const parent)
Definition: calprinter.cpp:56
Definition: calendarplugin.cpp:38