Add Code One options

This commit is contained in:
hooper114 2009-07-05 09:29:48 +00:00
parent e223f21746
commit 49ea7b87d7
3 changed files with 144 additions and 0 deletions

View file

@ -416,6 +416,17 @@ void MainWindow::change_options()
tabMain->insertTab(1,m_optionWidget,tr("Channel Code"));
connect(m_optionWidget->findChild<QObject*>("cmbChannel"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODEONE)
{
QFile file(":/grpCodeOne.ui");
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget=uiload.load(&file);
file.close();
tabMain->insertTab(1,m_optionWidget,tr("Code One"));
connect(m_optionWidget->findChild<QObject*>("cmbC1Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
}
switch(metaObject()->enumerator(0).value(bstyle->currentIndex()))
@ -732,6 +743,12 @@ void MainWindow::update_preview()
else
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbChannel")->currentIndex() + 2);
break;
case BARCODE_CODEONE:
m_bc.bc.setSymbol(BARCODE_CODEONE);
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbC1Size")->currentIndex());
break;
default:
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
break;