mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Move maxicode options to options tab
This commit is contained in:
parent
db87cda5a4
commit
d593111979
@ -10,7 +10,8 @@ QT4_WRAP_CPP(QZint_frontend_SRCS mainwindow.h)
|
||||
QT4_WRAP_UI(QZint_frontend_SRCS mainWindow.ui )
|
||||
# grpAztec.ui grpC39.ui grpDM.ui grpMSICheck.ui
|
||||
# grpC128.ui grpChannel.ui grpMicroPDF.ui grpPDF417.ui
|
||||
# grpC16k.ui grpCodablock.ui grpMQR.ui grpQR.ui)
|
||||
# grpC16k.ui grpCodablock.ui grpMQR.ui grpQR.ui
|
||||
# grpMaxicode.ui)
|
||||
|
||||
QT4_ADD_RESOURCES(QZint_frontend_SRCS resources.qrc)
|
||||
|
||||
|
108
frontend_qt4/grpMaxicode.ui
Normal file
108
frontend_qt4/grpMaxicode.ui
Normal file
@ -0,0 +1,108 @@
|
||||
<ui version="4.0" >
|
||||
<class>Form</class>
|
||||
<widget class="QWidget" name="Form" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>436</width>
|
||||
<height>180</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>18</x>
|
||||
<y>15</y>
|
||||
<width>400</width>
|
||||
<height>69</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="cmbMaxiMode" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Structured Carrier Message (Mode 2 or 3)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Standard Symbol, SEC (Mode 4)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Full ECC Symbol (Mode 5)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text" >
|
||||
<string>Reader Program, SEC (Mode 6)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QLineEdit" name="txtMaxiPrimary" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Primary Data Here!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="lblMaxiMode" >
|
||||
<property name="text" >
|
||||
<string>Encoding Mode:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="lblMaxiPrimary" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Primary Data:</string>
|
||||
</property>
|
||||
<property name="alignment" >
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0" >
|
||||
<class>mainWindow</class>
|
||||
<widget class="QWidget" name="mainWindow" >
|
||||
@ -6,10 +5,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>556</width>
|
||||
<height>893</height>
|
||||
<width>749</width>
|
||||
<height>741</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>800</width>
|
||||
<height>800</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>Zint Barcode Studio</string>
|
||||
</property>
|
||||
@ -20,7 +25,7 @@
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" >
|
||||
<item row="0" column="0" rowspan="3" colspan="3">
|
||||
<item rowspan="3" row="0" column="0" colspan="3" >
|
||||
<widget class="QGraphicsView" name="view" >
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
@ -140,22 +145,55 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="bstyle"/>
|
||||
<widget class="QComboBox" name="bstyle" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabMain" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>350</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabGeneral" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>727</width>
|
||||
<height>248</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>General</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3" >
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpData" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Data to Encode</string>
|
||||
</property>
|
||||
@ -170,77 +208,29 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpMaxiCode">
|
||||
<property name="title">
|
||||
<string>Maxicode</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblMaxiMode">
|
||||
<property name="text">
|
||||
<string>Encoding Mode:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cmbMaxiMode">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Structured Carrier Message (Mode 2 or 3)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Standard Symbol, SEC (Mode 4)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Full ECC Symbol (Mode 5)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Reader Program, SEC (Mode 6)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblMaxiPrimary">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Primary Data:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="txtMaxiPrimary">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Primary Data Here!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="grpComposite" >
|
||||
<property name="enabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize" >
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Composite Code</string>
|
||||
</property>
|
||||
@ -329,12 +319,24 @@
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="html" >
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Sans Serif';">Your Data Here!</span></p></body></html></string>
|
||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'DejaVu Sans';"><span style=" font-family:'Sans Serif';">Your Data Here!</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="acceptRichText" >
|
||||
<bool>false</bool>
|
||||
@ -349,6 +351,14 @@ p, li { white-space: pre-wrap; }
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabAppear" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>534</width>
|
||||
<height>324</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>Appearance</string>
|
||||
</attribute>
|
||||
|
@ -119,9 +119,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
|
||||
connect(cmbCompType, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(rotateSlider, SIGNAL(valueChanged(int)), SLOT(scaleRotate()));
|
||||
connect(scaleSlider, SIGNAL(valueChanged(int)), SLOT(scaleRotate()));
|
||||
connect(cmbMaxiMode, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(cmbMaxiMode, SIGNAL(currentIndexChanged( int )), SLOT(maxi_primary()));
|
||||
connect(txtMaxiPrimary, SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
|
||||
connect(spnWhitespace, SIGNAL(valueChanged( int )), SLOT(update_preview()));
|
||||
connect(btnAbout, SIGNAL(clicked( bool )), SLOT(about()));
|
||||
connect(btnSave, SIGNAL(clicked( bool )), SLOT(save()));
|
||||
@ -397,12 +394,15 @@ void MainWindow::change_options()
|
||||
|
||||
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MAXICODE)
|
||||
{
|
||||
QFile file(":/grpMaxiCode.ui");
|
||||
QFile file(":/grpMaxicode.ui");
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
return;
|
||||
m_optionWidget=uiload.load(&file);
|
||||
file.close();
|
||||
tabMain->insertTab(1,m_optionWidget,tr("Options"));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbMaxiMode"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
|
||||
connect(m_optionWidget->findChild<QObject*>("cmbMaxiMode"), SIGNAL(currentIndexChanged( int )), SLOT(maxi_primary()));
|
||||
connect(m_optionWidget->findChild<QObject*>("txtMaxiPrimary"), SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
|
||||
}
|
||||
|
||||
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CHANNEL)
|
||||
@ -486,12 +486,14 @@ void MainWindow::datamatrix_options()
|
||||
|
||||
void MainWindow::maxi_primary()
|
||||
{
|
||||
if(cmbMaxiMode->currentIndex() == 0) {
|
||||
lblMaxiPrimary->setEnabled(true);
|
||||
txtMaxiPrimary->setEnabled(true);
|
||||
if (metaObject()->enumerator(0).value(bstyle->currentIndex())!=BARCODE_MAXICODE)
|
||||
return;
|
||||
if(m_optionWidget->findChild<QComboBox*>("cmbMaxiMode")->currentIndex() == 0) {
|
||||
m_optionWidget->findChild<QLabel*>("lblMaxiPrimary")->setEnabled(true);
|
||||
m_optionWidget->findChild<QLineEdit*>("txtMaxiPrimary")->setEnabled(true);
|
||||
} else {
|
||||
lblMaxiPrimary->setEnabled(false);
|
||||
txtMaxiPrimary->setEnabled(false);
|
||||
m_optionWidget->findChild<QLabel*>("lblMaxiPrimary")->setEnabled(false);
|
||||
m_optionWidget->findChild<QLineEdit*>("txtMaxiPrimary")->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -713,13 +715,13 @@ void MainWindow::update_preview()
|
||||
|
||||
case BARCODE_MAXICODE:
|
||||
m_bc.bc.setSymbol(BARCODE_MAXICODE);
|
||||
if(cmbMaxiMode->currentIndex() == 0)
|
||||
if(m_optionWidget->findChild<QComboBox*>("cmbMaxiMode")->currentIndex() == 0)
|
||||
{
|
||||
m_bc.bc.setSecurityLevel(2);
|
||||
m_bc.bc.setPrimaryMessage(txtMaxiPrimary->text());
|
||||
m_bc.bc.setPrimaryMessage(m_optionWidget->findChild<QLineEdit*>("txtMaxiPrimary")->text());
|
||||
}
|
||||
else
|
||||
m_bc.bc.setSecurityLevel(cmbMaxiMode->currentIndex() + 3);
|
||||
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbMaxiMode")->currentIndex() + 3);
|
||||
break;
|
||||
|
||||
case BARCODE_CHANNEL:
|
||||
|
@ -11,6 +11,7 @@
|
||||
<file>grpC128.ui</file>
|
||||
<file>grpChannel.ui</file>
|
||||
<file>grpMicroPDF.ui</file>
|
||||
<file>grpMaxicode.ui</file>
|
||||
<file>grpPDF417.ui</file>
|
||||
<file>grpC16k.ui</file>
|
||||
<file>grpCodablock.ui</file>
|
||||
|
Loading…
Reference in New Issue
Block a user