diff --git a/common.pri b/common.pri index 9f65129..c1fbd66 100644 --- a/common.pri +++ b/common.pri @@ -77,7 +77,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 112 +LIMEREPORT_VERSION_RELEASE = 113 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/items/lrbarcodeitem.cpp b/limereport/items/lrbarcodeitem.cpp index 7af23bf..fac67d7 100644 --- a/limereport/items/lrbarcodeitem.cpp +++ b/limereport/items/lrbarcodeitem.cpp @@ -73,6 +73,7 @@ void BarcodeItem::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *opti bc.setWidth(m_barcodeWidth); bc.setSecurityLevel(m_securityLevel); bc.setPdf417CodeWords(m_pdf417CodeWords); + bc.setHideText(m_hideText); if (isSelected()) ppainter->setOpacity(Const::SELECTION_OPACITY); @@ -249,6 +250,22 @@ void BarcodeItem::setInputMode(const InputMode &inputMode) } } +bool BarcodeItem::hideText() const +{ + return m_hideText; +} + +void BarcodeItem::setHideText(bool hideText) +{ + if (m_hideText != hideText){ + m_hideText = hideText; + if (!isLoading()){ + update(); + notify("hideText",!m_hideText,m_hideText); + } + } +} + void BarcodeItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight) { switch(pass){ diff --git a/limereport/items/lrbarcodeitem.h b/limereport/items/lrbarcodeitem.h index 3f56c59..cfd6265 100644 --- a/limereport/items/lrbarcodeitem.h +++ b/limereport/items/lrbarcodeitem.h @@ -50,6 +50,7 @@ class BarcodeItem : public LimeReport::ContentItemDesignIntf { Q_PROPERTY(int securityLevel READ securityLevel WRITE setSecurityLevel) Q_PROPERTY(int pdf417CodeWords READ pdf417CodeWords WRITE setPdf417CodeWords) Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode) + Q_PROPERTY(bool hideText READ hideText WRITE setHideText) public: // enum BarcodeType {QRCODE=58,CODE128=20,DATAMATRIX=71,MAXICODE=57,MICROPDF417=84}; // enum BarcodeType {CODE_11=1,C25MATRIX=2,QRCODE=58,CODE128=20,DATAMATRIX=71,MAXICODE=57,MICROPDF417=84, @@ -167,6 +168,9 @@ public: InputMode inputMode() const; void setInputMode(const InputMode &inputMode); + bool hideText() const; + void setHideText(bool hideText); + private: Zint::QZint m_bc; QString m_content; @@ -180,6 +184,7 @@ private: int m_securityLevel; int m_pdf417CodeWords; InputMode m_inputMode; + bool m_hideText; }; }