src/global.cpp

Mon, 18 Jul 2022 17:04:02 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Mon, 18 Jul 2022 17:04:02 +0200
changeset 359
dfbb012c631c
parent 355
f3318d9d6668
child 373
b02aca4e926c
permissions
-rw-r--r--

Redesign of the water tabs in product and recipe editors. Prepare for sparge water salt additions. Acid additions are now automatic or manual for mash and sparge. Fixed error in acid calculation strength. Fixed phophoric SG value.



#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_factor_pellet = 10;
int my_factor_plug = 2;
int my_factor_wethop = -82;
int my_factor_cryohop = 100;
int my_ibu_method = 0;
int my_color_method = 0;
double my_brix_correction = 1.04;
double my_grain_absorbtion = 1.01;
int my_default_water = -1;
QString my_yeastlab = "";
int my_height = 0;

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_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", "Emersion chiller"),
    QT_TRANSLATE_NOOP("ChillerType", "Counterflow chiller"),
    QT_TRANSLATE_NOOP("ChillerType", "Au bain marie"),
    QT_TRANSLATE_NOOP("ChillerType", "Natural")
};

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[6] = {
    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", "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