mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-06 06:19:52 +08:00

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>
28 lines
402 B
C++
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;
|
|
}
|