src/global.cpp

Sat, 08 Jun 2024 15:54:30 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 08 Jun 2024 15:54:30 +0200
changeset 527
84091b9cb800
parent 464
1fed3ff9a64e
permissions
-rw-r--r--

Version 0.4.6a1. Added HLT equipment volume and deadspace settings. In EditProduct the target water selection is now sticky. Changed the water treatment tab. Added a row wich displays the salt adjustments. This can be selected between actual and target values. The treated water show can select between mash or sparge water. The total line will become the final water in the boil kettle. Database update function is expanded with the new settings. Added a popup message warning that the database is upgraded and user action is required for the equipment profiles.



#include "global.h"

QWebSocket	*webSocket;
QList<Acid>	my_acids;

QString my_brewery_name = "No-name";
QByteArray my_logoByteArray = 0;
int my_factor_mashhop = -30;
int my_factor_fwh = 10;
int my_ibu_method = 0;
int my_color_method = 0;
double my_brix_correction = 1.04;
double my_grain_absorption = 1.01;
int my_default_water = -1;
QString my_yeastlab = "";
int my_height = 0;
double my_ut_pellet = 22.0;
double my_ut_plug = 20.4;
double my_ut_leaf = 20.0;
double my_ut_wethop = 3.6;
double my_ut_t45 = 50.0;
double my_ut_co2extract = 35.0;
double my_ha_pellet = 2.67;
double my_ha_plug = 2.67;
double my_ha_leaf = 6.01;
double my_ha_wethop = 1.21;
double my_ha_t45 = 2.67;


Recipe *recipe;
Product *product;

const char * const g_prod_stages[12] = {
    QT_TRANSLATE_NOOP("ProdStages", "Plan"),
    QT_TRANSLATE_NOOP("ProdStages", "Wait"),
    QT_TRANSLATE_NOOP("ProdStages", "Brew"),
    QT_TRANSLATE_NOOP("ProdStages", "Primary"),
    QT_TRANSLATE_NOOP("ProdStages", "Secondary"),
    QT_TRANSLATE_NOOP("ProdStages", "Tertiary"),
    QT_TRANSLATE_NOOP("ProdStages", "Package"),
    QT_TRANSLATE_NOOP("ProdStages", "Carbonation"),
    QT_TRANSLATE_NOOP("ProdStages", "Mature"),
    QT_TRANSLATE_NOOP("ProdStages", "Taste"),
    QT_TRANSLATE_NOOP("ProdStages", "Ready"),
    QT_TRANSLATE_NOOP("ProdStages", "Closed")
};

const char * const g_prod_split[7] = {
    QT_TRANSLATE_NOOP("Splitter", "Not divided"),
    QT_TRANSLATE_NOOP("Splitter", "After mash"),
    QT_TRANSLATE_NOOP("Splitter", "After boil"),
    QT_TRANSLATE_NOOP("Splitter", "After cooling"),
    QT_TRANSLATE_NOOP("Splitter", "After primary"),
    QT_TRANSLATE_NOOP("Splitter", "After secondary"),
    QT_TRANSLATE_NOOP("Splitter", "After tertiary")
};

const char * const g_prod_pic_types[7] = {
    QT_TRANSLATE_NOOP("PicType", "Generic"),
    QT_TRANSLATE_NOOP("PicType", "Label Vichy"),
    QT_TRANSLATE_NOOP("PicType", "Label Steinie"),
    QT_TRANSLATE_NOOP("PicType", "Label 75cl"),
    QT_TRANSLATE_NOOP("PicType", "Label Magnum"),
    QT_TRANSLATE_NOOP("PicType", "Label Cap"),
    QT_TRANSLATE_NOOP("PicType", "Label Box")
};

const char * const g_recipe_types[3] = {
    QT_TRANSLATE_NOOP("RecipeType", "Extract"),
    QT_TRANSLATE_NOOP("RecipeType", "Partial Mash"),
    QT_TRANSLATE_NOOP("RecipeType", "All Grain")
};

const char * const g_style_types[6] = {
    QT_TRANSLATE_NOOP("BeerType", "Lager"),
    QT_TRANSLATE_NOOP("BeerType", "Ale"),
    QT_TRANSLATE_NOOP("BeerType", "Mead"),
    QT_TRANSLATE_NOOP("BeerType", "Wheat"),
    QT_TRANSLATE_NOOP("BeerType", "Mixed"),
    QT_TRANSLATE_NOOP("BeerType", "Cider")
};

const char * g_ibu_method[3] = {
    "Tinseth",
    "Tinseth++",
    "N/A"
};

const char * const g_chiller_types[5] = {
    QT_TRANSLATE_NOOP("ChillerType", "-"),
    QT_TRANSLATE_NOOP("ChillerType", "Immersion"),
    QT_TRANSLATE_NOOP("ChillerType", "Counterflow"),
    QT_TRANSLATE_NOOP("ChillerType", "Au bain marie"),
    QT_TRANSLATE_NOOP("ChillerType", "No-chill")
};

const char * const g_fermentable_types[5] = {
    QT_TRANSLATE_NOOP("FermentableType", "Grain"),
    QT_TRANSLATE_NOOP("FermentableType", "Sugar"),
    QT_TRANSLATE_NOOP("FermentableType", "Extract"),
    QT_TRANSLATE_NOOP("FermentableType", "Dry extract"),
    QT_TRANSLATE_NOOP("FermentableType", "Adjunct")
};

const char * const g_fermentable_graintypes[7] = {
    QT_TRANSLATE_NOOP("FermentableGraintype", "Base"),
    QT_TRANSLATE_NOOP("FermentableGraintype", "Roast"),
    QT_TRANSLATE_NOOP("FermentableGraintype", "Crystal"),
    QT_TRANSLATE_NOOP("FermentableGraintype", "Kilned"),
    QT_TRANSLATE_NOOP("FermentableGraintype", "Sour Malt"),
    QT_TRANSLATE_NOOP("FermentableGraintype", "Special"),
    QT_TRANSLATE_NOOP("FermentableGraintype", "No malt")
};

const char * const g_fermentable_added[6] = {
    QT_TRANSLATE_NOOP("FermentableAdded", "Mash"),
    QT_TRANSLATE_NOOP("FermentableAdded", "Boil"),
    QT_TRANSLATE_NOOP("FermentableAdded", "Fermentation"),
    QT_TRANSLATE_NOOP("FermentableAdded", "Lagering"),
    QT_TRANSLATE_NOOP("FermentableAdded", "Bottle"),
    QT_TRANSLATE_NOOP("FermentableAdded", "Kegs")
};

const char * const g_hop_types[3] = {
    QT_TRANSLATE_NOOP("HopTypes", "Bittering"),
    QT_TRANSLATE_NOOP("HopTypes", "Aroma"),
    QT_TRANSLATE_NOOP("HopTypes", "Both")
};

const char * const g_hop_forms[7] = {
    QT_TRANSLATE_NOOP("HopForm", "Pellet"),
    QT_TRANSLATE_NOOP("HopForm", "Plug"),
    QT_TRANSLATE_NOOP("HopForm", "Leaf"),
    QT_TRANSLATE_NOOP("HopForm", "Leaf wet"),
    QT_TRANSLATE_NOOP("HopForm", "Cryo"),
    QT_TRANSLATE_NOOP("HopForm", "CO2 extract"),
    QT_TRANSLATE_NOOP("HopForm", "Iso extract")
};

const char * const g_hop_useat[7] = {
    QT_TRANSLATE_NOOP("HopUse", "Mash"),
    QT_TRANSLATE_NOOP("HopUse", "First wort"),
    QT_TRANSLATE_NOOP("HopUse", "Boil"),
    QT_TRANSLATE_NOOP("HopUse", "Aroma"),
    QT_TRANSLATE_NOOP("HopUse", "Whirlpool"),
    QT_TRANSLATE_NOOP("HopUse", "Dry hop"),
    QT_TRANSLATE_NOOP("HopUse", "Bottling")
};

const char * const g_misc_types[7] = {
    QT_TRANSLATE_NOOP("MiscType", "Spice"),
    QT_TRANSLATE_NOOP("MiscType", "Herb"),
    QT_TRANSLATE_NOOP("MiscType", "Flavor"),
    QT_TRANSLATE_NOOP("MiscType", "Fining"),
    QT_TRANSLATE_NOOP("MiscType", "Water agent"),
    QT_TRANSLATE_NOOP("MiscType", "Yeast nutrient"),
    QT_TRANSLATE_NOOP("MiscType", "Other")
};

const char * const g_misc_uses[7] = {
    QT_TRANSLATE_NOOP("MiscUse", "Starter"),
    QT_TRANSLATE_NOOP("MiscUse", "Mash"),
    QT_TRANSLATE_NOOP("MiscUse", "Boil"),
    QT_TRANSLATE_NOOP("MiscUse", "Primary"),
    QT_TRANSLATE_NOOP("MiscUse", "Secondary"),
    QT_TRANSLATE_NOOP("MiscUse", "Bottling"),
    QT_TRANSLATE_NOOP("MiscUse", "Sparge")
};

const char * const g_yeast_types[8] = {
    QT_TRANSLATE_NOOP("YeastType", "Lager"),
    QT_TRANSLATE_NOOP("YeastType", "Ale"),
    QT_TRANSLATE_NOOP("YeastType", "Wheat"),
    QT_TRANSLATE_NOOP("YeastType", "Wine"),
    QT_TRANSLATE_NOOP("YeastType", "Champagne"),
    QT_TRANSLATE_NOOP("YeastType", "Brett"),
    QT_TRANSLATE_NOOP("YeastType", "Kveik"),
    QT_TRANSLATE_NOOP("YeastType", "Hybrid")
};

const char * const g_yeast_forms[7] = {
    QT_TRANSLATE_NOOP("YeastForm", "Liquid"),
    QT_TRANSLATE_NOOP("YeastForm", "Dry"),
    QT_TRANSLATE_NOOP("YeastForm", "Slant"),
    QT_TRANSLATE_NOOP("YeastForm", "Culture"),
    QT_TRANSLATE_NOOP("YeastForm", "Frozen"),
    QT_TRANSLATE_NOOP("YeastForm", "Bottle"),
    QT_TRANSLATE_NOOP("YeastForm", "Dried")
};

const char * const g_yeast_use[4] = {
    QT_TRANSLATE_NOOP("YeastUse", "Primary"),
    QT_TRANSLATE_NOOP("YeastUse", "Secondary"),
    QT_TRANSLATE_NOOP("YeastUse", "Tertiary"),
    QT_TRANSLATE_NOOP("YeastUse", "Bottle")
};

const char * const g_yeast_starter[3] = {
    QT_TRANSLATE_NOOP("YeastStarter", "Stirred"),
    QT_TRANSLATE_NOOP("YeastStarter", "Shaken"),
    QT_TRANSLATE_NOOP("YeastStarter", "Simple")
};

const char * const g_step_types[3] = {
    QT_TRANSLATE_NOOP("StepType", "Infusion"),
    QT_TRANSLATE_NOOP("StepType", "Temperature"),
    QT_TRANSLATE_NOOP("StepType", "Decoction")
};

const char * const g_tun_materials[4] = {
    QT_TRANSLATE_NOOP("TunMaterial", "Stainless Steel"),
    QT_TRANSLATE_NOOP("TunMaterial", "Aluminium"),
    QT_TRANSLATE_NOOP("TunMaterial", "Plastics"),
    QT_TRANSLATE_NOOP("TunMaterial", "Copper")
};

mercurial