-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmygraphicsview.h
More file actions
47 lines (38 loc) · 1.18 KB
/
Copy pathmygraphicsview.h
File metadata and controls
47 lines (38 loc) · 1.18 KB
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
#ifndef MYGRAPHICSVIEW_H
#define MYGRAPHICSVIEW_H
#include <QGraphicsView>
#include <QMouseEvent>
#include <QScrollBar>
#include <QDebug>
#include <QGraphicsOpacityEffect>
#include "mygraphicsscene.h"
#include "PartArray.h"
#include "partgraphicsitem.h"
#include "Part.h"
#include "random.h"
class MyGraphicsView : public QGraphicsView
{
Q_OBJECT
public:
explicit MyGraphicsView(QObject *parent = 0);
virtual ~MyGraphicsView();
MyGraphicsScene* scene();
MyGraphicsScene* _scene;
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
void wheelEvent(QWheelEvent *event);
void resizeEvent(QResizeEvent *event); //изменение положения превью при изменении размеров основного окна
private:
QGraphicsView preview;
signals:
void scaleUp();
void scaleDown();
public slots:
void updatePreview(const QList<QRectF> & regions);
void scaleTo(int size);
void changeOperateMode(int mode);
void dbgSlot();
void toggleDoubleArrows(bool on);
void toggleShowIds(bool on);
};
#endif // MYGRAPHICSVIEW_H