forked from Vector35/binaryninja-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreview.h
More file actions
50 lines (37 loc) · 878 Bytes
/
preview.h
File metadata and controls
50 lines (37 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#pragma once
#include <QtWidgets/QLabel>
#include <QtWidgets/QWidget>
#include "uitypes.h"
/*!
\defgroup preview Preview
\ingroup uiapi
*/
/*!
\ingroup preview
*/
class BINARYNINJAUIAPI PreviewScrollHandler
{
public:
virtual ~PreviewScrollHandler();
virtual void sendWheelEvent(QWheelEvent* event) = 0;
};
/*!
\ingroup preview
*/
class BINARYNINJAUIAPI PreviewWidget : public QFrame
{
Q_OBJECT
QWidget* m_contents;
PreviewScrollHandler* m_scrollHandler;
protected:
virtual bool eventFilter(QObject* obj, QEvent* event) override;
virtual void wheelEvent(QWheelEvent* event) override;
public:
PreviewWidget();
virtual ~PreviewWidget();
void setContents(QWidget* widget);
void setScrollHandler(PreviewScrollHandler* handler);
void sendWheelEvent(QWheelEvent* event);
void closePreview();
static bool isPreviewWidget(QWidget* widget);
};