0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00

HideText property has been added to BarcodeItem

This commit is contained in:
Arin Alexander 2018-12-31 03:02:27 +03:00
parent bdfaa39e61
commit 24de88c6b9
3 changed files with 23 additions and 1 deletions

View File

@ -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}\"

View File

@ -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){

View File

@ -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;
};
}