mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
GUI: export dialog: add postfix field for filename (#252)
man page: expand --scale spiel, mention MaxiCode exceptionalism manual: make MaxiCode scale exceptionalism a bit clearer
This commit is contained in:
@ -44,6 +44,7 @@ ExportWindow::ExportWindow(BarcodeItem *bc, const QString& output_data) : m_bc(b
|
||||
linDestPath->setText(settings.value(QSL("studio/export/destination"),
|
||||
QDir::toNativeSeparators(QDir::homePath())).toString());
|
||||
linPrefix->setText(settings.value(QSL("studio/export/file_prefix"), QSL("bcs_")).toString());
|
||||
linPostfix->setText(settings.value(QSL("studio/export/file_postfix"), QSL("")).toString());
|
||||
cmbFileName->setCurrentIndex(settings.value(QSL("studio/export/name_format"), 0).toInt());
|
||||
cmbFileFormat->setCurrentIndex(settings.value(QSL("studio/export/filetype"), 0).toInt());
|
||||
|
||||
@ -65,6 +66,7 @@ ExportWindow::~ExportWindow()
|
||||
|
||||
settings.setValue(QSL("studio/export/destination"), linDestPath->text());
|
||||
settings.setValue(QSL("studio/export/file_prefix"), linPrefix->text());
|
||||
settings.setValue(QSL("studio/export/file_postfix"), linPostfix->text());
|
||||
settings.setValue(QSL("studio/export/name_format"), cmbFileName->currentIndex());
|
||||
settings.setValue(QSL("studio/export/filetype"), cmbFileFormat->currentIndex());
|
||||
}
|
||||
@ -139,6 +141,7 @@ void ExportWindow::process()
|
||||
}
|
||||
|
||||
QString filePathPrefix = linDestPath->text() % QDir::separator() % linPrefix->text();
|
||||
QString postfix = linPostfix->text();
|
||||
|
||||
QStringList Feedback;
|
||||
int successCount = 0, errorCount = 0;
|
||||
@ -168,9 +171,9 @@ void ExportWindow::process()
|
||||
default: url_escaped += name_qchar; break;
|
||||
}
|
||||
}
|
||||
fileName = filePathPrefix % url_escaped % suffix;
|
||||
fileName = filePathPrefix % url_escaped % postfix % suffix;
|
||||
} else {
|
||||
fileName = filePathPrefix % dataString % suffix;
|
||||
fileName = filePathPrefix % dataString % postfix % suffix;
|
||||
}
|
||||
break;
|
||||
case 1: { /* Formatted Serial Number */
|
||||
@ -180,7 +183,7 @@ void ExportWindow::process()
|
||||
|
||||
pad.fill('0', biggest.length() - this_val.length());
|
||||
|
||||
fileName = filePathPrefix % pad % this_val % suffix;
|
||||
fileName = filePathPrefix % pad % this_val % postfix % suffix;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -82,6 +82,29 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblPostfix">
|
||||
<property name="text">
|
||||
<string>File Name Postfi&x:</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>The last part of the filenames</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>linPostfix</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="linPostfix">
|
||||
<property name="toolTip">
|
||||
<string>The last part of the filenames</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblFileName">
|
||||
<property name="text">
|
||||
<string>File &Name:</string>
|
||||
@ -94,7 +117,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="cmbFileName">
|
||||
<property name="toolTip">
|
||||
<string>Set the naming convention used by the files</string>
|
||||
@ -111,7 +134,7 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lblFileFormat">
|
||||
<property name="text">
|
||||
<string>File &Format:</string>
|
||||
@ -124,7 +147,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<item row="4" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="cmbFileFormat">
|
||||
<property name="toolTip">
|
||||
<string>The type of file which you want to create</string>
|
||||
|
Reference in New Issue
Block a user