Date/Time Spinner Redesign / April 2014 / RiverWare 6.5
Phil Weinstein, David Neumann, Edie Zagona, CADSWES, 5-02-2014

The RiverWare Date/Time Spinner was redesign for RiverWare 6.5 with these provisions:

These features required rearchitecting the RiverWare "DateTimeQtSpinner" class. The old implementation had been a basic specialization of Qt4 QSpinBox. This class supported only vertical arrangement of the two step buttons showing up and down triangle-arrows or "+" and "-" signs. The DateTimeQtSpinner redesign incorporates sub-widgets for the spin box and the three icon buttons. Here are the class diagrams for the two designs:

Step Button Details

Clicking the step buttons decreases or increases the date/time by one timestep. These buttons auto-repeat when holding down the mouse; this behavior is explicitly implementing using a QTimer. Auto-repeat timing is based on these two constants (in DateTimeQtSpinner.cpp):

// Step button repeating (when held down).
static const int REPEAT_DELAY_MSECS  (600); // milliseconds
static const int REPEAT_PERIOD_MSECS (150); // milliseconds

The triangle-arrows on the step buttons implemented with dynamic drawing -- rather than being fixed-size "pixmaps" (raster-based images). These scale well with different button sizes (based on the size of the current font).

"Used For Navigation" Property

The DateTimeQtSpinner class' "Used For Navigation" property is set on instances which are used to provide a reference timestep for some sort of dynamic series display -- either numeric (as with the Open Series Slot Dialog) or graphical (as with Plot Page and the Pie Chart output devices). DateTimeQtSpinners having this property participate in "Global Time Scroll" operations: when a global time scroll is triggered, all "Used For Navigation" date/time spinners are set to the "global scrolled" timestep.

"Navigation" date/time spinners are currently used in these RiverWare dialogs:

  1. Open Object
  2. Open Series Slot
  3. Open Account
  4. Edie Account
  5. Object Account Summary
  6. Exchange Balance
  7. Run Analysis
  8. Run Analysis Dispatch Detail
  9. SCT
  10. Mass Balance Summary (Slot)
  11. Plot Dialog
  12. Pie Chart Dialog

      
 

Two comparisons of dialog boxes with the new and old date/time spinners are presented here.

The Open Series Slot dialog's spinner has the "Used For Navigation" property set (so it shows the globe-icon menu button).

The Run Control dialog's date/time spinners do not have the "Used for Navigation" property set (so it doesn't show that menu button -- the only difference is the appearance of the step buttons).

New Date/Time Spin Slider Widget

      

As part of the recent Pie Chart Enhancements work supporting timestep animation, a new widget was developed which can be "plugged in" to any date/time spinner widget.

The DateTimeSpinSlider is a new composite slider control (with two icon buttons) which can be "attached" to any RiverWare date/time spinner.  The slider thumb provides an alternative way of changing the timestep value, and also graphically conveys the timestep value with respect to the full time series range.

This widget is also an "animation generator" which periodically advances the date/time spinner. Included is a Play/Pause button and a popup slider control to select the animation speed. The placement of the DateTimeSpinSlider within a widget layout is up to the client (dialog box) -- so it could be next to the date/time spinner instead of below it (as it is in the Pie Chart dialog).

This document presents more information about the new DateTimeSpinSlider widget:

--- (end) ---