RiverWare 5.3: Run Analysis Dialog: Pre-Simulation Timestep
Ornamentation / Sept 2010
See the blue dotted line ornament in the screenshots below. (In this example,
the Run Start time is March 14, 1957).
Horizontal
Timestep Axis Simulation Grid |
Horizontal
Timestep Axis Rules Grid |
Vertical
Timestep Axis Simulation Grid |
Vertical
Timestep Axis Rules Grid |
Technical Notes |
Short Description: Run Analysis Dlg: Show ornament on Pre-Simulation Timesteps Bug Number: n/a (but ancillary to Gnats 1852, a really old bug report). Release notes (y/n): Yes -- New Feature For Release Nums: 5.3 Run Analysis Dialog: Added "Color Bar" (dotted-line) ornamentation to Pre-Simulation Timestep headers. This is supported in both SimObj/Time axis orientations. SEE: http://cadswes2.colorado.edu/~philw/2010/RunAnalysisDlg/PreSimOrnament/ This was an ancillary aspect of Gnats 1852 ("Dispatch Info dialog should show pre-sim timesteps of reaches"). Full pre-simulation timestep display had previously been implemented, but there was no visible indication of which columns or rows were showing those timesteps. Several alternatives were considered, including a divider line between the Pre-Simulation and Simulation timesteps. That would not have been helpful unless both types of timesteps were within the scrolled view. We also considered certain text annotations on the row or column headers, but it was difficult to keep it simple, yet unambiguous. The implemented line is dotted, rather than solid, so that it is clear that it is an actual ornamentation, rather than just being a (meaningless) heavy table border -- which is what a solid line looked like if the scrolled view contained only Pre-Simulation timesteps. ------------------------ QtUtils/RwHeaderView.hpp QtUtils/RwHeaderView.cpp ------------------------ Added a "Color Bar" dotted-line ornament capability to this general-purpose Qt4 QHeaderView sublcass (which also supports a cross-hatch overlay). First use: QtRun/RunAnalGridQTableModel (see below). The client module can specify, through virtual method implementations: (1) Whether or not this ornament is shown, independently for the horizontal and vertical headers, and (2) What COLOR to use for the dotted line, independently for each row and column. (Qt::transparent can be returned for no color bar on any particular row or column). The style and thickness of the dotted line (e.g. density of the dots) is currently hard coded, but could be parameterized, e.g. to draw a solid line. The thickness is currently defined with this symbol: static const int COLOR_BAR_THICKNESS (3); New virtual method in class RwHeaderViewClient (optionally to be implemented by the client module): virtual bool RwHeaderView_supportsColorBarOrn ( Qt::Orientation) const { return (false); } virtual QColor RwHeaderView_colorBarOrnColor ( Qt::Orientation, int logicalIndex) const { return (Qt::black); } New private RwHeader support methods: bool supportsColorBarOrn (Qt::Orientation) const; QColor colorBarOrnColor (Qt::Orientation, int logicalIndex) const; See implementation in method: void RwHeaderView::paintTopOrnamentation (QPainter* painter, const QRect& rect, int logicalIndex) const -------------------------------- QtRun/RunAnalGridQTableModel.hpp QtRun/RunAnalGridQTableModel.cpp -------------------------------- RwHeaderViewClient implementation support for the Color Bar (dotted line) RwHeaderView ornament on individual row or column headers: // virtual from RwHeaderViewClient bool RwHeaderView_supportsColorBarOrn (Qt::Orientation) const; QColor RwHeaderView_colorBarOrnColor (Qt::Orientation, int logIndex) const; Color Bar (dotted line) color symbol: static const QColor PRESIM_BAR_COLOR (Qt::blue); Change in method: QVariant RunAnalGridQTableModel::headerData (...) ... Add a space character to the time-dimension header text to make room ... for the color bar -- in different places for the two dimensions. ------------------------ QtRun/QtRunAnalUtils.hpp QtRun/QtRunAnalUtils.cpp ------------------------ Added utility function: bool isPresimTimestep (seconds_t); ---