vedit.h 578 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef VEDIT_H
  2. #define VEDIT_H
  3. #include <QTextEdit>
  4. #include <QString>
  5. #include "vconstants.h"
  6. #include "vnotefile.h"
  7. class HGMarkdownHighlighter;
  8. class VEdit : public QTextEdit
  9. {
  10. Q_OBJECT
  11. public:
  12. VEdit(VNoteFile *noteFile, QWidget *parent = 0);
  13. void beginEdit();
  14. bool tryEndEdit();
  15. // begin: sync the buffer to noteFile->content;
  16. // end: setModified(false)
  17. void beginSave();
  18. void endSave();
  19. void reloadFile();
  20. signals:
  21. public slots:
  22. private:
  23. VNoteFile *noteFile;
  24. HGMarkdownHighlighter *mdHighlighter;
  25. };
  26. #endif // VEDIT_H