src/RecipesTree.h

Thu, 18 Aug 2022 20:34:15 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 18 Aug 2022 20:34:15 +0200
changeset 401
583148eb6e01
parent 82
84e5dcab868f
permissions
-rw-r--r--

Init est_carb field for new products.

81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 #ifndef _RECIPESTREE_H
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2 #define _RECIPESTREE_H
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 #include <QDialog>
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 #include <QtWidgets/QGridLayout>
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 #include <QtWidgets/QGroupBox>
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 #include <QtWidgets/QPushButton>
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 #include <QtWidgets/QListView>
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 #include <QtWidgets/QTreeWidget>
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 #include <QtWidgets/QDialog>
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 #include <QtWidgets/QHeaderView>
82
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
12 #include <QtWidgets/QLabel>
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
13 #include <QtWidgets/QLineEdit>
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
14 #include <QtWidgets/QPlainTextEdit>
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
15 #include <QtWidgets/QDoubleSpinBox>
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
16 #include <QtWidgets/QSpinBox>
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 namespace Ui {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 class RecipesTree;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 }
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22 class RecipesTree : public QDialog
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23 {
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 Q_OBJECT
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 public:
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 explicit RecipesTree(QWidget *parent = nullptr);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 ~RecipesTree();
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
29
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 signals:
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 void setStatus(QString);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 private slots:
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 void on_insertButton_clicked();
82
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
35 void on_openButton_clicked();
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
36 void on_item_clicked(QTreeWidgetItem *, int);
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
37 void on_item_doubleclicked(QTreeWidgetItem *, int);
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 void refreshTable(void);
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 private:
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 QGridLayout *gridLayout;
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 QTreeWidget *treeWidget;
82
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
43 QGroupBox *groupBox, *recipeBox;
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44 QHBoxLayout *horizontalLayout;
82
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
45 QPushButton *quitButton, *insertButton, *openButton;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
46 QLabel *volumeLabel, *efficiencyLabel, *boilvolumeLabel;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
47 QLabel *boiltimeLabel, *ogLabel, *fgLabel;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
48 QLabel *abvLabel, *co2Label, *colorLabel;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
49 QLabel *colormethodLabel, *ibuLabel, *ibumethodLabel;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
50 QLabel *remarksLabel;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
51 QDoubleSpinBox *volumeEdit, *boilvolumeEdit;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
52 QDoubleSpinBox *efficiencyEdit, *ogEdit, *fgEdit;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
53 QDoubleSpinBox *abvEdit, *co2Edit;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
54 QSpinBox *boiltimeEdit, *colorEdit, *ibuEdit;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
55 QPlainTextEdit *remarksEdit;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
56 QLineEdit *colormethodEdit, *ibumethodEdit;
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
57 int record;
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
58
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
59 void edit(int recno);
82
84e5dcab868f The screen design is final. The leftside tree doesn't collapse and expand, I leave that for now. Lack of good documentation to deal with this. The right side shows the current selected recipe in short form. This is now almost as I want it to be.
Michiel Broek <mbroek@mbse.eu>
parents: 81
diff changeset
60 void showRecipe();
81
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
61 };
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
62
562ed7d1b74d Added start of the Recipes Tree to select a recipe
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
63 #endif

mercurial