diff --git a/main.cpp b/main.cpp index 84928f5..4f87ea1 100644 --- a/main.cpp +++ b/main.cpp @@ -11,12 +11,5 @@ int main(int argc, char *argv[]) Database db("test.db"); - vector ri; - ri.push_back(RecipeIngredient("flour", "grains", 3.0f, UnitOfMeasure("cup", "cups", "c"))); - - - - Recipe rec("Example", ri, Instruction("Hello world"), QImage(), vector(), QDate::currentDate(), QTime(0, 30), QTime(0, 25), 10.0f); - return a.exec(); } diff --git a/userInterface/mainwindow.cpp b/userInterface/mainwindow.cpp index 59f2c18..55c857c 100644 --- a/userInterface/mainwindow.cpp +++ b/userInterface/mainwindow.cpp @@ -5,6 +5,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow){ ui->setupUi(this); + + //TESTING CODE + vector ri; + ri.push_back(RecipeIngredient("flour", "grains", 3.0f, UnitOfMeasure("cup", "cups", "c"))); + + Recipe rec("Example", ri, Instruction("BOLDiTaLiCs"), QImage(), vector(), QDate::currentDate(), QTime(0, 30), QTime(0, 25), 10.0f); + + this->loadFromRecipe(rec); } MainWindow::~MainWindow(){ @@ -22,9 +30,9 @@ void MainWindow::setRecipeName(string name){ } void MainWindow::setInstruction(Instruction instruction){ - + ui->instructionsTextEdit->setHtml(QString::fromStdString(instruction.getHTML())); } void MainWindow::setIngredients(vector ingredients){ - + ///TODO: Implement this. }