First Interaction with User Interface #1

Merged
andrewlalis merged 11 commits from development into master 2018-02-12 19:40:45 +00:00
2 changed files with 10 additions and 9 deletions
Showing only changes of commit e4dcd17e3e - Show all commits

View File

@ -11,12 +11,5 @@ int main(int argc, char *argv[])
Database db("test.db");
vector<RecipeIngredient> ri;
ri.push_back(RecipeIngredient("flour", "grains", 3.0f, UnitOfMeasure("cup", "cups", "c")));
Recipe rec("Example", ri, Instruction("Hello world"), QImage(), vector<RecipeTag>(), QDate::currentDate(), QTime(0, 30), QTime(0, 25), 10.0f);
return a.exec();
}

View File

@ -5,6 +5,14 @@ MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow){
ui->setupUi(this);
//TESTING CODE
vector<RecipeIngredient> ri;
ri.push_back(RecipeIngredient("flour", "grains", 3.0f, UnitOfMeasure("cup", "cups", "c")));
Recipe rec("Example", ri, Instruction("<b>BOLD</b><i>iTaLiCs</i>"), QImage(), vector<RecipeTag>(), 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<RecipeIngredient> ingredients){
///TODO: Implement this.
}