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>
|
|
|
|
#include <QFont>
|
|
|
|
|
|
|
|
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:
|
|
|
|
QFont font; // For future specialization.
|
|
|
|
double width, height;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|