aboutsummaryrefslogtreecommitdiffstats
path: root/stats/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-01 17:55:44 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2021-01-01 21:10:10 +0100
commit3a65b0f37f80b5dd93b9b7ccc8ac5c0653d95e4b (patch)
tree3f952959b5b1e55521fc7a6090ee7fbed86b221c /stats/CMakeLists.txt
parent7339dc28ae709f86e847ba5a6acb3e96f4ad0882 (diff)
downloadsubsurface-3a65b0f37f80b5dd93b9b7ccc8ac5c0653d95e4b.tar.gz
statistics: implement a legend box
For some chart (e.g. pie charts or stacked bar charts), we want to display a legend. QtCharts' legend interface happens to be private and therefore is of no use. This introduces a legend box which is implemented using QGraphicItems, which can be placed on top of QCharts. It's very unfancy, but works for now. If there are too many items, not all are shown. Currently, the legend is configured to fill at most half of the width and half of the height of the chart. This might need some optimization. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/CMakeLists.txt')
-rw-r--r--stats/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/stats/CMakeLists.txt b/stats/CMakeLists.txt
index e4c110271..11b091d1b 100644
--- a/stats/CMakeLists.txt
+++ b/stats/CMakeLists.txt
@@ -5,6 +5,8 @@ include_directories(.
)
set(SUBSURFACE_STATS_SRCS
+ legend.h
+ legend.cpp
statscolors.h
statscolors.cpp
statsvariables.h