-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHGVIEWCMD.H
58 lines (47 loc) · 1.23 KB
/
CHGVIEWCMD.H
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
51
52
53
54
55
56
57
58
#ifndef _ChgViewCmd_h_
#define _ChgViewCmd_h_
#include "COMMAND.H"
class QGraphicsView;
class QGraphicsRectItem;
#ifdef __cplusplus
////////////////
///CZoomPanCmd Àà
class CZoomPanCmd : public CCommand
{
private:
QPointF m_basePos;
QPointF m_desPos;
QGraphicsView* m_pView;
public:
CZoomPanCmd(DiagramScene* pScene) ;
~CZoomPanCmd() ;
int GetType();
int OnLButtonDown(QGraphicsSceneMouseEvent* mouseEvent) ;
int OnMouseMove(QGraphicsSceneMouseEvent* mouseEvent) ;
int OnRButtonDown(QGraphicsSceneMouseEvent* mouseEvent) ;
int Cancel() ;
} ;
///////////////////////////////////////////////////////////////
/*
* CZoomWindowCmd
*/
class CZoomWindowCmd : public CCommand
{
private:
QPointF m_basePos;
QPointF m_desPos;
QGraphicsView* m_pView;
QGraphicsRectItem* m_pRect;
public:
CZoomWindowCmd(DiagramScene* pScene) ;
~CZoomWindowCmd() ;
int GetType();
int OnLButtonDown(QGraphicsSceneMouseEvent* mouseEvent) ;
int OnMouseMove(QGraphicsSceneMouseEvent* mouseEvent) ;
int OnRButtonDown(QGraphicsSceneMouseEvent* mouseEvent) ;
int Cancel() ;
} ;
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
#endif // __cplusplus
#endif // _ModifyCmd_h_