2017-03-29 10:18:37 +00:00
|
|
|
#ifndef GRAPHICSBAR_H
|
|
|
|
#define GRAPHICSBAR_H
|
|
|
|
|
|
|
|
#include <QToolBar>
|
|
|
|
|
2017-12-07 23:41:15 +00:00
|
|
|
#include "cutter.h"
|
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
class MainWindow;
|
2017-04-13 15:14:02 +00:00
|
|
|
class QGraphicsView;
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
class GraphicsBar : public QToolBar
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2017-12-07 23:41:15 +00:00
|
|
|
struct xToAddress {
|
|
|
|
double x_start;
|
|
|
|
double x_end;
|
|
|
|
RVA address_from;
|
|
|
|
RVA address_to;
|
|
|
|
};
|
|
|
|
|
2017-03-29 10:18:37 +00:00
|
|
|
public:
|
|
|
|
explicit GraphicsBar(MainWindow *main, QWidget *parent = 0);
|
|
|
|
|
|
|
|
public slots:
|
2017-12-07 23:41:15 +00:00
|
|
|
void paintEvent(QPaintEvent *event) override;
|
2017-11-19 12:56:10 +00:00
|
|
|
|
|
|
|
private slots:
|
2017-12-07 23:41:15 +00:00
|
|
|
void fetchAndPaintData();
|
|
|
|
void fetchData();
|
2017-03-29 10:18:37 +00:00
|
|
|
void fillData();
|
2017-12-07 23:41:15 +00:00
|
|
|
void on_seekChanged(RVA addr);
|
2017-03-29 10:18:37 +00:00
|
|
|
|
|
|
|
private:
|
2017-04-13 15:14:02 +00:00
|
|
|
QGraphicsView *codeGraphic;
|
2017-10-02 16:26:07 +00:00
|
|
|
MainWindow *main;
|
2017-12-07 23:41:15 +00:00
|
|
|
RVA totalSectionsSize;
|
|
|
|
QList<SectionDescription> sections;
|
|
|
|
QList<QVariantMap> blockMaps;
|
|
|
|
QList<struct xToAddress> xToAddress;
|
|
|
|
QString generateTooltip(QString section_name, QMap<QString, QVariant> map);
|
|
|
|
|
|
|
|
void mousePressEvent(QMouseEvent *event) override;
|
2017-03-29 10:18:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GRAPHICSBAR_H
|