📄 editor.h
字号:
#ifndef EDITOR_H#define EDITOR_H#include <qtextedit.h>class Editor : public QTextEdit{ Q_OBJECTpublic: Editor(QWidget *parent = 0, const char *name = 0); void newFile(); bool open(); bool openFile(const QString &fileName); bool save(); bool saveAs(); QSize sizeHint() const;signals: void message(const QString &fileName, int delay);protected: void closeEvent(QCloseEvent *event);private: bool maybeSave(); void saveFile(const QString &fileName); void setCurrentFile(const QString &fileName); QString strippedName(const QString &fullFileName); bool readFile(const QString &fileName); bool writeFile(const QString &fileName); QString curFile; bool isUntitled; QString fileFilters;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -