GUI robots interface. More...
#include <bpsrobotsgui.h>
Signals | |
void | itemRejected (const QVariant &aKey) |
Emitted when a item was rejected by robot or because of data constraints. More... | |
void | itemSynced (const QVariant &aKey) |
Emitted when a item was successfully synced, e.g. More... | |
Public Member Functions | |
BpsRobotsGui (BpsOrderUtils *aUtils, QObject *aParent=nullptr) | |
bool | control (const QVariant &aZone, int aOp, const QVariantMap &aInput, QVariantMap &aOutput, QWidget *aParent) |
Execute robot specific operations. More... | |
bool | finishOrders (const QVariant &aZone, BpsRobot::OrderType aOrderType, const QVariantList &aKeys, QWidget *aParent) |
Finish order processing. More... | |
bool | loadOrdertrip (const QVariant &aZone, const QVariant &aOrdertripKey, QWidget *aParent) |
Load order trip into robot. More... | |
bool | lockRobot (const QVariant &aZone, QWidget *aParent) |
Lock the zone for exclusive robot access. More... | |
bool | revokeOrders (const QVariant &aZone, BpsRobot::OrderType aOrderType, const QVariantList &aKeys, QWidget *aParent) |
Revoke orders from the robot. More... | |
bool | syncOrders (const QVariant &aZone, BpsRobot::OrderType aOrderType, const QVariantList &aKeys, BpsRobot::OrderSyncMode aSyncMode, QWidget *aParent) |
Synchronize orders to the robot. More... | |
bool | syncStock (const QVariant &aZone, QWidget *aParent) |
Import all robot stocks into the BPS stock. More... | |
BpsOrderUtils * | utils () const |
![]() | |
bool | blockSignals (bool block) |
const QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () const const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const const |
QList< T > | findChildren (const QRegExp ®Exp, 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 QMetaObject * | metaObject () const const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () 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 | |
T | qFindChild (const QObject *obj, const QString &name) |
QList< T > | qFindChildren (const QObject *obj, const QRegExp ®Exp) |
QList< T > | qFindChildren (const QObject *obj, const QString &name) |
QObject (QObject *parent) | |
T | qobject_cast (const QObject *object) |
T | 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) |
QThread * | thread () const const |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
typedef | QObjectList |
![]() | |
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 |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
objectName | |
GUI robots interface.
This class provides convenience functions performing robot operations. Progress dialogs will be shown with the given widget as parent when necessary.
BpsRobotsGui::BpsRobotsGui | ( | BpsOrderUtils * | aUtils, |
QObject * | aParent = nullptr |
||
) |
aUtils | The order utilities object to be used. |
aParent | The parent object. |
bool BpsRobotsGui::control | ( | const QVariant & | aZone, |
int | aOp, | ||
const QVariantMap & | aInput, | ||
QVariantMap & | aOutput, | ||
QWidget * | aParent | ||
) |
Execute robot specific operations.
See documentation of the respective robot interface for details. The default implementation does noting.
aZone | Key of the zone. |
aOp | Operation command. |
aInput | Input data. |
aOutput | Output data. |
aParent | Parent widget for progress dialog and message boxes. |
BpsException | on errors or when operation is canceled. |
bool BpsRobotsGui::finishOrders | ( | const QVariant & | aZone, |
BpsRobot::OrderType | aOrderType, | ||
const QVariantList & | aKeys, | ||
QWidget * | aParent | ||
) |
Finish order processing.
Depending on the implementation the robot can continue picking until all pending jobs are completed.
In case of aOrderType==Trips, the order trip robot status shall either be finished ('f') after successful command transmission to the robot, or the robot shall update the status after completion later in case it has an asynchronous interface (for example a regular executed batch receiving data from robot).
In case of aborting (cancel or fatal error) in a critical communication phase, the status BPS knows about the robot may be inaccurate and have to be cleared manually by the user. The message of the thrown exception will in such a case include information about that fact.
The default implementation does nothing.
aZone | Key of the zone. |
aOrderType | Type of the records addressed by aKeys. |
aKeys | List of keys to process. Only keys belonging to a single trip are allowed. |
aParent | Parent widget for progress dialog and message boxes. |
|
signal |
Emitted when a item was rejected by robot or because of data constraints.
aKey | Key of the order item. |
|
signal |
Emitted when a item was successfully synced, e.g.
accepted by robot.
aKey | Key of the order item. |
bool BpsRobotsGui::loadOrdertrip | ( | const QVariant & | aZone, |
const QVariant & | aOrdertripKey, | ||
QWidget * | aParent | ||
) |
Load order trip into robot.
In case the order trip was already loaded before nothing happens. On success the method sets the order trip status to active.
In case of aborting (cancel or fatal error) in a critical communication phase, the status BPS knows about the robot may be inaccurate and have to be cleared manually by the user. The message of the thrown exception will in such a case include information about that fact.
aZone | Key of the zone. |
aOrdertripKey | Key of the order trip to load. |
aParent | Parent widget for progress dialog and message boxes. |
Lock the zone for exclusive robot access.
aZone | Key of the zone. |
aParent | Parent widget for progress dialog and message boxes. |
bool BpsRobotsGui::revokeOrders | ( | const QVariant & | aZone, |
BpsRobot::OrderType | aOrderType, | ||
const QVariantList & | aKeys, | ||
QWidget * | aParent | ||
) |
Revoke orders from the robot.
The method tries to revoke as many items as possible as long as no fatal error or cancel happens, and only throws an exception about the robot unable to revoke certain items at the end.
In case of aborting (cancel or fatal error) in a critical communication phase, the status BPS knows about the robot may be inaccurate and have to be cleared manually by the user. The message of the thrown exception will in such a case include information about that fact.
aZone | Key of the zone. |
aOrderType | Type of the records addressed by aKeys. |
aKeys | List of keys to process. Only keys belonging to a single trip are allowed. |
aParent | Parent widget for progress dialog and message boxes. |
bool BpsRobotsGui::syncOrders | ( | const QVariant & | aZone, |
BpsRobot::OrderType | aOrderType, | ||
const QVariantList & | aKeys, | ||
BpsRobot::OrderSyncMode | aSyncMode, | ||
QWidget * | aParent | ||
) |
Synchronize orders to the robot.
The method tries to synchronize as many items as possible as long as no fatal error or abort happens, and only throws an exception about rejects at the end.
In case of aborting (cancel or fatal error) in a critical communication phase, the status BPS knows about the robot may be inaccurate and have to be cleared manually by the user. The message of the thrown exception will in such a case include information about that fact.
aZone | Key of the zone. |
aOrderType | Type of the records addressed by aKeys. |
aKeys | List of keys to process. Only keys belonging to a single trip are allowed. |
aSyncMode | Synchronizing mode. |
aParent | Parent widget for progress dialog and message boxes. |
Import all robot stocks into the BPS stock.
aZone | Key of the zone. |
aParent | Parent widget for progress dialog and message boxes. |
BpsOrderUtils* BpsRobotsGui::utils | ( | ) | const |