GUI's "Display Statistics" should be nicely formatted similar to HTML
The HTML reports from reportGen and inspectReport are prettied up in #18 (closed). While a bit of the formatting was done in the GUI's statistics, it would be nice to get some more.
Before #18 (closed) | After #18 (closed) | Goal |
---|---|---|
There are missing column headings: "Both", "File A", "File B" No zebra striping in this example! |
(Dark colors are my local configuration, not in the Glance code!)
Goals:
-
Group paired A/B values into a single line -
Move group_stats_by_file
from report.py to stats.py -
In sendStatsInfo
in gui_statsprovider.py, add something like:kwargs = { 'runInfo': tempInfo, 'statGroups': tempAnalysis.dictionary_form(), GROUPED_STATS_INFO_DICT_KEY: group_stats_by_file(tempAnalysis.dictionary_form()) }
-
-
Right align numbers - For the HTML reports, we're setting
class="n"
(for number). That doesn't appear to work for QTextEdit, so we'll need to usealign=right
.
- For the HTML reports, we're setting
-
Right align labels (?) - Same as right aligning numbers
-
Zebra stripe rows (?) - We're using CSS to accomplish this. This may not be possible; QTextEdit only supports CSS 2.1, so we can't use
:nth-child(even)
. We can add explicit CSS classes for striping, or just drop the color directly in with<td bgcolor="SOMETHING">
.
- We're using CSS to accomplish this. This may not be possible; QTextEdit only supports CSS 2.1, so we can't use
Documentation on HTML/CSS support in QTextEdit: https://doc.qt.io/archives/qt-4.8/richtext-html-subset.html