comparison mupdf-source/thirdparty/zint/frontend_qt/barcodeitem.h @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 /***************************************************************************
2 * Copyright (C) 2008 by BogDan Vatra *
3 * bogdan@licentia.eu *
4 * Copyright (C) 2009-2023 by Robin Stuart <rstuart114@gmail.com> *
5 * *
6 * This program is free software: you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation, either version 3 of the License, or *
9 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
16 ***************************************************************************/
17 /* vim: set ts=4 sw=4 et : */
18
19 #ifndef BARCODEITEM_H
20 #define BARCODEITEM_H
21
22 #include <QGraphicsItem>
23 #include <qzint.h>
24
25 /**
26 @author BogDan Vatra <taipan@licentia.eu>
27 */
28
29 class BarcodeItem : public QGraphicsItem
30 {
31 public:
32 BarcodeItem();
33 ~BarcodeItem();
34
35 void setSize(int width, int height);
36 void setColor(const QColor& color); /* Set colour of bounding rect */
37 QRectF boundingRect() const;
38 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
39
40 private:
41 int w, h;
42 QColor m_color;
43
44 public:
45 mutable Zint::QZint bc;
46 };
47
48 #endif