2021-01-01 13:55:23 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
// Color constants for the various series
|
|
|
|
#ifndef STATSCOLORS_H
|
|
|
|
#define STATSCOLORS_H
|
|
|
|
|
|
|
|
#include <QColor>
|
|
|
|
|
statistics: convert chart to QQuickItem
It turns out that the wrong base class was used for the chart.
QQuickWidget can only be used on desktop, not in a mobile UI.
Therefore, turn this into a QQuickItem and move the container
QQuickWidget into desktop-only code.
Currently, this code is insane: The chart is rendered onto a
QGraphicsScene (as it was before), which is then rendered into
a QImage, which is transformed into a QSGTexture, which is then
projected onto the device. This is performed on every mouse
move event, since these events in general change the position
of the info-box.
The plan is to slowly convert elements such as the info-box into
QQuickItems. Browsing the QtQuick documentation, this will
not be much fun.
Also note that the rendering currently tears, flickers and has
antialiasing artifacts, most likely owing to integer (QImage)
to floating point (QGraphicsScene, QQuickItem) conversion
problems. The data flow is
QGraphicsScene (float) -> QImage (int) -> QQuickItem (float).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-07 13:38:37 +00:00
|
|
|
inline const QColor backgroundColor(Qt::white);
|
2021-01-01 13:55:23 +00:00
|
|
|
inline const QColor fillColor(0x44, 0x76, 0xaa);
|
|
|
|
inline const QColor borderColor(0x66, 0xb2, 0xff);
|
2021-01-31 19:48:12 +00:00
|
|
|
inline const QColor selectedColor(0xaa, 0x76, 0x44);
|
|
|
|
inline const QColor selectedBorderColor(0xff, 0xb2, 0x66);
|
2021-01-01 13:55:23 +00:00
|
|
|
inline const QColor highlightedColor(Qt::yellow);
|
|
|
|
inline const QColor highlightedBorderColor(0xaa, 0xaa, 0x22);
|
|
|
|
inline const QColor darkLabelColor(Qt::black);
|
|
|
|
inline const QColor lightLabelColor(Qt::white);
|
2021-01-05 11:11:46 +00:00
|
|
|
inline const QColor axisColor(Qt::black);
|
2021-01-05 12:51:39 +00:00
|
|
|
inline const QColor gridColor(0xcc, 0xcc, 0xcc);
|
2021-01-19 11:59:56 +00:00
|
|
|
inline const QColor informationBorderColor(Qt::black);
|
|
|
|
inline const QColor informationColor(0xff, 0xff, 0x00, 192); // Note: fourth argument is opacity
|
|
|
|
inline const QColor legendColor(0x00, 0x8e, 0xcc, 192); // Note: fourth argument is opacity
|
|
|
|
inline const QColor legendBorderColor(Qt::black);
|
|
|
|
inline const QColor quartileMarkerColor(Qt::red);
|
|
|
|
inline const QColor regressionItemColor(Qt::red);
|
|
|
|
inline const QColor meanMarkerColor(Qt::green);
|
|
|
|
inline const QColor medianMarkerColor(Qt::red);
|
2021-02-01 22:17:04 +00:00
|
|
|
inline const QColor selectionLassoColor(Qt::black);
|
2021-02-07 13:33:48 +00:00
|
|
|
inline const QColor selectionOverlayColor(Qt::lightGray);
|
2021-01-01 13:55:23 +00:00
|
|
|
|
|
|
|
QColor binColor(int bin, int numBins);
|
|
|
|
QColor labelColor(int bin, size_t numBins);
|
|
|
|
|
|
|
|
#endif
|