vnote/vedit.h
Le Tan e3e18d040c use QStackedWidget to hold QTextBrowser and VEdit
Use QTextBrowser to display file in read mode and VEdit to display file
in edit mode.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-07 21:55:30 +08:00

34 lines
506 B
C++

#ifndef VEDIT_H
#define VEDIT_H
#include <QTextEdit>
#include <QString>
#include "vconstants.h"
#include "vnotefile.h"
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;
};
#endif // VEDIT_H