Changeset View
Changeset View
Standalone View
Standalone View
src/quick/barcodequickitem.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | |||||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | void BarcodeQuickItem::componentComplete() | 101 | void BarcodeQuickItem::componentComplete() | ||
102 | { | 102 | { | ||
103 | QQuickPaintedItem::componentComplete(); | 103 | QQuickPaintedItem::componentComplete(); | ||
104 | updateBarcode(); | 104 | updateBarcode(); | ||
105 | } | 105 | } | ||
106 | 106 | | |||
107 | qreal BarcodeQuickItem::minimumHeight() const | ||||
108 | { | ||||
109 | return m_barcode ? m_barcode->trueMinimumSize().height() : 0.0; | ||||
110 | } | ||||
111 | | ||||
112 | qreal BarcodeQuickItem::minimumWidth() const | ||||
113 | { | ||||
114 | return m_barcode ? m_barcode->trueMinimumSize().width() : 0.0; | ||||
115 | } | ||||
116 | | ||||
107 | void BarcodeQuickItem::updateBarcode() | 117 | void BarcodeQuickItem::updateBarcode() | ||
108 | { | 118 | { | ||
109 | if (!isComponentComplete()) | 119 | if (!isComponentComplete()) | ||
110 | return; | 120 | return; | ||
111 | 121 | | |||
112 | if (m_type == Prison::Null || m_content.isEmpty()) { | 122 | if (m_type == Prison::Null || m_content.isEmpty()) { | ||
113 | m_barcode.reset(); | 123 | m_barcode.reset(); | ||
114 | update(); | 124 | update(); | ||
Show All 17 Lines |