cutter/src/widgets/HexdumpWidget.h

83 lines
1.8 KiB
C
Raw Normal View History

#ifndef HEXDUMPWIDGET_H
#define HEXDUMPWIDGET_H
#include <QDebug>
#include <QTextEdit>
#include <QMouseEvent>
#include <QAction>
2018-01-27 10:08:05 +00:00
#include <array>
#include <memory>
2018-01-27 10:08:05 +00:00
#include "core/Cutter.h"
#include "MemoryDockWidget.h"
#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"
2018-01-27 10:08:05 +00:00
#include "Dashboard.h"
namespace Ui {
2019-05-16 16:03:48 +00:00
class HexdumpWidget;
}
2019-01-13 15:00:07 +00:00
class RefreshDeferrer;
class HexdumpWidget : public MemoryDockWidget
{
2018-01-27 10:08:05 +00:00
Q_OBJECT
public:
explicit HexdumpWidget(MainWindow *main, QAction *action = nullptr);
2019-05-16 16:03:48 +00:00
~HexdumpWidget() override;
Highlighter *highlighter;
public slots:
void initParsing();
void toggleSync();
protected:
virtual void resizeEvent(QResizeEvent *event) override;
2019-05-16 16:03:48 +00:00
QWidget *widgetToFocusOnRaise() override;
private:
std::unique_ptr<Ui::HexdumpWidget> ui;
2018-01-27 10:08:05 +00:00
bool sent_seek = false;
2019-01-13 15:00:07 +00:00
RefreshDeferrer *refreshDeferrer;
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
void setupFonts();
void refreshSelectionInfo();
2018-01-27 10:08:05 +00:00
void updateParseWindow(RVA start_address, int size);
void clearParseWindow();
void showSidePanel(bool show);
2018-01-27 10:08:05 +00:00
QAction syncAction;
CutterSeekable *seekable;
2018-01-27 10:08:05 +00:00
private slots:
void onSeekChanged(RVA addr);
2019-05-16 16:03:48 +00:00
void selectionChanged(HexWidget::Selection selection);
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);
void fontsUpdated();
void on_hexSideTab_2_currentChanged(int index);
void on_copyMD5_clicked();
void on_copySHA1_clicked();
};
#endif // HEXDUMPWIDGET_H