statistics: draw title of axes

Easy enough to implement, but one weirdness:
To get the height of the rotated text, one has to access the
width() member of the boundingRect. I'm not sure if that makes
sense, but so be it.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-05 13:04:53 +01:00 committed by Dirk Hohndel
parent 4ab9f1c6b0
commit 8dfa3f6db3
3 changed files with 55 additions and 29 deletions

View file

@ -186,8 +186,7 @@ void StatsView::updateTitlePos()
template <typename T, class... Args>
T *StatsView::createAxis(const QString &title, Args&&... args)
{
// TODO: set title
T *res = new T(chart, std::forward<Args>(args)...);
T *res = new T(chart, title, std::forward<Args>(args)...);
axes.emplace_back(res);
return res;
}