Changeset View
Changeset View
Standalone View
Standalone View
src/lib/abstractbarcode.h
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 39 | #endif | |||
---|---|---|---|---|---|
56 | * @return QImage with a barcode on, trying to match the requested \param size | 56 | * @return QImage with a barcode on, trying to match the requested \param size | ||
57 | * | 57 | * | ||
58 | * If one of the dimensions of @param size is smaller than the matching dimension in \ref minimumSize, | 58 | * If one of the dimensions of @param size is smaller than the matching dimension in \ref minimumSize, | ||
59 | * a null QImage will be returned | 59 | * a null QImage will be returned | ||
60 | */ | 60 | */ | ||
61 | QImage toImage(const QSizeF& size) ; | 61 | QImage toImage(const QSizeF& size) ; | ||
62 | /** | 62 | /** | ||
63 | * The minimal size of this barcode. | 63 | * The minimal size of this barcode. | ||
64 | * @note This isn't the absolute minimum, but closer to the result of preferredSize(1). | ||||
64 | * @return the minimal size for this barcode. | 65 | * @return the minimal size for this barcode. | ||
66 | * @deprecated since 5.69 Prefer preferredSize() or trueMinimumSize(). | ||||
65 | */ | 67 | */ | ||
66 | QSizeF minimumSize() const; | 68 | QSizeF minimumSize() const; | ||
69 | | ||||
70 | /** | ||||
71 | * The minimal amount of pixels needed to represent this barcode without loss of information. | ||||
72 | * That is, the size of the barcode image if each line or dot is just one pixel wide. | ||||
73 | * On normal screens that is not enough for barcode scanners to reliably detect the barcode | ||||
74 | * though. | ||||
75 | * @see preferredSize | ||||
76 | * @since 5.69 | ||||
77 | */ | ||||
78 | QSizeF trueMinimumSize() const; // TODO KF6: rename to minimumSize | ||||
79 | | ||||
80 | /** | ||||
81 | * The recommended size for this barcode when shown on a screen. | ||||
82 | * This is typically significantly larger than trueMinimumSize() so that | ||||
83 | * barcode scanners tend to reliably detect the code. As this depends | ||||
84 | * on the physical resolution of the output, you have to pass the device | ||||
85 | * pixel ration of the output screen here. | ||||
86 | * @param devicePixelRatio The device pixel ratio of the screen this is shown on. | ||||
87 | * @see trueMinimumSize | ||||
88 | * @since 5.69 | ||||
89 | */ | ||||
90 | QSizeF preferredSize(qreal devicePixelRatio) const; | ||||
91 | | ||||
67 | /** | 92 | /** | ||
68 | * @return the foreground color (by default black) to be used for the barcode. | 93 | * @return the foreground color (by default black) to be used for the barcode. | ||
69 | */ | 94 | */ | ||
70 | const QColor& foregroundColor() const; | 95 | const QColor& foregroundColor() const; | ||
71 | /** | 96 | /** | ||
72 | * @return the background color (by default white) to be used for the barcode. | 97 | * @return the background color (by default white) to be used for the barcode. | ||
73 | */ | 98 | */ | ||
74 | const QColor& backgroundColor() const; | 99 | const QColor& backgroundColor() const; | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |