Add GS1data support to QR Code in zint-qt

This commit is contained in:
hooper114 2009-08-09 23:00:47 +00:00
parent 06cc245516
commit ca824684ac
2 changed files with 69 additions and 10 deletions

View File

@ -6,7 +6,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>441</width> <width>441</width>
<height>171</height> <height>208</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
@ -273,14 +273,68 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="3" column="0" > </layout>
<widget class="QCheckBox" name="chkQRHIBC" > </item>
<item>
<widget class="QGroupBox" name="grpAztecMode" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>70</height>
</size>
</property>
<property name="title" >
<string>Data Encoding</string>
</property>
<widget class="QRadioButton" name="radQRStand" >
<property name="geometry" >
<rect>
<x>10</x>
<y>17</y>
<width>102</width>
<height>24</height>
</rect>
</property>
<property name="minimumSize" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text" >
<string>S&amp;tandard</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="radQRHIBC" >
<property name="geometry" >
<rect>
<x>200</x>
<y>14</y>
<width>142</width>
<height>24</height>
</rect>
</property>
<property name="text" > <property name="text" >
<string>&amp;HIBC QR Code</string> <string>&amp;HIBC QR Code</string>
</property> </property>
</widget> </widget>
</item> <widget class="QRadioButton" name="radQRGS1" >
</layout> <property name="geometry" >
<rect>
<x>9</x>
<y>41</y>
<width>151</width>
<height>24</height>
</rect>
</property>
<property name="text" >
<string>&amp;GS-1 Data Mode</string>
</property>
</widget>
</widget>
</item> </item>
<item> <item>
<spacer name="verticalSpacer" > <spacer name="verticalSpacer" >

View File

@ -365,7 +365,9 @@ void MainWindow::change_options()
connect(m_optionWidget->findChild<QObject*>("radQRECC"), SIGNAL(clicked( bool )), SLOT(update_preview())); connect(m_optionWidget->findChild<QObject*>("radQRECC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(m_optionWidget->findChild<QObject*>("cmbQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview())); connect(m_optionWidget->findChild<QObject*>("cmbQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("chkQRHIBC"), SIGNAL(stateChanged( int )), SLOT(update_preview())); connect(m_optionWidget->findChild<QObject*>("radQRStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radQRGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radQRHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
} }
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROQR) if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROQR)
@ -705,11 +707,14 @@ void MainWindow::update_preview()
break; break;
case BARCODE_QRCODE: case BARCODE_QRCODE:
if(m_optionWidget->findChild<QCheckBox*>("chkQRHIBC")->isChecked()) if(m_optionWidget->findChild<QRadioButton*>("radQRHIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_QR); m_bc.bc.setSymbol(BARCODE_HIBC_QR);
else else
m_bc.bc.setSymbol(BARCODE_QRCODE); m_bc.bc.setSymbol(BARCODE_QRCODE);
if(m_optionWidget->findChild<QRadioButton*>("radQRGS1")->isChecked())
m_bc.bc.setInputMode(GS1_MODE);
if(m_optionWidget->findChild<QRadioButton*>("radQRSize")->isChecked()) if(m_optionWidget->findChild<QRadioButton*>("radQRSize")->isChecked())
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbQRSize")->currentIndex() + 1); m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbQRSize")->currentIndex() + 1);