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 : 2003-11-03 0007 * Description : painter class to draw calendar. 0008 * 0009 * SPDX-FileCopyrightText: 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com> 0010 * SPDX-FileCopyrightText: 2007-2008 by Orgad Shaneh <orgads at gmail dot com> 0011 * SPDX-FileCopyrightText: 2012 by Angelo Naselli <anaselli at linux dot it> 0012 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0013 * 0014 * SPDX-License-Identifier: GPL-2.0-or-later 0015 * 0016 * ============================================================ */ 0017 0018 #ifndef DIGIKAM_CAL_PAINTER_H 0019 #define DIGIKAM_CAL_PAINTER_H 0020 0021 // Qt includes 0022 0023 #include <QObject> 0024 #include <QPainter> 0025 0026 class QPaintDevice; 0027 0028 namespace DigikamGenericCalendarPlugin 0029 { 0030 0031 class CalPainter : public QObject, // clazy:exclude=ctor-missing-parent-argument 0032 public QPainter 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 0038 explicit CalPainter(QPaintDevice* const pDevice); 0039 ~CalPainter() override; 0040 0041 void setImage(const QUrl& imagePath); 0042 void paint(int month); 0043 0044 Q_SIGNALS: 0045 0046 void signalTotal(int total); 0047 void signalProgress(int value); 0048 void signalFinished(); 0049 0050 public Q_SLOTS: 0051 0052 void cancel(); 0053 0054 private: 0055 0056 class Private; 0057 Private* const d; 0058 }; 0059 0060 } // namespace Digikam 0061 0062 #endif // DIGIKAM_CAL_PAINTER_H