127 virtual void close(
volatile bool* aCancelFlag =
nullptr) = 0;
137 virtual void load(
const QVariant& aArticle,
const QVariantMap& aParams,
volatile bool* aCancelFlag =
nullptr) = 0;
147 virtual void save(
const QVariant& aArticle,
const QVariantMap& aParams,
volatile bool* aCancelFlag =
nullptr);
159 virtual void saveLoad(
const QVariant& aArticle,
const QVariantMap& aParams,
volatile bool* aCancelFlag =
nullptr);
168 virtual void print(
volatile bool* aCancelFlag =
nullptr);
186 virtual void start(
volatile bool* aCancelFlag =
nullptr);
194 virtual void stop(
volatile bool* aCancelFlag =
nullptr);
206 virtual void control(
int aOp,
const QVariantMap& aInput, QVariantMap& aOutput,
volatile bool* aCancelFlag =
nullptr);
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
BPS datastore class.
Definition: bpsdatastore.h:61
Labeler interface.
Definition: bpslabeler.h:17
void dataReceived(int aDataType, const QVariant &aCount, const QVariant &aWeight, const QVariant &aPrice)
Emitted when data is received from labeler.
void updateProgressLabel(const QString &aLabel)
Emitted to update the progress label text.
QString processPlaceholders(const QString &aText, const QVariant &aCheckInfo=QVariant())
Replace the placeholders in the given text.
virtual void print(volatile bool *aCancelFlag=nullptr)
Print a single label with the article previously loaded into the working memory.
BpsLabeler(BpsDatastore *aDatastore, const QString &aLabelerId, QObject *aParent=0)
virtual void saveLoad(const QVariant &aArticle, const QVariantMap &aParams, volatile bool *aCancelFlag=nullptr)
Load an article into the working memory and conditionally also save it to the labelers internal datab...
virtual QString processReplacement(const QString &aText)
After the substitute content for a single placeholder has been created, this method gets called to po...
void clearCache()
Clear the cached global and settings data.
Entity
Clearing entities.
Definition: bpslabeler.h:50
@ Collection
Clear articles of a collection (by given collection).
Definition: bpslabeler.h:51
virtual ~BpsLabeler()
Virtual default destructor.
virtual bool isOpen() const =0
void error(const QString &aMessage)
Emitted for fatal messages, for example failed operations.
QString labelData() const
The label data belonging to the latest article init() was called for.
virtual void control(int aOp, const QVariantMap &aInput, QVariantMap &aOutput, volatile bool *aCancelFlag=nullptr)
Execute labeler specific operations.
BpsDatastore * datastore() const
virtual void open(int aLineNo, const QString &aLineName, const QMap< QString, QString > &aConfig, volatile bool *aCancelFlag=nullptr)=0
Open the device and do general initializations (setting the current date for example).
virtual void save(const QVariant &aArticle, const QVariantMap &aParams, volatile bool *aCancelFlag=nullptr)
Save an article to the labelers internal database for emergency or offline operation.
void updateProgressValue(int aValue)
Emitted when progress reaches next value to update the progress indicator.
virtual void load(const QVariant &aArticle, const QVariantMap &aParams, volatile bool *aCancelFlag=nullptr)=0
Load an article into the working memory so it is ready to start labeling.
void showProgress(int aMaximum, const QString &aLabel)
Emitted at start of operation to begin showing the progress indicator.
virtual bool hasFeature(Feature aFeature)
Query information about available features.
Feature
Feature identifiers.
Definition: bpslabeler.h:35
@ CanPrint
Supports print().
Definition: bpslabeler.h:36
@ CanStartStop
Supports start() and stop().
Definition: bpslabeler.h:38
@ CanEmitDataSum1
Can emit sum 1 records.
Definition: bpslabeler.h:42
@ CanClearCollection
Supports clearing the articles of a collection.
Definition: bpslabeler.h:39
@ CanClearAll
Supports clearing all stored articles.
Definition: bpslabeler.h:40
@ CanEmitDataPackage
Can emit single package records.
Definition: bpslabeler.h:41
@ CanEmitDataSum2
Can emit sum 2 records.
Definition: bpslabeler.h:43
@ CanSave
Supports save().
Definition: bpslabeler.h:37
QString labelerId() const
QString labelerData() const
The labeler data is independent of the distinct setting and taken from table t_labelers.
QVariant labelerKey() const
The labeler key from t_labelers.
@ DataSum1
Sum 1 (TU)
Definition: bpslabeler.h:27
@ DataSum2
Sum 2 (LU)
Definition: bpslabeler.h:28
@ DataPackage
Single package.
Definition: bpslabeler.h:26
bool init(const QVariant &aArticle, const QVariantMap &aParams, const QString &aType=QString())
Initialize the internal data for processing placeholders.
virtual void stop(volatile bool *aCancelFlag=nullptr)
Stop labeling, if supported by the device.
virtual void close(volatile bool *aCancelFlag=nullptr)=0
Close the device and release it for manual operation.
void hideProgress()
Emitted after the operation is completed (or failed or was aborted).
virtual void start(volatile bool *aCancelFlag=nullptr)
Start labeling, if supported by the device.
void warning(const QString &aMessage)
Emitted for non-fatal messages, for example reception of unexpected records.
virtual int checkReplacement(const QString &aText, const QVariant &aCheckInfo)
Function called by processPlaceholdes() before any character is added to the produced text.
void setCustomData(const QString &aSettingsData, const QString &aGlobalData)
Makes the labeler use custom data instead of the regular data.
void updateProgressMaximum(int aMaximum)
Emitted to change the highest tick value.
virtual bool isStarted() const
Get the start/stop status.
QVariant labelKey() const
The label key from t_labels belonging to the latest article init() was called for.
virtual void processEvents()
Process pending events from labeler.
virtual void clear(Entity aEntity, const QVariant &aKey, volatile bool *aCancelFlag=nullptr)
Delete articles from the labelers internal database.
void info(const QString &aMessage)
Emitted for informational messages.