2018-02-02 12:27:57 +00:00
|
|
|
#include "userInterface/mainwindow.h"
|
2018-02-02 09:00:46 +00:00
|
|
|
#include "ui_mainwindow.h"
|
|
|
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent) :
|
|
|
|
QMainWindow(parent),
|
2018-02-12 13:24:11 +00:00
|
|
|
ui(new Ui::MainWindow){
|
2018-02-02 09:00:46 +00:00
|
|
|
ui->setupUi(this);
|
|
|
|
}
|
|
|
|
|
2018-02-12 13:24:11 +00:00
|
|
|
MainWindow::~MainWindow(){
|
2018-02-02 09:00:46 +00:00
|
|
|
delete ui;
|
|
|
|
}
|
2018-02-12 13:24:11 +00:00
|
|
|
|
|
|
|
void MainWindow::loadFromRecipe(Recipe recipe){
|
|
|
|
setRecipeName(recipe.getName());
|
|
|
|
setInstructions(recipe.getInstructions());
|
|
|
|
setIngredients(recipe.getIngredients());
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::setRecipeName(string name){
|
|
|
|
ui->recipeNameLabel->setText(QString::fromStdString(name));
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::setInstructions(vector<Instruction> instructions){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::setIngredients(vector<Ingredient> ingredients){
|
2018-02-12 13:25:35 +00:00
|
|
|
|
2018-02-12 13:24:11 +00:00
|
|
|
}
|