2023-05-24 12:38:22 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Statistic {
|
|
|
|
|
2023-10-02 23:07:05 +00:00
|
|
|
struct ChartRulersData final {
|
2023-05-24 12:38:22 +00:00
|
|
|
public:
|
2023-10-02 23:07:05 +00:00
|
|
|
ChartRulersData(
|
2023-05-24 12:38:22 +00:00
|
|
|
int newMaxHeight,
|
|
|
|
int newMinHeight,
|
2023-09-11 15:10:30 +00:00
|
|
|
bool useMinHeight,
|
2024-03-26 02:49:31 +00:00
|
|
|
float64 rightRatio,
|
2024-03-28 03:40:16 +00:00
|
|
|
Fn<QString(float64)> leftCustomCaption = nullptr,
|
|
|
|
Fn<QString(float64)> rightCustomCaption = nullptr);
|
2023-05-24 12:38:22 +00:00
|
|
|
|
2023-06-09 14:16:58 +00:00
|
|
|
void computeRelative(
|
|
|
|
int newMaxHeight,
|
|
|
|
int newMinHeight);
|
|
|
|
|
2023-05-24 12:38:22 +00:00
|
|
|
[[nodiscard]] static int LookupHeight(int maxValue);
|
|
|
|
|
|
|
|
struct Line final {
|
|
|
|
float64 absoluteValue = 0.;
|
|
|
|
float64 relativeValue = 0.;
|
|
|
|
QString caption;
|
2023-09-11 15:10:30 +00:00
|
|
|
QString scaledLineCaption;
|
|
|
|
float64 rightCaptionWidth = 0.;
|
2023-05-24 12:38:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<Line> lines;
|
|
|
|
float64 alpha = 0.;
|
|
|
|
float64 fixedAlpha = 1.;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Statistic
|