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

@ -32,78 +32,81 @@ class MainWindow : public QWidget, private Ui::mainWindow
public: public:
enum BarcodeTypes enum BarcodeTypes
{ {
CODE11 = 1, CODE11 =1,
C25MATRIX = 2, C25MATRIX =2,
C25INTER = 3, C25INTER =3,
C25IATA = 4, C25IATA =4,
C25LOGIC = 6, C25LOGIC =6,
C25IND = 7, C25IND =7,
CODE39 = 8, CODE39 =8,
EXCODE39 = 9, EXCODE39 =9,
EANX = 13, EANX =13,
EAN128 = 16, EAN128 =16,
CODABAR = 18, CODABAR =18,
CODE128 = 20, CODE128 =20,
DPLEIT = 21, DPLEIT =21,
DPIDENT = 22, DPIDENT =22,
CODE16K = 23, CODE16K =23,
CODE93 = 25, CODE93 =25,
FLAT = 28, FLAT =28,
RSS14 = 29, RSS14 =29,
RSS_LTD = 30, RSS_LTD =30,
RSS_EXP = 31, RSS_EXP =31,
TELEPEN = 32, TELEPEN =32,
UPCA = 34, UPCA =34,
UPCE = 37, UPCE =37,
POSTNET = 40, POSTNET =40,
MSI_PLESSEY = 47, MSI_PLESSEY =47,
FIM = 49, FIM =49,
LOGMARS = 50, LOGMARS =50,
PHARMA = 51, PHARMA =51,
PZN = 52, PZN =52,
PHARMA_TWO = 53, PHARMA_TWO =53,
PDF417 = 55, PDF417 =55,
PDF417TRUNC = 56, PDF417TRUNC =56,
MAXICODE = 57, MAXICODE =57,
QRCODE = 58, QRCODE =58,
CODE128B = 60, CODE128B =60,
AUSPOST = 63, AUSPOST =63,
AUSREPLY = 66, AUSREPLY =66,
AUSROUTE = 67, AUSROUTE =67,
AUSREDIRECT = 68, AUSREDIRECT =68,
ISBNX = 69, ISBNX =69,
RM4SCC = 70, RM4SCC =70,
DATAMATRIX = 71, DATAMATRIX =71,
ITF14 = 72, ITF14 =72,
NVE18 = 75, CODABLOCKF =74,
KOREAPOST = 77, NVE18 =75,
RSS14STACK = 79, KOREAPOST =77,
RSS14STACK_OMNI = 80, RSS14STACK =79,
RSS_EXPSTACK = 81, RSS14STACK_OMNI =80,
PLANET = 82, RSS_EXPSTACK =81,
MICROPDF417 = 84, PLANET =82,
ONECODE = 85, MICROPDF417 =84,
PLESSEY = 86, ONECODE =85,
TELEPEN_NUM = 100, PLESSEY =86,
MSI_10 = 101,
MSI_10_10 = 102, /* Tbarcode 8 codes */
MSI_11 = 103, KIX =90,
MSI_11_10 = 104, AZTEC =92,
CODE39_43 = 105, DAFT =93,
EXCODE39_43 = 106, ITALYPOST =94,
AZTEC = 107, DPD =96,
SUPER = 108, MICROQR =97,
ULTRA = 109,
EANX_CC = 110, /* Zint specific */
EAN128_CC = 111, TELEPEN_NUM =128,
RSS14_CC = 112, CODE32 =129,
RSS_LTD_CC = 113, EANX_CC =130,
RSS_EXP_CC = 114, EAN128_CC =131,
UPCA_CC = 115, RSS14_CC =132,
UPCE_CC = 116, RSS_LTD_CC =133,
RSS14STACK_CC = 117, RSS_EXP_CC =134,
RSS14_OMNI_CC = 118, UPCA_CC =135,
RSS_EXPSTACK_CC = 119, UPCE_CC =136,
RSS14STACK_CC =137,
RSS14_OMNI_CC =138,
RSS_EXPSTACK_CC =139
}; };
public: public: