4 Star 15 Fork 8

羽云工作室/WingHexPy
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
scriptwindow.h 1.66 KB
一键复制 编辑 原始数据 按行查看 历史
wingsummer 提交于 2022-08-23 16:37 +08:00 . update
#ifndef SCRIPTWINDOW_H
#define SCRIPTWINDOW_H
#include "QCodeEditor/QCodeEditor.hpp"
#include "QCodeEditor/QSyntaxStyle.hpp"
#include "findbar.h"
#include "recentfilemanager.h"
#include "replacebar.h"
#include <DGuiApplicationHelper>
#include <DLabel>
#include <DMainWindow>
#include <DStatusBar>
#include <DToolBar>
#include <QVBoxLayout>
DWIDGET_USE_NAMESPACE
class ScriptWindow : public DMainWindow {
Q_OBJECT
public:
ScriptWindow(DMainWindow *parent = nullptr);
~ScriptWindow();
static ScriptWindow *instance();
private:
void setTheme(DGuiApplicationHelper::ColorType theme);
public:
bool openFile(QString filename, bool readonly = false);
private:
void on_new();
void on_open();
void on_save();
void on_saveas();
void on_undo();
void on_redo();
void on_copy();
void on_cut();
void on_paste();
void on_run();
void on_runfile();
void on_close();
void on_sponsor();
void on_about();
void on_find();
void on_replace();
void on_jmp();
void setSaved(bool b);
signals:
void sigAbout();
void sigSponsor();
private:
QCodeEditor *editor;
static ScriptWindow *m_instance;
QSyntaxStyle *m_styles[2];
DToolBar *toolbar;
DStatusBar *status;
QAction *aundo, *aredo;
QAction *mundo, *mredo;
DMenu *menu;
RecentFileManager *recentmanager;
QVBoxLayout *vlayout;
FindBar *findbar;
ReplaceBar *replacebar;
QIcon picon;
private:
bool isSaved = true;
QString lastusedpath;
QString currentfilename;
private:
QPixmap infoSaved;
QPixmap infoUnsaved;
QPixmap infoReadonly;
QPixmap infoWriteable;
DLabel *iReadWrite;
DLabel *iSaved;
DLabel *lblrow;
DLabel *lblcol;
DLabel *lbllen;
};
#endif // SCRIPTWINDOW_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/wing-cloud/wing-hex-py.git
git@gitee.com:wing-cloud/wing-hex-py.git
wing-cloud
wing-hex-py
WingHexPy
master

搜索帮助