BPS C++ API  2.24.4
BpsLabelerGui Class Reference

GUI labeler interface. More...

#include <bpslabelergui.h>

+ Inheritance diagram for BpsLabelerGui:

Public Member Functions

 BpsLabelerGui (BpsLabeler *aLabeler, QObject *aParent=nullptr)
 
bool clear (BpsLabeler::Entity aEntity, const QVariant &aKey, QWidget *aParent)
 Delete articles from the labelers internal database. More...
 
bool close (QWidget *aParent)
 Close the device and release it for manual operation. More...
 
bool control (int aOp, const QVariantMap &aInput, QVariantMap &aOutput, QWidget *aParent)
 Execute labeler specific operations. More...
 
BpsLabelerlabeler () const
 
bool load (const QVariant &aArticle, const QVariantMap &aParams, QWidget *aParent)
 Load an article into the working memory so it is ready to start labeling. More...
 
bool open (int aLineNo, const QString &aLineName, const QMap< QString, QString > &aConfig, QWidget *aParent)
 Open the device and do general initializations (setting the current date for example). More...
 
bool print (QWidget *aParent)
 Print a single label with the article previously loaded into the working memory. More...
 
bool save (const QVariant &aArticle, const QVariantMap &aParams, QWidget *aParent)
 Save an article to the labelers internal database for emergency or offline operation. More...
 
bool saveLoad (const QVariant &aArticle, const QVariantMap &aParams, QWidget *aParent)
 Save an article to the labelers internal database, and load it into the working memory so it is ready to start labeling. More...
 
bool start (QWidget *aParent)
 Start labeling, if supported by the device. More...
 
bool stop (QWidget *aParent)
 Stop labeling, if supported by the device. More...
 
- Public Member Functions inherited from QObject
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
 QObject (QObject *parent)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

GUI labeler interface.

This class provides convenience functions performing labeler operations. Progress dialogs will be shown with the given widget as parent when necessary.

Constructor & Destructor Documentation

◆ BpsLabelerGui()

BpsLabelerGui::BpsLabelerGui ( BpsLabeler aLabeler,
QObject aParent = nullptr 
)
Parameters
aLabelerThe labeler object to be used.
aParentThe parent object.

Member Function Documentation

◆ clear()

bool BpsLabelerGui::clear ( BpsLabeler::Entity  aEntity,
const QVariant aKey,
QWidget aParent 
)

Delete articles from the labelers internal database.

Parameters
aEntityThe entity to clear.
aKeyThe PLU ID when aEntity is BpsLabeler::Article. The collection key when aEntity is BpsLabeler::Collection. Unused when aEntity is BpsLabeler::All.
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ close()

bool BpsLabelerGui::close ( QWidget aParent)

Close the device and release it for manual operation.

Parameters
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ control()

bool BpsLabelerGui::control ( int  aOp,
const QVariantMap &  aInput,
QVariantMap &  aOutput,
QWidget aParent 
)

Execute labeler specific operations.

See documentation of the respective labeler interfaces for details. The default implementation does noting.

Parameters
aOpOperation command.
aInputInput data.
aOutputOutput data.
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ labeler()

BpsLabeler* BpsLabelerGui::labeler ( ) const
Returns
The labeler object.

◆ load()

bool BpsLabelerGui::load ( const QVariant aArticle,
const QVariantMap &  aParams,
QWidget aParent 
)

Load an article into the working memory so it is ready to start labeling.

If the device does not support start/stop labeling, this will also start the labeling process.

Parameters
aArticleKey of the article to load.
aParamsOverride values for the placeholders as key/value pairs. All placeholders except a_barcode may be overridden.
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ open()

bool BpsLabelerGui::open ( int  aLineNo,
const QString aLineName,
const QMap< QString, QString > &  aConfig,
QWidget aParent 
)

Open the device and do general initializations (setting the current date for example).

Parameters
aLineNoThe packing line number, usually the folder Central System Settings/Terminals/TERMINAL/Packlines/LINENO.
aLineNameThe packing line name, usually the value Central System Settings/Terminals/TERMINAL/Packlines/LINENO/Name.
aConfigThe labeler configuration, usually the values in Central System Settings/Terminals/TERMINAL/Packlines/LINENO/Labeler.
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ print()

bool BpsLabelerGui::print ( QWidget aParent)

Print a single label with the article previously loaded into the working memory.

Parameters
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ save()

bool BpsLabelerGui::save ( const QVariant aArticle,
const QVariantMap &  aParams,
QWidget aParent 
)

Save an article to the labelers internal database for emergency or offline operation.

Parameters
aArticleKey of the article to load.
aParamsOverride values for the placeholders as key/value pairs. All placeholders except a_barcode may be overridden.
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ saveLoad()

bool BpsLabelerGui::saveLoad ( const QVariant aArticle,
const QVariantMap &  aParams,
QWidget aParent 
)

Save an article to the labelers internal database, and load it into the working memory so it is ready to start labeling.

If the device does not support start/stop labeling, this will also start the labeling process.

Parameters
aArticleKey of the article to load.
aParamsOverride values for the placeholders as key/value pairs. All placeholders except a_barcode may be overridden.
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ start()

bool BpsLabelerGui::start ( QWidget aParent)

Start labeling, if supported by the device.

Parameters
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

◆ stop()

bool BpsLabelerGui::stop ( QWidget aParent)

Stop labeling, if supported by the device.

Parameters
aParentParent widget for progress dialog and message boxes.
Returns
True if all ok, false on partial success, cancel or errors.

The documentation for this class was generated from the following file: