subsurface/stats/informationbox.h
Berthold Stoeger d060a3a3cb profile: rename stats/chartitem.* to stats/statsitem.*
Android uses qmake and apparently that doesn't support source files
with the same name. We already have chart/chartitem.*.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-09-12 15:17:15 +02:00

27 lines
679 B
C++

// SPDX-License-Identifier: GPL-2.0
// A small box displaying statistics information, notably
// for a scatter-plot item or a bar in a bar chart.
#ifndef INFORMATION_BOX_H
#define INFORMATION_BOX_H
#include "statsitem.h"
#include <vector>
#include <memory>
struct dive;
class ChartView;
class StatsTheme;
// Information window showing data of highlighted dive
struct InformationBox : ChartRectItem {
InformationBox(ChartView &, const StatsTheme &theme);
void setText(const std::vector<QString> &text, QPointF pos);
void setPos(QPointF pos);
int recommendedMaxLines() const;
private:
const StatsTheme &theme; // Set once in constructor.
double width, height;
};
#endif