First Interaction with User Interface #1
|
@ -1,6 +1,17 @@
|
||||||
#include "model/recipe/instruction.h"
|
#include "model/recipe/instruction.h"
|
||||||
|
|
||||||
Instruction::Instruction()
|
Instruction::Instruction(){
|
||||||
{
|
setHTML("");
|
||||||
|
}
|
||||||
|
|
||||||
|
Instruction::Instruction(string text){
|
||||||
|
setHTML(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
string Instruction::getHTML(){
|
||||||
|
return this->htmlText;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Instruction::setHTML(string newText){
|
||||||
|
this->htmlText = newText;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,27 @@
|
||||||
#ifndef INSTRUCTION_H
|
#ifndef INSTRUCTION_H
|
||||||
#define INSTRUCTION_H
|
#define INSTRUCTION_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The Instruction class is meant to hold an HTML document in string form, which holds formatted text as the instructions for the recipe.
|
||||||
|
*/
|
||||||
|
|
||||||
class Instruction
|
class Instruction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Instruction();
|
Instruction();
|
||||||
|
Instruction(string text);
|
||||||
|
|
||||||
|
//Getters
|
||||||
|
string getHTML();
|
||||||
|
|
||||||
|
//Setters
|
||||||
|
void setHTML(string newText);
|
||||||
|
private:
|
||||||
|
string htmlText;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INSTRUCTION_H
|
#endif // INSTRUCTION_H
|
Loading…
Reference in New Issue