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,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0" >
<ui version="4.0">
<class>grpAztec</class> <class>grpAztec</class>
<widget class="QWidget" name="grpAztec"> <widget class="QWidget" name="grpAztec" >
<property name="geometry"> <property name="geometry" >
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
@ -10,277 +9,265 @@
<height>237</height> <height>237</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle" >
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout" >
<item> <item>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0"> <item row="0" column="0" >
<widget class="QRadioButton" name="radAztecAuto"> <widget class="QRadioButton" name="radAztecAuto" >
<property name="text"> <property name="text" >
<string>Automatic Resizing</string> <string>Automatic Resizing</string>
</property> </property>
<property name="checked"> <property name="checked" >
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0" >
<widget class="QRadioButton" name="radAztecSize"> <widget class="QRadioButton" name="radAztecSize" >
<property name="text"> <property name="text" >
<string>Adjust Size To:</string> <string>Adjust Size To:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1" >
<widget class="QComboBox" name="cmbAztecSize"> <widget class="QComboBox" name="cmbAztecSize" >
<property name="enabled"> <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<item> <item>
<property name="text"> <property name="text" >
<string>15 x 15*</string> <string>15 x 15 Compact</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>19 x 19*</string> <string>19 x 19 Compact</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>23 x 23*</string> <string>23 x 23 Compact</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>27 x 27*</string> <string>27 x 27 Compact</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>19 x 19</string> <string>19 x 19</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>23 x 23</string> <string>23 x 23</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>27 x 27</string> <string>27 x 27</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>31 x 31</string> <string>31 x 31</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>37 x 37</string> <string>37 x 37</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>41 x 41</string> <string>41 x 41</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>45 x 45</string> <string>45 x 45</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>49 x 49</string> <string>49 x 49</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>53 x 53</string> <string>53 x 53</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>57 x 57</string> <string>57 x 57</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>61 x 61</string> <string>61 x 61</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>67 x 67</string> <string>67 x 67</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>71 x 71</string> <string>71 x 71</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>75 x 75</string> <string>75 x 75</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>79 x 79</string> <string>79 x 79</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>83 x 83</string> <string>83 x 83</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>87 x 87</string> <string>87 x 87</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>91 x 91</string> <string>91 x 91</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>95 x 95</string> <string>95 x 95</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>101 x 101</string> <string>101 x 101</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>105 x 105</string> <string>105 x 105</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>109 x 109</string> <string>109 x 109</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>113 x 113</string> <string>113 x 113</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>117 x 117</string> <string>117 x 117</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>121 x 121</string> <string>121 x 121</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>125 x 125</string> <string>125 x 125</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>131 x 131</string> <string>131 x 131</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>135 x 135</string> <string>135 x 135</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>139 x 139</string> <string>139 x 139</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>143 x 143</string> <string>143 x 143</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>147 x 147</string> <string>147 x 147</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>151 x 151</string> <string>151 x 151</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0" >
<widget class="QRadioButton" name="radAztecECC"> <widget class="QRadioButton" name="radAztecECC" >
<property name="text"> <property name="text" >
<string>Add Minimum Error Correction:</string> <string>Add Minimum Error Correction:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1" >
<widget class="QComboBox" name="cmbAztecECC"> <widget class="QComboBox" name="cmbAztecECC" >
<property name="enabled"> <property name="enabled" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<item> <item>
<property name="text"> <property name="text" >
<string>10% + 3 words</string> <string>10% + 3 words</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>23% + 3 words</string> <string>23% + 3 words</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>36% + 3 words</string> <string>36% + 3 words</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text" >
<string>50% + 3 words</string> <string>50% + 3 words</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0" >
<widget class="QCheckBox" name="chkAztecMode"> <widget class="QCheckBox" name="chkAztecMode" >
<property name="text"> <property name="text" >
<string>Encode as GS-1 Data</string> <string>Encode as GS-1 Data</string>
</property> </property>
</widget> </widget>
</item> </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> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer" >
<property name="orientation"> <property name="orientation" >
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0" >
<size> <size>
<width>20</width> <width>20</width>
<height>53</height> <height>53</height>
@ -298,11 +285,11 @@ p, li { white-space: pre-wrap; }
<receiver>cmbAztecSize</receiver> <receiver>cmbAztecSize</receiver>
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel" >
<x>85</x> <x>85</x>
<y>47</y> <y>47</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel" >
<x>331</x> <x>331</x>
<y>47</y> <y>47</y>
</hint> </hint>
@ -314,11 +301,11 @@ p, li { white-space: pre-wrap; }
<receiver>cmbAztecECC</receiver> <receiver>cmbAztecECC</receiver>
<slot>setEnabled(bool)</slot> <slot>setEnabled(bool)</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel" >
<x>200</x> <x>200</x>
<y>80</y> <y>80</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel" >
<x>366</x> <x>366</x>
<y>80</y> <y>80</y>
</hint> </hint>

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> <x>0</x>
<y>0</y> <y>0</y>
<width>310</width> <width>310</width>
<height>78</height> <height>124</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle" >
@ -86,6 +86,23 @@
</item> </item>
</layout> </layout>
</item> </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> <item>
<spacer name="verticalSpacer" > <spacer name="verticalSpacer" >
<property name="orientation" > <property name="orientation" >

View File

@ -159,9 +159,9 @@ bool MainWindow::save()
void MainWindow::about() void MainWindow::about()
{ {
QMessageBox::about(this, tr("About Zint"), 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>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>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>" "<p>Copyright &copy; 2009 Robin Stuart &amp; Bogdan Vatra.<br>"
"QR Code support by Kentaro Fukuchi.<br>" "QR Code support by Kentaro Fukuchi.<br>"
@ -405,8 +405,19 @@ void MainWindow::change_options()
file.close(); file.close();
tabMain->insertTab(1,m_optionWidget,tr("Code One")); 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*>("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())) switch(metaObject()->enumerator(0).value(bstyle->currentIndex()))
{ {
@ -725,9 +736,17 @@ void MainWindow::update_preview()
case BARCODE_CODEONE: case BARCODE_CODEONE:
m_bc.bc.setSymbol(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()); m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbC1Size")->currentIndex());
break; 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: default:
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex())); m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
break; break;

View File

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