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:
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
///
|
||||
|
||||
@@ -65,6 +65,8 @@ namespace glabels
|
||||
|
||||
const QString& name() const;
|
||||
|
||||
QString fullName() const;
|
||||
|
||||
bool canText() const;
|
||||
|
||||
bool textOptional() const;
|
||||
|
||||
Reference in New Issue
Block a user