src/RecipesTree.h

Thu, 31 Mar 2022 23:10:57 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 31 Mar 2022 23:10:57 +0200
changeset 97
8283bbf95806
parent 82
84e5dcab868f
permissions
-rw-r--r--

Stripped down the RangedSlider. It is more compact and still does everything. Base colors (red and green) are fixed inside, also automatisc setting of outer limits. The tooltip shows the current ranges. Still some finetuning to be done.

#ifndef _RECIPESTREE_H
#define _RECIPESTREE_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 RecipesTree;
}

class RecipesTree : public QDialog
{
    Q_OBJECT

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

signals:
    void setStatus(QString);

private slots:
    void on_insertButton_clicked();
    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, *insertButton, *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