Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
86978a7b
Commit
86978a7b
authored
Jul 06, 2011
by
shibakaneki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
497288d4
2491e7e3
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
363 additions
and
117 deletions
+363
-117
UBGraphicsTriangle.cpp
src/tools/UBGraphicsTriangle.cpp
+348
-115
UBGraphicsTriangle.h
src/tools/UBGraphicsTriangle.h
+15
-2
No files found.
src/tools/UBGraphicsTriangle.cpp
View file @
86978a7b
This diff is collapsed.
Click to expand it.
src/tools/UBGraphicsTriangle.h
View file @
86978a7b
...
...
@@ -67,6 +67,8 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
protected
:
void
updateResizeCursor
();
virtual
void
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
styleOption
,
QWidget
*
widget
);
virtual
void
rotateAroundCenter
(
qreal
angle
);
...
...
@@ -80,7 +82,9 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
QRectF
vFlipRect
()
const
;
QRectF
rotateRect
()
const
;
QCursor
moveResizeCursor
()
const
;
QCursor
resizeCursor1
()
const
;
QCursor
resizeCursor2
()
const
;
QCursor
flipCursor
()
const
;
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
...
...
@@ -92,6 +96,9 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
private
:
QCursor
mResizeCursor1
;
QCursor
mResizeCursor2
;
QTransform
calculateRotationTransform
();
qreal
angle
;
void
rotateAroundCenter
(
QTransform
&
transform
,
QPointF
center
);
...
...
@@ -112,9 +119,15 @@ class UBGraphicsTriangle : public UBAbstractDrawRuler, public QGraphicsPolygonIt
UBGraphicsTriangleOrientation
mOrientation
;
QPointF
A1
,
B1
,
C1
,
A2
,
B2
,
C2
;
// coordinates of points in ext and int triangles
qreal
C
;
qreal
W1
,
H1
;
// Neccessary for filling
QPointF
CC
;
// Hyp. fillining gradient - top point
void
calculatePoints
(
const
QRectF
&
rect
);
static
const
int
d
=
70
;
// width of triangle border
static
const
int
sArrowLength
=
30
;
static
const
int
sMinWidth
=
20
0
;
static
const
int
sMinWidth
=
38
0
;
static
const
int
sMinHeight
=
200
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment