digiKam
calpainter.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 : 2003-11-03
7  * Description : painter class to draw calendar.
8  *
9  * Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2007-2008 by Orgad Shaneh <orgads at gmail dot com>
11  * Copyright (C) 2012 by Angelo Naselli <anaselli at linux dot it>
12  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_CAL_PAINTER_H
27 #define DIGIKAM_CAL_PAINTER_H
28 
29 // Qt includes
30 
31 #include <QObject>
32 #include <QPainter>
33 
34 class QPaintDevice;
35 
37 {
38 
39 class CalPainter : public QObject, // clazy:exclude=ctor-missing-parent-argument
40  public QPainter
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit CalPainter(QPaintDevice* const pDevice);
47  ~CalPainter() override;
48 
49  void setImage(const QUrl& imagePath);
50  void paint(int month);
51 
52 Q_SIGNALS:
53 
54  void signalTotal(int total);
55  void signalProgress(int value);
57 
58 public Q_SLOTS:
59 
60  void cancel();
61 
62 private:
63 
64  class Private;
65  Private* const d;
66 };
67 
68 } // namespace Digikam
69 
70 #endif // DIGIKAM_CAL_PAINTER_H
Definition: calpainter.h:41
void cancel()
Definition: calpainter.cpp:84
void paint(int month)
Definition: calpainter.cpp:96
~CalPainter() override
Definition: calpainter.cpp:79
void setImage(const QUrl &imagePath)
Definition: calpainter.cpp:89
CalPainter(QPaintDevice *const pDevice)
Definition: calpainter.cpp:73
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: calendarplugin.cpp:38