src/ProdOnTree.h

Fri, 29 Jul 2022 13:12:26 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 29 Jul 2022 13:12:26 +0200
changeset 373
b02aca4e926c
parent 232
6d3ba9c44f95
permissions
-rw-r--r--

First load of changes for hops. In EditHop load the dropdown buttons from the global table. Use named query fields. Added database utilisation and bu_factor fields for hop extracts. Added edit fields for these new fields. Added post boil SG, utilisation and bu_factor parameters to the toIBU function. Added hops form parameter to the hopFlavourContribution and hopAromaContribution display bars. In the hops inventory list dispay volumes instead of weight for hop extracts. Modified the TinsethIBU function to use utilisation and bu_factor parameters. Add calculations for co2 and iso hop extracts, this is work in progress. The toIBU function makes use of the preSG and postSG values to use the correct SG to caall the TinsethIBU function. This results in a bit lower IBU values mostly affecting the late additions. Added use hop at bottling for iso hop extracts like Tetra hops using the formula from BarthHaas.

#ifndef _PRODONTREE_H
#define _PRODONTREE_H

#include <QDialog>
#include <QtWidgets/QGridLayout>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QListView>
#include <QtWidgets/QTreeWidget>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPlainTextEdit>
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QSpinBox>

namespace Ui {
class ProdOnTree;
}

class ProdOnTree : public QDialog
{
    Q_OBJECT

public:
    explicit ProdOnTree(QWidget *parent = nullptr);
    ~ProdOnTree();

signals:
    void setStatus(QString);

private slots:
    void on_openButton_clicked();
    void on_item_clicked(QTreeWidgetItem *, int);
    void on_item_doubleclicked(QTreeWidgetItem *, int);
    void refreshTable(void);

private:
    QGridLayout *gridLayout;
    QTreeWidget *treeWidget;
    QGroupBox *groupBox, *recipeBox;
    QHBoxLayout *horizontalLayout;
    QPushButton *quitButton, *openButton;
    QLabel *volumeLabel, *efficiencyLabel, *boilvolumeLabel;
    QLabel *boiltimeLabel, *ogLabel, *fgLabel;
    QLabel *abvLabel, *co2Label, *colorLabel;
    QLabel *colormethodLabel, *ibuLabel, *ibumethodLabel;
    QLabel *remarksLabel;
    QDoubleSpinBox *volumeEdit, *boilvolumeEdit;
    QDoubleSpinBox *efficiencyEdit, *ogEdit, *fgEdit;
    QDoubleSpinBox *abvEdit, *co2Edit;
    QSpinBox *boiltimeEdit, *colorEdit, *ibuEdit;
    QPlainTextEdit *remarksEdit;
    QLineEdit *colormethodEdit, *ibumethodEdit;
    int	record;

    void edit(int recno);
    void showRecipe();
};

#endif

mercurial