2021-01-01 00:37:56 +00:00
|
|
|
# the stats-graph widget
|
|
|
|
include_directories(.
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(SUBSURFACE_STATS_SRCS
|
2021-01-01 21:18:51 +00:00
|
|
|
barseries.h
|
|
|
|
barseries.cpp
|
2021-01-01 21:23:29 +00:00
|
|
|
boxseries.h
|
|
|
|
boxseries.cpp
|
2021-01-02 21:16:11 +00:00
|
|
|
chartlistmodel.h
|
|
|
|
chartlistmodel.cpp
|
2021-01-01 21:03:26 +00:00
|
|
|
informationbox.h
|
|
|
|
informationbox.cpp
|
2021-01-01 16:55:44 +00:00
|
|
|
legend.h
|
|
|
|
legend.cpp
|
2021-01-01 21:26:52 +00:00
|
|
|
pieseries.h
|
|
|
|
pieseries.cpp
|
2021-01-01 21:30:30 +00:00
|
|
|
scatterseries.h
|
|
|
|
scatterseries.cpp
|
statistics: implement axes
Implement five kinds of axes:
- ValueAxis: a standard axis for plotting numerical linear data.
- CountAxis: a ValueAxis for plotting counts of dives.
- CategoryAxis: an axis for plotting discrete variables without
any notion of distance.
- HistogramAxis: an axis for plotting bins with a numeric value.
- DateAxis: a HistogramAxis that formats dates.
The axes derive from a common virtual base class that defines
a small interface, notably, returning the minimum and maximum
displayed value and redrawing the axis.
The mapping and painting is performed by QtCharts' axes. On
the one hand, using QtCharts turned out to be too inflexible.
On the other hand it allowed us to quickly prototype the charts.
Ultimately, we should do our own drawing of the axis.
As a testament to the inflexibility, QtCharts' axes do not
allow for repeated labels is needed for quarter-based date
charts (year, Q2, Q3, Q4, year, Q2, Q3, ...). Therefore the
code disambiguates labels by adding unicode zero-width spaces.
Wonderful.
When omitting labels due to space reasons, the histogram
axis attempts to show "preferred" labels. In the quarter
example above, it tries to show full years.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-01 20:35:56 +00:00
|
|
|
statsaxis.h
|
|
|
|
statsaxis.cpp
|
2021-01-01 13:55:23 +00:00
|
|
|
statscolors.h
|
|
|
|
statscolors.cpp
|
2021-01-01 20:54:35 +00:00
|
|
|
statsseries.h
|
|
|
|
statsseries.cpp
|
2021-01-01 21:37:55 +00:00
|
|
|
statsstate.h
|
|
|
|
statsstate.cpp
|
2021-01-02 21:16:11 +00:00
|
|
|
statstranslations.h
|
2021-01-01 00:37:56 +00:00
|
|
|
statsvariables.h
|
|
|
|
statsvariables.cpp
|
2021-01-01 21:43:21 +00:00
|
|
|
statsview.h
|
|
|
|
statsview.cpp
|
2021-01-02 09:25:04 +00:00
|
|
|
zvalues.h
|
2021-01-01 00:37:56 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group("Subsurface statistics sourcecode" FILES ${SUBSURFACE_STATS_SRCS})
|
|
|
|
|
|
|
|
add_library(subsurface_stats STATIC ${SUBSURFACE_STATS_SRCS})
|
|
|
|
target_link_libraries(subsurface_stats ${QT_LIBRARIES})
|