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
691eb2a8
Commit
691eb2a8
authored
Nov 24, 2015
by
agriche
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Modify all paint buttons (close,reset,rotate,mark,resize buttons).
parent
411a0988
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
43 deletions
+189
-43
UBGraphicsProtractor.cpp
src/tools/UBGraphicsProtractor.cpp
+178
-41
UBGraphicsProtractor.h
src/tools/UBGraphicsProtractor.h
+11
-2
No files found.
src/tools/UBGraphicsProtractor.cpp
View file @
691eb2a8
This diff is collapsed.
Click to expand it.
src/tools/UBGraphicsProtractor.h
View file @
691eb2a8
...
...
@@ -28,13 +28,20 @@
#ifndef UBGRAPHICSPROTRACTOR_H_
#define UBGRAPHICSPROTRACTOR_H_
#include <QtGui>
//#include <QtGui>
#include <QtWidgets>
#include <QtWidgets/QGraphicsItem>
#include <QtWidgets/QGraphicsView>
#include <QtSvg>
#include "core/UB.h"
#include "tools/UBAbstractDrawRuler.h"
#include "domain/UBItem.h"
#include "frameworks/UBGeometryUtils.h"
class
UBGraphicsScene
;
class
UBGraphicsProtractor
:
public
UBAbstractDrawRuler
,
public
QGraphicsEllipseItem
,
public
UBItem
...
...
@@ -74,7 +81,8 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse
virtual
void
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
QPainterPath
shape
()
const
;
QRectF
boundingRect
()
const
;
void
paintGraduations
(
QPainter
*
painter
);
void
paintGraduations
(
QPainter
*
painter
);
private
:
// Helpers
...
...
@@ -88,6 +96,7 @@ class UBGraphicsProtractor : public UBAbstractDrawRuler, public QGraphicsEllipse
QSizeF
buttonSizeReference
()
const
{
return
QSizeF
(
radius
()
/
10
,
mCloseSvgItem
->
boundingRect
().
height
()
*
radius
()
/
(
10
*
mCloseSvgItem
->
boundingRect
().
width
()));}
QSizeF
markerSizeReference
()
const
{
return
QSizeF
(
radius
()
/
10
,
mMarkerSvgItem
->
boundingRect
().
height
()
*
radius
()
/
(
10
*
mMarkerSvgItem
->
boundingRect
().
width
()));}
QRectF
resetButtonRect
()
const
;
QRectF
closeButtonRect
()
const
;
QRectF
resizeButtonRect
()
const
;
QRectF
rotateButtonRect
()
const
{
return
QRectF
(
buttonSizeReference
().
width
()
*
5
.
5
,
-
buttonSizeReference
().
width
()
*
5
,
buttonSizeReference
().
width
(),
buttonSizeReference
().
width
());}
...
...
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