vnote/vdocument.cpp
Le Tan 7bce2cb298 use QWebEngineView to display markdown files
Thanks to [marked JavaScript library](https://github.com/chjj/marked) by
Christopher Jeffrey. The
[style sheet](http://kevinburke.bitbucket.org/markdowncss/markdown.css)
was created by Kevin Burke.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-09 20:47:20 +08:00

28 lines
402 B
C++

#include "vdocument.h"
#include <QtDebug>
VDocument::VDocument(QObject *parent) : QObject(parent)
{
}
VDocument::VDocument(const QString &text, QObject *parent)
: QObject(parent)
{
m_text = text;
}
void VDocument::setText(const QString &text)
{
if (text == m_text)
return;
m_text = text;
emit textChanged(m_text);
}
QString VDocument::getText()
{
return m_text;
}