2021-01-01 21:03:26 +00:00
|
|
|
// 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
|
|
|
|
|
2021-01-13 14:17:54 +00:00
|
|
|
#include "chartitem.h"
|
2021-01-03 11:49:26 +00:00
|
|
|
|
2021-01-01 21:03:26 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
struct dive;
|
2021-01-13 14:17:54 +00:00
|
|
|
class StatsView;
|
2021-01-01 21:03:26 +00:00
|
|
|
|
|
|
|
// Information window showing data of highlighted dive
|
2021-01-13 14:17:54 +00:00
|
|
|
struct InformationBox : ChartRectItem {
|
|
|
|
InformationBox(StatsView &);
|
2021-01-01 21:03:26 +00:00
|
|
|
void setText(const std::vector<QString> &text, QPointF pos);
|
|
|
|
void setPos(QPointF pos);
|
|
|
|
int recommendedMaxLines() const;
|
|
|
|
private:
|
2021-02-16 16:05:39 +00:00
|
|
|
const StatsTheme &theme; // Set once in constructor.
|
2021-01-01 21:03:26 +00:00
|
|
|
double width, height;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|