Documents > BPS V2 C++ API
bpsrobots.h
Go to the documentation of this file.
00001 
00004 #ifndef BPSROBOTS_H
00005 #define BPSROBOTS_H
00006 
00007 #include "bpsrobot.h"
00008 
00009 class BpsDatastore;
00010 class BpsOrderUtils;
00011 
00015 class BPSCORE_EXPORT BpsRobots : public QObject
00016 {
00017     Q_OBJECT
00018     BPS_PRIVATE(BpsRobots)
00019 
00020 public:
00021 
00027     BpsRobots(BpsDatastore* aDatastore, const QString& aProgram, QObject* aParent = 0);
00028 
00030     virtual ~BpsRobots();
00032 
00036     BpsDatastore* datastore() const;
00037 
00041     bool anyRobots() const;
00042 
00046     QVariantList zones() const;
00047 
00051     QList<qlonglong> zonesAsLongLong() const;
00052 
00056     QList<qulonglong> zonesAsULongLong() const;
00057 
00063     void addRobotsToTrip(const QVariant& aOrdertrip);
00064 
00086     void syncOrders(
00087         const QVariant& aZone, 
00088         BpsRobot::OrderType aOrderType, 
00089         const QVariantList& aKeys, 
00090         BpsRobot::OrderSyncMode aSyncMode, 
00091         volatile bool* aCancelFlag = 0);
00092 
00112     void revokeOrders(
00113         const QVariant& aZone, 
00114         BpsRobot::OrderType aOrderType, 
00115         const QVariantList& aKeys, 
00116         volatile bool* aCancelFlag = 0);
00117 
00124     void syncStock(const QVariant& aZone, volatile bool* aCancelFlag = 0);
00125 
00132     void lockRobot(const QVariant& aZone, volatile bool* aCancelFlag = 0);
00133 
00139     void unlockRobot(const QVariant& aZone);
00140 
00141 signals:
00142 
00149     void showProgress(int aMaximum, const QString& aLabel);
00150 
00155     void updateProgressMaximum(int aMaximum);
00156 
00161     void updateProgressValue(int aValue);
00162 
00167     void updateProgressLabel(const QString& aLabel);
00168 
00173     void hideProgress();
00174 
00179     void itemSynced(const QVariant& aKey);
00180 
00185     void itemRejected(const QVariant& aKey);
00186 };
00187 
00188 #endif // BPSROBOTS_H