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" >
<widget class="QGraphicsView" name="view" />
</item>
<item rowspan="2" row="1" column="0" >
<item row="1" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
<widget class="QLabel" name="label" >
@ -29,7 +29,7 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="stype" />
<widget class="QComboBox" name="bstyle" />
</item>
</layout>
</item>
@ -63,7 +63,31 @@
</item>
</layout>
</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" >
<item>
<widget class="QLabel" name="label_12" >
@ -93,48 +117,7 @@
</item>
</layout>
</item>
<item rowspan="2" 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" >
<item row="3" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_5" >
<item>
<widget class="QLabel" name="label_5" >
@ -158,32 +141,24 @@
</item>
</layout>
</item>
<item rowspan="7" row="6" column="1" >
<layout class="QVBoxLayout" name="verticalLayout" >
<item row="3" column="1" >
<layout class="QHBoxLayout" name="horizontalLayout_4" >
<item>
<widget class="QLabel" name="label_2" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>Data</string>
<string>Primary</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</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:'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>
<widget class="QLineEdit" name="primary" />
</item>
</layout>
</item>
<item row="7" column="0" >
<item row="4" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_6" >
<item>
<widget class="QLabel" name="label_6" >
@ -210,7 +185,32 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</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" >
<item>
<widget class="QLabel" name="label_7" >
@ -237,7 +237,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="9" column="0" >
<item row="6" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_8" >
<item>
<widget class="QLabel" name="label_8" >
@ -264,7 +264,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="10" column="0" >
<item row="7" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_10" >
<item>
<widget class="QLabel" name="label_9" >
@ -297,7 +297,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="11" column="0" >
<item row="8" column="0" >
<layout class="QHBoxLayout" name="horizontalLayout_11" >
<item>
<widget class="QLabel" name="label_10" >
@ -324,7 +324,78 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</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" >
<item>
<widget class="QPushButton" name="fgcolor" >
@ -342,7 +413,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item row="13" column="0" colspan="2" >
<item row="12" column="0" colspan="2" >
<layout class="QHBoxLayout" name="horizontalLayout" >
<item>
<spacer name="horizontalSpacer" >

View File

@ -31,10 +31,10 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
m_fgcolor=qRgb(0,0,0);
m_bgcolor=qRgb(0xff,0xff,0xff);
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();
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(widthb, 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.bc.setText(text->toPlainText());
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.setBorderWidth(bwidth->value());
m_bc.bc.setHeight(heightb->value());

View File

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