Prison
7#ifndef PRISON_BARCODEQUICKITEM_H
8#define PRISON_BARCODEQUICKITEM_H
10#include <Prison/Barcode>
13#include <QQuickPaintedItem>
15#include <qqmlregistration.h>
20class BarcodeQuickItem :
public QQuickPaintedItem
23 QML_NAMED_ELEMENT(Barcode)
24 Q_PROPERTY(QVariant content READ content WRITE setContent NOTIFY contentChanged)
25 Q_PROPERTY(QJSValue barcodeType READ barcodeType WRITE setBarcodeType NOTIFY barcodeTypeChanged)
26 Q_PROPERTY(QColor foregroundColor READ foregroundColor WRITE setForegroundColor NOTIFY foregroundColorChanged)
27 Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged)
28 Q_PROPERTY(Dimensions dimensions READ dimensions NOTIFY dimensionsChanged)
53 ~BarcodeQuickItem()
override;
55 QVariant content()
const;
56 void setContent(
const QVariant &data);
58 QJSValue barcodeType()
const;
59 void setBarcodeType(
const QJSValue &type);
61 QColor foregroundColor()
const;
62 void setForegroundColor(
const QColor &color);
63 QColor backgroundColor()
const;
64 void setBackgroundColor(
const QColor &color);
72 Dimensions dimensions()
const;
74 void paint(QPainter *painter)
override;
75 void componentComplete()
override;
77 qreal minimumHeight()
const;
78 qreal minimumWidth()
const;
81 void contentChanged();
82 void barcodeTypeChanged();
83 void foregroundColorChanged();
84 void backgroundColorChanged();
85 void dimensionsChanged();
92 std::optional<Barcode> m_barcode;
95 std::optional<Prison::BarcodeType> m_type;
Provides classes and methods for generating barcodes.
@ QRCode
QRCode 2d barcode.
@ DataMatrix
DataMatrix 2d barcode.
@ Code128
Code 128 barcode.
QQuickItem(QQuickItem *parent)
void implicitHeightChanged()
void implicitWidthChanged()
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 11:52:49 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.