mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
785d5189f6
A small step in converting from QGraphicsScene to QQuickItem. This is the second item to be converted (after the legend) and for now items are drawn in order of creation, which means that the infobox is on top of the legend. This will have to be made deterministic in follow-up commits. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
27 lines
642 B
C++
27 lines
642 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 "chartitem.h"
|
|
|
|
#include <vector>
|
|
#include <memory>
|
|
#include <QFont>
|
|
|
|
struct dive;
|
|
class StatsView;
|
|
|
|
// Information window showing data of highlighted dive
|
|
struct InformationBox : ChartRectItem {
|
|
InformationBox(StatsView &);
|
|
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
|