RiverWare Output Canvas: Tea Cup and Flow Animations: Design 2
Phil Weinstein, David Neumann, Patrick Lynn, Edie Zagona, CADSWES, 8-21-2014 -- See Project Index

(0) Overview

This document presents a design for a new RiverWare "Output Canvas" output device which can be used to illustrate water storage levels and water flows over a period of time. The initial implementation supports the following graphical elements, including two animated components:

  1. Images
  2. Text Items
  3. Tea Cups
  4. Flow Lines

Subsequent development of the Output Canvas output device may provide additional graphical features, such as incorporation of RiverWare Plot Page and Pie Chart output devices. Output Canvases may eventually be deployable on the web. Those features are beyond the scope of this project.

(0.1) Document Status

Revisions to this design are continuing in a new “Design 3” document. Major changes include:

(0.2) Contents

  1. Tea Cup Reference Examples
    1. California Dept. of Water Resources
    2. Bureau of Reclamation, Pacific Northwest Region Hydromet Program
  2. Output Canvas
    1. Output Canvas Configuration Settings
    2. Output Provisions
    3. Additional Output Canvas Provisions
  3. Image Items
  4. Text Items
  5. Tea Cup Items
    1. Tea Cup Group Configuration
    2. Tea Cup Marker Configuration
    3. Tea Cup Numeric Text Item Configuration
    4. Tea Cup Bounding Box Configuration
    5. Tea Cup Group Legend Configuration
    6. Tea Cup Instance Configuration
    7. Duplicate Tea Cup Operation
    8. Tea Cup Creation Wizard
    9. Other RiverWare Tea Cup Item Provisions
  6. Flow Lines
    1. Flow Line Group Configuration
    2. Flow Line Instance Configuration
    3. Other RiverWare Flow Line Provisions

(1) Tea Cup Reference Examples

Two examples of water resource tea cup graphics are provided here to help devise a design for RiverWare Tea Cup items.

(1.1) California Dept. of Water Resources

A visual tool on the California Department of Water Resources website provides a good example of the sort of Reservoir Tea Cup graphical element we would like to create.

   
Source: http://cdec.water.ca.gov/cdecapp/resapp/getResGraphsMain.action

This visually depicts these quantities:

The Tea Cup Item also includes these text / numeric items:

The full map image depicts "callouts" -- lines connecting the tea cup image to a particular point within the map. (We will not be implementing this feature).

Most reservoirs seem to share a common vertical (volume) scale. But some smaller-capacity reservoirs have a larger scale (e.g. see Pyramid Lake at the bottom of the graphic).

(1.2) Bureau of Reclamation, Pacific Northwest Region Hydromet Program

Source: http://www.usbr.gov/pn/hydromet/burtea.html
   

In this particular map, there are three tea cup "profiles" -- for different ranges of reservoir capacities. Each tea cup apparently has its own scale.

The indicated flow ("cfs") text items are apparently independently placed (i.e. not implemented as part of the tea cup item).

Observation: this trapezoidal presentation is potentially ambiguous. Ostensibly storage volumes rather than pool elevations are depicted by the filled-in area. But it's not clear whether the height or the area of the filled-in area represents that volume. And certainly the height of that area doesn't accurately represent the pool elevation.

(2) Output Canvas

The Output Canvas is a new RiverWare graphical output device. Existing graphical output devices include the Plot Page and Pie Chart. The Output Canvas output device is "workspace-like" in that it contains graphic objects which are selectable and draggable on top of an optional background image. (The Output Canvas supports multiple user-supplied images; any of those can be used as background images).

An Output Canvas is configured using a "property editor" based GUI design -- similar to RiverWare Model Reports and Scripts. The Output Canvas Dialog is composed of the following panels supporting user-adjustable "splitter" controls.

 
Object
Tree

Output
Canvas

Settings
Property
Editor

The Object Tree and Settings Property Editor can optionally be hidden. The Object Tree supports single-item selection. The Settings Property Editor shows the editable properties of the selected Object Tree item.

Related GUI controls mentioned in this design document include:

  1. Reference timestep date/time spinner, slider, animation control.
  2. Action menu (combo box or push button with popup menu)
  3. Lock Item Positions checkbox.

The various types of graphical items on the Output Canvas are managed within Item Groups. The following types of Item Groups are supported:

Item Group Type Number Supported Special Features
1 Image Group One Independently lockable canvas positions.
2 Text Item Group One  
3 Tea Cup Group One or Several* Supports Generated Legend Graphic
4 Flow Line Group One or Several* The two ends can "snap to" Tea Cups or an end of another Flow Line

*The initial implementation may support only a single Tea Cup Group and a single Flow Line Group. When multiple groups of these types are supported, they will need to have user-editable names which are enforced to be unique.

The Object Tree is initialized with the following non-deletable top-level items (assuming a single-instance implementation for all item group types):

When multiple Tea Cup Groups and Flow Line Groups are supported, a new Output Canvas does not initially have those top-level items (Tea Cups and Flow Lines). Instead, an action menu above the object tree supports "Add Tea Cup Group" and "Add Flow Line Group" actions.

The Output Canvas has a configured size, in pixels. Zooming in or out is not supported. Scrollbars will be shown as needed (i.e. when the Output Canvas window is smaller than the configured size). The locations of all graphical elements within the Output Canvas will generally be locked, but when unlocked, they can be dragged to a different location. This is supported with a "Lock item positions" checkbox.

Similar to the Pie Chart device, the Output Canvas provides a timestep slider with animation controls to allow the user to move timestep-animatable items to different timesteps within a model data time range -- and to automatically step that timestep forward at a settable rate to present an animation or slide show.

      

(2.1) Output Canvas Configuration Settings

The Settings Property Editor shows the Output Canvas' general settings when the "Canvas" item is selected in the object tree:

 
rwSetting ID Type Meaning Notes
OCAN_NAME string output device name  
OCAN_WIDTH int canvas width (pixels)  
OCAN_HEIGHT int canvas height (pixels)  
OCAN_BG_COLOR color background color  
OCAN_REF_TSTEP date/time reference timestep date/time See below.

The reference timestep date/time is generally synchronized with the timestep slider shown with the canvas. Manual changes to the slider (including using the step buttons) change this value, but changes to that slider during an animation do not.

(2.2) Output Provisions

The Output Canvas can be exported as an image file (at a single reference timestep) or as an animated-image file. Supported still-image formats include PNG and JPEG. Image output dialog support is modeled on existing image export functions, for example, this dialog for exporting the workspace image:

      

The configured dimensions of the Output Canvas can be used, or can be overridden.

Note: Animated-image file export will be supported with the MPEG, AVI, MNG or MOV file format, or something similar. None of the utility libraries we are currently using (including Qt) support any sort of movie-file generation. I believe that we will be able to make use of the FFmpeg, Libav, MEncoder, or GStreamer libraries, but this requires more investigation and some integration work.

Output Canvas still images (and maybe animated movie files of some format) can be included in RiverWare model reports. The model report contains a reference to a particular Output Canvas (output device) instance saved in the model file. The reference timestep date/time (for still images), image width, and image height of the Output Canvas can either be used, or overridden in the model report configuration. The following detail shows a Pie Chart model report item's configuration within a model report.

      

(2.3) Additional Output Canvas Provisions

The Output Canvas supports:

  1. Multiple element selection (including extended-selection "shift" and "control" clicking and rubber-band selection), for operations on multiple items including:
    1. moving (by dragging, as a group),
    2. plotting
  2. A "File" menu including:
    1. Import Configuration...
    2. Export Configuration...
    3. Export as Image...
    4. Duplicate...
    5. Print...
  3. A "View" menu including:
    1. Show Settings Panels (checkable).
  4. A context menu (shown when right-clicking on the canvas background) including:
    1. Add Text...
    2. Add Image...
    3. Add Tea Cup...
    4. Add Flow Line...

The "Add" items in the context menu show the Setting Panel (which may have been hidden) with the new item selected in the object tree and the settings property editor showing the settings for that new item. The various types of canvas items also support their own context menus. Generally, operations in those item context menus apply to the full selected set of items -- see below.

(3) Image Items

Image Items can be created from basic image files (JPEG, PNG, GIF) and are saved (serialized) within the Output Canvas output device, generally contained within a RiverWare model file. Selecting the "Add Image..." operation from the canvas' context menu or the object tree's action menu brings up an image file selection dialog to allow the user to pick an image file to be loaded.

Image items support an adjustable opacity (0% to 100%). Individual items can be designated as "background images". Doing so has the following effects:

Non-background images are drawn "under" the other three types of items described in this document (but over all background images). Partially transparent background images (less than 100% opacity) are effectively blended with the Output Canvas' configured background color.

Each image has its own "locked position" toggle which prevents it from being moved by dragging; this is distinct from the canvas' "Lock item positions" checkbox. The image-specific position lock is appropriate for images used as background images.

The top-level "Images" (Image Group) object tree item doesn't have any associated settings. It contains a tree child item for each configured image in the canvas. An image item's "name" is initialized from the loaded image file's name (modified to ensure uniqueness within the canvas), and can subsequently be edited by the user. The Settings Property Editor shows the Output Canvas' general settings when an image item is selected in the object tree:

 
rwSetting ID Label Type Meaning
OCAN_IMG_NAME Name string image name (editable -- not necessarily the original image file name).
OCAN_IMG_IS_BG Is Background? bool is background image
OCAN_IMG_POS_LOCKED Position Locked? bool is the image's position on the canvas locked? (preventing drag moves)
OCAN_IMG_OPACITY Opacity percent opacity percent [0..100]. 0%: fully transparent. 100%: fully opaque (default).
OCAN_IMG_POSX X Position int horizontal coordinate of image's center on canvas
OCAN_IMG_POSY Y Position int vertical coordinate of image's center on canvas

(4) Text Items

Text Items can contain multiple lines of text with a single selectable color and font. Instead of picking a potentially unique font specification for each Text Item instance, three fonts can be configured within the Text Group, and any item can be displayed with any of those fonts.

Accordingly, the top level "Text Items" (Text Item Group) object tree item supports the following settings:

 
rwSetting ID Label Type Meaning
OCAN_TXT_FONT1 Font 1 font specification editable and selectable using the Qt Font Selector Dialog
OCAN_TXT_FONT2 Font 2 font specification editable and selectable using the Qt Font Selector Dialog
OCAN_TXT_FONT3 Font 3 font specification editable and selectable using the Qt Font Selector Dialog

The "Text Items" (Text Item Group) object tree item contains a child item for each text item in the canvas.

A text item can be of any of the following types. Some of these text types support references to slots in the model -- this can be a scalar slot (or 1x1 table slot) or any slot which can be resolved to a single value at a reference timestep. Most text item types support an optional user-entered suffix and prefix -- and in one case -- optional "middle" text. This set of supported text items may be extended in the future.

 
text item type Slot References Example
1 plain 0 CURRENT RESERVOIR CONDITIONS
2 ref timestep 0 Ending at Midnight - July 29, 2014
3 current date/time 0 Graph Generated 07/30/2014 02:45 PM
3 one value ref 1 ALPY 6435 cfs
4 two value ref 2 Lake Walcott 97346 / 95180
5 fraction 2 Palisades 67% Full

The Settings Property Editor conditionally shows the following settings when a text item is selected in the object tree:

 
rwSetting ID Label Type Shown for text item types
OCAN_TXT_TYPE Type enum (see above) all
OCAN_TXT_TEXT Text string plain
OCAN_TXT_PREFIX Prefix Text string all but "plain"
OCAN_TXT_SLOT1 Slot 1 slot reference one value ref, two value ref, fraction
OCAN_TXT_SLOT1_SHU Slot 1, Show Units? bool one value ref, two value ref
OCAN_TXT_MIDTEXT Middle Text string two value ref
OCAN_TXT_SLOT2 Slot 2 slot reference two value ref, fraction
OCAN_TXT_SLOT2_SHU Slot 2, Show Units? bool one value ref, two value ref
OCAN_TXT_SUFFIX Suffix Text string all but "plain"
OCAN_TXT_DT_FMT Date/Time Format enum (various) ref timestep and current date/time
OCAN_TXT_FRACT_FMT Fraction Format decimal or percent, enum fraction
OCAN_TXT_FRACT_PREC Fraction Precision integer: 0, 1, 2, ... fraction
OCAN_TXT_FONT_ID Font enum: 1, 2, 3 all
OCAN_TXT_COLOR Text Color color all
OCAN_TXT_POSX X Position int (x pos of center) all
OCAN_TXT_POSY Y Position int (y pos of center) all

(5) Tea Cup Items

      
CDWR Example

Certain aspects of RiverWare Tea Cups are modeled primarily on the CDWR example presented above. They present:

  1. Graphical representations of numeric values having a common unit type (e.g. volume):
    1. A "maximum value" rectangular area
    2. A "current value" rectangular area
    3. Any number of "marker" horizontal lines (not just one)
  2. Numeric labeled tick marks along the vertical axis
  3. A tea cup item text label
  4. Multiple numeric text items, arranged in one or two columns and one or more rows.

(5.1) Tea Cup Group Configuration

Various Tea Cup composition and display properties are defined at the "Tea Cup Group" level. These properties are shared among all Tea Cups in the Tea Cup Group. This configuration includes: The Settings Property Editor shows the Tea Cup Group's settings when a (or the) Tea Cup Group is selected in the object tree:

 
rwSetting ID Label Type Notes
General Tea Cup Configuration Settings:
    TCUP_GRP_NAME Name string only if multiple groups are supported
    TCUP_UNIT_TYP Unit Type enum any supported unit type (e.g. volume)
    TCUP_DISP_PREC Precision int number of fractional decimal digits (0 or more) [Note 1]
Maximum Value Entity definition (full area):
    TCUP_MAX_LAB1 Max Value Short Label string e.g. "capacity"
    TCUP_MAX_LAB2 Max Value Long Label string e.g. "Total capacity"
    TCUP_MAX_COLOR Max Value Color color  
    TCUP_MAX_COLOR_NAM Max Value Color Name color used in legend
Current Value Entity definition (smaller filled area):
    TCUP_CUR_LAB1 Current Value Short Label string e.g. "storage"
    TCUP_CUR_LAB2 Current Value Long Label string e.g. "Current storage"
    TCUP_CUR_COLOR Current Value Color color  
    TCUP_CUR_COLOR_NAM Current Value Color Name color used in legend
Optional Features:
    TCUP_MARKER_CNT Marker Count int 0 or more [Note 2]
    TCUP_NUM_COL_CNT Num Text Col Count int 1 or 2 [Note 3]
    TCUP_NUM_ROW_CNT Num Text Row Count int 0 or more [Note 3]
    TCUP_SHOW_BNDBOX Show Bounding Box? bool [Note 4]
    TCUP_SHOW_LEGEND Show Legend? bool [Note 5]
Fonts:
    TCUP_FONT_LABEL Label Font font editable and selectable using the Qt Font Selector Dialog
    TCUP_FONT_AXIS Axis Font font
    TCUP_FONT_NUMS Num Text Font font

Notes:

  1. Numeric values (of the specified unit type) are always shown with the current unit scheme's unit for that unit type, but the precision is specified here because of the somewhat different context for these numeric values. (Generally, a lower precision may be used in the Output Canvas).
  2. Child Tea Cup Marker Tree Items are automatically created and deleted according to the configured number of markers.
  3. Child Numeric Text Tree Items are automatically created and deleted according to the configured number of numeric text columns (1 or 2) and rows. When two numeric text columns are used, text items in the columns are aligned "together" (i.e. first column is right aligned; second column is left aligned) and a vertical line is drawn between the two columns. (See the CDWR example).
  4. A Child Bounding Box Tree Item is automatically created and deleted according to the "Show Bounding Box" setting.
  5. A Child Tea Cup Legend Configuration is automatically created and deleted according to the "Show Legend" setting.

(5.2) Tea Cup Marker Configuration

If the Tea Cup Group's "Marker Count" configuration is at least one, then that number of Tea Cup Marker Configuration child tree items are created under the Tea Cup Group tree item in the object tree. These tree items have text of the form "Tea Cup Marker #" (where # is an integer starting at 1). The Settings Property Editor shows the following Tea Cup Marker Configuration Item settings when such a tree item is selected in the object tree:

 
rwSetting ID Label Type Notes
TCUP_MARK_LAB1 Marker Short Label string e.g. "historic average"
TCUP_MARK_LAB2 Marker Long Label string e.g. "Historic average level for date"
TCUP_MARK_COLOR Marker Line Color color  
TCUP_MARK_COLOR_NAME Marker Line Color Name string used in legend
TCUP_MARK_STYLE Marker Line Style enum solid, dashed, dotted
      
CDWR Example

(5.3) Tea Cup Numeric Text Item Configuration

If the Tea Cup Group's "Num Text Row Count" and "Num Text Col Count" configurations result in at least one such numeric text "cell", then that number of Tea Cup Text Item Configuration child tree items are created under the Tea Cup Group tree item in the object tree. These tree items have text of the form "Tea Cup Numeric Text (Row <row>, <side>)" where <row> is an integer starting at 1 and <side> is either "Left" or "Right" (or blank if there is only one column).

Text Item types similar to those on the output canvas (see Section 4) are supported. Instead of data sources being references to slots in the model, data sources are the particular tea cup graphical quantitative entities, i.e. any of:

All Tea Cup Numeric Text Item types support an optional user-entered suffix and prefix -- and in one case -- optional "middle" text. This set of supported text items may be extended in the future.

 
text item type Entity References Example
1 one value ref 1 ALPY 6435 cfs
2 two value ref 2 97346 / 95180
3 fraction 2 67% Full

The Settings Property Editor conditionally shows the following settings when a Tea Cup Numeric Text Item is selected in the object tree:

 
rwSetting ID Label Type Shown for text item types
TCUP_TXT_TYPE Type enum (see above) all
TCUP_TEXT_LEGEND Legend Text string all
TCUP_TXT_PREFIX Prefix Text string all
TCUP_TXT_ENT1_TYPE Entity 1 Tea Cup Entity Enum* one value ref, two value ref, fraction
TCUP_TXT_ENT1_SHU Entity 1, Show Units? bool one value ref, two value ref
TCUP_TXT_MIDTEXT Middle Text string two value ref
TCUP_TXT_ENT2_TYPE Entity 2 Tea Cup Entity Enum* two value ref, fraction
TCUP_TXT_ENT2_SHU Entity 2, Show Units? bool two value ref
TCUP_TXT_SUFFIX Suffix Text string all
TCUP_TXT_FRACT_FMT Fraction Format decimal or percent, enum fraction
TCUP_TXT_FRACT_PREC Fraction Precision integer: 0, 1, 2, ... fraction
TCUP_TXT_COLOR Text Color color all

(5.4) Tea Cup Bounding Box Configuration

If the Tea Cup Group's "Show Bounding Box" configuration checkbox is on, then a Tea Cup Bounding Box Configuration ("Bounding Box") child item is created under the Tea Cup Group tree item in the object tree. The Settings Property Editor shows the following Tea Cup Marker Configuration Item settings when such a tree item is selected in the object tree:

 
rwSetting ID Label Type Notes
TCUP_BBOX_COLOR Background Color color  
TCUP_BBOX_OPACITY Opacity percent opacity percent [0..100]. 0%: fully transparent. 100%: fully opaque.
TCUP_BBOX_BORDER_SHOW Show Border bool  
TCUP_BBOX_BORDER_COLOR Border Color color  

(5.5) Tea Cup Group Legend Configuration

      
CDWR Example

If the Tea Cup Group's "Show Legend" configuration checkbox is on, then a Tea Cup Legend Configuration ("Legend") child item is created under the Tea Cup Group tree item in the object tree. A legend graphic based on the design of the CDWR example is implemented -- but with support for multiple markers. Legend graphic composition is supported with settings in these other configuration items:

  1. These configuration items include color name settings (apart from actual color settings) for use in the legend graphic:
  2. Tea Cup Numeric Text Item Configurations include a Legend Text setting.

The Settings Property Editor shows the following Tea Cup Legend Configuration Item settings when such a tree item is selected in the object tree:

 
rwSetting ID Label Type
TCUP_LEG_MAX_LABEL Max Value Label enum: short or long
TCUP_LEG_CUR_LABEL Cur Value Label enum: short or long
TCUP_LEG_MARK_LABS Marker Labels enum: short or long
TCUP_LEG_MARK_ONLY1 Show Only First Marker bool -- used when all the markers have the same semantics, e.g. from snapshots of a set of different model runs.
TCUP_LEG_FONT Font font -- editable and selectable using the Qt Font Selector Dialog

(5.6) Tea Cup Instance Configuration

Tea Cups are added to an Output Canvas on demand by the user. When adding a Tea Cup item, or any time thereafter, the user configures the item according to a tea cup configuration established for the Tea Cup Group. Note: If multiple Tea Cup Groups are supported -- unless a particular Tea Cup Group is indicated with a current selection within the Object Tree -- upon creation of a new Tea Cup, the user is queried for the target group.

Child tree items for each Tea Cup instance appears under the containing Tea Cup Group's tree item within the object tree. The Tea Cup tree item redunantly display's the Tea Cup's label text which is also the first item in the Tea Cup's properties. The label must be unique within the group and will typically be the name of the simulation object represented by the Tea Cup. The Settings Property Editor shows the following Tea Cup settings when a Tea Cup item is selected in the object tree:

 
rwSetting ID Label Type Notes
TCUP_LABEL_TEXT Label string generally the name of a simulation object, typically a reservoir or ground water object.
TCUP_MAX_DATA_SLOT Max Value Slot slot  
TCUP_CUR_DATA_SLOT Cur Value Slot slot  
TCUP_POSX X Position int horizontal coordinate of tea cup (center) on canvas
TCUP_POSY Y Position int vertical coordinate of tea cup (center) on canvas

Since our property editor implementation (based on the rwSetting class) doesn't, and can't easily support an open-ended, variable number of items, a Tea Cup Marker data sources (slots) are represented as properties of child Marker object tree items (in the Object Tree) under Tea Cup tree items. The number of Marker object tree items is dynamically based on the Tea Cup Group's configured Marker Count property. Each such Marker Object tree item supports a single slot reference property:

 
rwSetting ID Label Type Notes
TCUP_MARKER_DATA_SLOT Marker Slot slot  

All slot references can be either scalar (or 1x1 table) slots or any slot which can be resolved to a single value at a given timestep date/time.

(5.7) Duplicate Tea Cup Operation

      

The basic way of creating a Tea Cup involves individually specifying the data sources (slots) for each of the tea cup's graphical entities (Maximum, Current, and each of the Markers). This would be a tedious process for creating a large set of Tea Cups.

The "Duplicate Tea Cup" operation allows the data source (slot) configuration of an existing Tea Cup to be applied to the creation of multiple new Tea Cups for a designated set of simulation objects. This operation is accessible from various Tea Cup instance contexts including context menus on a Tea Cup canvas item or Object List Tea Cup tree item.

Inputs to this operation are:

  1. A "Source Tea Cup" (identified from the context at the time of the initiation of the operation).
  2. A list of Simulation Objects for the new Tea Cups. This list is constructed within the Duplicate Tea Cup dialog using either the selected objects on the workspace or the Simulation Object (GUS) selector. (See the accompanying mockup image).

The operation assumes that Tea Cups represent quantities related to individual simulation objects (and possibly also associated, systematically named data objects) and that Tea Cup labels are the names of those simulation objects.

The specific data source slot references for the new Tea Cups are devised by replacing the Source Tea Cup's name -- in the data source slots' object names -- with the name of the respective selected simulation object. A green-check or red-X icon in the object list's "Slots Found" column indicates whether that name substitution results in valid slot references.

Clicking the "Create Tea Cups" button creates the new Tea Cups and shows a message box confirming the completion of the operation and reporting its status. The operation will fail if the "Replace existing Tea Cups having the same label text (object name)" checkbox is not checked and such conflicts exist.

New Tea Cup canvas items are heuristically placed on the Output Canvas based on the relative positions of the corresponding simulation objects in the Simulation View; the user will then be able to adjust their positions by dragging the Tea Cup canvas items.

(5.8) Tea Cup Creation Wizard

      

The Tea Cup Wizard is an additional way (similar to the "Duplicate Tea Cup" Operation -- see above) to create Tea Cups for a set of simulation objects.

The operation assumes that Tea Cups represent quantities related to individual simulation objects and possibly also associated, systematically named data objects. The names of data objects associated with a simulation object must be composed by adding a designated suffix to the simulation object name.

Inputs to this operation are:

  1. A list of Simulation Objects for the new Tea Cups. This list is constructed within the Tea Cup Creation Wizard dialog using either the selected objects on the workspace or the Simulation Object (GUS) selector. (See the accompanying mockup image).
  2. For each of the Tea Cup's numeric / graphical entities -- Maximum, Current, and each of the Markers configured within the Tea Cup Group:
    1. An indication of whether the data source slot is on the simulation object OR on the associated data object.
    2. The local slot name for the data source slot (relative to either the simulation object or the associated data object).
  3. A data object name suffix from which data object names can be constructed from the corresponding simulation object name. Note that data object slot lookup will be attempted both with and without a leading space on the suffix text -- we won't require the user to include that leading space if one is needed.

The ellipsis buttons presented with each of data source slots bring up the slot name selector (based on the GUS slot selector) to select a local slot name. These local slot names can also be directly edited. (This is similar to specification of a slot name in the Unit Scheme Manager's "Add Exception" function).

The operation of the Tea Cup Creation Wizard is otherwise similar to the Duplicate Tea Cup operation described above with respect to the "Slots Found" visual indication, the "Replace existing ..." option, the operation confirmation, and placement of the new Tea Cup canvas items within the Output Canvas. (See the prior section).

(5.9) Other RiverWare Tea Cup Item provisions:

  1. Double clicking a Tea Cup item will open the Object List and Settings Property Editor, with the Tea Cup item selected so that the property editor shows that Tea Cup's configuration settings.
  2. The width of Tea Cup Items is the same for all instances, based on a hard-coded function of the selected Tea Cup Label font.
  3. The height of a Tea Cup Item is a function of both the selected Tea Cup Label font (as above) and the item's "Total" value.
  4. Only a single uniform vertical scale is currently supported.
  5. The vertical axis tick-marks are placed automatically based on the Scale Axis font. There are tick marks at 0 (bottom) and the maximum (top), and usually a few at nice values in between.
  6. Callouts (illustrated in both examples above) are not currently supported.
  7. Independent tooltips, showing slot names and value (as appropriate) are provided for these features:
    1. Maximum rectangle
    2. Current rectangle
    3. each horizontal marker
  8. A context menu with the following operations. (Those which can reasonably be applied to multiple Tea Cups are applied to the multiple Tea Cup selection):
    1. Plot...
    2. Show slots in New SCT...
    3. Add slots to the open SCT...
    4. Open <object>... (shown only if the tea cup label is the name of a simulation object).
    5. Open Current Value Slot...
    6. Open <Marker> Slot... (one for each horizontal marker)
    7. Configure...
    8. Delete (with confirmation).

(6) Flow Lines

"Flow Line" Output Canvas items convey the magnitude of a series' value at the canvas' reference timestep using line width, color and pattern. (Neither of the two reference examples above illustrate flow lines).

Generally, slots associated with Flow Lines have the flow unit type. But any single unit type can be used. This is configurable at the Flow Line Group level. (All Flow Lines within a particular Flow Line Group must have the same unit type). Potentially, multiple Flow Line Groups could be defined within an Output Canvas, but the initial implementation will support only a single Flow Line Group.

A Flow Line has a reference to a single series slot (of the configured unit type) chosen by the user. The current magnitude of the element's series (at the reference timestep) will be depicted in two ways:

The current Flow Line value is shown as numeric text along the drawn line using a font defined at the Flow Line Group for this purpose.

Either end of a Flow Line can be "snapped to" a Tea Cup Item or to the end of a different Flow Line or can be independently placed anywhere within the Output Canvas.

We will need to devise mouse interaction techniques for disambiguating the action associated with clicking and dragging a Tea Cup Item or a proximate Flow Line. Flow Lines will need two or three draggable "hot spots" for positioning -- one at either end, and possibly a third in the middle for geometric translation (moving) which could also "un-snap" the Flow Line from other items.

(6.1) Flow Line Group Configuration

Various Flow Line composition and display properties are defined at the "Flow Line Group" level. These properties are shared among all Flow Lines in the Flow Line Group. The Settings Property Editor shows the Flow Line Group's settings when a (or the) Flow Line Group is selected in the object tree:

 
rwSetting ID Label Type Notes
General Flow Line Configuration Settings:
    FLOWLINE_GRP_NAME Name string only if multiple groups are supported
    FLOWLINE_UNIT_TYP Unit Type enum any supported unit type (e.g. flow)
Line Thicknesses (absolute value display) ... interpolated between minimum and maximum limits ... common to all Flow Items in the Flow Group.
    FLOWLINE_MIN_WIDTH Min Line Width int minimum flow line width (pixels)
    FLOWLINE_MIN_VAL Min Width Value double with units values at or below this value are displayed with the minimum flow line width. This value is stored internally in standard units.
    FLOWLINE_MAX_WIDTH Max Line Width int maximum flow line width (pixels)
    FLOWLINE_MAX_VAL Max Width Value double with units values at or above this value are displayed with the maximum flow line width. This value is stored internally in standard units.
Flow Stages / Line Color and Style
    FLOWLINE_NEGL_FLOW_COLOR Negligable Value Color color  
    FLOWLINE_NEGL_FLOW_STYLE Negligable Value Line Style enum solid, dashed, dotted
    FLOWLINE_STAGE_COUNT Stage Count int See below
Value Display
    FLOWLINE_SHOW_VALUE Show Numeric Value? bool Should the numeric value be displayed?
    FLOWLINE_FONT_LABEL Label Font font editable and selectable using the Qt Font Selector Dialog

Since our property editor implementation (based on the rwSetting class) doesn't, and can't easily support an open-ended, variable number of items, Flow Line State (threshold) configuration properties are provided under child Stage object tree items (in the Object Tree) under Flow Line Group and Flow Line tree items. The number of Stage object tree items is dynamically based on the Flow Line Group's configured Stage Count property. Each such Stage tree item under a Flow Line Group supports the following properties:

 
rwSetting ID Label Type Notes
FLOW_STAGE_LABEL Stage Label string used for tooltips
FLOW_STAGE_COLOR Stage Color color  
FLOW_STAGE_LINE_STYLE Stage Line Style enum solid, dashed, dotted

(6.2) Flow Line Instance Configuration

Flow Line items are added on demand by the user. When adding a Flow Line item, or any time thereafter, the user configures the item according to a line item configuration established for the containing Flow Line Group. Note: If multiple Flow Line Groups are supported -- unless a particular Flow Line Group is indicated with a current selection within the Object Tree -- upon creation of a new Flow Line, the user is queried for the target group.

Child tree items for each Flow Line instance appears under the containing Flow Line Group's tree item within the object tree. The Flow Line tree item redunantly display's the Flow Line's label text which is also the first item in the Flow Line's properties. The label must be unique within the group and will typically be the name of the simulation object (typically a Reach) represented by the Flow Line. The Settings Property Editor shows the following Flow Line settings when a Flow Line item is selected in the object tree:

 
rwSetting ID Label Type Notes
FLOWLINE_LABEL_TEXT Label string generally the name of a simulation object, typically a reach.
FLOWLINE_DATA_SLOT Value Slot slot  
FLOWLINE_END1_SNAP End 1 Snapped To flow line snap spec None or Tea Cup name or Flow Line name with (-1) or (-2).
FLOWLINE_END2_SNAP End 2 Snapped To flow line snap spec None or Tea Cup name or Flow Line name with (-1) or (-2).
FLOWLINE_END1_POSX End 1, X Position int horizontal coordinate of line end 1 on canvas
FLOWLINE_END1_POSY End 1, Y Position int vertical coordinate of line end 1 on canvas
FLOWLINE_END1_POSX End 2, X Position int horizontal coordinate of line end 2 on canvas
FLOWLINE_END1_POSY End 2, Y Position int vertical coordinate of line end 2 on canvas

As previously described, each end of a Flow Line can be snapped to any Tea Cup or to either end of another Flow Line. The current "snapped" state of each end of a flow line is encoded in a new "Flow Line Snap Spec" rwSetting type supporting the following values:

As mentioned above, since our property editor implementation (based on the rwSetting class) doesn't, and can't easily support an open-ended, variable number of items, Flow Line State (threshold) configuration properties are provided under child Stage object tree items (in the Object Tree) under Flow Line Group and Flow Line tree items. The number of Stage object tree items is dynamically based on the Flow Line Group's configured Stage Count property. Each such Stage tree item under a Flow Line (instance) supports the following properties:

 
rwSetting ID Label Type Notes
FLOWSTAGE_THRESH_TYPE Stage Threshold Type enum: Value or Slot determines which of the following thresholds are used
FLOWSTAGE_THRESH_VAL Stage Threshold Value double with units values at or above this threshold value (and below the subsquent stage's threshold) are displayed with the Flow Item Group's color and line style for this stage. This value is stored internally in standard units for the Flow Line Group's unit type.
FLOWSTAGE_THRESH_SLOT Stage Threshold Slot slot values at or above this slot's value (and below the subsquent stage's threshold) are displayed with the Flow Item Group's color and line style for this stage. This slot will typically be some sort of "guide curve", typically a periodic slot.

The threshold values above represent the "bottom" of the entity's (typically, reach's) stage value for the particular Stage. Values below the lowest threshold value are displayed with the Flow Line Group's Negligable Value Color and Line Style.

(6.3) Other RiverWare Flow Line provisions:

  1. Double clicking a Flow Line item opens the Object List and Settings Property Editor, with the Flow Line item selected so that the property editor shows that Flow Line's configuration settings.
  2. A context menu with the following operations. (Those which can reasonably be applied to multiple Flow Lines are applied to the multiple Flow Line selection):
    1. Plot...
    2. Add slot to the open SCT...
    3. Open Slot...
    4. Configure...
    5. Delete (with confirmation).

--- (end) ---