First Interaction with User Interface #1

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

View File

@ -21,7 +21,8 @@ SOURCES += SQLite/sqlite3.c \
model/recipe/ingredients/unitofmeasure.cpp \
model/recipe/ingredients/ingredient.cpp \
model/recipe/ingredients/ingredientlistmodel.cpp \
model/recipe/ingredients/recipeingredient.cpp
model/recipe/ingredients/recipeingredient.cpp \
model/recipe/tags/recipetag.cpp
HEADERS += SQLite/sqlite3.h \
SQLite/sqlite3ext.h \
@ -33,7 +34,8 @@ HEADERS += SQLite/sqlite3.h \
model/recipe/ingredients/unitofmeasure.h \
model/recipe/ingredients/ingredient.h \
model/recipe/ingredients/ingredientlistmodel.h \
model/recipe/ingredients/recipeingredient.h
model/recipe/ingredients/recipeingredient.h \
model/recipe/tags/recipetag.h
FORMS += gui/mainwindow.ui

View File

@ -2,6 +2,11 @@
Recipe::Recipe(){
//Set default values when none are specified.
this->Recipe("Unnamed Recipe",
vector<RecipeIngredient>(),
Instruction(),
QImage(),
vector<string>())
this->name = "Unnamed Recipe";
this->ingredients = vector<RecipeIngredient>();
this->instruction = Instruction();

View File

@ -0,0 +1,17 @@
#include "recipetag.h"
RecipeTag::RecipeTag(){
this->RecipeTag("");
}
RecipeTag::RecipeTag(string val){
this->value = val;
}
RecipeTag::getValue(){
return this->value;
}
RecipeTag::setValue(string newValue){
this->value = newValue;
}

View File

@ -0,0 +1,26 @@
#ifndef RECIPETAG_H
#define RECIPETAG_H
#include <string>
using namespace std;
/**
* @brief The RecipeTag class is used to represent tags which can be used to categorize recipes for easy retrieval.
*/
class RecipeTag
{
public:
RecipeTag();
RecipeTag(string val);
//Getters
string getValue();
//Setters
void setValue(string newValue);
private:
string value;
};
#endif // RECIPETAG_H