0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-09-30 19:19:56 +03:00

InputMode propperty has been added to BarcodeItem

This commit is contained in:
Arin Alexander
2016-03-25 23:46:17 +03:00
parent 225e0f6c91
commit 517bf8357e
2 changed files with 32 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ 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_barcodeWidth(0), m_securityLevel(0), m_pdf417CodeWords(928), m_inputMode(UNICODE_INPUT_MODE)
{}
BarcodeItem::~BarcodeItem()
@@ -65,6 +65,7 @@ void BarcodeItem::paint(QPainter *ppainter, const QStyleOptionGraphicsItem *opti
Zint::QZint bc;
if (itemMode() & DesignMode) bc.setText(m_designTestValue);
else bc.setText(m_content);
bc.setInputMode(m_inputMode);
bc.setSymbol(m_barcodeType);
bc.setWhitespace(m_whitespace);
bc.setFgColor(m_foregroundColor);
@@ -231,6 +232,23 @@ void BarcodeItem::setPdf417CodeWords(int pdf417CodeWords)
}
}
BarcodeItem::InputMode BarcodeItem::inputMode() const
{
return m_inputMode;
}
void BarcodeItem::setInputMode(const InputMode &inputMode)
{
if (m_inputMode != inputMode){
InputMode oldValue = m_inputMode;
m_inputMode = inputMode;
if (!isLoading()){
update();
notify("inputMode",oldValue,inputMode);
}
}
}
void BarcodeItem::updateItemSize(DataSourceManager* dataManager, RenderPass pass, int maxHeight)
{
switch(pass){