Short Description: Qt4 Accounting View: Basic "Account Row Graphics Item" Bug Number: n/a Release notes (y/n): no, not yet. For Release Nums: 6.1 (1) Added "Account Row Graphics Item" QGraphicsItem class (stub), as a conditionally managed child item in SimObjGfxItem. (2) Removed old-style SimObjGfxItem custom-drawing methods. There is still a little custom drawing, e.g. to implement an opaque background. But the major features are implemented with child QGraphicsItems. -------------------------------- QtUtils/AcctRowGfxItem.hpp -- NEW QtUtils/AcctRowGfxItem.cpp -- NEW QtUtils/Make.package QtUtils/QtUtils.pro QtUtils/QtUtils.vcproj QtUtils/QtUtilsGenerated.pro QtUtils/QtUtilsGenerated.vcproj -------------------------------- Added "Account Row Graphics Item" QGraphicsItem class to encapsulate and manage the row of Account and Aggregate-Account Graphics Items in a Simulation Object "Region" Item in the new Qt4 GraphicsView-based Accounting Workspace. This initial "stub" implementation just shows "AcctRowGfxItem" as a test string (implemented as a child QGraphicsTextItem). Other features: (1) Receives SimObj Callbacks via the parent SimObjGfxItem. (2) Implements also QObject, at least for the parent to receive the QObject "destroyed" signal. ------------------------- QtUtils/SimObjGfxItem.hpp QtUtils/SimObjGfxItem.cpp ------------------------- (1) Removed old implementation of custom drawn (rather than "composited") SimObj Icon and SimObj Name Label, as it has become effectively dead code AND because the "composition" approach now has excellent performance (in the newest versions of Qt, i.e. beyond Qt 4.4). REMOVED: bool useCompositeGfxItems() const; // Two implementations of painting: (1) without, (2) with child items void paint_custom (QPainter*, const QStyleOptionGraphicsItem*, QWidget*); void paint_composite (QPainter*, const QStyleOptionGraphicsItem*, QWidget*); .. this implementation moved directly to the QGraphicsItem virtual paint .. method: void paint (QPainter*, const QStyleOptionGraphicsItem*, ..) (2) When in an Accounting Workspace (see bool onAccountingCanvas()), manage a AcctRowGfxItem ("Account Row Graphics Item") instance below the SimObj Icon and SimObj Name Label. ADDED: AcctRowGfxItem* _acctRowItem; void updateAcctRowGfxItem (bool showSelected=false); void acctRowItemDestroyed (QObject*); // private Qt slot (3) Unhandled SimObj callbacks are passed to the AcctRowGfxItem, if that QGraphicItem is instantiated (i.e. only in the Accounting View). ----------------------------- QtUtils/WorkspaceGfxScene.hpp QtUtils/WorkspaceGfxScene.cpp ----------------------------- Removed method: bool useCompositeGfxItems() const; In method: WorkspaceGfxScene::layoutNetwork(), show message box: "Layout Network operation is not implemented in this view." ---