File indexing completed on 2025-01-05 03:51:59
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-11-13 0007 * Description : printer thread. 0008 * 0009 * SPDX-FileCopyrightText: 2008 by Orgad Shaneh <orgads at gmail dot com> 0010 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_CAL_PRINTER_H 0017 #define DIGIKAM_CAL_PRINTER_H 0018 0019 // Qt includes 0020 0021 #include <QMap> 0022 #include <QThread> 0023 #include <QUrl> 0024 0025 class QPrinter; 0026 0027 namespace DigikamGenericCalendarPlugin 0028 { 0029 0030 class CalPainter; 0031 0032 class CalPrinter : public QThread 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 0038 explicit CalPrinter(QPrinter* const printer, 0039 const QMap<int, QUrl>& months, 0040 QObject* const parent); 0041 0042 ~CalPrinter() override; 0043 0044 protected: 0045 0046 void run() override; 0047 0048 Q_SIGNALS: 0049 0050 void pageChanged(int page); 0051 void totalBlocks(int total); 0052 void blocksFinished(int finished); 0053 0054 public Q_SLOTS: 0055 0056 void cancel(); 0057 0058 private: 0059 0060 class Private; 0061 Private* const d; 0062 }; 0063 0064 } // namespace Digikam 0065 0066 #endif // DIGIKAM_CAL_PRINTER_H