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
82c155ca
Commit
82c155ca
authored
Apr 25, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
20698028
f37ba1b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
7 deletions
+30
-7
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+27
-5
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+2
-0
UBGraphicsProtractor.cpp
src/tools/UBGraphicsProtractor.cpp
+1
-2
No files found.
src/domain/UBGraphicsScene.cpp
View file @
82c155ca
...
...
@@ -507,9 +507,32 @@ bool UBGraphicsScene::inputDeviceRelease()
}
UBDrawingController
*
dc
=
UBDrawingController
::
drawingController
();
if
(
dc
->
isDrawingTool
())
if
(
dc
->
isDrawingTool
()
||
mDrawWithCompass
)
{
if
(
mCurrentStroke
)
if
(
mArcPolygonItem
){
if
(
eDrawingMode_Vector
==
dc
->
drawingMode
()){
UBGraphicsStrokesGroup
*
pStrokes
=
new
UBGraphicsStrokesGroup
();
// Add the arc
mAddedItems
.
remove
(
mArcPolygonItem
);
removeItem
(
mArcPolygonItem
);
UBCoreGraphicsScene
::
removeItemFromDeletion
(
mArcPolygonItem
);
pStrokes
->
addToGroup
(
mArcPolygonItem
);
// Add the center cross
foreach
(
QGraphicsItem
*
item
,
mAddedItems
){
removeItem
(
item
);
UBCoreGraphicsScene
::
removeItemFromDeletion
(
item
);
pStrokes
->
addToGroup
(
item
);
}
mAddedItems
.
clear
();
mAddedItems
<<
pStrokes
;
addItem
(
pStrokes
);
mDrawWithCompass
=
false
;
}
}
else
if
(
mCurrentStroke
)
{
if
(
eDrawingMode_Vector
==
dc
->
drawingMode
()){
UBGraphicsStrokesGroup
*
pStrokes
=
new
UBGraphicsStrokesGroup
();
...
...
@@ -525,10 +548,7 @@ bool UBGraphicsScene::inputDeviceRelease()
// TODO LATER : Generate well pressure-interpolated polygons and create the line group with them
mAddedItems
.
clear
();
// Add the groupItem in mAddedItem
mAddedItems
<<
pStrokes
;
addItem
(
pStrokes
);
}
...
...
@@ -635,6 +655,7 @@ void UBGraphicsScene::moveTo(const QPointF &pPoint)
mPreviousWidth
=
-
1.0
;
mPreviousPolygonItems
.
clear
();
mArcPolygonItem
=
0
;
mDrawWithCompass
=
false
;
}
...
...
@@ -817,6 +838,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
void
UBGraphicsScene
::
drawArcTo
(
const
QPointF
&
pCenterPoint
,
qreal
pSpanAngle
)
{
mDrawWithCompass
=
true
;
if
(
mArcPolygonItem
)
{
mAddedItems
.
remove
(
mArcPolygonItem
);
...
...
src/domain/UBGraphicsScene.h
View file @
82c155ca
...
...
@@ -397,6 +397,8 @@ public slots:
UBZLayerController
*
mZLayerController
;
UBGraphicsPolygonItem
*
mpLastPolygon
;
bool
mDrawWithCompass
;
};
...
...
src/tools/UBGraphicsProtractor.cpp
View file @
82c155ca
...
...
@@ -79,8 +79,7 @@ void UBGraphicsProtractor::paint(QPainter *painter, const QStyleOptionGraphicsIt
painter
->
setFont
(
QFont
(
"Arial"
));
painter
->
setPen
(
drawColor
());
painter
->
setBrush
(
fillBrush
());
painter
->
drawPie
(
QRectF
(
rect
().
center
().
x
()
-
radius
(),
rect
().
center
().
y
()
-
radius
(),
2
*
radius
(),
2
*
radius
()),
mStartAngle
*
16
,
mSpan
*
16
);
painter
->
drawPie
(
QRectF
(
rect
().
center
().
x
()
-
radius
(),
rect
().
center
().
y
()
-
radius
(),
2
*
radius
(),
2
*
radius
()),
mStartAngle
*
16
,
mSpan
*
16
);
paintGraduations
(
painter
);
paintButtons
(
painter
);
paintAngleMarker
(
painter
);
...
...
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