GUI update

This commit is contained in:
hooper114 2009-07-13 19:04:52 +00:00
parent 3c5b7d5a2e
commit 59fa2e8ba4
5 changed files with 168 additions and 92 deletions

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0" >
<class>grpAztec</class>
<widget class="QWidget" name="grpAztec" >
@ -40,22 +39,22 @@
</property>
<item>
<property name="text" >
<string>15 x 15*</string>
<string>15 x 15 Compact</string>
</property>
</item>
<item>
<property name="text" >
<string>19 x 19*</string>
<string>19 x 19 Compact</string>
</property>
</item>
<item>
<property name="text" >
<string>23 x 23*</string>
<string>23 x 23 Compact</string>
</property>
</item>
<item>
<property name="text" >
<string>27 x 27*</string>
<string>27 x 27 Compact</string>
</property>
</item>
<item>
@ -261,18 +260,6 @@
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="lblAztecNote">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;* An asterisk indicates a &quot;compact&quot; symbol;&lt;/p&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;the rest are &quot;full range&quot; symbols.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
<item>

52
frontend_qt4/grpC49.ui Normal file
View File

@ -0,0 +1,52 @@
<ui version="4.0" >
<class>grpC16k</class>
<widget class="QWidget" name="grpC16k" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>186</width>
<height>123</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QRadioButton" name="radC49Stand" >
<property name="text" >
<string>Standard Mode</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radC49GS1" >
<property name="text" >
<string>GS-1 Data Mode</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>60</height>
</size>
</property>
</spacer>
</item>
</layout>
<zorder>radC49Stand</zorder>
<zorder>radC49GS1</zorder>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>310</width>
<height>78</height>
<height>124</height>
</rect>
</property>
<property name="windowTitle" >
@ -86,6 +86,23 @@
</item>
</layout>
</item>
<item>
<widget class="QRadioButton" name="radC1Stand" >
<property name="text" >
<string>Standard Mode</string>
</property>
<property name="checked" >
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radC1GS1" >
<property name="text" >
<string>GS-1 Data Mode</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer" >
<property name="orientation" >

View File

@ -159,9 +159,9 @@ bool MainWindow::save()
void MainWindow::about()
{
QMessageBox::about(this, tr("About Zint"),
tr("<h2>Zint Barcode Studio 0.3</h2>"
tr("<h2>Zint Barcode Studio 1.0</h2>"
"<p>A simple barcode generator"
"<p>Requires libzint 2.1.3 or greater."
"<p>Requires libzint 2.2 or greater."
"<p>Visit the <a href=\"http://www.zint.org.uk\">Zint Project Homepage</a> for more information."
"<p>Copyright &copy; 2009 Robin Stuart &amp; Bogdan Vatra.<br>"
"QR Code support by Kentaro Fukuchi.<br>"
@ -405,8 +405,19 @@ void MainWindow::change_options()
file.close();
tabMain->insertTab(1,m_optionWidget,tr("Code One"));
connect(m_optionWidget->findChild<QObject*>("cmbC1Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radC1GS1"), SIGNAL(toggled( bool )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE49)
{
QFile file(":/grpC49.ui");
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget=uiload.load(&file);
file.close();
tabMain->insertTab(1,m_optionWidget,tr("Code 49"));
connect(m_optionWidget->findChild<QObject*>("radC49GS1"), SIGNAL(toggled( bool )), SLOT(update_preview()));
}
switch(metaObject()->enumerator(0).value(bstyle->currentIndex()))
{
@ -725,9 +736,17 @@ void MainWindow::update_preview()
case BARCODE_CODEONE:
m_bc.bc.setSymbol(BARCODE_CODEONE);
if(m_optionWidget->findChild<QRadioButton*>("radC1GS1")->isChecked())
m_bc.bc.setInputMode(GS1_MODE);
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbC1Size")->currentIndex());
break;
case BARCODE_CODE49:
m_bc.bc.setSymbol(BARCODE_CODE49);
if(m_optionWidget->findChild<QRadioButton*>("radC49GS1")->isChecked())
m_bc.bc.setInputMode(GS1_MODE);
break;
default:
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
break;

View File

@ -18,5 +18,6 @@
<file>grpMQR.ui</file>
<file>grpQR.ui</file>
<file>grpCodeOne.ui</file>
<file>grpC49.ui</file>
</qresource>
</RCC>