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
24 QML_NAMED_ELEMENT(Barcode)
25 Q_PROPERTY(QVariant content READ content WRITE setContent NOTIFY contentChanged)
26 Q_PROPERTY(QJSValue barcodeType READ barcodeType WRITE setBarcodeType NOTIFY barcodeTypeChanged)
27 Q_PROPERTY(QColor foregroundColor READ foregroundColor WRITE setForegroundColor NOTIFY foregroundColorChanged)
28 Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor NOTIFY backgroundColorChanged)
29 Q_PROPERTY(Dimensions dimensions READ dimensions NOTIFY dimensionsChanged)
54 ~BarcodeQuickItem()
override;
56 QVariant content()
const;
57 void setContent(
const QVariant &data);
59 QJSValue barcodeType()
const;
60 void setBarcodeType(
const QJSValue &type);
62 QColor foregroundColor()
const;
63 void setForegroundColor(
const QColor &color);
64 QColor backgroundColor()
const;
65 void setBackgroundColor(
const QColor &color);
73 Dimensions dimensions()
const;
75 void paint(QPainter *painter)
override;
76 void componentComplete()
override;
78 qreal minimumHeight()
const;
79 qreal minimumWidth()
const;
82 void contentChanged();
83 void barcodeTypeChanged();
84 void foregroundColorChanged();
85 void backgroundColorChanged();
86 void dimensionsChanged();
93 std::optional<Barcode> m_barcode;
96 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 Jan 24 2025 11:50:16 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.