Phil Weinstein, CADSWES, edit 3-12-2012; Status: Ready for review / PDF
The SCT's Series Slot Table -- on the first tab of the SCT -- provides four series data views:
SCT Configuration Data is composed primarily of these components:
SCT Components / Layers used in the Qt3 implementation:
The display and behavioral features of the SCT's series slot views need to be migrated from the Qt3 "SctView" subclasses and the new Qt4 table view, model and delegate classes. Operations involving changes to the display table configuration (e.g. number of, and content of the rows and columns) -- which are represented in SctConfig -- will need to cause updates within the new model classes instead of within the old table classes.
Note that in the Qt4 model/view architecture, the cell selection is NOT part of the "model" (QAbstractItemModel). Rather, it is represented in a "selection model" instance which is also owned by the table view. As with the Qt3 selection model, care must be taken to implement cell selection analysis very efficiently because it must be performed on every selection change AND because one of the dimensions of the table can be huge (e.g. tens or hundreds of thousands of timesteps) -- but the algorithms devised for an efficient implementation in Qt3 will need to rewritten for the Qt4 selection model architecture. (It's different).
The following sections describe the major porting tasks.
Mechanisms to efficiently compute internal table structure data -- i.e. only when absolutely necessary -- will need to live in the model classes. This includes row/column mappings (see below) and intermediate timestep aggregation computations.
The row/column mappings include these:
Hopefully, the internals of the cell and divider rendering code can substantially remain intact. But it will need to be moved to the new Qt "item delegate" class, with a slightly different interface (e.g. where the drawing "rectangle" comes from). Cell rendering includes these aspects:
Note that in Qt4, we no longer have a way of providing custom selection ornamentation -- that is performed automatically in Qt after custom cell drawing has been applied. This poses a bit of a problem for our special selection ornamentation in aggregation summary cells. Fortunately, that ornamentation is important primarily in the case of the summary cell not itself being selected (but rather when a subset of its detail cells are selected). This should work out OK.
When series slot values or flags change in the model, the SCT needs to update automatically (including a deferred column width expansion, as needed). Actually, updates of display data as a response to value edits in the SCT are also asynchronous by default -- i.e. the SCT value display will update in response to a value-change notification from the slot being edited.
Slot change callbacks are maintained by the SctModelData object, and that can remain intact. Those will need to result in generation of "data changed" notifications from the various QAbstractItemModel instances in the new design.
Computing the SCT's internal slot / timestep oriented cell selection from the QTableView's row / column oriented cell selection -- and the reverse operation of setting the QTableView's selection -- need to be reimplemented for Qt4. The internal slot / timestep selection is used to sensitize (enable/disable) and perform various high-level operations on slot data, including the various copy/paste operations. These need to be very efficient, including with large timestep-count models; table selection needs to be re-analyzed with every change to the cell selection. As mentioned above, a QTableView's cell selection is represented in a separate "selection model" object -- and not in the QAbstractItemModel object -- and is quite different from the Qt3 table selection architecture.
It is difficult to simultaneously support certain "selection" features for both the old Qt3 and new Qt4 table implementations, i.e. for the purpose of development testing. At some point during this development step, the "hooks" to the old selection implementation will be removed.
Most of the GUI controls to initiate operations exist in the SctDialog class, e.g. menu and toolbar items. These fall into the following general categories:
Several of these categories of operations will need to be moved to appropriate component within the Qt4 item view architecture: generally to the new SctTableView or item model subclasses.
Once all the basic functionality is implemented, certain precise table-related behaviors will need to be revisited for Qt4. These include:
Bottlenecks in run-time performance, especially in models with huge time series, will need to be examined and optimized. One source of difficulty is that hiding and showing table rows and columns can be very expensive in huge tables, as Qt recomputes the positions of all rows and columns. In some cases, it was found to be more efficient to "RESET" the entire QAbstractItemModel rather than change the hidden state of many individual rows. The performance of operations which are of particular concern in the Qt4 architecture (at least with our current version, Qt 4.6.3) include the following:
I'm recommending that we substantially complete the first several development steps with one of the four SCT views before proceeding with the other three views. This initial development will be coded with the intermediate base Qt4 item model class, SctTableModel. When that is complete, aspects of that model which are particular to the actual view will be moved to the subclass for that view (mainly via virtual methods -- e.g. for the slot / timestep / row / column mappings), and the model subclasses for the other three views will then be implemented.
Task | Est [days] |
Compl. | Description |
Phase I -- with only the Non-Aggregated Vertical Time View |
|||
I (3.1) | 2.0 | Moving GUI table configuration computation mechanisms to the new model classes. | |
I (3.2) | 1.5 | Value and Ornamentation Display | |
I (3.3) | 0.5 | Asynchronous Value Updates | |
I (3.4) | 2.5 | Selection Representation | |
Phase II -- with the remaining three views |
|||
II (3.1) | 1.5 | Moving GUI table configuration computation mechanisms to the new model classes. | |
II (3.2) | 2.0 | Value and Ornamentation Display -- including support for complex aggregation divider "cells" | |
II (3.3) | 0.0 | Asynchronous Value Updates -- no additional development expected | |
II (3.4) | 1.0 | Selection Representation | |
II (3.5) | 1.5 | Re-deployment of SCT user operations. | |
II (3.6) | 1.5 | Precise display behaviors / Usability issues. | |
II (3.7) | 2.0 | GUI performance | |
16.0 | TOTAL [days] |
---