BPS C++ API  2.24.4
bpsbarcode.h
Go to the documentation of this file.
1 
4 #ifndef BPSBARCODE_H
5 #define BPSBARCODE_H
6 
7 #include "bpscore_global.h"
8 #include <QMap>
9 
10 class BpsDatastore;
11 class QStringList;
12 
53 {
55 
56 public:
60  enum Function {
61  SSCC = 0,
62  GRAI = 1,
63  LotID = 100,
64 #ifdef CRQ007076
65  FoilID = 101,
66 #endif
67  StockLocation = 200,
68  ArticleCU = 300,
69  ArticleTU = 301,
70  ArticleLU = 302,
71  NetWeight = 320,
72  Partner = 400,
73  ShipToPartner = 401,
74  BillToPartner = 402,
75  SellingPartner = 403,
76  DeliveringPartner = 404,
77  InvoicingPartner = 405,
78  OriginCountry = 422,
79  ProcessCountry = 423,
80  Slaughterhouse = 7030,
81  CuttingHall1 = 7031,
82  CuttingHall2 = 7032,
83  CuttingHall3 = 7033
84  };
85 
90 
94  BpsBarcode(BpsDatastore* aDatastore);
95 
101  BpsBarcode(BpsDatastore* aDatastore, char aCode, const QString& aData);
102 
108  BpsBarcode(BpsDatastore* aDatastore, const QString& aName, const QString& aData);
109 
114  BpsBarcode(const BpsBarcode& aOther);
115 
117  virtual ~BpsBarcode();
119 
123  char code() const;
124 
129  void setCode(char aCode);
130 
135  void setName(const QString& aName);
136 
141 
146  QStringList names(Function aFunction) const;
147 
151  QString data() const;
152 
158  QString data(Function aFunction, bool aForLookup) const;
159 
164  void setData(const QString& aData);
165 
170  bool hasGs1Data() const;
171 
177  static bool hasGs1Data(char aCode);
178 
184  static bool hasGs1Data(const QString& aName);
185 
190 
191 };
192 
193 #endif // BPSBARCODE_H
Public include file for BPS CORE library macros.
#define BPSCORE_EXPORT
Declare class to be an import from the shared library.
Definition: bpscore_global.h:22
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Utility class to process scanned bar codes.
Definition: bpsbarcode.h:53
void setData(const QString &aData)
Set bar code data (without the code type identifier).
static QMap< char, QStringList > codeNames()
bool hasGs1Data() const
Test if this bar code is using GS1 data format with application identifiers (AI).
BpsBarcode(BpsDatastore *aDatastore, const QString &aName, const QString &aData)
void setCode(char aCode)
Set code identifier.
BpsBarcode(BpsDatastore *aDatastore)
QStringList names(Function aFunction) const
static bool hasGs1Data(char aCode)
Test if a given bar code type is using GS1 data format with application identifiers (AI).
BpsBarcode(BpsDatastore *aDatastore, char aCode, const QString &aData)
void setName(const QString &aName)
Set code type name.
char code() const
BpsBarcode(const BpsBarcode &aOther)
The copy constructor.
QStringList names() const
QString data() const
QString data(Function aFunction, bool aForLookup) const
static QList< BpsBarcode::Function > partnerFunctions()
static bool hasGs1Data(const QString &aName)
Test if a given bar code name is using GS1 data format with application identifiers (AI).
Function
Bar code function types.
Definition: bpsbarcode.h:60
BPS datastore class.
Definition: bpsdatastore.h:61