blob: 25a15ad79834f3cb6a30946a2b5c6a5160bd2d8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef MO_TEXTEDITOR_H
#define MO_TEXTEDITOR_H
#include <QPlainTextEdit>
class TextEditor : public QObject
{
Q_OBJECT
public:
TextEditor(QPlainTextEdit* edit);
bool load(const QString& filename);
bool save();
const QString& filename() const;
void wordWrap(bool b);
bool wordWrap() const;
bool dirty() const;
signals:
void changed(bool b);
private:
QPlainTextEdit* m_edit;
QString m_filename;
QString m_encoding;
bool m_dirty;
void onChanged(bool b);
void dirty(bool b);
};
#endif // MO_TEXTEDITOR_H
|