2021-06-10 18:54:54 +08:00
|
|
|
#ifndef RESULTTEXTVIEW_H
|
|
|
|
#define RESULTTEXTVIEW_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2021-09-06 13:27:22 +08:00
|
|
|
#include <QTextEdit>
|
2021-06-10 18:54:54 +08:00
|
|
|
#include <QAction>
|
|
|
|
#include <QMenu>
|
|
|
|
|
|
|
|
|
2021-09-06 13:27:22 +08:00
|
|
|
class ResultTextView : public QTextEdit
|
2021-06-10 18:54:54 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit ResultTextView(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void contextMenuEvent(QContextMenuEvent *e) override;
|
2021-06-15 16:09:51 +08:00
|
|
|
void resizeEvent(QResizeEvent *event) override;
|
2021-06-10 18:54:54 +08:00
|
|
|
|
2021-06-15 16:09:51 +08:00
|
|
|
signals:
|
|
|
|
void sigChangeSize();
|
2021-06-10 18:54:54 +08:00
|
|
|
private:
|
2021-06-25 15:25:42 +08:00
|
|
|
QMenu *m_Menu{nullptr};
|
|
|
|
QAction *m_actCopy{nullptr};
|
|
|
|
QAction *m_actCut{nullptr};
|
|
|
|
QAction *m_actPaste{nullptr};
|
|
|
|
QAction *m_actSelectAll{nullptr};
|
2021-06-10 18:54:54 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RESULTTEXTVIEW_H
|