⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editor.h

📁 QT是跨平台的GUI开发工具包,本代码是使用QT3.x实现的文本文件编辑器,可以嵌入到其他项目中使用.
💻 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 + -