mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-09-23 08:39:07 +03:00
HideText property has been added to BarcodeItem
This commit is contained in:
@@ -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){
|
||||
|
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user