2017-03-29 10:18:37 +00:00
|
|
|
#ifndef NOTEPAD_H
|
|
|
|
#define NOTEPAD_H
|
|
|
|
|
2017-04-13 15:14:02 +00:00
|
|
|
#include "dockwidget.h"
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
class MainWindow;
|
2017-04-13 15:14:02 +00:00
|
|
|
class MdHighlighter;
|
|
|
|
class Highlighter;
|
|
|
|
class QPlainTextEdit;
|
2017-03-29 10:18:37 +00:00
|
|
|
|
2017-04-09 19:55:06 +00:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class Notepad;
|
2017-03-29 10:18:37 +00:00
|
|
|
}
|
|
|
|
|
2017-04-13 15:14:02 +00:00
|
|
|
class Notepad : public DockWidget
|
2017-03-29 10:18:37 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit Notepad(MainWindow *main, QWidget *parent = 0);
|
2017-04-13 15:14:02 +00:00
|
|
|
~Notepad();
|
|
|
|
|
|
|
|
void setup() override;
|
|
|
|
|
|
|
|
void refresh() override;
|
|
|
|
|
|
|
|
void setText(const QString &str);
|
|
|
|
QString textToBase64() const;
|
|
|
|
|
|
|
|
void appendPlainText(const QString &text);
|
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
void highlightPreview();
|
2017-04-13 15:14:02 +00:00
|
|
|
|
|
|
|
public slots:
|
2017-03-29 10:18:37 +00:00
|
|
|
void setFonts(QFont font);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_fontButton_clicked();
|
|
|
|
|
|
|
|
void on_boldButton_clicked();
|
|
|
|
|
|
|
|
void on_italicsButton_clicked();
|
|
|
|
|
|
|
|
void on_h1Button_clicked();
|
|
|
|
|
|
|
|
void on_h2Button_clicked();
|
|
|
|
|
|
|
|
void on_h3Button_clicked();
|
|
|
|
|
|
|
|
void on_undoButton_clicked();
|
|
|
|
|
|
|
|
void on_redoButton_clicked();
|
|
|
|
|
|
|
|
void on_searchEdit_returnPressed();
|
|
|
|
|
|
|
|
void on_searchEdit_textEdited(const QString &arg1);
|
|
|
|
|
|
|
|
void on_searchEdit_textChanged(const QString &arg1);
|
|
|
|
|
|
|
|
void showNotepadContextMenu(const QPoint &pt);
|
|
|
|
|
|
|
|
void on_actionDisassmble_bytes_triggered();
|
|
|
|
|
|
|
|
void on_actionDisassmble_function_triggered();
|
|
|
|
|
|
|
|
void on_actionHexdump_bytes_triggered();
|
|
|
|
|
|
|
|
void on_actionCompact_Hexdump_triggered();
|
|
|
|
|
|
|
|
void on_actionHexdump_function_triggered();
|
|
|
|
|
|
|
|
private:
|
2017-04-13 15:14:02 +00:00
|
|
|
Ui::Notepad *ui;
|
|
|
|
MdHighlighter *highlighter;
|
|
|
|
Highlighter *disasm_highlighter;
|
|
|
|
bool isFirstTime;
|
|
|
|
MainWindow *main;
|
|
|
|
QString addr;
|
|
|
|
QPlainTextEdit *notesTextEdit;
|
2017-03-29 10:18:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NOTEPAD_H
|