2018-03-10 13:06:24 +00:00
|
|
|
#ifndef NEWINGREDIENTDIALOG_H
|
|
|
|
#define NEWINGREDIENTDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2018-03-30 12:33:48 +00:00
|
|
|
#include <QMessageBox>
|
|
|
|
|
2018-03-10 13:06:24 +00:00
|
|
|
#include "model/recipe/ingredients/ingredient.h"
|
2018-03-30 10:56:42 +00:00
|
|
|
#include "model/database/recipedatabase.h"
|
2018-03-30 12:33:48 +00:00
|
|
|
#include "gui/newDialogs/newfoodgroupdialog.h"
|
2018-03-10 13:06:24 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class NewIngredientDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NewIngredientDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit NewIngredientDialog(QWidget *parent = 0);
|
2018-03-30 10:56:42 +00:00
|
|
|
NewIngredientDialog(RecipeDatabase *recipeDB, QWidget *parent = 0);
|
2018-03-10 13:06:24 +00:00
|
|
|
~NewIngredientDialog();
|
|
|
|
|
|
|
|
//Access values.
|
|
|
|
Ingredient getIngredient();
|
|
|
|
|
2018-03-30 12:33:48 +00:00
|
|
|
private slots:
|
|
|
|
void on_addFoodGroupButton_clicked();
|
|
|
|
|
|
|
|
void on_deleteFoodGroupButton_clicked();
|
|
|
|
|
2018-03-10 13:06:24 +00:00
|
|
|
private:
|
|
|
|
Ui::NewIngredientDialog *ui;
|
2018-03-30 10:56:42 +00:00
|
|
|
RecipeDatabase *recipeDB;
|
|
|
|
|
|
|
|
void populateFoodGroupBox();
|
2018-03-10 13:06:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NEWINGREDIENTDIALOG_H
|