2019-03-27 08:24:54 +00:00
|
|
|
#ifndef MEMORYDOCKWIDGET_H
|
|
|
|
#define MEMORYDOCKWIDGET_H
|
|
|
|
|
|
|
|
#include "CutterDockWidget.h"
|
|
|
|
#include "core/Cutter.h"
|
|
|
|
|
2019-10-06 17:35:44 +00:00
|
|
|
#include <QAction>
|
|
|
|
|
2019-06-18 13:02:41 +00:00
|
|
|
class CutterSeekable;
|
|
|
|
|
2019-09-06 05:40:20 +00:00
|
|
|
/* Disassembly/Graph/Hexdump/Decompiler view priority */
|
|
|
|
enum class MemoryWidgetType { Disassembly, Graph, Hexdump, Decompiler };
|
2019-07-19 19:21:12 +00:00
|
|
|
|
2019-03-27 08:24:54 +00:00
|
|
|
class MemoryDockWidget : public CutterDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-07-19 19:21:12 +00:00
|
|
|
MemoryDockWidget(MemoryWidgetType type, MainWindow *parent, QAction *action = nullptr);
|
2019-10-06 17:35:44 +00:00
|
|
|
~MemoryDockWidget() override {}
|
2019-03-27 08:24:54 +00:00
|
|
|
|
2019-10-06 17:35:44 +00:00
|
|
|
CutterSeekable *getSeekable() const;
|
2019-06-18 13:02:41 +00:00
|
|
|
|
2019-07-19 19:21:12 +00:00
|
|
|
bool tryRaiseMemoryWidget();
|
|
|
|
void raiseMemoryWidget();
|
|
|
|
MemoryWidgetType getType() const
|
|
|
|
{
|
|
|
|
return mType;
|
|
|
|
}
|
2019-10-06 17:35:44 +00:00
|
|
|
bool eventFilter(QObject *object, QEvent *event) override;
|
2019-03-27 08:24:54 +00:00
|
|
|
private:
|
|
|
|
|
2019-07-19 19:21:12 +00:00
|
|
|
MemoryWidgetType mType;
|
2019-06-18 13:02:41 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void updateWindowTitle();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
CutterSeekable *seekable = nullptr;
|
2019-10-06 17:35:44 +00:00
|
|
|
QAction syncAction;
|
|
|
|
QMenu *dockMenu = nullptr;
|
2019-06-18 13:02:41 +00:00
|
|
|
|
|
|
|
virtual QString getWindowTitle() const = 0;
|
2019-10-06 17:35:44 +00:00
|
|
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
2019-03-27 08:24:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MEMORYDOCKWIDGET_H
|