forked from rogii-com/SceneSample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathI2DSceneManipulator.hpp
46 lines (37 loc) · 963 Bytes
/
I2DSceneManipulator.hpp
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
#pragma once
#include <QPoint>
#include <QRect>
namespace rogii
{
class I2DSceneManipulator
{
public:
virtual ~I2DSceneManipulator()
{
}
/**
* @brief Zooms @a zoomSteps in or out the scene.
*/
virtual void zoom(int zoomSteps) = 0;
/**
* @brief Zooms @a zoomSteps in or out the scene relative to @a pivotPoint.
*/
virtual void zoom(int zoomSteps, QPoint pivotPoint) = 0;
/**
* @brief Zooms and shifts the scene so the selected area occupies the whole widget.
* @param newSceneRect is in widget coordinates
*/
virtual void showArea(const QRect & windowAreaToZoom) = 0;
/**
* @brief Shifts the scene by screen shifts
* @param dx in window coordinates
* @param dy in window coordinates
*/
virtual void shift(int dx, int dy) = 0;
/**
* @brief Zooms and shifts the scene the best way to show \a area.
* @param rect is in scene coordinates
*/
virtual void showSceneArea(const QRectF & area) = 0;
};
} //~namespace rogii