2017-10-12 19:55:15 +00:00
|
|
|
#ifndef HEXDUMPWIDGET_H
|
|
|
|
#define HEXDUMPWIDGET_H
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QTextEdit>
|
|
|
|
#include <QMouseEvent>
|
2019-02-07 16:19:05 +00:00
|
|
|
#include <QAction>
|
2018-01-27 10:08:05 +00:00
|
|
|
|
|
|
|
#include <array>
|
2017-10-12 19:55:15 +00:00
|
|
|
#include <memory>
|
2018-01-27 10:08:05 +00:00
|
|
|
|
2019-02-22 16:50:45 +00:00
|
|
|
#include "core/Cutter.h"
|
2019-03-27 08:24:54 +00:00
|
|
|
#include "MemoryDockWidget.h"
|
2019-01-14 18:43:44 +00:00
|
|
|
#include "common/CutterSeekable.h"
|
2018-10-17 07:55:53 +00:00
|
|
|
#include "common/Highlighter.h"
|
|
|
|
#include "common/HexAsciiHighlighter.h"
|
|
|
|
#include "common/HexHighlighter.h"
|
|
|
|
#include "common/SvgIconEngine.h"
|
2019-05-16 16:03:48 +00:00
|
|
|
#include "HexWidget.h"
|
2017-10-12 19:55:15 +00:00
|
|
|
|
2018-01-27 10:08:05 +00:00
|
|
|
#include "Dashboard.h"
|
2017-10-12 19:55:15 +00:00
|
|
|
|
2019-02-07 16:19:05 +00:00
|
|
|
namespace Ui {
|
2019-05-16 16:03:48 +00:00
|
|
|
class HexdumpWidget;
|
2019-02-07 16:19:05 +00:00
|
|
|
}
|
2017-10-12 19:55:15 +00:00
|
|
|
|
2019-01-13 15:00:07 +00:00
|
|
|
class RefreshDeferrer;
|
|
|
|
|
2019-03-27 08:24:54 +00:00
|
|
|
class HexdumpWidget : public MemoryDockWidget
|
2017-10-12 19:55:15 +00:00
|
|
|
{
|
2018-01-27 10:08:05 +00:00
|
|
|
Q_OBJECT
|
2017-10-12 19:55:15 +00:00
|
|
|
public:
|
2018-03-16 21:46:57 +00:00
|
|
|
explicit HexdumpWidget(MainWindow *main, QAction *action = nullptr);
|
2019-05-16 16:03:48 +00:00
|
|
|
~HexdumpWidget() override;
|
|
|
|
Highlighter *highlighter;
|
2017-10-12 19:55:15 +00:00
|
|
|
|
2019-06-18 13:02:41 +00:00
|
|
|
static QString getWidgetType();
|
|
|
|
|
2017-10-12 19:55:15 +00:00
|
|
|
public slots:
|
2017-12-03 10:50:14 +00:00
|
|
|
void initParsing();
|
2017-10-12 19:55:15 +00:00
|
|
|
|
|
|
|
protected:
|
2017-11-08 13:17:24 +00:00
|
|
|
virtual void resizeEvent(QResizeEvent *event) override;
|
2019-05-16 16:03:48 +00:00
|
|
|
QWidget *widgetToFocusOnRaise() override;
|
2017-10-12 19:55:15 +00:00
|
|
|
private:
|
|
|
|
std::unique_ptr<Ui::HexdumpWidget> ui;
|
|
|
|
|
2018-01-27 10:08:05 +00:00
|
|
|
bool sent_seek = false;
|
2017-10-12 19:55:15 +00:00
|
|
|
|
2019-01-13 15:00:07 +00:00
|
|
|
RefreshDeferrer *refreshDeferrer;
|
2019-01-12 18:01:43 +00:00
|
|
|
|
2019-05-16 16:03:48 +00:00
|
|
|
void refresh();
|
|
|
|
void refresh(RVA addr);
|
2017-12-03 01:44:12 +00:00
|
|
|
void selectHexPreview();
|
2017-11-17 12:41:30 +00:00
|
|
|
|
2017-11-20 10:10:31 +00:00
|
|
|
void setupFonts();
|
|
|
|
|
2019-05-10 11:15:57 +00:00
|
|
|
void refreshSelectionInfo();
|
2018-01-27 10:08:05 +00:00
|
|
|
void updateParseWindow(RVA start_address, int size);
|
|
|
|
void clearParseWindow();
|
2019-05-23 10:44:28 +00:00
|
|
|
void showSidePanel(bool show);
|
2018-01-27 10:08:05 +00:00
|
|
|
|
2019-06-18 13:02:41 +00:00
|
|
|
QString getWindowTitle() const override;
|
|
|
|
|
2018-05-25 14:30:59 +00:00
|
|
|
QAction syncAction;
|
2018-01-27 10:08:05 +00:00
|
|
|
|
2017-10-12 19:55:15 +00:00
|
|
|
private slots:
|
2019-01-12 17:02:51 +00:00
|
|
|
void onSeekChanged(RVA addr);
|
2017-10-12 19:55:15 +00:00
|
|
|
|
2019-05-16 16:03:48 +00:00
|
|
|
void selectionChanged(HexWidget::Selection selection);
|
2017-12-03 10:50:14 +00:00
|
|
|
|
|
|
|
void on_parseArchComboBox_currentTextChanged(const QString &arg1);
|
|
|
|
void on_parseBitsComboBox_currentTextChanged(const QString &arg1);
|
|
|
|
void on_parseTypeComboBox_currentTextChanged(const QString &arg1);
|
|
|
|
void on_parseEndianComboBox_currentTextChanged(const QString &arg1);
|
2017-10-12 19:55:15 +00:00
|
|
|
|
2017-11-20 10:10:31 +00:00
|
|
|
void fontsUpdated();
|
|
|
|
|
2017-10-12 19:55:15 +00:00
|
|
|
void on_hexSideTab_2_currentChanged(int index);
|
|
|
|
void on_copyMD5_clicked();
|
|
|
|
void on_copySHA1_clicked();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // HEXDUMPWIDGET_H
|