digiKam
templateicon.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 : 2009-06-26
7  * Description : a tool to print images
8  *
9  * Copyright (C) 2008 by Andreas Trink <atrink at nociaro dot org>
10  * Copyright (C) 2006-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_TEMPLATE_ICON_H
25 #define DIGIKAM_TEMPLATE_ICON_H
26 
27 // Qt includes
28 
29 #include <QPainter>
30 #include <QIcon>
31 #include <QColor>
32 #include <QSize>
33 
35 {
36 
38 {
39 
40 public:
41 
46  explicit TemplateIcon(int iconHeight, const QSize& templateSize);
47  ~TemplateIcon();
48 
52  void begin();
53 
57  void end();
58 
62  QIcon& getIcon() const;
63 
67  QSize& getSize();
68 
72  QPainter& getPainter() const;
73 
78  void fillRect(int x, int y, int w, int h, const QColor& color);
79 
80 private:
81 
82  // Disable
83  TemplateIcon(const TemplateIcon&) = delete;
84  TemplateIcon& operator=(const TemplateIcon&) = delete;
85 
86 private:
87 
88  class Private;
89  Private* const d;
90 };
91 
92 } // namespace DigikamGenericPrintCreatorPlugin
93 
94 #endif // DIGIKAM_TEMPLATE_ICON_H
QIcon & getIcon() const
Definition: templateicon.cpp:153
TemplateIcon(int iconHeight, const QSize &templateSize)
Definition: templateicon.cpp:64
void begin()
Definition: templateicon.cpp:88
void end()
Definition: templateicon.cpp:138
QPainter & getPainter() const
Definition: templateicon.cpp:163
void fillRect(int x, int y, int w, int h, const QColor &color)
Definition: templateicon.cpp:119
QSize & getSize()
Definition: templateicon.cpp:158
~TemplateIcon()
Definition: templateicon.cpp:80
Definition: advprintphoto.cpp:43