From 03591279145491d2ae33588320dd6c0c7e578699 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Sun, 19 May 2019 14:25:18 +0300 Subject: [PATCH] Option3 property has been added to BarcodeItem --- common.pri | 2 +- limereport/items/lrbarcodeitem.cpp | 23 +++++++++++++++++++++-- limereport/items/lrbarcodeitem.h | 5 +++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/common.pri b/common.pri index b7a1f16..a86753b 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 = 128 +LIMEREPORT_VERSION_RELEASE = 129 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 a0fee56..ad63ac0 100644 --- a/limereport/items/lrbarcodeitem.cpp +++ b/limereport/items/lrbarcodeitem.cpp @@ -48,7 +48,8 @@ namespace LimeReport{ BarcodeItem::BarcodeItem(QObject* owner,QGraphicsItem* parent) : ContentItemDesignIntf(xmlTag,owner,parent),m_designTestValue("1"), m_barcodeType(CODE128), m_foregroundColor(Qt::black), m_backgroundColor(Qt::white), m_whitespace(10), m_angle(Angle0), - m_barcodeWidth(0), m_securityLevel(0), m_pdf417CodeWords(928), m_inputMode(UNICODE_INPUT_MODE) + m_barcodeWidth(0), m_securityLevel(0), m_pdf417CodeWords(928), m_inputMode(UNICODE_INPUT_MODE), + m_option3(0) {} BarcodeItem::~BarcodeItem() @@ -74,6 +75,7 @@ void BarcodeItem::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *opti bc.setSecurityLevel(m_securityLevel); bc.setPdf417CodeWords(m_pdf417CodeWords); bc.setHideText(m_hideText); + bc.setOption3(m_option3); if (isSelected()) ppainter->setOpacity(Const::SELECTION_OPACITY); @@ -291,7 +293,24 @@ void BarcodeItem::setHideText(bool hideText) m_hideText = hideText; if (!isLoading()){ update(); - notify("hideText",!m_hideText,m_hideText); + notify("hideText", !m_hideText, m_hideText); + } + } +} + +int BarcodeItem::option3() const +{ + return m_option3; +} + +void BarcodeItem::setOption3(int option3) +{ + if (m_option3 != option3){ + int oldValue = m_option3; + m_option3 = option3; + if(!isLoading()){ + update(); + notify("option3", oldValue, m_option3); } } } diff --git a/limereport/items/lrbarcodeitem.h b/limereport/items/lrbarcodeitem.h index cdf9971..e80b468 100644 --- a/limereport/items/lrbarcodeitem.h +++ b/limereport/items/lrbarcodeitem.h @@ -53,6 +53,7 @@ class BarcodeItem : public LimeReport::ContentItemDesignIntf { Q_PROPERTY(int pdf417CodeWords READ pdf417CodeWords WRITE setPdf417CodeWords) Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode) Q_PROPERTY(bool hideText READ hideText WRITE setHideText) + Q_PROPERTY(int option3 READ option3 WRITE setOption3) 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, @@ -177,6 +178,9 @@ public: bool hideText() const; void setHideText(bool hideText); + int option3() const; + void setOption3(int option3); + private: Zint::QZint m_bc; QString m_content; @@ -193,6 +197,7 @@ private: int m_pdf417CodeWords; InputMode m_inputMode; bool m_hideText; + int m_option3; }; }