Mon, 11 Apr 2022 20:45:22 +0200
Blocked hop table edit. Implemented add and delete hop rows. Started the ui of the water tab.
#ifndef _UTILS_H #define _UTILS_H #include <QString> #include <QColor> /** * @namespace Utils * * @brief Global math functions. */ namespace Utils { double lintner_to_kolbach(double lintner); double kolbach_to_lintner(double kolbach); double ebc_to_srm(double ebc); double srm_to_ebc(double srm); double get_kt(int ebc); double plato_to_sg(double plato); double sg_to_plato(double sg); double brix_to_sg(double brix); double sg_to_brix(double sg); double brix_to_fg(double o_plato, double refracto); double calc_svg(double og, double fg); double estimate_sg(double sugars, double batch_size); double estimate_fg(double psugar, double pcara, double wgratio, double mashtime, double mashtemp, double svg, double og); double kw_to_srm(int colormethod, double c); double kw_to_ebc(int colormethod, double c); double abvol(double og, double fg); double toIBU(int Use, int Form, double SG, double Volume, double Amount, double Boiltime, double Alpha, int Method, double Whirlpool9, double Whirlpool7, double Whirlpool6); double hopFlavourContribution(double bt, double vol, int use, double amount); double hopAromaContribution(double bt, double vol, int use, double amount); QString hours_to_string(int hours); /** * @brief Map SRM color to RGB and return as QColor. * @param srm The srm value. * @return QColor */ QColor srm_to_color(int srm); /** * @brief Map EBC color to RGB and return as QColor. * @param ebc The ebc value. * @return QColor */ QColor ebc_to_color(int ebc); /** * @brief Map SRM color to a QString for stylesheets. * @param srm The srm value. * @return A QString with stylesheet colors. */ QString srm_to_style(int ebc); /** * @brief Map EBC color to a QString for stylesheets. * @param ebc The ebc value. * @return A QString with stylesheet colors. */ QString ebc_to_style(int srm); // double my_brix_correction = 1.04; } #endif