Short Description: Qt4 Accounting View: Supply Items basic functionality Bug Number: n/a Release notes (y/n): no For Release Nums: 6.1 COMPLETED: (1) Management of Supply Items with Account Changes (2) Supply Display Group Properties (color, pattern) (3) Arrows implemented with distinct child QGraphicItems, with color and position synchronized with the parent Supply Item. (4) Workspace Tooltip support extended to Supplies (multiple). (5) StatusBar Tip support extended to Supplies. TO DO: (1) Transfer Supply Items as a distinct class (as an arc). (2) Supply Creation Operations using context menus on Account Items. (The submenu items for these operations are in place, as stubs). PROBLEM: Supply Items obscuring Object Icon and Name Label. Even though the "Z" values are set properly (which should be rechecked), it looks like the Supply Item can't be drawn between distinct "Z" layers of the nested QGrahpicsItem children nested within a SimObjGfxItem. These are the "Z" value offsets used, with respect to the SimObjGfxItem "Z" values: static const double ZValueOffset_AcctRow (0.0001); static const double ZValueOffset_Supply (0.0002); static const double ZValueOffset_Label (0.0003); static const double ZValueOffset_Icon (0.0004); static const double ZValueOffset_Acct (0.0005); Note that ZValueOffset_Supply is lower than ZValueOffset_Label and ZValueOffset_Icon, but supply items are still being drawn above the SimObj label and icon. ----------------------------- QtUtils/Make.package QtUtils/QtUtils.pro QtUtils/QtUtils.vcproj QtUtils/ArrowHeadGfxItem.hpp -- NEW QtUtils/ArrowHeadGfxItem.cpp -- NEW QtUtils/SupplyGfxItem.cpp -- NEW QtUtils/SupplyGfxItem.hpp -- NEW ----------------------------- See overview, above. -------------------------- QtUtils/AccountGfxItem.hpp QtUtils/AccountGfxItem.cpp -------------------------- Maintains association with SupplyGfxItems for Supplies to and from the item's Account. New data members: QMap _supplyItemMap; QTimer* _updateSuppliesTimer; New methods: void addSupplyItem (SupplyGfxItem*); void removeSupplyItem (SupplyGfxItem*); void deleteSupplyItems(); void schedUpdateSupplies(); void updateSupplies (bool calledFromTimeout=false); double accountZValue() const; double supplyZValue() const; void updateSuppliesTimeout(); // Qt slot -------------------------- QtUtils/AcctRowGfxItem.hpp QtUtils/AcctRowGfxItem.cpp -------------------------- Added SupplyGfxItem support (for the "row's" composition of AccountGfxItems): New methods: void forceScheduledBuildAccountItems(); void updateSupplies(); void deleteSupplyItems(); double accountZValue() const; double supplyZValue() const; ------------------------- QtUtils/SimObjGfxItem.hpp QtUtils/SimObjGfxItem.cpp ------------------------- Added SupplyGfxItem support: void forceScheduledBuildAccountItems(); void updateSupplies(); double accountZValue() const; double supplyZValue() const; ----------------------------- QtUtils/WorkspaceGfxScene.hpp QtUtils/WorkspaceGfxScene.cpp ----------------------------- SupplyGfxItem management: QMap getSupplyMap() const; SupplyGfxItem* getSupplyItem (const Supply*) const; void clearLinkAndSupplyItems(); virtual void reconfigureLinkItems() {} virtual void reconfigureSupplyItems() {} void addSupplyItem (Supply*); void deleteSupplyItem (Supply*); void setSupplyStyle (Supply*); virtual bool supplyTypeSupported (const Supply*) const = 0; Additional Account Support: AccountGfxItem* getAccountItem (const Account*) const; AccountGfxItem* getAcctItemAtScenePos (const QPointF&) const; ------------------------------ QtUtils/SimulationGfxScene.hpp QtUtils/SimulationGfxScene.cpp ------------------------------ SupplyGfxItem management: virtual bool supplyTypeSupported (const Supply*) const; virtual void reconfigureSupplyItems(); Note: These WorkspaceGfxScene virtual methods overrides above would be moved to a different specializiation class, AccountingGfxScene, if we decide to create that. (That may not be warranted). Enhancement to the following method to support tooltips on Supplies. A tooltip may simultaneously show multiple proximate Links and Supplies. QString SimulationGfxScene::toolTipString (QGraphicsSceneHelpEvent*) ---------------------------- QtUtils/WorkspaceGfxView.hpp QtUtils/WorkspaceGfxView.cpp ---------------------------- Enhancement to the following method to support status-bar messages on Supplies. QString WorkspaceGfxView::mouseStatusMessage (const QPoint&, ...) ------------------- Q3GUI/CanvasRef.cpp ------------------- In this "adaptor" class, add Qt4 Graphics View implementations for these two methods: void CanvasRef::addSupply (Supply*) const; void CanvasRef::deleteSupply (Supply*) const; ... these call methods on a WorkspaceGfxScene instance. --