| 46 | } |
| 47 | |
| 48 | [[nodiscard]] QColor colorFromIndex(int index) { |
| 49 | static const std::array<QColor, 8> k_colors = { |
| 50 | QColor("#1f77b4"), QColor("#d62728"), QColor("#1ac938"), QColor("#ff7f0e"), |
| 51 | QColor("#f14cc1"), QColor("#9467bd"), QColor("#17becf"), QColor("#bcbd22"), |
| 52 | }; |
| 53 | return k_colors[static_cast<std::size_t>(index) % k_colors.size()]; |
| 54 | } |
| 55 | |
| 56 | // Session-wide override for the OpenGL canvas choice, set by |
| 57 | // PlotWidgetBase::setOpenGlDisabledOverride (the --disable-opengl CLI flag). |
no test coverage detected