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