1
0
mirror of https://github.com/woo-j/zint.git synced 2024-12-23 01:33:55 +03:00

Give Zint Studio some love

This commit is contained in:
taipanromania 2009-05-21 21:00:23 +00:00
parent 8398eff997
commit b85039e746
23 changed files with 2966 additions and 2949 deletions

View File

@ -19,6 +19,16 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include (SetPaths.cmake)
INCLUDE (CheckCXXCompilerFlag)
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
check_cxx_compiler_flag("-Wall" CXX_COMPILER_FLAG_WALL)
if (CXX_COMPILER_FLAG_WALL)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif (CXX_COMPILER_FLAG_WALL)
endif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
IF(APPLE)
IF(NOT ZINT_HAS_BEEN_RUN_BEFORE)
IF(EXISTS /Developer/SDKs/MacOSX10.5.sdk OR EXISTS /SDKs/MacOSX10.5.sdk)
@ -38,8 +48,10 @@ add_subdirectory(backend)
add_subdirectory(frontend)
find_package(Qt4)
if (QT4_FOUND)
set( QT_USE_QTGUI TRUE )
set( QT_USE_QTUITOOLS TRUE )
include( ${QT_USE_FILE} )
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}

View File

@ -6,14 +6,20 @@ include_directories(BEFORE "${CMAKE_SOURCE_DIR}/backend" "${CMAKE_SOURCE_DIR}/b
set(QZint_frontend_SRCS barcodeitem.cpp main.cpp mainwindow.cpp)
QT4_WRAP_CPP(QZint_frontend_SRCS mainwindow.h)
QT4_WRAP_UI(QZint_frontend_SRCS mainWindow.ui)
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)
QT4_ADD_RESOURCES(QZint_frontend_SRCS resources.qrc)
add_executable(QZint_frontend ${QZint_frontend_SRCS})
add_dependencies(QZint_frontend QZint zint)
link_directories( "${CMAKE_BINARY_DIR}/backend" "${CMAKE_BINARY_DIR}/backend_qt4" )
target_link_libraries(QZint_frontend zint QZint ${QT_QTGUI_LIBRARY}
target_link_libraries(QZint_frontend zint QZint ${QT_QTUITOOLS_LIBRARY} ${QT_QTGUI_LIBRARY}
${QT_QTCORE_LIBRARY} )
install(TARGETS QZint_frontend DESTINATION "${BIN_INSTALL_DIR}" RUNTIME)

328
frontend_qt4/grpAztec.ui Normal file
View File

@ -0,0 +1,328 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpAztec</class>
<widget class="QWidget" name="grpAztec">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>461</width>
<height>237</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<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">
<bool>true</bool>
</property>
</widget>
</item>
<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">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>15 x 15*</string>
</property>
</item>
<item>
<property name="text">
<string>19 x 19*</string>
</property>
</item>
<item>
<property name="text">
<string>23 x 23*</string>
</property>
</item>
<item>
<property name="text">
<string>27 x 27*</string>
</property>
</item>
<item>
<property name="text">
<string>19 x 19</string>
</property>
</item>
<item>
<property name="text">
<string>23 x 23</string>
</property>
</item>
<item>
<property name="text">
<string>27 x 27</string>
</property>
</item>
<item>
<property name="text">
<string>31 x 31</string>
</property>
</item>
<item>
<property name="text">
<string>37 x 37</string>
</property>
</item>
<item>
<property name="text">
<string>41 x 41</string>
</property>
</item>
<item>
<property name="text">
<string>45 x 45</string>
</property>
</item>
<item>
<property name="text">
<string>49 x 49</string>
</property>
</item>
<item>
<property name="text">
<string>53 x 53</string>
</property>
</item>
<item>
<property name="text">
<string>57 x 57</string>
</property>
</item>
<item>
<property name="text">
<string>61 x 61</string>
</property>
</item>
<item>
<property name="text">
<string>67 x 67</string>
</property>
</item>
<item>
<property name="text">
<string>71 x 71</string>
</property>
</item>
<item>
<property name="text">
<string>75 x 75</string>
</property>
</item>
<item>
<property name="text">
<string>79 x 79</string>
</property>
</item>
<item>
<property name="text">
<string>83 x 83</string>
</property>
</item>
<item>
<property name="text">
<string>87 x 87</string>
</property>
</item>
<item>
<property name="text">
<string>91 x 91</string>
</property>
</item>
<item>
<property name="text">
<string>95 x 95</string>
</property>
</item>
<item>
<property name="text">
<string>101 x 101</string>
</property>
</item>
<item>
<property name="text">
<string>105 x 105</string>
</property>
</item>
<item>
<property name="text">
<string>109 x 109</string>
</property>
</item>
<item>
<property name="text">
<string>113 x 113</string>
</property>
</item>
<item>
<property name="text">
<string>117 x 117</string>
</property>
</item>
<item>
<property name="text">
<string>121 x 121</string>
</property>
</item>
<item>
<property name="text">
<string>125 x 125</string>
</property>
</item>
<item>
<property name="text">
<string>131 x 131</string>
</property>
</item>
<item>
<property name="text">
<string>135 x 135</string>
</property>
</item>
<item>
<property name="text">
<string>139 x 139</string>
</property>
</item>
<item>
<property name="text">
<string>143 x 143</string>
</property>
</item>
<item>
<property name="text">
<string>147 x 147</string>
</property>
</item>
<item>
<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">
<string>Add Minimum Error Correction:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="cmbAztecECC">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>10% + 3 words</string>
</property>
</item>
<item>
<property name="text">
<string>23% + 3 words</string>
</property>
</item>
<item>
<property name="text">
<string>36% + 3 words</string>
</property>
</item>
<item>
<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">
<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">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>53</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>radAztecSize</sender>
<signal>toggled(bool)</signal>
<receiver>cmbAztecSize</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>85</x>
<y>47</y>
</hint>
<hint type="destinationlabel">
<x>331</x>
<y>47</y>
</hint>
</hints>
</connection>
<connection>
<sender>radAztecECC</sender>
<signal>toggled(bool)</signal>
<receiver>cmbAztecECC</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>200</x>
<y>80</y>
</hint>
<hint type="destinationlabel">
<x>366</x>
<y>80</y>
</hint>
</hints>
</connection>
</connections>
</ui>

81
frontend_qt4/grpC128.ui Normal file
View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpC128</class>
<widget class="QWidget" name="grpC128">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>317</width>
<height>156</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radC128Stand">
<property name="text">
<string>S&amp;tandard</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="radC128CSup">
<property name="text">
<string>Subset &amp;C Supression</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radC128EAN">
<property name="text">
<string>&amp;GS1-128</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QRadioButton" name="radC128HIBC">
<property name="text">
<string>&amp;HIBC 128</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="lblC128">
<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;Note: Composite symbols require a&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;GS1-128 linear component.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>43</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

51
frontend_qt4/grpC16k.ui Normal file
View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<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="radC16kStand">
<property name="text">
<string>Standard Mode</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radC16kGS1">
<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>
</widget>
<resources/>
<connections/>
</ui>

58
frontend_qt4/grpC39.ui Normal file
View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpC39</class>
<widget class="QWidget" name="grpC39">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>200</width>
<height>131</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="radC39Stand">
<property name="text">
<string>No Check Digit</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radC39Check">
<property name="text">
<string>Mod-43 Check Digit</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radC39HIBC">
<property name="text">
<string>HIBC 39</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>42</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpChannel</class>
<widget class="QWidget" name="grpChannel">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>310</width>
<height>78</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lblChannel">
<property name="text">
<string>Number of Channels:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cmbChannel">
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
<item>
<property name="text">
<string>3</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
</property>
</item>
<item>
<property name="text">
<string>7</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpCodablock</class>
<widget class="QWidget" name="grpCodablock">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>184</width>
<height>118</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QRadioButton" name="radCodaStand">
<property name="text">
<string>Standard Mode</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radCodaGS1">
<property name="text">
<string>GS-1 Data Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radCodaHIBC">
<property name="text">
<string>HIBC Codablock-F</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>29</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

418
frontend_qt4/grpDM.ui Normal file
View File

@ -0,0 +1,418 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpDM</class>
<widget class="QWidget" name="grpDM">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>398</width>
<height>339</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Encoding Mode:</string>
</property>
<property name="buddy">
<cstring>cmbDMMode</cstring>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cmbDMMode">
<item>
<property name="text">
<string>ECC 200 (Recommended)</string>
</property>
</item>
<item>
<property name="text">
<string>ECC 000</string>
</property>
</item>
<item>
<property name="text">
<string>ECC 050</string>
</property>
</item>
<item>
<property name="text">
<string>ECC 080</string>
</property>
</item>
<item>
<property name="text">
<string>ECC 100</string>
</property>
</item>
<item>
<property name="text">
<string>ECC 140</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="grpDMNon200">
<property name="title">
<string>Non ECC 200 Options</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="lblDMNon200Size">
<property name="text">
<string>Size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbDMNon200Size">
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
<item>
<property name="text">
<string>7 x 7</string>
</property>
</item>
<item>
<property name="text">
<string>9 x 9</string>
</property>
</item>
<item>
<property name="text">
<string>11 x 11</string>
</property>
</item>
<item>
<property name="text">
<string>13 x 13</string>
</property>
</item>
<item>
<property name="text">
<string>15 x 15</string>
</property>
</item>
<item>
<property name="text">
<string>17 x 17</string>
</property>
</item>
<item>
<property name="text">
<string>19 x 19</string>
</property>
</item>
<item>
<property name="text">
<string>21 x 21</string>
</property>
</item>
<item>
<property name="text">
<string>23 x 23</string>
</property>
</item>
<item>
<property name="text">
<string>25 x 25</string>
</property>
</item>
<item>
<property name="text">
<string>27 x 27</string>
</property>
</item>
<item>
<property name="text">
<string>29 x 29</string>
</property>
</item>
<item>
<property name="text">
<string>31 x 31</string>
</property>
</item>
<item>
<property name="text">
<string>33 x 33</string>
</property>
</item>
<item>
<property name="text">
<string>35 x 35</string>
</property>
</item>
<item>
<property name="text">
<string>37 x 37</string>
</property>
</item>
<item>
<property name="text">
<string>39 x 39</string>
</property>
</item>
<item>
<property name="text">
<string>41 x 41</string>
</property>
</item>
<item>
<property name="text">
<string>43 x 43</string>
</property>
</item>
<item>
<property name="text">
<string>45 x 45</string>
</property>
</item>
<item>
<property name="text">
<string>47 x 47</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="grpDM200">
<property name="title">
<string>ECC 200 Options</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radDM200Stand">
<property name="text">
<string>Standard</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QRadioButton" name="radDM200HIBC">
<property name="text">
<string>HIBC Data Matrix</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="radDM200GS1">
<property name="text">
<string>GS-1 Data Mode</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblDM200Size">
<property name="text">
<string>Size:</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QComboBox" name="cmbDM200Size">
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
<item>
<property name="text">
<string>10 x 10</string>
</property>
</item>
<item>
<property name="text">
<string>12 x 12</string>
</property>
</item>
<item>
<property name="text">
<string>14 x 14</string>
</property>
</item>
<item>
<property name="text">
<string>16 x 16</string>
</property>
</item>
<item>
<property name="text">
<string>18 x 18</string>
</property>
</item>
<item>
<property name="text">
<string>20 x 20</string>
</property>
</item>
<item>
<property name="text">
<string>22 x 22</string>
</property>
</item>
<item>
<property name="text">
<string>24 x 24</string>
</property>
</item>
<item>
<property name="text">
<string>26 x 26</string>
</property>
</item>
<item>
<property name="text">
<string>32 x 32</string>
</property>
</item>
<item>
<property name="text">
<string>36 x 36</string>
</property>
</item>
<item>
<property name="text">
<string>40 x 40</string>
</property>
</item>
<item>
<property name="text">
<string>44 x 44</string>
</property>
</item>
<item>
<property name="text">
<string>48 x 48</string>
</property>
</item>
<item>
<property name="text">
<string>52 x 52</string>
</property>
</item>
<item>
<property name="text">
<string>64 x 64</string>
</property>
</item>
<item>
<property name="text">
<string>72 x 72</string>
</property>
</item>
<item>
<property name="text">
<string>80 x 80</string>
</property>
</item>
<item>
<property name="text">
<string>88 x 88</string>
</property>
</item>
<item>
<property name="text">
<string>96 x 96</string>
</property>
</item>
<item>
<property name="text">
<string>104 x 104</string>
</property>
</item>
<item>
<property name="text">
<string>120 x 120</string>
</property>
</item>
<item>
<property name="text">
<string>132 x 132</string>
</property>
</item>
<item>
<property name="text">
<string>144 x 144</string>
</property>
</item>
<item>
<property name="text">
<string>8 x 18</string>
</property>
</item>
<item>
<property name="text">
<string>8 x 32</string>
</property>
</item>
<item>
<property name="text">
<string>12 x 26</string>
</property>
</item>
<item>
<property name="text">
<string>12 x 36</string>
</property>
</item>
<item>
<property name="text">
<string>16 x 36</string>
</property>
</item>
<item>
<property name="text">
<string>16 x 48</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>71</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

144
frontend_qt4/grpMQR.ui Normal file
View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpMQR</class>
<widget class="QWidget" name="grpMQR">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>423</width>
<height>159</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radMQRAuto">
<property name="text">
<string>Automatic Resizing</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radMQRSize">
<property name="text">
<string>Adjust Size To:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cmbMQRSize">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>11 x 11 (Version M1)</string>
</property>
</item>
<item>
<property name="text">
<string>13 x 13 (Version M2)</string>
</property>
</item>
<item>
<property name="text">
<string>15 x 15 (Version M3)</string>
</property>
</item>
<item>
<property name="text">
<string>17 x 17 (Version M4)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radMQRECC">
<property name="text">
<string>Add Error Correction:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="cmbMQRECC">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>~20% (Level L)</string>
</property>
</item>
<item>
<property name="text">
<string>~37% (Level M)</string>
</property>
</item>
<item>
<property name="text">
<string>~55% (Level Q)</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>50</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>radMQRSize</sender>
<signal>toggled(bool)</signal>
<receiver>cmbMQRSize</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>98</x>
<y>54</y>
</hint>
<hint type="destinationlabel">
<x>279</x>
<y>53</y>
</hint>
</hints>
</connection>
<connection>
<sender>radMQRECC</sender>
<signal>toggled(bool)</signal>
<receiver>cmbMQRECC</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>114</x>
<y>89</y>
</hint>
<hint type="destinationlabel">
<x>279</x>
<y>89</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpMSICheck</class>
<widget class="QWidget" name="grpMSICheck">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>295</width>
<height>79</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lblMSICheck">
<property name="text">
<string>Check Digit:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cmbMSICheck">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Mod-10</string>
</property>
</item>
<item>
<property name="text">
<string>Mod-10 &amp; Mod-10</string>
</property>
</item>
<item>
<property name="text">
<string>Mod-11</string>
</property>
</item>
<item>
<property name="text">
<string>Mod-11 &amp; Mod-10</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>31</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpMicroPDF</class>
<widget class="QWidget" name="grpMicroPDF">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>351</width>
<height>100</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="lblMPDFCols">
<property name="text">
<string>Number of Data Columns:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="cmbMPDFCols">
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
<item>
<property name="text">
<string>1</string>
</property>
</item>
<item>
<property name="text">
<string>2</string>
</property>
</item>
<item>
<property name="text">
<string>3</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radMPDFStand">
<property name="text">
<string>Standard</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="QRadioButton" name="radMPDFHIBC">
<property name="text">
<string>HIBC MicroPDF417</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>26</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

271
frontend_qt4/grpPDF417.ui Normal file
View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpPDF417</class>
<widget class="QWidget" name="grpPDF417">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>390</width>
<height>223</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="lblPDFCols">
<property name="text">
<string>Number of Data Columns:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbPDFCols">
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
<item>
<property name="text">
<string>1</string>
</property>
</item>
<item>
<property name="text">
<string>2</string>
</property>
</item>
<item>
<property name="text">
<string>3</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
</property>
</item>
<item>
<property name="text">
<string>6</string>
</property>
</item>
<item>
<property name="text">
<string>7</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
<item>
<property name="text">
<string>9</string>
</property>
</item>
<item>
<property name="text">
<string>10</string>
</property>
</item>
<item>
<property name="text">
<string>11</string>
</property>
</item>
<item>
<property name="text">
<string>12</string>
</property>
</item>
<item>
<property name="text">
<string>13</string>
</property>
</item>
<item>
<property name="text">
<string>14</string>
</property>
</item>
<item>
<property name="text">
<string>15</string>
</property>
</item>
<item>
<property name="text">
<string>16</string>
</property>
</item>
<item>
<property name="text">
<string>17</string>
</property>
</item>
<item>
<property name="text">
<string>18</string>
</property>
</item>
<item>
<property name="text">
<string>19</string>
</property>
</item>
<item>
<property name="text">
<string>20</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblPDFECC">
<property name="text">
<string>Error Correction Capacity:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cmbPDFECC">
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
<item>
<property name="text">
<string>2 words</string>
</property>
</item>
<item>
<property name="text">
<string>4 words</string>
</property>
</item>
<item>
<property name="text">
<string>8 words</string>
</property>
</item>
<item>
<property name="text">
<string>16 words</string>
</property>
</item>
<item>
<property name="text">
<string>32 words</string>
</property>
</item>
<item>
<property name="text">
<string>64 words</string>
</property>
</item>
<item>
<property name="text">
<string>128 words</string>
</property>
</item>
<item>
<property name="text">
<string>256 words</string>
</property>
</item>
<item>
<property name="text">
<string>512 words</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblPDFWords">
<property name="text">
<string>Ma&amp;ximum Codeword Lengh:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>codewords</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="codewords">
<property name="minimum">
<number>928</number>
</property>
<property name="maximum">
<number>1800</number>
</property>
<property name="value">
<number>928</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QRadioButton" name="radPDFStand">
<property name="text">
<string>Standard</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QRadioButton" name="radPDFHIBC">
<property name="text">
<string>HIBC PDF417</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QRadioButton" name="radPDFTruncated">
<property name="text">
<string>Truncated</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>52</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

336
frontend_qt4/grpQR.ui Normal file
View File

@ -0,0 +1,336 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>grpQR</class>
<widget class="QWidget" name="grpQR">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>441</width>
<height>171</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QRadioButton" name="radQRAuto">
<property name="text">
<string>Automatic Resizing</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radQRSize">
<property name="text">
<string>Adjust Size To:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cmbQRSize">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>21 x 21 (Version 1)</string>
</property>
</item>
<item>
<property name="text">
<string>25 x 25 (Version 2)</string>
</property>
</item>
<item>
<property name="text">
<string>29 x 29 (Version 3)</string>
</property>
</item>
<item>
<property name="text">
<string>33 x 33 (Version 4)</string>
</property>
</item>
<item>
<property name="text">
<string>37 x 37 (Version 5)</string>
</property>
</item>
<item>
<property name="text">
<string>41 x 41 (Version 6)</string>
</property>
</item>
<item>
<property name="text">
<string>45 x 45 (Version 7)</string>
</property>
</item>
<item>
<property name="text">
<string>49 x 49 (Version 8)</string>
</property>
</item>
<item>
<property name="text">
<string>53 x 53 (Version 9)</string>
</property>
</item>
<item>
<property name="text">
<string>57 x 57 (Version 10)</string>
</property>
</item>
<item>
<property name="text">
<string>61 x 61 (Version 11)</string>
</property>
</item>
<item>
<property name="text">
<string>65 x 65 (Version 12)</string>
</property>
</item>
<item>
<property name="text">
<string>69 x 69 (Version 13)</string>
</property>
</item>
<item>
<property name="text">
<string>73 x 73 (Version 14)</string>
</property>
</item>
<item>
<property name="text">
<string>77 x 77 (Version 15)</string>
</property>
</item>
<item>
<property name="text">
<string>81 x 81 (Version 16)</string>
</property>
</item>
<item>
<property name="text">
<string>85 x 85 (Version 17)</string>
</property>
</item>
<item>
<property name="text">
<string>89 x 89 (Version 18)</string>
</property>
</item>
<item>
<property name="text">
<string>93 x 93 (Version 19)</string>
</property>
</item>
<item>
<property name="text">
<string>97 x 97 (Version 20)</string>
</property>
</item>
<item>
<property name="text">
<string>101 x 101 (Version 21)</string>
</property>
</item>
<item>
<property name="text">
<string>105 x 105 (Version 22)</string>
</property>
</item>
<item>
<property name="text">
<string>109 x 109 (Version 23)</string>
</property>
</item>
<item>
<property name="text">
<string>113 x 113 (Version 24)</string>
</property>
</item>
<item>
<property name="text">
<string>117 x 117 (Version 25)</string>
</property>
</item>
<item>
<property name="text">
<string>121 x 121 (Version 26)</string>
</property>
</item>
<item>
<property name="text">
<string>125 x 125 (Version 27)</string>
</property>
</item>
<item>
<property name="text">
<string>129 x 129 (Version 28)</string>
</property>
</item>
<item>
<property name="text">
<string>133 x 133 (Version 29)</string>
</property>
</item>
<item>
<property name="text">
<string>137 x 137 (Version 30)</string>
</property>
</item>
<item>
<property name="text">
<string>141 x 141 (Version 31)</string>
</property>
</item>
<item>
<property name="text">
<string>145 x 145 (Version 32)</string>
</property>
</item>
<item>
<property name="text">
<string>149 x 149 (Version 33)</string>
</property>
</item>
<item>
<property name="text">
<string>153 x 153 (Version 34)</string>
</property>
</item>
<item>
<property name="text">
<string>157 x 157 (Version 35)</string>
</property>
</item>
<item>
<property name="text">
<string>161x 161 (Version 36)</string>
</property>
</item>
<item>
<property name="text">
<string>165 x 165 (Version 37)</string>
</property>
</item>
<item>
<property name="text">
<string>169 x 169 (Version 38)</string>
</property>
</item>
<item>
<property name="text">
<string>173 x 173 (Version 39)</string>
</property>
</item>
<item>
<property name="text">
<string>177 x 177 (Version 40)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="radQRECC">
<property name="text">
<string>Add Error Correction:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="cmbQRECC">
<property name="enabled">
<bool>false</bool>
</property>
<item>
<property name="text">
<string>~20% (Level L)</string>
</property>
</item>
<item>
<property name="text">
<string>~37% (Level M)</string>
</property>
</item>
<item>
<property name="text">
<string>~55% (Level Q)</string>
</property>
</item>
<item>
<property name="text">
<string>~65% (Level H)</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="chkQRHIBC">
<property name="text">
<string>HIBC QR Code</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>35</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>radQRSize</sender>
<signal>toggled(bool)</signal>
<receiver>cmbQRSize</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>89</x>
<y>39</y>
</hint>
<hint type="destinationlabel">
<x>255</x>
<y>46</y>
</hint>
</hints>
</connection>
<connection>
<sender>radQRECC</sender>
<signal>toggled(bool)</signal>
<receiver>cmbQRECC</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>95</x>
<y>79</y>
</hint>
<hint type="destinationlabel">
<x>308</x>
<y>79</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -20,8 +20,8 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Q_INIT_RESOURCE(resources);
MainWindow w;
w.show();
return app.exec();
}

File diff suppressed because it is too large Load Diff

View File

@ -18,12 +18,14 @@
#include <QGraphicsScene>
#include <QImage>
#include <QColorDialog>
#include <QUiLoader>
#include <QFile>
#include "mainwindow.h"
#include <stdio.h>
MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
: QWidget(parent, fl)
: QWidget(parent, fl),m_optionWidget(0)
{
char bstyle_text[][50] = {
@ -109,68 +111,18 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
connect(bstyle, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(heightb, SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(bwidth, SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(codewords, SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(btype, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(txtData, SIGNAL(textChanged( const QString& )), SLOT(update_preview()));
connect(txtComposite, SIGNAL(textChanged()), SLOT(update_preview()));
connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(composite_enable()));
connect(chkComposite, SIGNAL(stateChanged( int )), SLOT(update_preview()));
connect(cmbCompType, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(radC128EAN, SIGNAL(toggled( bool )), SLOT(composite_ean_check()));
connect(radC128Stand, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radC128CSup, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radC128EAN, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radC128HIBC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(cmbPDFECC, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbPDFCols, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(radPDFTruncated, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radPDFStand, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radPDFHIBC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radAztecSize, SIGNAL(toggled( bool )), SLOT(aztec_size()));
connect(radAztecECC, SIGNAL(toggled( bool )), SLOT(aztec_errorcorrect()));
connect(radAztecAuto, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radAztecSize, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radAztecECC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(cmbAztecSize, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbAztecECC, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(chkAztecMode, SIGNAL(stateChanged( int )), SLOT(update_preview()));
connect(cmbMSICheck, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(radC39Stand, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radC39Check, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radC39HIBC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(cmbMPDFCols, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(radMPDFStand, SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(radC16kStand, SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(radCodaStand, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radCodaGS1, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radCodaHIBC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(cmbDMMode, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbDMMode, SIGNAL(currentIndexChanged( int )), SLOT(datamatrix_options()));
connect(radDM200Stand, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radDM200GS1, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radDM200HIBC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(cmbDM200Size, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbDMNon200Size, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(radQRAuto, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radQRSize, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radQRECC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radQRSize, SIGNAL(toggled( bool )), SLOT(qr_size()));
connect(radQRECC, SIGNAL(toggled( bool )), SLOT(qr_errorcorrect()));
connect(cmbQRSize, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbQRECC, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(chkQRHIBC, SIGNAL(stateChanged( int )), SLOT(update_preview()));
connect(radMQRAuto, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radMQRSize, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radMQRECC, SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(radMQRSize, SIGNAL(toggled( bool )), SLOT(mqr_size()));
connect(radMQRECC, SIGNAL(toggled( bool )), SLOT(mqr_errorcorrect()));
connect(cmbMQRSize, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(cmbMQRECC, 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(cmbChannel, SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(btnAbout, SIGNAL(clicked( bool )), SLOT(about()));
connect(btnSave, SIGNAL(clicked( bool )), SLOT(save()));
connect(spnScale, SIGNAL(valueChanged( double )), SLOT(change_print_scale()));
@ -180,6 +132,13 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags fl)
MainWindow::~MainWindow()
{
}
void MainWindow::scaleRotate()
{
view->resetTransform();
view->rotate(rotateSlider->value());
view->scale((double)scaleSlider->value()/100,(double)scaleSlider->value()/100);
}
/*
void MainWindow::createActions()
{
@ -254,139 +213,210 @@ void MainWindow::change_print_scale()
void MainWindow::quit_now()
{
this->close();
close();
}
void MainWindow::change_options()
{
bool options;
QUiLoader uiload;
options = false;
if (tabMain->count()==3)
tabMain->removeTab(1);
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE128)
{
options = true;
grpC128->show();
QFile file(":/grpC128.ui");
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget=uiload.load(&file);
file.close();
tabMain->insertTab(1,m_optionWidget,tr("Options"));
chkComposite->setText(tr("Add 2D Component (GS1-128 only)"));
} else {
grpC128->hide();
connect(m_optionWidget->findChild<QObject*>("radC128EAN"), SIGNAL(toggled( bool )), SLOT(composite_ean_check()));
connect(m_optionWidget->findChild<QObject*>("radC128Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radC128CSup"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radC128EAN"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radC128HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
}
else
chkComposite->setText(tr("Add 2D Component"));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_PDF417)
{
options = true;
grpPDF417->show();
} else {
grpPDF417->hide();
QFile file(":/grpPDF417.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*>("codewords"), SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbPDFECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbPDFCols"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radPDFTruncated"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radPDFStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radPDFHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROPDF417)
{
options = true;
grpMicroPDF->show();
} else {
grpMicroPDF->hide();
QFile file(":/grpMicroPDF.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*>("cmbMPDFCols"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radMPDFStand"), SIGNAL(toggled( bool )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_AZTEC)
{
options = true;
grpAztec->show();
} else {
grpAztec->hide();
QFile file(":/grpAztec.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*>("radAztecAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radAztecSize"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radAztecECC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbAztecSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbAztecECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("chkAztecMode"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MSI_PLESSEY)
{
options = true;
grpMSICheck->show();
} else {
grpMSICheck->hide();
QFile file(":/grpMSICheck.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*>("cmbMSICheck"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
}
if((metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE39) ||
(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_EXCODE39))
{
options = true;
grpC39->show();
} else {
grpC39->hide();
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_EXCODE39) {
if(radC39HIBC->isChecked() == true) {
radC39HIBC->setChecked(false);
radC39Stand->setChecked(true);
}
radC39HIBC->setEnabled(false);
} else {
radC39HIBC->setEnabled(true);
QFile file(":/grpC39.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*>("radC39Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radC39Check"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radC39HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_EXCODE39)
{
if(m_optionWidget->findChild<QRadioButton*>("radC39HIBC")->isChecked() == true)
{
m_optionWidget->findChild<QRadioButton*>("radC39HIBC")->setChecked(false);
m_optionWidget->findChild<QRadioButton*>("radC39Stand")->setChecked(true);
}
m_optionWidget->findChild<QRadioButton*>("radC39HIBC")->setEnabled(false);
}
else
m_optionWidget->findChild<QRadioButton*>("radC39HIBC")->setEnabled(true);
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODABLOCKF)
{
options = true;
grpCodablock->show();
} else {
grpCodablock->hide();
QFile file(":/grpCodablock.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*>("radCodaStand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radCodaGS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radCodaHIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CODE16K)
{
options = true;
grpC16k->show();
} else {
grpC16k->hide();
QFile file(":/grpC16k.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*>("radC16kStand"), SIGNAL(toggled( bool )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_DATAMATRIX)
{
options = true;
QFile file(":/grpDM.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*>("cmbDMMode"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbDMMode"), SIGNAL(currentIndexChanged( int )), SLOT(datamatrix_options()));
connect(m_optionWidget->findChild<QObject*>("radDM200Stand"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radDM200GS1"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radDM200HIBC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbDM200Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbDMNon200Size"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
datamatrix_options();
grpDM->show();
} else {
grpDM->hide();
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_QRCODE)
{
options = true;
grpQR->show();
} else {
grpQR->hide();
QFile file(":/grpQR.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*>("radQRAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radQRSize"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radQRECC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("chkQRHIBC"), SIGNAL(stateChanged( int )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MICROQR)
{
options = true;
grpMQR->show();
} else {
grpMQR->hide();
QFile file(":/grpMQR.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*>("radMQRAuto"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radMQRSize"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("radMQRECC"), SIGNAL(clicked( bool )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbMQRSize"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(m_optionWidget->findChild<QObject*>("cmbMQRECC"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_MAXICODE)
{
grpMaxiCode->show();
} else {
grpMaxiCode->hide();
QFile file(":/grpMaxiCode.ui");
if (!file.open(QIODevice::ReadOnly))
return;
m_optionWidget=uiload.load(&file);
file.close();
tabMain->insertTab(1,m_optionWidget,tr("Options"));
}
if(metaObject()->enumerator(0).value(bstyle->currentIndex()) == BARCODE_CHANNEL)
{
options = true;
grpChannel->show();
} else {
grpChannel->hide();
QFile file(":/grpChannel.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*>("cmbChannel"), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
}
if(options == true) {
lblNoOption->hide();
} else {
lblNoOption->show();
}
switch(metaObject()->enumerator(0).value(bstyle->currentIndex()))
{
case BARCODE_CODE128:
@ -406,17 +436,22 @@ void MainWindow::change_options()
grpComposite->hide();
break;
}
tabMain->setCurrentIndex(0);
}
void MainWindow::composite_enable()
{
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked() == true)
{
lblCompType->setEnabled(true);
cmbCompType->setEnabled(true);
lblComposite->setEnabled(true);
txtComposite->setEnabled(true);
radC128EAN->setChecked(true);
} else {
if (metaObject()->enumerator(0).value(bstyle->currentIndex())==BARCODE_CODE128)
m_optionWidget->findChild<QRadioButton*>("radC128EAN")->setChecked(true);
}
else
{
lblCompType->setEnabled(false);
cmbCompType->setEnabled(false);
lblComposite->setEnabled(false);
@ -426,73 +461,26 @@ void MainWindow::composite_enable()
void MainWindow::composite_ean_check()
{
if(radC128EAN->isChecked() == false) {
if (metaObject()->enumerator(0).value(bstyle->currentIndex())!=BARCODE_CODE128)
return;
if(!m_optionWidget->findChild<QRadioButton*>("radC128EAN")->isChecked())
chkComposite->setChecked(false);
}
}
void MainWindow::aztec_size()
{
if(radAztecSize->isChecked() == true) {
cmbAztecSize->setEnabled(true);
} else {
cmbAztecSize->setEnabled(false);
}
}
void MainWindow::aztec_errorcorrect()
{
if(radAztecECC->isChecked() == true) {
cmbAztecECC->setEnabled(true);
} else {
cmbAztecECC->setEnabled(false);
}
}
void MainWindow::qr_size()
{
if(radQRSize->isChecked() == true) {
cmbQRSize->setEnabled(true);
} else {
cmbQRSize->setEnabled(false);
}
}
void MainWindow::mqr_errorcorrect()
{
if(radMQRECC->isChecked() == true) {
cmbMQRECC->setEnabled(true);
} else {
cmbMQRECC->setEnabled(false);
}
}
void MainWindow::mqr_size()
{
if(radMQRSize->isChecked() == true) {
cmbMQRSize->setEnabled(true);
} else {
cmbMQRSize->setEnabled(false);
}
}
void MainWindow::qr_errorcorrect()
{
if(radQRECC->isChecked() == true) {
cmbQRECC->setEnabled(true);
} else {
cmbQRECC->setEnabled(false);
}
}
void MainWindow::datamatrix_options()
{
if(cmbDMMode->currentIndex() == 0) {
grpDMNon200->hide();
grpDM200->show();
} else {
grpDM200->hide();
grpDMNon200->show();
if (metaObject()->enumerator(0).value(bstyle->currentIndex())!=BARCODE_DATAMATRIX)
return;
if(m_optionWidget->findChild<QComboBox*>("cmbDMMode")->currentIndex() == 0)
{
m_optionWidget->findChild<QGroupBox*>("grpDMNon200")->hide();
m_optionWidget->findChild<QGroupBox*>("grpDM200")->show();
}
else
{
m_optionWidget->findChild<QGroupBox*>("grpDM200")->hide();
m_optionWidget->findChild<QGroupBox*>("grpDMNon200")->show();
}
}
@ -524,224 +512,231 @@ void MainWindow::update_preview()
switch(metaObject()->enumerator(0).value(bstyle->currentIndex()))
{
case BARCODE_CODE128:
if(radC128Stand->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radC128Stand")->isChecked())
m_bc.bc.setSymbol(BARCODE_CODE128);
}
if(radC128CSup->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radC128CSup")->isChecked())
m_bc.bc.setSymbol(BARCODE_CODE128B);
}
if(radC128EAN->isChecked() == true) {
if(chkComposite->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radC128EAN")->isChecked())
{
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_EAN128_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_EAN128);
}
}
if(radC128HIBC->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radC128HIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_128);
}
break;
case BARCODE_EANX:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_EANX_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_EANX);
}
break;
case BARCODE_UPCA:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_UPCA_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_UPCA);
}
break;
case BARCODE_UPCE:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_UPCE_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_UPCE);
}
break;
case BARCODE_RSS14:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_RSS14_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_RSS14);
}
break;
case BARCODE_RSS_LTD:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_RSS_LTD_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_RSS_LTD);
}
break;
case BARCODE_RSS_EXP:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_RSS_EXP_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_RSS_EXP);
}
break;
case BARCODE_RSS14STACK:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_RSS14STACK_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_RSS14STACK);
}
break;
case BARCODE_RSS14STACK_OMNI:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_RSS14_OMNI_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_RSS14STACK_OMNI);
}
break;
case BARCODE_RSS_EXPSTACK:
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSymbol(BARCODE_RSS_EXPSTACK_CC);
} else {
else
m_bc.bc.setSymbol(BARCODE_RSS_EXPSTACK);
}
break;
case BARCODE_PDF417:
m_bc.bc.setWidth(cmbPDFCols->currentIndex());
m_bc.bc.setSecurityLevel(cmbPDFECC->currentIndex() - 1);
m_bc.bc.setPdf417CodeWords(codewords->value());
if(radPDFStand->isChecked() == true) {
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbPDFCols")->currentIndex());
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbPDFECC")->currentIndex()-1);
m_bc.bc.setPdf417CodeWords(m_optionWidget->findChild<QSpinBox*>("codewords")->value());
if(m_optionWidget->findChild<QRadioButton*>("radPDFStand")->isChecked())
m_bc.bc.setSymbol(BARCODE_PDF417);
}
if(radPDFTruncated->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radPDFTruncated")->isChecked())
m_bc.bc.setSymbol(BARCODE_PDF417TRUNC);
}
if(radPDFHIBC->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radPDFHIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_PDF);
}
break;
case BARCODE_MICROPDF417:
m_bc.bc.setWidth(cmbMPDFCols->currentIndex());
if(radMPDFStand->isChecked() == true) {
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbMPDFCols")->currentIndex());
if(m_optionWidget->findChild<QRadioButton*>("radMPDFStand")->isChecked())
m_bc.bc.setSymbol(BARCODE_MICROPDF417);
}
if(radMPDFHIBC->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radMPDFHIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_MICPDF);
}
break;
case BARCODE_AZTEC:
m_bc.bc.setSymbol(BARCODE_AZTEC);
if(radAztecSize->isChecked() == true) {
m_bc.bc.setWidth(cmbAztecSize->currentIndex() + 1);
}
if(radAztecECC->isChecked() == true) {
m_bc.bc.setSecurityLevel(cmbAztecECC->currentIndex() + 1);
}
if(chkAztecMode->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radAztecSize")->isChecked())
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbAztecSize")->currentIndex() + 1);
if(m_optionWidget->findChild<QRadioButton*>("radAztecECC")->isChecked())
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbAztecECC")->currentIndex() + 1);
if(m_optionWidget->findChild<QCheckBox*>("chkAztecMode")->isChecked())
m_bc.bc.setInputMode(GS1_MODE);
}
break;
case MSI_PLESSEY:
m_bc.bc.setSymbol(BARCODE_MSI_PLESSEY);
m_bc.bc.setWidth(cmbMSICheck->currentIndex());
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbMSICheck")->currentIndex());
break;
case BARCODE_CODE39:
if(radC39HIBC->isChecked() == false) {
if(m_optionWidget->findChild<QRadioButton*>("radC39HIBC")->isChecked())
{
m_bc.bc.setSymbol(BARCODE_CODE39);
if(radC39Check->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radC39Check")->isChecked())
m_bc.bc.setWidth(1);
}
} else {
}
else
m_bc.bc.setSymbol(BARCODE_HIBC_39);
}
break;
case BARCODE_EXCODE39:
m_bc.bc.setSymbol(BARCODE_EXCODE39);
if(radC39Check->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radC39Check")->isChecked())
m_bc.bc.setWidth(1);
}
break;
case BARCODE_CODE16K:
m_bc.bc.setSymbol(BARCODE_CODE16K);
if(radC16kStand->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radC16kStand")->isChecked())
m_bc.bc.setInputMode(UNICODE_MODE);
} else {
else
m_bc.bc.setInputMode(GS1_MODE);
}
break;
case BARCODE_CODABLOCKF:
if(radCodaGS1->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radCodaGS1")->isChecked())
m_bc.bc.setInputMode(GS1_MODE);
}
if(radCodaHIBC->isChecked() == false) {
m_bc.bc.setSymbol(BARCODE_CODABLOCKF);
} else {
if(m_optionWidget->findChild<QRadioButton*>("radCodaHIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_BLOCKF);
}
else
m_bc.bc.setSymbol(BARCODE_CODABLOCKF);
break;
case BARCODE_DATAMATRIX:
m_bc.bc.setSecurityLevel(cmbDMMode->currentIndex() + 1);
if(cmbDMMode->currentIndex() == 0) {
/* ECC 200 */
if(radDM200HIBC->isChecked() == true) {
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbDMMode")->currentIndex() + 1);
if(m_optionWidget->findChild<QComboBox*>("cmbDMMode")->currentIndex() == 0)
{ /* ECC 200 */
if(m_optionWidget->findChild<QRadioButton*>("radDM200HIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_DM);
} else {
else
m_bc.bc.setSymbol(BARCODE_DATAMATRIX);
}
if(radDM200GS1->isChecked() == true) {
if(m_optionWidget->findChild<QRadioButton*>("radDM200GS1")->isChecked())
m_bc.bc.setInputMode(GS1_MODE);
}
m_bc.bc.setWidth(cmbDM200Size->currentIndex());
} else {
/* Not ECC 200 */
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbDM200Size")->currentIndex());
}
else
{ /* Not ECC 200 */
m_bc.bc.setSymbol(BARCODE_DATAMATRIX);
m_bc.bc.setWidth(cmbDMNon200Size->currentIndex());
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbDMNon200Size")->currentIndex());
}
break;
case BARCODE_QRCODE:
if(chkQRHIBC->isChecked() == true) {
if(m_optionWidget->findChild<QCheckBox*>("chkQRHIBC")->isChecked())
m_bc.bc.setSymbol(BARCODE_HIBC_QR);
} else {
else
m_bc.bc.setSymbol(BARCODE_QRCODE);
}
if(radQRSize->isChecked() == true) {
m_bc.bc.setWidth(cmbQRSize->currentIndex() + 1);
}
if(radQRECC->isChecked() == true) {
m_bc.bc.setSecurityLevel(cmbQRECC->currentIndex() + 1);
}
if(m_optionWidget->findChild<QRadioButton*>("radQRSize")->isChecked())
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbQRSize")->currentIndex() + 1);
if(m_optionWidget->findChild<QRadioButton*>("radQRECC")->isChecked())
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbQRECC")->currentIndex() + 1);
break;
case BARCODE_MICROQR:
m_bc.bc.setSymbol(BARCODE_MICROQR);
if(radMQRSize->isChecked() == true) {
m_bc.bc.setWidth(cmbMQRSize->currentIndex() + 1);
}
if(radMQRECC->isChecked() == true) {
m_bc.bc.setSecurityLevel(cmbMQRECC->currentIndex() + 1);
}
if(m_optionWidget->findChild<QRadioButton*>("radMQRSize")->isChecked())
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbMQRSize")->currentIndex() + 1);
if(m_optionWidget->findChild<QRadioButton*>("radMQRECC")->isChecked())
m_bc.bc.setSecurityLevel(m_optionWidget->findChild<QComboBox*>("cmbMQRECC")->currentIndex() + 1);
break;
case BARCODE_MAXICODE:
m_bc.bc.setSymbol(BARCODE_MAXICODE);
if(cmbMaxiMode->currentIndex() == 0) {
if(cmbMaxiMode->currentIndex() == 0)
{
m_bc.bc.setSecurityLevel(2);
m_bc.bc.setPrimaryMessage(txtMaxiPrimary->text());
} else {
m_bc.bc.setSecurityLevel(cmbMaxiMode->currentIndex() + 3);
}
else
m_bc.bc.setSecurityLevel(cmbMaxiMode->currentIndex() + 3);
break;
case BARCODE_CHANNEL:
m_bc.bc.setSymbol(BARCODE_CHANNEL);
if(cmbChannel->currentIndex() == 0) {
if(m_optionWidget->findChild<QComboBox*>("cmbChannel")->currentIndex() == 0)
m_bc.bc.setWidth(0);
} else {
m_bc.bc.setWidth(cmbChannel->currentIndex() + 2);
}
else
m_bc.bc.setWidth(m_optionWidget->findChild<QComboBox*>("cmbChannel")->currentIndex() + 2);
break;
default:
m_bc.bc.setSymbol(metaObject()->enumerator(0).value(bstyle->currentIndex()));
break;
}
if(chkComposite->isChecked() == true) {
if(chkComposite->isChecked())
m_bc.bc.setSecurityLevel(cmbCompType->currentIndex());
}
m_bc.bc.setBorderType((Zint::QZint::BorderType)(btype->currentIndex()*2));
m_bc.bc.setBorderWidth(bwidth->value());
m_bc.bc.setHeight(heightb->value());

View File

@ -19,15 +19,15 @@
#include <QtGui>
#include <QGraphicsItem>
#include <QMainWindow>
#include <QMainWindow>
#include "ui_mainWindow.h"
#include "barcodeitem.h"
class QAction;
class QActionGroup;
class QLabel;
class QMenu;
class QAction;
class QActionGroup;
class QLabel;
class QMenu;
class MainWindow : public QWidget, private Ui::mainWindow
{
@ -104,6 +104,7 @@ public:
MainWindow(QWidget* parent = 0, Qt::WFlags fl = 0);
~MainWindow();
public slots:
void update_preview();
void change_options();
@ -111,21 +112,16 @@ public slots:
void on_bgcolor_clicked();
void composite_enable();
void composite_ean_check();
void aztec_size();
void aztec_errorcorrect();
void datamatrix_options();
void qr_size();
void qr_errorcorrect();
void mqr_size();
void mqr_errorcorrect();
void maxi_primary();
void change_print_scale();
void scaleRotate();
private slots:
bool save();
void about();
void quit_now();
/* void about(); */
private:
/* void createActions();
@ -133,6 +129,7 @@ private:
QColor m_fgcolor,m_bgcolor;
BarcodeItem m_bc;
QWidget *m_optionWidget;
/* QMenu *fileMenu;
QMenu *helpMenu;
QAction *saveAct;

View File

@ -0,0 +1,20 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>zoomin.png</file>
<file>zoomout.png</file>
<file>rotateleft.png</file>
<file>rotateright.png</file>
<file>grpAztec.ui</file>
<file>grpC39.ui</file>
<file>grpDM.ui</file>
<file>grpMSICheck.ui</file>
<file>grpC128.ui</file>
<file>grpChannel.ui</file>
<file>grpMicroPDF.ui</file>
<file>grpPDF417.ui</file>
<file>grpC16k.ui</file>
<file>grpCodablock.ui</file>
<file>grpMQR.ui</file>
<file>grpQR.ui</file>
</qresource>
</RCC>

BIN
frontend_qt4/rotateleft.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
frontend_qt4/zoomin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
frontend_qt4/zoomout.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB