mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-13 14:44:35 -04:00
Add Ultracode options to UI
This commit is contained in:
parent
92cfd65b56
commit
4b584a6344
3 changed files with 159 additions and 0 deletions
|
@ -686,6 +686,21 @@ void MainWindow::change_options()
|
|||
tabMain->insertTab(1,m_optionWidget,tr("GS1 DataBar Stacked"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbCols"), SIGNAL(currentIndexChanged ( int )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_ULTRA)
|
||||
{
|
||||
QFile file(":/grpUltra.ui");
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
return;
|
||||
m_optionWidget=uiload.load(&file);
|
||||
file.close();
|
||||
tabMain->insertTab(1,m_optionWidget,tr("Ultracode"));
|
||||
connect(m_optionWidget->findChild<QObject*>("radUltraAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radUltraEcc"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbUltraEcc"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radUltraStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("radUltraGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
switch(metaObject()->enumerator(0).value(bstyle->currentIndex()))
|
||||
{
|
||||
|
@ -1057,6 +1072,14 @@ void MainWindow::update_preview()
|
|||
if(m_optionWidget->findChild<QRadioButton*>("radHXECC")->isChecked())
|
||||
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbHXECC")->currentIndex() + 1);
|
||||
break;
|
||||
|
||||
case BARCODE_ULTRA:
|
||||
m_bc.bc.setSymbol(BARCODE_ULTRA);
|
||||
if(m_optionWidget->findChild<QRadioButton*>("radUltraEcc")->isChecked())
|
||||
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbUltraEcc")->currentIndex() + 1);
|
||||
if(m_optionWidget->findChild<QRadioButton*>("radUltraGS1")->isChecked())
|
||||
m_bc.bc.setInputMode(GS1_MODE);
|
||||
break;
|
||||
|
||||
default:
|
||||
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue