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
47844ccf
Commit
47844ccf
authored
Oct 15, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-candidate' of
https://github.com/Sankore/Sankore-3.1
into release-candidate
Conflicts: src/tools/UBGraphicsRuler.cpp
parents
e37b3ac7
012517ac
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
24 deletions
+42
-24
UBDocumentPublisher.cpp
src/adaptors/publishing/UBDocumentPublisher.cpp
+3
-4
UBBoardController.cpp
src/board/UBBoardController.cpp
+9
-2
UBBoardView.cpp
src/board/UBBoardView.cpp
+6
-0
UBFileSystemUtils.cpp
src/frameworks/UBFileSystemUtils.cpp
+0
-1
UBGraphicsCompass.cpp
src/tools/UBGraphicsCompass.cpp
+23
-16
UBGraphicsCompass.h
src/tools/UBGraphicsCompass.h
+1
-1
No files found.
src/adaptors/publishing/UBDocumentPublisher.cpp
View file @
47844ccf
...
...
@@ -62,7 +62,6 @@ UBDocumentPublisher::UBDocumentPublisher(UBDocumentProxy* pDocument, QObject *pa
,
mPassword
(
""
)
,
bLoginCookieSet
(
false
)
{
//NOOP
init
();
}
...
...
@@ -109,7 +108,7 @@ void UBDocumentPublisher::buildUbwFile()
if
(
UBFileSystemUtils
::
copyDir
(
mSourceDocument
->
persistencePath
(),
tmpDir
))
{
Q
Uuid
publishingUuid
=
QUuid
::
createUuid
();
Q
String
documentName
=
mSourceDocument
->
name
();
mPublishingPath
=
tmpDir
;
mPublishingSize
=
mSourceDocument
->
pageCount
();
...
...
@@ -120,11 +119,11 @@ void UBDocumentPublisher::buildUbwFile()
UBExportFullPDF
pdfExporter
;
pdfExporter
.
setVerbode
(
false
);
pdfExporter
.
persistsDocument
(
mSourceDocument
,
mPublishingPath
+
"/"
+
UBStringUtils
::
toCanonicalUuid
(
publishingUuid
)
+
".pdf"
);
pdfExporter
.
persistsDocument
(
mSourceDocument
,
mPublishingPath
+
"/"
+
documentName
+
".pdf"
);
UBExportDocument
ubzExporter
;
ubzExporter
.
setVerbode
(
false
);
ubzExporter
.
persistsDocument
(
mSourceDocument
,
mPublishingPath
+
"/"
+
UBStringUtils
::
toCanonicalUuid
(
publishingUuid
)
+
".ubz"
);
ubzExporter
.
persistsDocument
(
mSourceDocument
,
mPublishingPath
+
"/"
+
documentName
+
".ubz"
);
// remove all useless files
...
...
src/board/UBBoardController.cpp
View file @
47844ccf
...
...
@@ -2364,10 +2364,17 @@ void UBBoardController::togglePodcast(bool checked)
void
UBBoardController
::
moveGraphicsWidgetToControlView
(
UBGraphicsWidgetItem
*
graphicsWidget
)
{
mActiveScene
->
setURStackEnable
(
false
);
UBGraphicsItem
*
toolW3C
=
duplicateItem
(
dynamic_cast
<
UBItem
*>
(
graphicsWidget
));
UBGraphicsWidgetItem
*
copyedGraphicsWidget
=
NULL
;
if
(
UBGraphicsWidgetItem
::
Type
==
toolW3C
->
type
())
copyedGraphicsWidget
=
static_cast
<
UBGraphicsWidgetItem
*>
(
toolW3C
);
UBToolWidget
*
toolWidget
=
new
UBToolWidget
(
copyedGraphicsWidget
,
mControlView
);
graphicsWidget
->
remove
(
false
);
mActiveScene
->
addItemToDeletion
(
graphicsWidget
);
UBToolWidget
*
toolWidget
=
new
UBToolWidget
(
graphicsWidget
,
mControlView
);
mActiveScene
->
setURStackEnable
(
true
);
QPoint
controlViewPos
=
mControlView
->
mapFromScene
(
graphicsWidget
->
sceneBoundingRect
().
center
());
...
...
src/board/UBBoardView.cpp
View file @
47844ccf
...
...
@@ -866,6 +866,7 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
mMouseDownPos
=
event
->
pos
();
movingItem
=
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()));
if
(
!
movingItem
)
emit
clickOnBoard
();
...
...
@@ -1099,6 +1100,11 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
if
(
currentTool
==
UBStylusTool
::
Selector
)
{
bool
bReleaseIsNeed
=
true
;
if
(
movingItem
!=
determineItemToPress
(
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()))))
{
movingItem
=
NULL
;
bReleaseIsNeed
=
false
;
}
if
(
mWidgetMoved
)
{
mWidgetMoved
=
false
;
...
...
src/frameworks/UBFileSystemUtils.cpp
View file @
47844ccf
...
...
@@ -397,7 +397,6 @@ QString UBFileSystemUtils::lastPathComponent(const QString& path)
QString
UBFileSystemUtils
::
mimeTypeFromFileName
(
const
QString
&
fileName
)
{
Q_ASSERT
(
fileName
.
length
());
QString
ext
=
extension
(
fileName
);
if
(
ext
==
"xls"
||
ext
==
"xlsx"
)
return
"application/msexcel"
;
...
...
src/tools/UBGraphicsCompass.cpp
View file @
47844ccf
...
...
@@ -51,6 +51,13 @@ UBGraphicsCompass::UBGraphicsCompass()
,
mDrewCenterCross
(
false
)
{
setRect
(
sDefaultRect
);
setBrush
(
QBrush
(
Qt
::
red
));
//TODO claudio: remove code duplication
QDesktopWidget
*
desktop
=
UBApplication
::
desktop
();
int
dpiCommon
=
(
desktop
->
physicalDpiX
()
+
desktop
->
physicalDpiY
())
/
2
;
mPixelsPerMillimeter
=
qRound
(
dpiCommon
/
25.4
f
);
setFlag
(
QGraphicsItem
::
ItemIsMovable
,
true
);
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
setFlag
(
QGraphicsItem
::
ItemSendsGeometryChanges
,
true
);
...
...
@@ -399,7 +406,7 @@ void UBGraphicsCompass::paintAngleDisplay(QPainter *painter)
void
UBGraphicsCompass
::
paintRadiusDisplay
(
QPainter
*
painter
)
{
qreal
radiusInCentimeters
=
rect
().
width
()
/
(
s
PixelsPerMillimeter
*
10
);
qreal
radiusInCentimeters
=
rect
().
width
()
/
(
m
PixelsPerMillimeter
*
10
);
QString
format
=
rect
().
width
()
>=
sDisplayRadiusUnitMinLength
?
"%1 cm"
:
"%1"
;
QString
radiusText
=
QString
(
format
).
arg
(
radiusInCentimeters
,
0
,
'f'
,
1
);
...
...
src/tools/UBGraphicsCompass.h
View file @
47844ccf
...
...
@@ -113,6 +113,7 @@ class UBGraphicsCompass: public QObject, public QGraphicsRectItem, public UBItem
QGraphicsSvgItem
*
mResizeSvgItem
;
qreal
mAntiScaleRatio
;
bool
mDrewCenterCross
;
int
mPixelsPerMillimeter
;
// Constants
static
const
QRect
sDefaultRect
;
...
...
@@ -130,7 +131,6 @@ class UBGraphicsCompass: public QObject, public QGraphicsRectItem, public UBItem
static
const
QColor
sDarkBackgroundEdgeFillColor
;
static
const
QColor
sDarkBackgroundMiddleFillColor
;
static
const
QColor
sDarkBackgroundDrawColor
;
static
const
int
sPixelsPerMillimeter
=
5
;
static
const
int
sDisplayRadiusOnPencilArmMinLength
=
300
;
static
const
int
sDisplayRadiusUnitMinLength
=
250
;
};
...
...
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