mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
GUI: restore tabMain minimizeSize (preview wasn't updating correctly)
- manually adjust Windows min/max sizes; use grpC39 for LOGMARS
This commit is contained in:
parent
18ede09761
commit
07772094d5
@ -18,11 +18,11 @@ else()
|
|||||||
qt5_wrap_ui(zint-qt_SRCS mainWindow.ui extCLI.ui extData.ui extSequence.ui extExport.ui)
|
qt5_wrap_ui(zint-qt_SRCS mainWindow.ui extCLI.ui extData.ui extSequence.ui extExport.ui)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# grpAztec.ui grpC39.ui grpCodablockF.ui grpDotCode.ui grpMaxicode.ui grpQR.ui grpUPNQR.ui
|
# grpAztec.ui grpC39.ui grpCodablockF.ui grpDotCode.ui grpMicroPDF.ui grpRMQR.ui grpVIN.ui
|
||||||
# grpC11.ui grpC49.ui grpCodeOne.ui grpGrid.ui grpMicroPDF.ui grpRMQR.ui grpVIN.ui
|
# grpC11.ui grpC49.ui grpCodeOne.ui grpGrid.ui grpMQR.ui grpUltra.ui
|
||||||
# grpC128.ui grpC93.ui grpDAFT.ui grpHX.ui grpMQR.ui grpUltra.ui
|
# grpC128.ui grpC93.ui grpDAFT.ui grpHX.ui grpMSICheck.ui grpUPCA.ui
|
||||||
# grpC16k.ui grpChannel.ui grpDBExtend.ui grpITF14.ui grpMSICheck.ui grpUPCA.ui
|
# grpC16k.ui grpChannel.ui grpDBExtend.ui grpITF14.ui grpPDF417.ui grpUPCEAN.ui
|
||||||
# grpC25.ui grpCodabar.ui grpDM.ui grpLOGMARS.ui grpPDF417.ui grpUPCEAN.ui
|
# grpC25.ui grpCodabar.ui grpDM.ui grpMaxicode.ui grpQR.ui grpUPNQR.ui
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# https://doc.qt.io/qt-5/appicon.html
|
# https://doc.qt.io/qt-5/appicon.html
|
||||||
|
@ -32,6 +32,7 @@ FORMS += extCLI.ui \
|
|||||||
grpC25.ui \
|
grpC25.ui \
|
||||||
grpC39.ui \
|
grpC39.ui \
|
||||||
grpC49.ui \
|
grpC49.ui \
|
||||||
|
grpC93.ui \
|
||||||
grpChannel.ui \
|
grpChannel.ui \
|
||||||
grpCodabar.ui \
|
grpCodabar.ui \
|
||||||
grpCodablockF.ui \
|
grpCodablockF.ui \
|
||||||
@ -42,7 +43,7 @@ FORMS += extCLI.ui \
|
|||||||
grpDotCode.ui \
|
grpDotCode.ui \
|
||||||
grpGrid.ui \
|
grpGrid.ui \
|
||||||
grpHX.ui \
|
grpHX.ui \
|
||||||
grpLOGMARS.ui \
|
grpITF14.ui \
|
||||||
grpMaxicode.ui \
|
grpMaxicode.ui \
|
||||||
grpMicroPDF.ui \
|
grpMicroPDF.ui \
|
||||||
grpMQR.ui \
|
grpMQR.ui \
|
||||||
|
@ -22,6 +22,7 @@ FORMS += extCLI.ui \
|
|||||||
grpC25.ui \
|
grpC25.ui \
|
||||||
grpC39.ui \
|
grpC39.ui \
|
||||||
grpC49.ui \
|
grpC49.ui \
|
||||||
|
grpC93.ui \
|
||||||
grpChannel.ui \
|
grpChannel.ui \
|
||||||
grpCodabar.ui \
|
grpCodabar.ui \
|
||||||
grpCodablockF.ui \
|
grpCodablockF.ui \
|
||||||
@ -32,7 +33,7 @@ FORMS += extCLI.ui \
|
|||||||
grpDotCode.ui \
|
grpDotCode.ui \
|
||||||
grpGrid.ui \
|
grpGrid.ui \
|
||||||
grpHX.ui \
|
grpHX.ui \
|
||||||
grpLOGMARS.ui \
|
grpITF14.ui \
|
||||||
grpMaxicode.ui \
|
grpMaxicode.ui \
|
||||||
grpMicroPDF.ui \
|
grpMicroPDF.ui \
|
||||||
grpMQR.ui \
|
grpMQR.ui \
|
||||||
|
@ -2,14 +2,6 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>grpC128</class>
|
<class>grpC128</class>
|
||||||
<widget class="QWidget" name="grpC128">
|
<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="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>600</width>
|
<width>600</width>
|
||||||
@ -29,9 +21,6 @@
|
|||||||
<string>How to process data</string>
|
<string>How to process data</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayoutC128EncodingMode">
|
<layout class="QGridLayout" name="gridLayoutC128EncodingMode">
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetMinimumSize</enum>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QRadioButton" name="radC128Stand">
|
<widget class="QRadioButton" name="radC128Stand">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>grpLOGMARS</class>
|
|
||||||
<widget class="QWidget" name="grpLOGMARS">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>131</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>600</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Form</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="grpLOGMARSCheckDigits">
|
|
||||||
<property name="title">
|
|
||||||
<string>Check Digits</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayoutLOGMARSCheckDigits">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QRadioButton" name="radLOGMARSStand">
|
|
||||||
<property name="text">
|
|
||||||
<string>&No Check Digit</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QRadioButton" name="radLOGMARSCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>&One (Mod-43)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -5,12 +5,6 @@
|
|||||||
<property name="windowModality">
|
<property name="windowModality">
|
||||||
<enum>Qt::NonModal</enum>
|
<enum>Qt::NonModal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>360</width>
|
<width>360</width>
|
||||||
@ -31,12 +25,15 @@
|
|||||||
<locale language="English" country="UnitedStates"/>
|
<locale language="English" country="UnitedStates"/>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vLayoutMain">
|
<layout class="QVBoxLayout" name="vLayoutMain">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetMinimumSize</enum>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGraphicsView" name="view">
|
<widget class="QGraphicsView" name="view">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>5</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
@ -129,10 +126,16 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabMain">
|
<widget class="QTabWidget" name="tabMain">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>346</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>360</height>
|
<height>346</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
|
@ -223,6 +223,11 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags fl)
|
|||||||
mac_hack(this);
|
mac_hack(this);
|
||||||
mac_hack_vLayouts(this);
|
mac_hack_vLayouts(this);
|
||||||
mac_hack_statusBars(this, "statusBar");
|
mac_hack_statusBars(this, "statusBar");
|
||||||
|
vLayoutTabData->setContentsMargins(QMargins(20, 0, 20, 0));
|
||||||
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
|
tabMain->setMinimumSize(QSize(0, 316));
|
||||||
|
tabMain->setMaximumSize(QSize(16777215, 316));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
restoreGeometry(saved_geometry.toByteArray());
|
restoreGeometry(saved_geometry.toByteArray());
|
||||||
@ -1149,7 +1154,6 @@ void MainWindow::on_encoded()
|
|||||||
if (QApplication::activeModalWidget() != nullptr) { // Protect against encode in popup dialog
|
if (QApplication::activeModalWidget() != nullptr) { // Protect against encode in popup dialog
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->setMinimumHeight(m_bc.bc.getError() ? 455 : 435);
|
|
||||||
enableActions(true);
|
enableActions(true);
|
||||||
errtxtBar_set(false /*isError*/);
|
errtxtBar_set(false /*isError*/);
|
||||||
|
|
||||||
@ -1165,7 +1169,6 @@ void MainWindow::on_errored()
|
|||||||
if (QApplication::activeModalWidget() != nullptr) { // Protect against error in popup dialog (Sequence Export)
|
if (QApplication::activeModalWidget() != nullptr) { // Protect against error in popup dialog (Sequence Export)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->setMinimumHeight(455);
|
|
||||||
enableActions(false);
|
enableActions(false);
|
||||||
errtxtBar_set(true /*isError*/);
|
errtxtBar_set(true /*isError*/);
|
||||||
}
|
}
|
||||||
@ -1585,7 +1588,7 @@ void MainWindow::change_options()
|
|||||||
connect(get_widget(QSL("radC25CheckHide")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
connect(get_widget(QSL("radC25CheckHide")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (symbology == BARCODE_CODE39 || symbology == BARCODE_EXCODE39) {
|
} else if (symbology == BARCODE_CODE39 || symbology == BARCODE_EXCODE39 || symbology == BARCODE_LOGMARS) {
|
||||||
QFile file(QSL(":/grpC39.ui"));
|
QFile file(QSL(":/grpC39.ui"));
|
||||||
if (!file.open(QIODevice::ReadOnly))
|
if (!file.open(QIODevice::ReadOnly))
|
||||||
return;
|
return;
|
||||||
@ -1594,10 +1597,13 @@ void MainWindow::change_options()
|
|||||||
load_sub_settings(settings, symbology);
|
load_sub_settings(settings, symbology);
|
||||||
connect(get_widget(QSL("radC39Stand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
connect(get_widget(QSL("radC39Stand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
||||||
connect(get_widget(QSL("radC39Check")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
connect(get_widget(QSL("radC39Check")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
||||||
connect(get_widget(QSL("radC39HIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
|
||||||
QRadioButton *radC39HIBC = m_optionWidget->findChild<QRadioButton*>(QSL("radC39HIBC"));
|
QRadioButton *radC39HIBC = m_optionWidget->findChild<QRadioButton*>(QSL("radC39HIBC"));
|
||||||
if (symbology == BARCODE_EXCODE39) {
|
if (symbology == BARCODE_EXCODE39 || symbology == BARCODE_LOGMARS) {
|
||||||
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 39 Extended"));
|
if (symbology == BARCODE_EXCODE39) {
|
||||||
|
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 39 Extended"));
|
||||||
|
} else {
|
||||||
|
tabMain->insertTab(1, m_optionWidget, tr("LOGM&ARS"));
|
||||||
|
}
|
||||||
if (radC39HIBC->isChecked()) {
|
if (radC39HIBC->isChecked()) {
|
||||||
radC39HIBC->setChecked(false);
|
radC39HIBC->setChecked(false);
|
||||||
m_optionWidget->findChild<QRadioButton*>(QSL("radC39Stand"))->setChecked(true);
|
m_optionWidget->findChild<QRadioButton*>(QSL("radC39Stand"))->setChecked(true);
|
||||||
@ -1605,22 +1611,12 @@ void MainWindow::change_options()
|
|||||||
radC39HIBC->setEnabled(false);
|
radC39HIBC->setEnabled(false);
|
||||||
radC39HIBC->hide();
|
radC39HIBC->hide();
|
||||||
} else {
|
} else {
|
||||||
|
connect(get_widget(QSL("radC39HIBC")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
||||||
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 39"));
|
tabMain->insertTab(1, m_optionWidget, tr("Cod&e 39"));
|
||||||
radC39HIBC->setEnabled(true);
|
radC39HIBC->setEnabled(true);
|
||||||
radC39HIBC->show();
|
radC39HIBC->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (symbology == BARCODE_LOGMARS) {
|
|
||||||
QFile file(QSL(":/grpLOGMARS.ui"));
|
|
||||||
if (!file.open(QIODevice::ReadOnly))
|
|
||||||
return;
|
|
||||||
m_optionWidget = uiload.load(&file);
|
|
||||||
file.close();
|
|
||||||
load_sub_settings(settings, symbology);
|
|
||||||
tabMain->insertTab(1, m_optionWidget, tr("LOGM&ARS"));
|
|
||||||
connect(get_widget(QSL("radLOGMARSStand")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
|
||||||
connect(get_widget(QSL("radLOGMARSCheck")), SIGNAL(toggled( bool )), SLOT(update_preview()));
|
|
||||||
|
|
||||||
} else if (symbology == BARCODE_CODE16K) {
|
} else if (symbology == BARCODE_CODE16K) {
|
||||||
QFile file(QSL(":/grpC16k.ui"));
|
QFile file(QSL(":/grpC16k.ui"));
|
||||||
if (!file.open(QIODevice::ReadOnly))
|
if (!file.open(QIODevice::ReadOnly))
|
||||||
@ -2530,7 +2526,7 @@ void MainWindow::update_preview()
|
|||||||
break;
|
break;
|
||||||
case BARCODE_LOGMARS:
|
case BARCODE_LOGMARS:
|
||||||
m_bc.bc.setSymbol(BARCODE_LOGMARS);
|
m_bc.bc.setSymbol(BARCODE_LOGMARS);
|
||||||
if (get_rad_val(QSL("radLOGMARSCheck"))) {
|
if (get_rad_val(QSL("radC39Check"))) {
|
||||||
m_bc.bc.setOption2(1);
|
m_bc.bc.setOption2(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3106,7 +3102,9 @@ void MainWindow::errtxtBar_set(bool isError)
|
|||||||
{
|
{
|
||||||
if (!m_bc.bc.hasErrors()) {
|
if (!m_bc.bc.hasErrors()) {
|
||||||
errtxtBar_clear();
|
errtxtBar_clear();
|
||||||
|
view->setMinimumSize(QSize(0, 35));
|
||||||
} else {
|
} else {
|
||||||
|
view->setMinimumSize(QSize(0, 5));
|
||||||
errtxtBar->showMessage(m_bc.bc.lastError());
|
errtxtBar->showMessage(m_bc.bc.lastError());
|
||||||
errtxtBar->setStyleSheet(isError
|
errtxtBar->setStyleSheet(isError
|
||||||
? QSL("QStatusBar {background:white; color:#dd0000;}")
|
? QSL("QStatusBar {background:white; color:#dd0000;}")
|
||||||
@ -3486,10 +3484,9 @@ void MainWindow::save_sub_settings(QSettings &settings, int symbology)
|
|||||||
settings.setValue(QSL("studio/bc/excode39/check_digit"), get_rad_grp_index(
|
settings.setValue(QSL("studio/bc/excode39/check_digit"), get_rad_grp_index(
|
||||||
QStringList() << QSL("radC39Stand") << QSL("radC39Check")));
|
QStringList() << QSL("radC39Stand") << QSL("radC39Check")));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BARCODE_LOGMARS:
|
case BARCODE_LOGMARS:
|
||||||
settings.setValue(QSL("studio/bc/logmars/check_digit"), get_rad_grp_index(
|
settings.setValue(QSL("studio/bc/logmars/check_digit"), get_rad_grp_index(
|
||||||
QStringList() << QSL("radLOGMARSStand") << QSL("radLOGMARSCheck")));
|
QStringList() << QSL("radC39Stand") << QSL("radC39Check")));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BARCODE_CODE16K:
|
case BARCODE_CODE16K:
|
||||||
@ -3872,10 +3869,9 @@ void MainWindow::load_sub_settings(QSettings &settings, int symbology)
|
|||||||
set_rad_from_setting(settings, QSL("studio/bc/excode39/check_digit"),
|
set_rad_from_setting(settings, QSL("studio/bc/excode39/check_digit"),
|
||||||
QStringList() << QSL("radC39Stand") << QSL("radC39Check"));
|
QStringList() << QSL("radC39Stand") << QSL("radC39Check"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BARCODE_LOGMARS:
|
case BARCODE_LOGMARS:
|
||||||
set_rad_from_setting(settings, QSL("studio/bc/logmars/check_digit"),
|
set_rad_from_setting(settings, QSL("studio/bc/logmars/check_digit"),
|
||||||
QStringList() << QSL("radLOGMARSStand") << QSL("radLOGMARSCheck"));
|
QStringList() << QSL("radC39Stand") << QSL("radC39Check"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BARCODE_CODE16K:
|
case BARCODE_CODE16K:
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
<file>grpGrid.ui</file>
|
<file>grpGrid.ui</file>
|
||||||
<file>grpHX.ui</file>
|
<file>grpHX.ui</file>
|
||||||
<file>grpITF14.ui</file>
|
<file>grpITF14.ui</file>
|
||||||
<file>grpLOGMARS.ui</file>
|
|
||||||
<file>grpMaxicode.ui</file>
|
<file>grpMaxicode.ui</file>
|
||||||
<file>grpMicroPDF.ui</file>
|
<file>grpMicroPDF.ui</file>
|
||||||
<file>grpMQR.ui</file>
|
<file>grpMQR.ui</file>
|
||||||
|
Loading…
Reference in New Issue
Block a user