Scribus
Open source desktop publishing at your fingertips
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
canvasmode_rotate.h
1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
7
/***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef CANVAS_MODE_ROTATE_H
17
#define CANVAS_MODE_ROTATE_H
18
19
#include "scribusapi.h"
20
#include "canvasmode.h"
21
#include "fpoint.h"
22
23
class
QDragEnterEvent;
24
class
QDragMoveEvent;
25
class
QDragLeaveEvent;
26
class
QDropEvent;
27
class
QEvent;
28
class
QInputMethodEvent;
29
class
QMouseEvent;
30
class
QKeyEvent;
31
class
QPainter;
32
33
class
PageItem
;
34
35
class
SCRIBUS_API
CanvasMode_Rotate
:
public
CanvasMode
36
{
37
public
:
38
explicit
CanvasMode_Rotate
(
ScribusView
* view);
39
virtual
~
CanvasMode_Rotate
() {}
40
41
virtual
void
enterEvent(QEvent *);
42
virtual
void
leaveEvent(QEvent *);
43
44
virtual
void
drawControls
(QPainter* p);
45
virtual
void
activate
(
bool
);
46
virtual
void
deactivate
(
bool
);
47
48
virtual
void
mousePressEvent(QMouseEvent *m);
49
virtual
void
mouseReleaseEvent(QMouseEvent *m);
50
virtual
void
mouseMoveEvent(QMouseEvent *m);
51
52
private
:
53
inline
bool
GetItem(
PageItem
** pi);
54
55
void
createContextMenu(
PageItem
*currItem,
double
mx,
double
my);
56
void
drawItemOutlines(QPainter*);
57
void
getNewItemPosition(
PageItem
* item,
FPoint
& pos,
double
& rotation);
58
// void setResizeCursor(int how);
59
60
bool
m_inItemRotation;
61
62
int
m_oldRotMode;
63
FPoint
m_oldRotCenter;
64
FPoint
m_canvasPressCoord;
65
FPoint
m_canvasCurrCoord;
66
bool
m_angleConstrained;
67
68
int
m_rotMode;
69
FPoint
m_rotCenter;
70
double
m_startAngle;
71
};
72
73
#endif
CanvasMode::deactivate
virtual void deactivate(bool forGesture)
Definition:
canvasmode.h:91
CanvasMode::drawControls
virtual void drawControls(QPainter *p)
Definition:
canvasmode.h:121
FPoint
A point with floating point precision.
Definition:
fpoint.h:43
CanvasMode
Definition:
canvasmode.h:72
PageItem
Definition:
pageitem.h:92
CanvasMode_Rotate
Definition:
canvasmode_rotate.h:35
ScribusView
Definition:
scribusview.h:87
CanvasMode::activate
virtual void activate(bool fromGesture)
Definition:
canvasmode.h:86
scribus
canvasmode_rotate.h
Generated on Tue Sep 29 2015 09:14:55 for Scribus by
1.8.9.1