Barcode tweaks.

- Add capability to disable text in glbarcode UPC/EAN barcodes. (#79)
- Add backend name to display text in BarcodeMenuButton.
This commit is contained in:
Jim Evins
2019-12-08 17:07:10 -05:00
parent bd92e6f238
commit af607ca4af
5 changed files with 57 additions and 29 deletions
+2 -2
View File
@@ -50,10 +50,10 @@ namespace glabels
true, true, true, true, "1234567890", true, 10 );
registerStyle( "upc-a", "", tr("UPC-A"),
true, false, true, false, "12345678901", false, 11 );
true, true, true, false, "12345678901", false, 11 );
registerStyle( "ean-13", "", tr("EAN-13"),
true, false, true, false, "123456789012", false, 12 );
true, true, true, false, "123456789012", false, 12 );
registerStyle( "postnet", "", tr("POSTNET (any)"),
false, false, true, false, "12345-6789-12", false, 11 );
+18
View File
@@ -20,6 +20,8 @@
#include "Style.h"
#include "Backends.h"
namespace glabels
{
@@ -116,6 +118,22 @@ namespace glabels
}
///
/// Full Name Property Getter
///
QString Style::fullName() const
{
if ( mBackendId == "" )
{
return mName;
}
else
{
return Backends::backendName(mBackendId) + " / " + mName;
}
}
///
/// Can Text Property Getter
///
+2
View File
@@ -65,6 +65,8 @@ namespace glabels
const QString& name() const;
QString fullName() const;
bool canText() const;
bool textOptional() const;