Add HEIGHTPERROW_MODE_input mode flag (#204)

backend_qt: add encodedWidth, encodedRows
DBAR_EXPSTK: add max rows option (option_3)
CODE16K/CODE49: add min rows option (option_1)
GUI: HIBC xxx -> HIBC
This commit is contained in:
gitlost
2021-11-20 11:32:30 +00:00
parent 96cf5aa668
commit e14d9e99d5
36 changed files with 2453 additions and 608 deletions

View File

@ -19,9 +19,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutAztec">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutAztec">
<item row="0" column="0">
<widget class="QRadioButton" name="radAztecAuto">
<property name="text">
@ -331,7 +331,7 @@ formatted with Application Identifiers (AIs)</string>
<item row="0" column="2">
<widget class="QRadioButton" name="radAztecHIBC">
<property name="text">
<string>H&amp;IBC Aztec Code</string>
<string>H&amp;IBC</string>
</property>
<property name="toolTip">
<string>Process data as a Health Industry Barcode (HIBC)
@ -729,7 +729,7 @@ Maximum length 32 and cannot contain spaces
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerAztec">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,7 +19,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutC128">
<item>
<widget class="QGroupBox" name="groupBoxC128EncodingMode">
<property name="title">
@ -70,7 +70,7 @@ formatted with Application Identifiers (AIs)</string>
<item row="1" column="1">
<widget class="QRadioButton" name="radC128HIBC">
<property name="text">
<string>H&amp;IBC 128</string>
<string>H&amp;IBC</string>
</property>
<property name="toolTip">
<string>Process data as a Health Industry Barcode (HIBC)
@ -106,7 +106,7 @@ the data with a slash &quot;/&quot;</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerC128">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,11 +19,227 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutC16k">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutC16k">
<item row="0" column="0">
<widget class="QLabel" name="labelRowSeparatorHeight">
<widget class="QLabel" name="lblC16kRows">
<property name="text">
<string>Minimum Ro&amp;ws:</string>
</property>
<property name="toolTip">
<string>Set minimum number of rows</string>
</property>
<property name="buddy">
<cstring>cmbC16kRows</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbC16kRows">
<property name="maxVisibleItems">
<number>16</number>
</property>
<property name="toolTip">
<string>Set minimum number of rows</string>
</property>
<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>
<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>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblC16kHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="text">
<string>Row &amp;Height:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>spnC16kHeightPerRow</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horzLayoutC16kHeightPerRow">
<item>
<widget class="QDoubleSpinBox" name="spnC16kHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> X</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0</double>
</property>
<property name="maximum">
<double>2000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0</double>
</property>
<property name="specialValueText">
<string>0 (Disabled)</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnC16kHeightPerRowDisable">
<property name="toolTip">
<string>Set height per row to 0
(&quot;Height&quot; in the Appearance
tab will be re-enabled)</string>
</property>
<property name="text">
<string>Disabl&amp;e</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnC16kHeightPerRowDefault">
<property name="toolTip">
<string>Set height per row to default value</string>
</property>
<property name="text">
<string>De&amp;fault</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblC16kRowSepHeight">
<property name="text">
<string>&amp;Row Separator Height:</string>
</property>
@ -36,7 +252,7 @@ separating rows</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="2" column="1">
<widget class="QComboBox" name="cmbC16kRowSepHeight">
<property name="toolTip">
<string>Height in X-dimensions of horizontal lines
@ -119,7 +335,7 @@ formatted with Application Identifiers (AIs)</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerC16k">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,7 +19,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutC39">
<item>
<widget class="QGroupBox" name="grpC39Check">
<property name="title">
@ -28,7 +28,7 @@
<property name="toolTip">
<string>Check character options</string>
</property>
<layout class="QGridLayout" name="gridLayoutCheck">
<layout class="QGridLayout" name="gridLayoutC39Check">
<item row="0" column="0">
<widget class="QRadioButton" name="radC39Stand">
<property name="text">
@ -45,7 +45,7 @@
<item row="1" column="0" colspan="2">
<widget class="QRadioButton" name="radC39HIBC">
<property name="text">
<string>H&amp;IBC 39 (Mod-43 Check Digit added)</string>
<string>H&amp;IBC (Mod-43 Check Digit added)</string>
</property>
<property name="toolTip">
<string>Process data as a Health Industry Barcode (HIBC)
@ -69,7 +69,7 @@ the data with a slash &quot;/&quot;</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerC39">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,11 +19,184 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutC49">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutC49">
<item row="0" column="0">
<widget class="QLabel" name="labelRowSeparatorHeight">
<widget class="QLabel" name="lblC49Rows">
<property name="text">
<string>Minimum Ro&amp;ws:</string>
</property>
<property name="toolTip">
<string>Set minimum number of rows</string>
</property>
<property name="buddy">
<cstring>cmbC49Rows</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="cmbC49Rows">
<property name="toolTip">
<string>Set minimum number of rows</string>
</property>
<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>
<item row="1" column="0">
<widget class="QLabel" name="lblC49HeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="text">
<string>Row &amp;Height:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>spnC49HeightPerRow</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horzLayoutC49HeightPerRow">
<item>
<widget class="QDoubleSpinBox" name="spnC49HeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> X</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0</double>
</property>
<property name="maximum">
<double>2000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0</double>
</property>
<property name="specialValueText">
<string>0 (Disabled)</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnC49HeightPerRowDisable">
<property name="toolTip">
<string>Set height per row to 0
(&quot;Height&quot; in the Appearance
tab will be re-enabled)</string>
</property>
<property name="text">
<string>Disabl&amp;e</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnC49HeightPerRowDefault">
<property name="toolTip">
<string>Set height per row to default value</string>
</property>
<property name="text">
<string>De&amp;fault</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblC49RowSepHeight">
<property name="text">
<string>&amp;Row Separator Height:</string>
</property>
@ -36,7 +209,7 @@ separating rows</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="2" column="1">
<widget class="QComboBox" name="cmbC49RowSepHeight">
<property name="toolTip">
<string>Height in X-dimensions of horizontal lines
@ -119,7 +292,7 @@ formatted with Application Identifiers (AIs)</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerC49">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,16 +19,16 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutCbf">
<item>
<layout class="QGridLayout" name="gridCbfLayout">
<layout class="QGridLayout" name="gridLayoutCbf">
<item row="0" column="0">
<widget class="QLabel" name="labelWidth">
<widget class="QLabel" name="lblCbfWidth">
<property name="text">
<string>Symbol &amp;Width (Columns):</string>
<string>&amp;Number of Data Columns:</string>
</property>
<property name="toolTip">
<string>The number of data characters in a row</string>
<string>Set number of data characters in a row</string>
</property>
<property name="buddy">
<cstring>cmbCbfWidth</cstring>
@ -41,7 +41,7 @@
<number>21</number>
</property>
<property name="toolTip">
<string>The number of data characters in a row</string>
<string>Set number of data characters in a row</string>
</property>
<item>
<property name="text">
@ -346,12 +346,12 @@
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelHeight">
<widget class="QLabel" name="lblCbfHeight">
<property name="text">
<string>Symbol &amp;Height (Rows):</string>
<string>Number of Ro&amp;ws:</string>
</property>
<property name="toolTip">
<string>The number of rows</string>
<string>Set number of rows</string>
</property>
<property name="buddy">
<cstring>cmbCbfHeight</cstring>
@ -364,7 +364,7 @@
<number>21</number>
</property>
<property name="toolTip">
<string>The number of rows</string>
<string>Set number of rows</string>
</property>
<item>
<property name="text">
@ -594,7 +594,119 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelRowSeparatorHeight">
<widget class="QLabel" name="lblCbfHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="text">
<string>Row &amp;Height:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>spnCbfHeightPerRow</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horzLayoutCbfHeightPerRow">
<item>
<widget class="QDoubleSpinBox" name="spnCbfHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> X</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0</double>
</property>
<property name="maximum">
<double>2000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0</double>
</property>
<property name="specialValueText">
<string>0 (Disabled)</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnCbfHeightPerRowDisable">
<property name="toolTip">
<string>Set height per row to 0
(&quot;Height&quot; in the Appearance
tab will be re-enabled)</string>
</property>
<property name="text">
<string>Disabl&amp;e</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnCbfHeightPerRowDefault">
<property name="toolTip">
<string>Set height per row to default value</string>
</property>
<property name="text">
<string>De&amp;fault</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="lblCbfRowSepHeight">
<property name="text">
<string>&amp;Row Separator Height:</string>
</property>
@ -607,7 +719,7 @@ separating rows</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QComboBox" name="cmbCbfRowSepHeight">
<property name="toolTip">
<string>Height in X-dimensions of horizontal lines
@ -645,7 +757,7 @@ separating rows</string>
<property name="toolTip">
<string>How to process data</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<layout class="QHBoxLayout" name="horizontalCbfLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
@ -665,7 +777,7 @@ separating rows</string>
<item>
<widget class="QRadioButton" name="radCbfHIBC">
<property name="text">
<string>H&amp;IBC Codablock-F</string>
<string>H&amp;IBC</string>
</property>
<property name="toolTip">
<string>Process data as a Health Industry Barcode (HIBC)
@ -692,7 +804,7 @@ the data with a slash &quot;/&quot;</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerCbf">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,24 +19,35 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutDBES">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="lblColumns">
<layout class="QGridLayout" name="gridLayoutDBES">
<item row="0" column="0">
<widget class="QRadioButton" name="radDBESCols">
<property name="text">
<string>&amp;Number of Columns:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
<property name="toolTip">
<string>Set number of columns (each contains
2 data segments)</string>
</property>
<property name="buddy">
<cstring>cmbCols</cstring>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroupDBESColsRows</string>
</attribute>
</widget>
</item>
<item>
<widget class="QComboBox" name="cmbCols">
<item row="0" column="1">
<widget class="QComboBox" name="cmbDBESCols">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Set number of columns (each contains
2 data segments)</string>
</property>
<item>
<property name="text">
<string>Automatic</string>
@ -99,10 +110,206 @@
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QRadioButton" name="radDBESRows">
<property name="text">
<string>Maximum Ro&amp;ws:</string>
</property>
<property name="toolTip">
<string>Set maximum number of rows</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroupDBESColsRows</string>
</attribute>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cmbDBESRows">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Set maximum number of rows</string>
</property>
<item>
<property name="text">
<string>None</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 (same as none)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblDBESHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="text">
<string>Row &amp;Height:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>spnDBESHeightPerRow</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horzLayoutDBESHeightPerRow">
<item>
<widget class="QDoubleSpinBox" name="spnDBESHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> X</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0</double>
</property>
<property name="maximum">
<double>2000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0</double>
</property>
<property name="specialValueText">
<string>0 (Disabled)</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnDBESHeightPerRowDisable">
<property name="toolTip">
<string>Set height per row to 0
(&quot;Height&quot; in the Appearance
tab will be re-enabled)</string>
</property>
<property name="text">
<string>Disabl&amp;e</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnDBESHeightPerRowDefault">
<property name="toolTip">
<string>Set height per row to default value</string>
</property>
<property name="text">
<string>De&amp;fault</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerDBES">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -117,5 +324,41 @@
</layout>
</widget>
<resources/>
<connections/>
<connections>
<connection>
<sender>radDBESCols</sender>
<signal>toggled(bool)</signal>
<receiver>cmbDBESCols</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>radDBESRows</sender>
<signal>toggled(bool)</signal>
<receiver>cmbDBESRows</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>
<buttongroups>
<buttongroup name="buttonGroupDBESColsRows"/>
</buttongroups>
</ui>

View File

@ -19,9 +19,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutDM">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutDM">
<item row="0" column="0">
<widget class="QLabel" name="lblDM200Size">
<property name="text">
@ -379,7 +379,7 @@ formatted with Application Identifiers (AIs)</string>
<item row="0" column="2">
<widget class="QRadioButton" name="radDM200HIBC">
<property name="text">
<string>H&amp;IBC Data Matrix</string>
<string>H&amp;IBC</string>
</property>
<property name="toolTip">
<string>Process data as a Health Industry Barcode (HIBC)
@ -745,7 +745,7 @@ Value ranges from 1 to 254
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerDM">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,9 +19,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutMPDF">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutMPDF">
<item row="0" column="0">
<widget class="QLabel" name="lblMPDFCols">
<property name="text">
@ -38,7 +38,7 @@
</property>
</widget>
</item>
<item row="0" column="2">
<item row="0" column="1">
<widget class="QComboBox" name="cmbMPDFCols">
<property name="toolTip">
<string>Set number of data characters in a row</string>
@ -70,6 +70,124 @@
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lblMPDFHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="text">
<string>Row &amp;Height:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>spnMPDFHeightPerRow</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horzLayoutMPDFHeightPerRow">
<item>
<widget class="QDoubleSpinBox" name="spnMPDFHeightPerRow">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Height per row in X-dimensions
Only available if &quot;Automatic Height&quot; in
the Appearance tab is not checked
(ignored if disabled)</string>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
<property name="prefix">
<string/>
</property>
<property name="suffix">
<string> X</string>
</property>
<property name="decimals">
<number>3</number>
</property>
<property name="minimum">
<double>0</double>
</property>
<property name="maximum">
<double>2000.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0</double>
</property>
<property name="specialValueText">
<string>0 (Disabled)</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnMPDFHeightPerRowDisable">
<property name="toolTip">
<string>Set height per row to 0
(&quot;Height&quot; in the Appearance
tab will be re-enabled)</string>
</property>
<property name="text">
<string>Disabl&amp;e</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnMPDFHeightPerRowDefault">
<property name="toolTip">
<string>Set height per row to default value</string>
</property>
<property name="text">
<string>De&amp;fault</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
@ -100,7 +218,7 @@
<item row="0" column="1">
<widget class="QRadioButton" name="radMPDFHIBC">
<property name="text">
<string>H&amp;IBC MicroPDF417</string>
<string>H&amp;IBC</string>
</property>
<property name="toolTip">
<string>Process data as a Health Industry Barcode (HIBC)
@ -163,7 +281,7 @@ Value ranges from 1 (Disabled) to 99999</string>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacerPDFStructApp">
<spacer name="horizontalSpacerMPDFStructApp">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -253,7 +371,7 @@ Numbers only, in triplets, maximum length 30 (10 triplets)
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerMPDF">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

File diff suppressed because it is too large Load Diff

View File

@ -19,9 +19,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutQR">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutQR">
<item row="0" column="0">
<widget class="QLabel" name="labelQRSize">
<property name="text">
@ -403,7 +403,7 @@ formatted with Application Identifiers (AIs)</string>
<item row="0" column="2">
<widget class="QRadioButton" name="radQRHIBC">
<property name="text">
<string>H&amp;IBC QR Code</string>
<string>H&amp;IBC</string>
</property>
<property name="toolTip">
<string>Process data as a Health Industry Barcode (HIBC)
@ -746,7 +746,7 @@ Value ranges from 0 to 255
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerQR">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,9 +19,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutUPCA">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutUPCA">
<item row="0" column="0">
<widget class="QLabel" name="lblUPCAAddonGap">
<property name="text">
@ -89,7 +89,7 @@ descend below the main bars (default 5X)
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horzLayoutUPCAGuardDescent">
<item>
<item>
<widget class="QDoubleSpinBox" name="spnUPCAGuardDescent">
<property name="toolTip">
<string>Height in X-dimensions that the guard bars
@ -169,7 +169,7 @@ to default 5X</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerUPCA">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -19,9 +19,9 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayoutUPCEAN">
<item>
<layout class="QGridLayout" name="gridLayout">
<layout class="QGridLayout" name="gridLayoutUPCEAN">
<item row="0" column="0">
<widget class="QLabel" name="lblUPCEANAddonGap">
<property name="text">
@ -99,7 +99,7 @@ descend below the main bars (default 5X)
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horzLayoutUPCEANGuardDescent">
<item>
<item>
<widget class="QDoubleSpinBox" name="spnUPCEANGuardDescent">
<property name="toolTip">
<string>Height in X-dimensions that the guard bars
@ -179,7 +179,7 @@ to default 5X</string>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<spacer name="verticalSpacerUPCEAN">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>

View File

@ -125,7 +125,9 @@ static const struct bstyle_item bstyle_items[] = {
};
MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
: QWidget(parent, fl), m_optionWidget(nullptr), m_symbology(0), m_saveAsShortcut(nullptr), m_menu(nullptr)
: QWidget(parent, fl), m_optionWidget(nullptr), m_symbology(0), m_saveAsShortcut(nullptr), m_menu(nullptr),
m_lblHeightPerRow(nullptr), m_spnHeightPerRow(nullptr),
m_btnHeightPerRowDisable(nullptr), m_btnHeightPerRowDefault(nullptr)
{
// Undocumented command line debug flag
m_bc.bc.setDebug(QCoreApplication::arguments().contains(QSL("--verbose")));
@ -518,6 +520,24 @@ void MainWindow::autoheight_ui_set()
bool enabled = chkAutoHeight->isEnabled() && !chkAutoHeight->isChecked();
lblHeight->setEnabled(enabled);
heightb->setEnabled(enabled);
if (m_lblHeightPerRow && m_spnHeightPerRow) {
m_lblHeightPerRow->setEnabled(enabled);
m_spnHeightPerRow->setEnabled(enabled);
if (enabled && m_spnHeightPerRow->value()) {
lblHeight->setEnabled(!enabled);
heightb->setEnabled(!enabled);
statusBar->showMessage(tr("Using \"Row Height\""), statusBarTimeout);
} else {
statusBar->clearMessage();
}
if (m_btnHeightPerRowDisable) {
m_btnHeightPerRowDisable->setEnabled(enabled && m_spnHeightPerRow->value());
}
if (m_btnHeightPerRowDefault) {
m_btnHeightPerRowDefault->setEnabled(enabled);
}
}
}
void MainWindow::HRTShow_ui_set()
@ -634,7 +654,7 @@ void MainWindow::on_encoded()
enableActions(true);
errtxtBar_set(false /*isError*/);
if (!chkAutoHeight->isEnabled() || chkAutoHeight->isChecked()) {
if (!chkAutoHeight->isEnabled() || chkAutoHeight->isChecked() || !heightb->isEnabled()) {
/* setValue() rounds up/down to precision (decimals 3), we want round up only */
float height = (float) (ceil(m_bc.bc.height() * 1000.0f) / 1000.0f);
heightb->setValue(height);
@ -779,6 +799,52 @@ void MainWindow::copy_to_clipboard_errtxt()
}
}
void MainWindow::height_per_row_disable()
{
if (m_spnHeightPerRow) {
m_spnHeightPerRow->setValue(0.0);
}
}
void MainWindow::height_per_row_default()
{
if (m_spnHeightPerRow && m_btnHeightPerRowDefault) {
const QString &name = m_btnHeightPerRowDefault->objectName();
double val = 0.0;
if (name == QSL("btnPDFHeightPerRowDefault")) {
val = 3.0;
} else if (name == QSL("btnMPDFHeightPerRowDefault")) {
val = 2.0;
} else if (name == QSL("btnC16kHeightPerRowDefault")) {
if (chkCompliantHeight->isEnabled() && chkCompliantHeight->isChecked()) {
const int rows = m_bc.bc.encodedRows();
val = 10.0 + (double)((rows - 1) * (get_cmb_index(QSL("cmbC16kRowSepHeight")) + 1)) / rows;
} else {
val = 10.0;
}
} else if (name == QSL("btnCbfHeightPerRowDefault")) {
// Depends on no. of data cols
const int cols = (m_bc.bc.encodedWidth() - 57) / 11; // 57 = 4 * 11 (start/subset/checks) + 13 (stop char)
val = 0.55 * cols + 3;
if (val < 10.0) {
val = 10.0;
}
} else if (name == QSL("btnC49HeightPerRowDefault")) {
if (chkCompliantHeight->isEnabled() && chkCompliantHeight->isChecked()) {
const int rows = m_bc.bc.encodedRows();
val = 10.0 + (double)((rows - 1) * (get_cmb_index(QSL("cmbC49RowSepHeight")) + 1)) / rows;
} else {
val = 10.0;
}
} else if (name == QSL("btnDBESHeightPerRowDefault")) {
val = 34.0;
}
if (val) {
m_spnHeightPerRow->setValue(val);
}
}
}
void MainWindow::guard_reset_upcean()
{
guard_reset(QSL("spnUPCEANGuardDescent"));
@ -812,6 +878,7 @@ void MainWindow::view_context_menu(const QPoint &pos)
#endif
menu.addAction(m_copySVGAct);
menu.addAction(m_copyTIFAct);
menu.addSeparator();
menu.addAction(m_saveAsAct);
menu.exec(get_context_menu_pos(pos, view));
@ -853,6 +920,10 @@ void MainWindow::change_options()
cmbECI->setItemText(25, tr("29: GB 2312 (PRC)"));
btype->setItemText(0, tr("No border"));
combobox_item_enabled(cmbFontSetting, 1, true);
m_lblHeightPerRow = nullptr;
m_spnHeightPerRow = nullptr;
m_btnHeightPerRowDisable = nullptr;
m_btnHeightPerRowDefault = nullptr;
if (symbology == BARCODE_CODE128) {
QFile file(QSL(":/grpC128.ui"));
@ -883,6 +954,14 @@ void MainWindow::change_options()
connect(get_widget(QSL("cmbPDFECC")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("cmbPDFCols")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("cmbPDFRows")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
m_lblHeightPerRow = m_optionWidget->findChild<QLabel*>(QSL("lblPDFHeightPerRow"));
m_spnHeightPerRow = m_optionWidget->findChild<QDoubleSpinBox*>(QSL("spnPDFHeightPerRow"));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(autoheight_ui_set()));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(update_preview()));
m_btnHeightPerRowDisable = m_optionWidget->findChild<QPushButton*>(QSL("btnPDFHeightPerRowDisable"));
m_btnHeightPerRowDefault = m_optionWidget->findChild<QPushButton*>(QSL("btnPDFHeightPerRowDefault"));
connect(m_btnHeightPerRowDisable, SIGNAL(clicked( bool )), SLOT(height_per_row_disable()));
connect(m_btnHeightPerRowDefault, SIGNAL(clicked( bool )), SLOT(height_per_row_default()));
connect(get_widget(QSL("radPDFTruncated")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("radPDFStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("radPDFHIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
@ -901,6 +980,14 @@ void MainWindow::change_options()
structapp_ui_set();
tabMain->insertTab(1, m_optionWidget, tr("Micro PDF41&7"));
connect(get_widget(QSL("cmbMPDFCols")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
m_lblHeightPerRow = m_optionWidget->findChild<QLabel*>(QSL("lblMPDFHeightPerRow"));
m_spnHeightPerRow = m_optionWidget->findChild<QDoubleSpinBox*>(QSL("spnMPDFHeightPerRow"));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(autoheight_ui_set()));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(update_preview()));
m_btnHeightPerRowDisable = m_optionWidget->findChild<QPushButton*>(QSL("btnMPDFHeightPerRowDisable"));
m_btnHeightPerRowDefault = m_optionWidget->findChild<QPushButton*>(QSL("btnMPDFHeightPerRowDefault"));
connect(m_btnHeightPerRowDisable, SIGNAL(clicked( bool )), SLOT(height_per_row_disable()));
connect(m_btnHeightPerRowDefault, SIGNAL(clicked( bool )), SLOT(height_per_row_default()));
connect(get_widget(QSL("radMPDFStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("spnMPDFStructAppCount")), SIGNAL(valueChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("spnMPDFStructAppCount")), SIGNAL(valueChanged( int )), SLOT(structapp_ui_set()));
@ -1034,6 +1121,15 @@ void MainWindow::change_options()
load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 16K"));
btype->setItemText(0, tr("Default (bind)"));
connect(get_widget(QSL("cmbC16kRows")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
m_lblHeightPerRow = m_optionWidget->findChild<QLabel*>(QSL("lblC16kHeightPerRow"));
m_spnHeightPerRow = m_optionWidget->findChild<QDoubleSpinBox*>(QSL("spnC16kHeightPerRow"));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(autoheight_ui_set()));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(update_preview()));
m_btnHeightPerRowDisable = m_optionWidget->findChild<QPushButton*>(QSL("btnC16kHeightPerRowDisable"));
m_btnHeightPerRowDefault = m_optionWidget->findChild<QPushButton*>(QSL("btnC16kHeightPerRowDefault"));
connect(m_btnHeightPerRowDisable, SIGNAL(clicked( bool )), SLOT(height_per_row_disable()));
connect(m_btnHeightPerRowDefault, SIGNAL(clicked( bool )), SLOT(height_per_row_default()));
connect(get_widget(QSL("cmbC16kRowSepHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("radC16kStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("chkC16kNoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
@ -1061,6 +1157,14 @@ void MainWindow::change_options()
btype->setItemText(0, tr("Default (bind)"));
connect(get_widget(QSL("cmbCbfWidth")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("cmbCbfHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
m_lblHeightPerRow = m_optionWidget->findChild<QLabel*>(QSL("lblCbfHeightPerRow"));
m_spnHeightPerRow = m_optionWidget->findChild<QDoubleSpinBox*>(QSL("spnCbfHeightPerRow"));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(autoheight_ui_set()));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(update_preview()));
m_btnHeightPerRowDisable = m_optionWidget->findChild<QPushButton*>(QSL("btnCbfHeightPerRowDisable"));
m_btnHeightPerRowDefault = m_optionWidget->findChild<QPushButton*>(QSL("btnCbfHeightPerRowDefault"));
connect(m_btnHeightPerRowDisable, SIGNAL(clicked( bool )), SLOT(height_per_row_disable()));
connect(m_btnHeightPerRowDefault, SIGNAL(clicked( bool )), SLOT(height_per_row_default()));
connect(get_widget(QSL("cmbCbfRowSepHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("radCbfStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("radCbfHIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
@ -1250,6 +1354,15 @@ void MainWindow::change_options()
load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 49"));
btype->setItemText(0, tr("Default (bind)"));
connect(get_widget(QSL("cmbC49Rows")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
m_lblHeightPerRow = m_optionWidget->findChild<QLabel*>(QSL("lblC49HeightPerRow"));
m_spnHeightPerRow = m_optionWidget->findChild<QDoubleSpinBox*>(QSL("spnC49HeightPerRow"));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(autoheight_ui_set()));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(update_preview()));
m_btnHeightPerRowDisable = m_optionWidget->findChild<QPushButton*>(QSL("btnC49HeightPerRowDisable"));
m_btnHeightPerRowDefault = m_optionWidget->findChild<QPushButton*>(QSL("btnC49HeightPerRowDefault"));
connect(m_btnHeightPerRowDisable, SIGNAL(clicked( bool )), SLOT(height_per_row_disable()));
connect(m_btnHeightPerRowDefault, SIGNAL(clicked( bool )), SLOT(height_per_row_default()));
connect(get_widget(QSL("cmbC49RowSepHeight")), SIGNAL(currentIndexChanged( int )), SLOT(update_preview()));
connect(get_widget(QSL("radC49GS1")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("chkC49NoQuietZones")), SIGNAL(toggled( bool )), SLOT(update_preview()));
@ -1271,8 +1384,19 @@ void MainWindow::change_options()
m_optionWidget = uiload.load(&file);
file.close();
load_sub_settings(settings, symbology);
tabMain->insertTab(1, m_optionWidget, tr("GS1 DataBar Stack&ed"));
connect(get_widget(QSL("cmbCols")), SIGNAL(currentIndexChanged ( int )), SLOT(update_preview()));
tabMain->insertTab(1, m_optionWidget, tr("GS1 D&ataBar Exp Stack"));
connect(get_widget(QSL("radDBESCols")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("radDBESRows")), SIGNAL(toggled( bool )), SLOT(update_preview()));
connect(get_widget(QSL("cmbDBESCols")), SIGNAL(currentIndexChanged ( int )), SLOT(update_preview()));
connect(get_widget(QSL("cmbDBESRows")), SIGNAL(currentIndexChanged ( int )), SLOT(update_preview()));
m_lblHeightPerRow = m_optionWidget->findChild<QLabel*>(QSL("lblDBESHeightPerRow"));
m_spnHeightPerRow = m_optionWidget->findChild<QDoubleSpinBox*>(QSL("spnDBESHeightPerRow"));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(autoheight_ui_set()));
connect(m_spnHeightPerRow, SIGNAL(valueChanged( double )), SLOT(update_preview()));
m_btnHeightPerRowDisable = m_optionWidget->findChild<QPushButton*>(QSL("btnDBESHeightPerRowDisable"));
m_btnHeightPerRowDefault = m_optionWidget->findChild<QPushButton*>(QSL("btnDBESHeightPerRowDefault"));
connect(m_btnHeightPerRowDisable, SIGNAL(clicked( bool )), SLOT(height_per_row_disable()));
connect(m_btnHeightPerRowDefault, SIGNAL(clicked( bool )), SLOT(height_per_row_default()));
} else if (symbology == BARCODE_ULTRA) {
QFile file(QSL(":/grpUltra.ui"));
@ -1642,8 +1766,15 @@ void MainWindow::update_preview()
break;
case BARCODE_DBAR_EXPSTK:
m_bc.bc.setSymbol(chkComposite->isChecked() ? BARCODE_DBAR_EXPSTK_CC : BARCODE_DBAR_EXPSTK);
if ((item_val = get_cmb_index(QSL("cmbCols"))) != 0)
m_bc.bc.setOption2(item_val);
if (get_rad_val(QSL("radDBESCols"))) {
if ((item_val = get_cmb_index(QSL("cmbDBESCols"))) != 0) {
m_bc.bc.setOption2(item_val);
}
} else if (get_rad_val(QSL("radDBESRows"))) {
if ((item_val = get_cmb_index(QSL("cmbDBESRows"))) != 0) {
m_bc.bc.setOption3(item_val + 1); // Begins at 2
}
}
break;
case BARCODE_PDF417:
@ -1769,6 +1900,9 @@ void MainWindow::update_preview()
case BARCODE_CODE16K:
m_bc.bc.setSymbol(BARCODE_CODE16K);
set_gs1_mode(get_rad_val(QSL("radC16kGS1")));
if ((item_val = get_cmb_index(QSL("cmbC16kRows"))) != 0) {
m_bc.bc.setOption1(item_val + 2); // Starts at 3
}
// Row separator height selection uses option 3 in zint_symbol
if ((item_val = get_cmb_index(QSL("cmbC16kRowSepHeight"))) != 0) {
m_bc.bc.setOption3(item_val + 1); // Zero-based
@ -1997,6 +2131,9 @@ void MainWindow::update_preview()
case BARCODE_CODE49:
m_bc.bc.setSymbol(BARCODE_CODE49);
set_gs1_mode(get_rad_val(QSL("radC49GS1")));
if ((item_val = get_cmb_index(QSL("cmbC49Rows"))) != 0) {
m_bc.bc.setOption1(item_val + 2); // Starts at 3
}
// Row separator height selection uses option 3 in zint_symbol
if ((item_val = get_cmb_index(QSL("cmbC49RowSepHeight"))) != 0) {
m_bc.bc.setOption3(item_val + 1); // Zero-based
@ -2075,7 +2212,13 @@ void MainWindow::update_preview()
if (!chkAutoHeight->isEnabled() || chkAutoHeight->isChecked()) {
m_bc.bc.setHeight(0);
} else {
m_bc.bc.setHeight(heightb->value());
if (m_spnHeightPerRow && m_spnHeightPerRow->isEnabled() && m_spnHeightPerRow->value()) {
// This causes a double-encode unfortunately, as heightb gets synced
m_bc.bc.setInputMode(m_bc.bc.inputMode() | HEIGHTPERROW_MODE);
m_bc.bc.setHeight(m_spnHeightPerRow->value());
} else {
m_bc.bc.setHeight(heightb->value());
}
}
m_bc.bc.setCompliantHeight(chkCompliantHeight->isEnabled() && chkCompliantHeight->isChecked());
m_bc.bc.setECI(cmbECI->isEnabled() ? cmbECI->currentIndex() : 0);
@ -2309,7 +2452,7 @@ QPoint MainWindow::get_context_menu_pos(const QPoint &pos, QWidget *widget)
/* Shorthand to find widget child as generic QWidget */
QWidget *MainWindow::get_widget(const QString &name)
{
return m_optionWidget->findChild<QWidget*>(name);
return m_optionWidget ? m_optionWidget->findChild<QWidget*>(name) : nullptr;
}
/* Return settings subsection name for a symbol */
@ -2679,6 +2822,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
case BARCODE_HIBC_PDF:
settings.setValue(QSL("studio/bc/pdf417/cols"), get_cmb_index(QSL("cmbPDFCols")));
settings.setValue(QSL("studio/bc/pdf417/rows"), get_cmb_index(QSL("cmbPDFRows")));
settings.setValue(QSL("studio/bc/pdf417/height_per_row"), get_dspn_val(QSL("spnPDFHeightPerRow")));
settings.setValue(QSL("studio/bc/pdf417/ecc"), get_cmb_index(QSL("cmbPDFECC")));
settings.setValue(QSL("studio/bc/pdf417/encoding_mode"), get_rad_grp_index(
QStringList() << QSL("radPDFStand") << QSL("radPDFTruncated") << QSL("radPDFHIBC")));
@ -2690,6 +2834,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
case BARCODE_MICROPDF417:
case BARCODE_HIBC_MICPDF:
settings.setValue(QSL("studio/bc/micropdf417/cols"), get_cmb_index(QSL("cmbMPDFCols")));
settings.setValue(QSL("studio/bc/micropdf417/height_per_row"), get_dspn_val(QSL("spnMPDFHeightPerRow")));
settings.setValue(QSL("studio/bc/micropdf417/encoding_mode"), get_rad_grp_index(
QStringList() << QSL("radMPDFStand") << QSL("radMPDFHIBC")));
settings.setValue(QSL("studio/bc/micropdf417/structapp_count"),
@ -2770,6 +2915,8 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
break;
case BARCODE_CODE16K:
settings.setValue(QSL("studio/bc/code16k/rows"), get_cmb_index(QSL("cmbC16kRows")));
settings.setValue(QSL("studio/bc/code16k/height_per_row"), get_dspn_val(QSL("spnC16kHeightPerRow")));
settings.setValue(QSL("studio/bc/code16k/row_sep_height"), get_cmb_index(QSL("cmbC16kRowSepHeight")));
settings.setValue(QSL("studio/bc/code16k/encoding_mode"), get_rad_grp_index(
QStringList() << QSL("radC16kStand") << QSL("radC16kGS1")));
@ -2785,6 +2932,7 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
case BARCODE_HIBC_BLOCKF:
settings.setValue(QSL("studio/bc/codablockf/width"), get_cmb_index(QSL("cmbCbfWidth")));
settings.setValue(QSL("studio/bc/codablockf/height"), get_cmb_index(QSL("cmbCbfHeight")));
settings.setValue(QSL("studio/bc/codablockf/height_per_row"), get_dspn_val(QSL("spnCbfHeightPerRow")));
settings.setValue(QSL("studio/bc/codablockf/row_sep_height"), get_cmb_index(QSL("cmbCbfRowSepHeight")));
settings.setValue(QSL("studio/bc/codablockf/encoding_mode"), get_rad_grp_index(
QStringList() << QSL("radCbfStand") << QSL("radCbfHIBC")));
@ -2881,6 +3029,8 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
break;
case BARCODE_CODE49:
settings.setValue(QSL("studio/bc/code49/rows"), get_cmb_index(QSL("cmbC49Rows")));
settings.setValue(QSL("studio/bc/code49/height_per_row"), get_dspn_val(QSL("spnC49HeightPerRow")));
settings.setValue(QSL("studio/bc/code49/row_sep_height"), get_cmb_index(QSL("cmbC49RowSepHeight")));
settings.setValue(QSL("studio/bc/code49/encoding_mode"), get_rad_grp_index(
QStringList() << QSL("radC49Stand") << QSL("radC49GS1")));
@ -2893,7 +3043,11 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
case BARCODE_DBAR_EXPSTK:
case BARCODE_DBAR_EXPSTK_CC:
settings.setValue(QSL("studio/bc/dbar_expstk/cols"), get_cmb_index(QSL("cmbCols")));
settings.setValue(QSL("studio/bc/dbar_expstk/colsrows"), get_rad_grp_index(
QStringList() << QSL("radDBESCols") << QSL("radDBESRows")));
settings.setValue(QSL("studio/bc/dbar_expstk/cols"), get_cmb_index(QSL("cmbDBESCols")));
settings.setValue(QSL("studio/bc/dbar_expstk/rows"), get_cmb_index(QSL("cmbDBESRows")));
settings.setValue(QSL("studio/bc/dbar_expstk/height_per_row"), get_dspn_val(QSL("spnDBESHeightPerRow")));
break;
case BARCODE_ULTRA:
@ -3034,6 +3188,7 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
case BARCODE_HIBC_PDF:
set_cmb_from_setting(settings, QSL("studio/bc/pdf417/cols"), QSL("cmbPDFCols"));
set_cmb_from_setting(settings, QSL("studio/bc/pdf417/rows"), QSL("cmbPDFRows"));
set_dspn_from_setting(settings, QSL("studio/bc/pdf417/height_per_row"), QSL("spnPDFHeightPerRow"), 0.0f);
set_cmb_from_setting(settings, QSL("studio/bc/pdf417/ecc"), QSL("cmbPDFECC"));
set_rad_from_setting(settings, QSL("studio/bc/pdf417/encoding_mode"),
QStringList() << QSL("radPDFStand") << QSL("radPDFTruncated") << QSL("radPDFHIBC"));
@ -3045,6 +3200,8 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
case BARCODE_MICROPDF417:
case BARCODE_HIBC_MICPDF:
set_cmb_from_setting(settings, QSL("studio/bc/micropdf417/cols"), QSL("cmbMPDFCols"));
set_dspn_from_setting(settings, QSL("studio/bc/micropdf417/height_per_row"), QSL("spnMPDFHeightPerRow"),
0.0f);
set_rad_from_setting(settings, QSL("studio/bc/micropdf417/encoding_mode"),
QStringList() << QSL("radMPDFStand") << QSL("radMPDFHIBC"));
set_spn_from_setting(settings, QSL("studio/bc/micropdf417/structapp_count"),
@ -3127,6 +3284,9 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
break;
case BARCODE_CODE16K:
set_cmb_from_setting(settings, QSL("studio/bc/code16k/rows"), QSL("cmbC16kRows"));
set_dspn_from_setting(settings, QSL("studio/bc/code16k/height_per_row"), QSL("spnC16kHeightPerRow"),
0.0f);
set_cmb_from_setting(settings, QSL("studio/bc/code16k/row_sep_height"), QSL("cmbC16kRowSepHeight"));
set_rad_from_setting(settings, QSL("studio/bc/code16k/encoding_mode"),
QStringList() << QSL("radC16kStand") << QSL("radC16kGS1"));
@ -3142,6 +3302,8 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
case BARCODE_HIBC_BLOCKF:
set_cmb_from_setting(settings, QSL("studio/bc/codablockf/width"), QSL("cmbCbfWidth"));
set_cmb_from_setting(settings, QSL("studio/bc/codablockf/height"), QSL("cmbCbfHeight"));
set_dspn_from_setting(settings, QSL("studio/bc/codablockf/height_per_row"), QSL("spnCbfHeightPerRow"),
0.0f);
set_cmb_from_setting(settings, QSL("studio/bc/codablockf/row_sep_height"),
QSL("cmbCbfRowSepHeight"));
set_rad_from_setting(settings, QSL("studio/bc/codablockf/encoding_mode"),
@ -3238,6 +3400,8 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
break;
case BARCODE_CODE49:
set_cmb_from_setting(settings, QSL("studio/bc/code49/rows"), QSL("cmbC49Rows"));
set_dspn_from_setting(settings, QSL("studio/bc/code49/height_per_row"), QSL("spnC49HeightPerRow"), 0.0f);
set_cmb_from_setting(settings, QSL("studio/bc/code49/row_sep_height"), QSL("cmbC49RowSepHeight"));
set_rad_from_setting(settings, QSL("studio/bc/code49/encoding_mode"),
QStringList() << QSL("radC49Stand") << QSL("radC49GS1"));
@ -3249,7 +3413,12 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
break;
case BARCODE_DBAR_EXPSTK:
set_cmb_from_setting(settings, QSL("studio/bc/dbar_expstk/cols"), QSL("cmbCols"));
set_rad_from_setting(settings, QSL("studio/bc/dbar_expstk/colsrows"),
QStringList() << QSL("radDBESCols") << QSL("radDBESRows"));
set_cmb_from_setting(settings, QSL("studio/bc/dbar_expstk/cols"), QSL("cmbDBESCols"));
set_cmb_from_setting(settings, QSL("studio/bc/dbar_expstk/rows"), QSL("cmbDBESRows"));
set_dspn_from_setting(settings, QSL("studio/bc/dbar_expstk/height_per_row"), QSL("spnDBESHeightPerRow"),
0.0f);
break;
case BARCODE_ULTRA:

View File

@ -22,12 +22,15 @@
#include <QGraphicsItem>
#include <QMainWindow>
#include <QGraphicsScene>
#include <QButtonGroup>
#include "ui_mainWindow.h"
#include "barcodeitem.h"
class QLabel;
class QShortcut;
class QDoubleSpinBox;
class QPushButton;
class MainWindow : public QWidget, private Ui::mainWindow
{
@ -82,6 +85,9 @@ public slots:
void copy_to_clipboard_errtxt();
void height_per_row_disable();
void height_per_row_default();
void guard_reset_upcean();
void guard_reset_upca();
@ -160,6 +166,10 @@ private:
QAction *m_helpAct;
QAction *m_quitAct;
QAction *m_copyErrtxtAct;
QLabel *m_lblHeightPerRow;
QDoubleSpinBox *m_spnHeightPerRow;
QPushButton *m_btnHeightPerRowDisable;
QPushButton *m_btnHeightPerRowDefault;
};
#endif