Qt4
Accounting Workspace Development -- Status: 12-6-2010
Phil Weinstein, CADSWES
The Qt4 "Graphics View"
Accounting Workspace is going well, but of course not without some unanticipated
complications. 9.5 days have been spent on development so far (including today),
with an original estimate of 10 days. I hope to have this completed in three
or four additional days (certainly finishing this week). Quite a lot of tricky
technical problems have already been worked through. All work to date has been
checked in and is enabled in the 6.1 Development build.
SEE
old and new Accounting workspace comparison screenshots (click
on image to switch). Notice these things:
- See
the topmost object: Transfer Supplies are currently just shown as straight lines.
[correct drawing still to do].
- Physical Links are drawn
to the SimObj Icon rather than to the center of the SimObj region box. This
is good, I think.
- Problem (not trivial,
see also note below): Supplies are drawn over Labels (and over SimObj icons).
Provisions have been coded to prevent this, but are not working.
This is a pretty direct
port with only incidental enhancements. Performance is vastly improved, e.g.
when dragging multiple selected Simulation Object boxes. Also, with antialiasing
provided in Qt4 Graphics View, the appearance is better.
The following functional
areas have been completed:
- Management of both the
old (Qt3) and new (Qt4) Accounting Workspaces (Views) sharing a common "geometry"
(SimObj icon positions).
- Simulation Object "Regions"
with Icon, Label and a row of Account Items of different shapes for the four
Account types.
- Improved SimObj "Region"
selection ornamentation: added dashed outline.
- Reordering of the Accounts
in a SimObj by dragging.
- Context menus (see
old images), distinct for Accounting Workspace, SimObj Regions, and Account
Items, with most operations implemented (i.e. a couple menu items are still
"stubs"). Implemented operations include:
- Create Physical Link
(between SimObjs),
- Open Object,
- Add Account (of the
appropriate types),
- Show Obj Account Summary,
- Show and Modify Display
Groups,
- Delete Object,
- Edit Account,
- Open Account,
- Delete Account.
- Dynamically maintained
Supply Items (straight line only), with direction arrow.
- Display Group "styles"
(fonts, colors, patterns) implemented on the SimObj Region, Account Items and
Supply Items.
- Disabling of icon movements
when the Workspace is locked or in Viewer or Scenario mode. Also, appropriate
disabling of destructive operations in those modes.
Other completed
software engineering work:
- Removal of the old-style
custom-painted SimObj Graphics Items
- Removal of the old Qt3
Simulation View (long-time dead code).
- Various performance features
(e.g. caching computed "shapes").
- Some SimObj and Account
class methods to more easily enumerate Accounts and Supplies.
Still to do:
- Transfer Supplies (drawn
as arcs). [Those currently show up just as just "straight" Supplies].
- Account Group Aggregation.
- Fill Account Label text
background with a color to contrast the text. (I might do something different
from the old Qt3 implementation).
- Porting the Layout Network
operation (currently, just a context menu stub).
- Porting the Add Supply
operation (currently, just a context submenu stub).
- Account Selection ornamentation.
(Single Account selection only). (I will probably implement this as a dashed
outline. Note however that we don't really have any operations on the "selected"
Account -- but it will be beneficial to ornament the Account item for the drag-reordering
operation).
- Minor: only conditionally
show physical links.
- Problem:
Supplies are obscuring SimObj and Account Labels, and the SimObj icon. "Z"
values don't seem to function as desired between distinct sets of nested child
QGraphicsItems. (See these technical notes).
(ADDED: See also this technical question for Qt
Centre Forum).
Other Materials:
---