2018-03-04 08:05:20 +00:00
|
|
|
#ifndef NEWRECIPEDIALOG_H
|
|
|
|
#define NEWRECIPEDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2018-03-10 07:51:17 +00:00
|
|
|
#include <QTextCharFormat>
|
|
|
|
|
|
|
|
#include "model/database/recipedatabase.h"
|
2018-03-04 08:05:20 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class NewRecipeDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NewRecipeDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit NewRecipeDialog(QWidget *parent = 0);
|
2018-03-10 07:51:17 +00:00
|
|
|
NewRecipeDialog(RecipeDatabase *db, QWidget *parent = 0);
|
2018-03-04 08:05:20 +00:00
|
|
|
~NewRecipeDialog();
|
|
|
|
|
2018-03-10 07:51:17 +00:00
|
|
|
private slots:
|
|
|
|
void on_toolButton_clicked();
|
|
|
|
|
2018-03-04 08:05:20 +00:00
|
|
|
private:
|
|
|
|
Ui::NewRecipeDialog *ui;
|
2018-03-10 07:51:17 +00:00
|
|
|
RecipeDatabase *recipeDB;
|
|
|
|
vector<Ingredient> ingredients;
|
|
|
|
vector<UnitOfMeasure> units;
|
|
|
|
|
|
|
|
//Helper functions to fill fields.
|
|
|
|
void populateIngredientsBox();
|
|
|
|
void populateUnitsBox();
|
2018-03-04 08:05:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NEWRECIPEDIALOG_H
|