2 Star 12 Fork 3

1136863240/SimpleEditorByQt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mainwindow.h 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
1136863240 提交于 2021-01-04 10:15 . 教程已完结
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QList>
#include <QString>
#include <QPoint>
#include <QWheelEvent>
#include <QFile>
#include "cursorthread.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
protected:
void paintEvent(QPaintEvent *);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void inputMethodEvent(QInputMethodEvent *event);
void wheelEvent(QWheelEvent *event);
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
signals:
void send_break();
private slots:
void receive_cursor_status(bool is_show);
void on_action_triggered();
void on_action_2_triggered();
void on_action_3_triggered();
private:
Ui::MainWindow *ui;
CursorThread *cursor_thread;
QString file_name;
QFile *file;
QPoint cursor_point;
QPoint start_point;
QPoint end_point;
bool is_cursor_show;
bool is_ctrl_down;
bool is_column_end;
QList<QString> line_list;
int start_index;
int start_column;
int w, h;
int max_line;
int max_column;
};
#endif // MAINWINDOW_H
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/foreverofprogrammer/simple-editor-by-qt.git
git@gitee.com:foreverofprogrammer/simple-editor-by-qt.git
foreverofprogrammer
simple-editor-by-qt
SimpleEditorByQt
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385