Add bold max score per model in b_list results

This commit is contained in:
2024-03-11 17:02:58 +01:00
parent 52d689666a
commit 72cda3784a
5 changed files with 72 additions and 24 deletions

View File

@@ -64,6 +64,27 @@ namespace platform {
}
return efectiveStyle;
}
void ExcelFile::boldFontColor(const uint32_t color)
{
createFormats();
for (const std::string& style : { "text", "ints", "result" }) {
for (const std::string& suffix : { "_odd", "_even" }) {
format_set_font_color(styles[style + "_bold" + suffix], lxw_color_t(color));
}
}
}
void ExcelFile::boldGreen()
{
boldFontColor(0x00FF00);
}
void ExcelFile::boldRed()
{
boldFontColor(0xFF0000);
}
void ExcelFile::boldBlue()
{
boldFontColor(0x0000FF);
}
void ExcelFile::writeString(int row, int col, const std::string& text, const std::string& style)
{
worksheet_write_string(worksheet, row, col, text.c_str(), efectiveStyle(style));

View File

@@ -26,6 +26,10 @@ namespace platform {
void writeInt(int row, int col, const int number, const std::string& style = "");
void writeDouble(int row, int col, const double number, const std::string& style = "");
void createFormats();
void boldFontColor(const uint32_t color); // the same color for bold styles
void boldRed(); //set red color for the bold styles
void boldBlue(); //set blue color for the bold styles
void boldGreen(); //set green color for the bold styles
void createStyle(const std::string& name, lxw_format* style, bool odd);
void addColor(lxw_format* style, bool odd);
lxw_format* efectiveStyle(const std::string& name);