SCT Custom Cell Colors [12] -- Merge from SctCustCellColors1 to 6.8 Master
Bug Number: n/a
Release notes (y/n): Yes
For Release Nums: 6.8
The SCT's series slot table now supports the application of custom text
(foreground) and background colors to arbitrary sets of slot/timestep cells.
This overrides the cell background colors which indicate the series timestep
flag.
Both the definition of a prescribed set of "custom color items" and the
association of those definitions to particular slot/timestep cells are
stored in the SCT configuration -- not within the RiverWare model.
This development has been squash merged from the SctCustCellColors1 git
branch to the 6.8 master branch.
SEE DOCUMENT:
SCT Custom Slot/Timestep Cell Colors / RiverWare 6.8
R:\doc\sct\2015\SctCustomColors-2015-Sep.docx
R:\doc\sct\2015\SctCustomColors-2015-Sep-Phil-9-28.pdf
http://cadswes2.colorado.edu/~philw/2015/SCT/SctCustomFlags/SctCustomColors-2015-Sep-Phil-9-28.pdf
ORIGINAL ANALYSIS:
http://cadswes2.colorado.edu/~philw/2015/SCT/SctCustomFlags/Analysis.html
ARCHITECTURE ISSUE:
This is the first time that slot/timestep-specific data is being
associated with an SCT. In the past, the SCT was simply a view onto
model data, and could reasonably be applied to different (but similar)
models. Once an SCT was configured, it had previously been unusual -- at
least, fundamentally -- to resave the SCT Configuration in the normal
course of project or modeling operations.
In a sense, this new feature could be thought of as a custom
extension of series timestep flags with explicitly configured visual
characteristics. The custom colors being assigned to specific
slot/timestep cells will often serve as an annotation to the series data
appearing in that cell -- and that series data lives in the RiverWare
model, not in the SCT. It is conceivable that some modelers will, in the
near future, want to use these custom flags as inputs, e.g. taken into
account in special circumstances by RPL-based policies.
With these concerns in mind, in this short-term development, both
the set of Custom Slot/Timestep Flag definitions, and their association
with specific Slot/Timestep cells, were implemented using data
structures which could, in the future, be moved into the RiverWare
model. The serialization of this data is done with XML records, instead
of directly with the form of Flex/Bison-parsable format typical of the
SCT configuration serialization.
NEW MODULES:
Two new major data structures are used to support SCT custom cell
colors. Internally, these are framed as "user flags," to support the
ideas that (a) the non-visual components of these definitions, and
importantly, the slot/timestep cell associations could be moved into the
RiverWare model, rather than remaining within the SCT configuration, and
(b) there could potentially be other associated visual properties --
i.e. not just colors.
(1) Sim/UserFlagSet -- list of "user flag" items (name, foreground color, background color).
(2) Sim/SlotUserFlagMap -- association of Slot/Timestep Cells with user flag names.
In this initial implementation, the SctConfig class supports one
instance of each of these classes. These are serialized within the
SctConfig flex/bison-parsed SCT file format as distinct XML elements.
See example below.
(3) QtSCT/UserFlagSetConfigDlg -- User Flag Set Configuration Dialog.
SERIALIZATION EXAMPLE:
USER_FLAG_SET XML-UFLAG-SET-BEG
XML-UFLAG-SET-END
SLOT_USER_FLAG_MAP XML-UFLAG-MAP-BEG
XML-UFLAG-MAP-END
---