/////////////////////////////////////////////////////////////////// // events void PosixIBClient::orderStatus( OrderId orderId, const IBString &status, int filled, int remaining, double avgFillPrice, int permId, int parentId, double lastFillPrice, int clientId, const IBString& whyHeld) { QString msg("OrderStatus | orderId:"); msg.append(QString::number(orderId)); msg.append(", Status:"); msg.append(QString::fromStdString(status)); msg.append(", remaining:"); msg.append(QString::number(filled)); msg.append(", filled:"); msg.append(QString::number(remaining)); msg.append(", avgPx:"); msg.append(QString::number(avgFillPrice)); // msg = "OrderStatus:" + "OrderId:" + orderId + ", Status:" // + QString::fromStdString(status) + ", filled:" + filled // + ", remaining:" + remaining + ", avgPx:" + avgFillPrice // + ", permId:" + permId + ", parentId:" + parentId // + ", lastFillPrice:" + lastFillPrice // + ", clientId:" + clientId // + ", whyHeld:" + QString::fromStdString(whyHeld); qDebug() << msg; emit orderUpdated(msg); }
/*! * updateOrder */ void TTCutList::updateOrder() { for (int i = 0; i < data.count(); i++) { data[i].setOrder(i); emit orderUpdated(data.at(i), i); } }
/*! * onUpdateOrder */ void TTCutList::onUpdateOrder(const TTCutItem& item, int order) { int index = data.indexOf(item); if (index < 0) { //qDebug("TTCutList::onUpdateOrder item not in list! %s", qPrintable(item.fileName())); return; } data[index].setOrder(order); emit orderUpdated(data.at(index), order); }
/*! * append */ void TTCutList::append(const TTCutItem& cItem) { TTCutItem item(cItem); if (item.order() < 0) { item.setOrder(count()); emit orderUpdated(item, item.order()); } data.append(item); emit itemAppended(item); }