sync with changes made on backend

This commit is contained in:
taipanromania 2008-09-24 09:38:32 +00:00
parent ae7a09dce6
commit 4d13445260
3 changed files with 229 additions and 144 deletions

View File

@ -16,7 +16,7 @@
<item row="0" column="0" colspan="2" > <item row="0" column="0" colspan="2" >
<widget class="QGraphicsView" name="view" /> <widget class="QGraphicsView" name="view" />
</item> </item>
<item rowspan="2" row="1" column="0" > <item row="1" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_2" > <layout class="QHBoxLayout" name="horizontalLayout_2" >
<item> <item>
<widget class="QLabel" name="label" > <widget class="QLabel" name="label" >
@ -29,7 +29,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="stype" /> <widget class="QComboBox" name="bstyle" />
</item> </item>
</layout> </layout>
</item> </item>
@ -63,7 +63,31 @@
</item> </item>
</layout> </layout>
</item> </item>
<item rowspan="2" row="2" column="1" > <item row="2" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_3" >
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Height:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="heightb" >
<property name="maximum" >
<number>300</number>
</property>
<property name="value" >
<number>50</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="1" >
<layout class="QHBoxLayout" name="horizontalLayout_13" > <layout class="QHBoxLayout" name="horizontalLayout_13" >
<item> <item>
<widget class="QLabel" name="label_12" > <widget class="QLabel" name="label_12" >
@ -93,48 +117,7 @@
</item> </item>
</layout> </layout>
</item> </item>
<item rowspan="2" row="3" column="0" > <item row="3" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_3" >
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Height:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="heightb" >
<property name="maximum" >
<number>300</number>
</property>
<property name="value" >
<number>50</number>
</property>
</widget>
</item>
</layout>
</item>
<item rowspan="2" row="4" column="1" >
<layout class="QHBoxLayout" name="horizontalLayout_4" >
<item>
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Primary</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="primary" />
</item>
</layout>
</item>
<item rowspan="2" row="5" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_5" > <layout class="QHBoxLayout" name="horizontalLayout_5" >
<item> <item>
<widget class="QLabel" name="label_5" > <widget class="QLabel" name="label_5" >
@ -158,32 +141,24 @@
</item> </item>
</layout> </layout>
</item> </item>
<item rowspan="7" row="6" column="1" > <item row="3" column="1" >
<layout class="QVBoxLayout" name="verticalLayout" > <layout class="QHBoxLayout" name="horizontalLayout_4" >
<item> <item>
<widget class="QLabel" name="label_2" > <widget class="QLabel" name="label_4" >
<property name="text" > <property name="text" >
<string>Data</string> <string>Primary</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QTextEdit" name="text" > <widget class="QLineEdit" name="primary" />
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">123456&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="acceptRichText" >
<bool>false</bool>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="7" column="0" > <item row="4" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_6" > <layout class="QHBoxLayout" name="horizontalLayout_6" >
<item> <item>
<widget class="QLabel" name="label_6" > <widget class="QLabel" name="label_6" >
@ -210,7 +185,32 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item row="8" column="0" > <item rowspan="8" row="4" column="1" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Data</string>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="text" >
<property name="html" >
<string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:10pt;">123456&lt;/p>&lt;/body>&lt;/html></string>
</property>
<property name="acceptRichText" >
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_7" > <layout class="QHBoxLayout" name="horizontalLayout_7" >
<item> <item>
<widget class="QLabel" name="label_7" > <widget class="QLabel" name="label_7" >
@ -237,7 +237,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item row="9" column="0" > <item row="6" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_8" > <layout class="QHBoxLayout" name="horizontalLayout_8" >
<item> <item>
<widget class="QLabel" name="label_8" > <widget class="QLabel" name="label_8" >
@ -264,7 +264,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item row="10" column="0" > <item row="7" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_10" > <layout class="QHBoxLayout" name="horizontalLayout_10" >
<item> <item>
<widget class="QLabel" name="label_9" > <widget class="QLabel" name="label_9" >
@ -297,7 +297,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item row="11" column="0" > <item row="8" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_11" > <layout class="QHBoxLayout" name="horizontalLayout_11" >
<item> <item>
<widget class="QLabel" name="label_10" > <widget class="QLabel" name="label_10" >
@ -324,7 +324,78 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item row="12" column="0" > <item row="9" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_14" >
<item>
<widget class="QLabel" name="label_13" >
<property name="text" >
<string>MSI PLESSEY:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="msiPlessey" >
<item>
<property name="text" >
<string>MSI_PLESSEY</string>
</property>
</item>
<item>
<property name="text" >
<string>MSI_10</string>
</property>
</item>
<item>
<property name="text" >
<string>MSI_10_10</string>
</property>
</item>
<item>
<property name="text" >
<string>MSI_11</string>
</property>
</item>
<item>
<property name="text" >
<string>MSI_11_10</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="10" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_15" >
<item>
<widget class="QLabel" name="label_14" >
<property name="text" >
<string>(Ex)CODE39:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="code39" >
<item>
<property name="text" >
<string>(EX)CODE39</string>
</property>
</item>
<item>
<property name="text" >
<string>(EX)CODE39_43</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="11" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_9" > <layout class="QHBoxLayout" name="horizontalLayout_9" >
<item> <item>
<widget class="QPushButton" name="fgcolor" > <widget class="QPushButton" name="fgcolor" >
@ -342,7 +413,7 @@ p, li { white-space: pre-wrap; }
</item> </item>
</layout> </layout>
</item> </item>
<item row="13" column="0" colspan="2" > <item row="12" column="0" colspan="2" >
<layout class="QHBoxLayout" name="horizontalLayout" > <layout class="QHBoxLayout" name="horizontalLayout" >
<item> <item>
<spacer name="horizontalSpacer" > <spacer name="horizontalSpacer" >

View File

@ -31,10 +31,10 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
m_fgcolor=qRgb(0,0,0); m_fgcolor=qRgb(0,0,0);
m_bgcolor=qRgb(0xff,0xff,0xff); m_bgcolor=qRgb(0xff,0xff,0xff);
for (int i=0;i<metaObject()->enumerator(0).keyCount();i++) for (int i=0;i<metaObject()->enumerator(0).keyCount();i++)
stype->addItem(metaObject()->enumerator(0).key(i)); bstyle->addItem(metaObject()->enumerator(0).key(i));
on_generate_clicked(); on_generate_clicked();
view->scene()->addItem(&m_bc); view->scene()->addItem(&m_bc);
connect(stype, SIGNAL(currentIndexChanged( int )), SLOT(on_generate_clicked())); connect(bstyle, SIGNAL(currentIndexChanged( int )), SLOT(on_generate_clicked()));
connect(heightb, SIGNAL(valueChanged( int )), SLOT(on_generate_clicked())); connect(heightb, SIGNAL(valueChanged( int )), SLOT(on_generate_clicked()));
connect(widthb, SIGNAL(valueChanged( int )), SLOT(on_generate_clicked())); connect(widthb, SIGNAL(valueChanged( int )), SLOT(on_generate_clicked()));
connect(security, SIGNAL(valueChanged( int )), SLOT(on_generate_clicked())); connect(security, SIGNAL(valueChanged( int )), SLOT(on_generate_clicked()));
@ -73,8 +73,19 @@ void MainWindow::on_generate_clicked()
m_bc.h=iheight->value(); m_bc.h=iheight->value();
m_bc.bc.setText(text->toPlainText()); m_bc.bc.setText(text->toPlainText());
m_bc.bc.setPrimaryMessage(primary->text()); m_bc.bc.setPrimaryMessage(primary->text());
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(stype->currentIndex())); m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
switch(m_bc.bc.symbol())
{
case BARCODE_MSI_PLESSEY:
m_bc.bc.setMsiExtraSymbology(msiPlessey->currentIndex());
break;
case BARCODE_CODE39:
m_bc.bc.setCode39ExtraSymbology(code39->currentIndex());
break;
case BARCODE_EXCODE39:
m_bc.bc.setExcode39ExtraSymbology(code39->currentIndex());
break;
}
m_bc.bc.setBorderType((Zint::QZint::BorderType)btype->currentIndex()); m_bc.bc.setBorderType((Zint::QZint::BorderType)btype->currentIndex());
m_bc.bc.setBorderWidth(bwidth->value()); m_bc.bc.setBorderWidth(bwidth->value());
m_bc.bc.setHeight(heightb->value()); m_bc.bc.setHeight(heightb->value());

View File

@ -75,6 +75,7 @@ public:
RM4SCC =70, RM4SCC =70,
DATAMATRIX =71, DATAMATRIX =71,
ITF14 =72, ITF14 =72,
CODABLOCKF =74,
NVE18 =75, NVE18 =75,
KOREAPOST =77, KOREAPOST =77,
RSS14STACK =79, RSS14STACK =79,
@ -84,26 +85,28 @@ public:
MICROPDF417 =84, MICROPDF417 =84,
ONECODE =85, ONECODE =85,
PLESSEY =86, PLESSEY =86,
TELEPEN_NUM = 100,
MSI_10 = 101, /* Tbarcode 8 codes */
MSI_10_10 = 102, KIX =90,
MSI_11 = 103, AZTEC =92,
MSI_11_10 = 104, DAFT =93,
CODE39_43 = 105, ITALYPOST =94,
EXCODE39_43 = 106, DPD =96,
AZTEC = 107, MICROQR =97,
SUPER = 108,
ULTRA = 109, /* Zint specific */
EANX_CC = 110, TELEPEN_NUM =128,
EAN128_CC = 111, CODE32 =129,
RSS14_CC = 112, EANX_CC =130,
RSS_LTD_CC = 113, EAN128_CC =131,
RSS_EXP_CC = 114, RSS14_CC =132,
UPCA_CC = 115, RSS_LTD_CC =133,
UPCE_CC = 116, RSS_EXP_CC =134,
RSS14STACK_CC = 117, UPCA_CC =135,
RSS14_OMNI_CC = 118, UPCE_CC =136,
RSS_EXPSTACK_CC = 119, RSS14STACK_CC =137,
RSS14_OMNI_CC =138,
RSS_EXPSTACK_CC =139
}; };
public: public: