Allow bookmark to be created from a Book and url/title.

This commit is contained in:
Matthieu Gautier
2024-01-16 17:15:02 +01:00
parent 699f96ca0d
commit a546effa15
3 changed files with 64 additions and 13 deletions

View File

@ -18,6 +18,7 @@
*/
#include "bookmark.h"
#include "book.h"
#include <pugixml.hpp>
@ -28,6 +29,17 @@ Bookmark::Bookmark()
{
}
Bookmark::Bookmark(const Book& book, const std::string& path, const std::string& title):
m_bookId(book.getId()),
m_bookTitle(book.getTitle()),
m_bookName(book.getName()),
m_bookFlavour(book.getFlavour()),
m_url(path),
m_title(title),
m_language(book.getCommaSeparatedLanguages()),
m_date(book.getDate())
{}
/* Destructor */
Bookmark::~Bookmark()
{