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
fb56485c
Commit
fb56485c
authored
Dec 16, 2011
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sankore 378
parent
cef6e1a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
UBAbstractDrawRuler.cpp
src/tools/UBAbstractDrawRuler.cpp
+6
-2
UBAbstractDrawRuler.h
src/tools/UBAbstractDrawRuler.h
+7
-8
No files found.
src/tools/UBAbstractDrawRuler.cpp
View file @
fb56485c
...
...
@@ -35,7 +35,6 @@ const QColor UBAbstractDrawRuler::sDarkBackgroundDrawColor = QColor(0xff, 0xff,
const
int
UBAbstractDrawRuler
::
sLeftEdgeMargin
=
10
;
const
int
UBAbstractDrawRuler
::
sDegreeToQtAngleUnit
=
16
;
const
int
UBAbstractDrawRuler
::
sRotationRadius
=
15
;
const
int
UBAbstractDrawRuler
::
sPixelsPerMillimeter
=
5
;
const
int
UBAbstractDrawRuler
::
sFillTransparency
=
127
;
const
int
UBAbstractDrawRuler
::
sDrawTransparency
=
192
;
const
int
UBAbstractDrawRuler
::
sRoundingRadius
=
sLeftEdgeMargin
/
2
;
...
...
@@ -44,7 +43,12 @@ const int UBAbstractDrawRuler::sRoundingRadius = sLeftEdgeMargin / 2;
UBAbstractDrawRuler
::
UBAbstractDrawRuler
()
:
mShowButtons
(
false
)
,
mAntiScaleRatio
(
1.0
)
{}
{
//we actually need to evaluate pixels per millimeter
QDesktopWidget
*
desktop
=
UBApplication
::
desktop
();
int
dpiCommon
=
(
desktop
->
physicalDpiX
()
+
desktop
->
physicalDpiY
())
/
2
;
sPixelsPerMillimeter
=
qRound
(
dpiCommon
/
25.4
f
);
//because 1inch = 25.4 mm
}
void
UBAbstractDrawRuler
::
create
(
QGraphicsItem
&
item
)
{
...
...
src/tools/UBAbstractDrawRuler.h
View file @
fb56485c
...
...
@@ -70,14 +70,13 @@ protected:
static
const
QColor
sDarkBackgroundMiddleFillColor
;
static
const
QColor
sDarkBackgroundDrawColor
;
static
const
int
sLeftEdgeMargin
;
static
const
int
sDegreeToQtAngleUnit
;
static
const
int
sRotationRadius
;
static
const
int
sPixelsPerMillimeter
;
static
const
int
sFillTransparency
;
static
const
int
sDrawTransparency
;
static
const
int
sRoundingRadius
;
static
const
int
sLeftEdgeMargin
;
static
const
int
sDegreeToQtAngleUnit
;
static
const
int
sRotationRadius
;
static
const
int
sFillTransparency
;
static
const
int
sDrawTransparency
;
static
const
int
sRoundingRadius
;
int
sPixelsPerMillimeter
;
};
#endif
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