First version

This commit is contained in:
Aurélie Delhaie
2022-02-01 19:08:44 +01:00
commit d661cc7b42
26 changed files with 1896 additions and 0 deletions

45
src/models/note.cpp Executable file
View File

@@ -0,0 +1,45 @@
#include "note.h"
Note::Note()
{
}
QJsonObject Note::toJson()
{
QJsonObject o;
o["title"] = this->title;
o["content"] = this->content;
return o;
}
Note *Note::fromJson(QJsonObject o)
{
Note *n = new Note();
n->title = o["title"].toString();
n->content = o["content"].toString();
return n;
}
QString Note::getTitle()
{
return title;
}
QString Note::getContent()
{
return content;
}
void Note::setTitle(QString value)
{
this->title = value;
}
void Note::setContent(QString value)
{
this->content = value;
}