vnote/vedit.h
Le Tan 29609f0b65 change HGMarkdownHighlighter to use QSyntaxHighlighter
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-19 22:49:45 +08:00

37 lines
578 B
C++

#ifndef VEDIT_H
#define VEDIT_H
#include <QTextEdit>
#include <QString>
#include "vconstants.h"
#include "vnotefile.h"
class HGMarkdownHighlighter;
class VEdit : public QTextEdit
{
Q_OBJECT
public:
VEdit(VNoteFile *noteFile, QWidget *parent = 0);
void beginEdit();
bool tryEndEdit();
// begin: sync the buffer to noteFile->content;
// end: setModified(false)
void beginSave();
void endSave();
void reloadFile();
signals:
public slots:
private:
VNoteFile *noteFile;
HGMarkdownHighlighter *mdHighlighter;
};
#endif // VEDIT_H