First Interaction with User Interface #1
|
@ -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
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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
|
Loading…
Reference in New Issue