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
46809871
Commit
46809871
authored
Jul 25, 2012
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
1f4444f2
b34926f7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
UBDrawingController.cpp
src/board/UBDrawingController.cpp
+2
-2
UBDrawingController.h
src/board/UBDrawingController.h
+5
-0
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+1
-1
UBDesktopAnnotationController.cpp
src/desktop/UBDesktopAnnotationController.cpp
+2
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+3
-3
No files found.
src/board/UBDrawingController.cpp
View file @
46809871
...
...
@@ -46,7 +46,7 @@ UBDrawingController::UBDrawingController(QObject * parent)
,
mStylusTool
((
UBStylusTool
::
Enum
)
-
1
)
,
mLatestDrawingTool
((
UBStylusTool
::
Enum
)
-
1
)
,
mDrawingMode
(
DRAWING_MODE
)
,
mIsDesktopMode
(
false
)
{
connect
(
UBSettings
::
settings
(),
SIGNAL
(
colorContextChanged
()),
this
,
SIGNAL
(
colorPaletteChanged
()));
...
...
@@ -107,7 +107,7 @@ void UBDrawingController::setStylusTool(int tool)
mStylusTool
=
(
UBStylusTool
::
Enum
)
tool
;
if
(
eDrawingMode_Vector
==
DRAWING_MODE
){
if
(
eDrawingMode_Vector
==
DRAWING_MODE
&&
!
mIsDesktopMode
){
mDrawingMode
=
eDrawingMode_Vector
;
}
...
...
src/board/UBDrawingController.h
View file @
46809871
...
...
@@ -61,6 +61,10 @@ class UBDrawingController : public QObject
UBAbstractDrawRuler
*
mActiveRuler
;
void
setInDestopMode
(
bool
mode
){
mIsDesktopMode
=
mode
;
}
public
slots
:
void
setStylusTool
(
int
tool
);
...
...
@@ -79,6 +83,7 @@ class UBDrawingController : public QObject
UBStylusTool
::
Enum
mStylusTool
;
UBStylusTool
::
Enum
mLatestDrawingTool
;
eDrawingMode
mDrawingMode
;
bool
mIsDesktopMode
;
static
UBDrawingController
*
sDrawingController
;
...
...
src/core/UBApplicationController.cpp
View file @
46809871
...
...
@@ -69,7 +69,6 @@ UBApplicationController::UBApplicationController(UBBoardView *pControlView, UBBo
,
mCheckingForUpdates
(
false
)
,
mIsShowingDesktop
(
false
)
,
mHttp
(
0
)
{
mDisplayManager
=
new
UBDisplayManager
(
this
);
...
...
@@ -457,6 +456,7 @@ void UBApplicationController::showDesktop(bool dontSwitchFrontProcess)
UBPlatformUtils
::
bringPreviousProcessToFront
();
}
UBDrawingController
::
drawingController
()
->
setInDestopMode
(
true
);
UBDrawingController
::
drawingController
()
->
setDrawingMode
(
eDrawingMode_Artistic
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
}
...
...
src/desktop/UBDesktopAnnotationController.cpp
View file @
46809871
...
...
@@ -385,6 +385,8 @@ void UBDesktopAnnotationController::goToUniboard()
hideWindow
();
UBPlatformUtils
::
setDesktopMode
(
false
);
UBDrawingController
::
drawingController
()
->
setInDestopMode
(
false
);
UBDrawingController
::
drawingController
()
->
setDrawingMode
(
eDrawingMode_Vector
);
emit
restoreUniboard
();
}
...
...
src/domain/UBGraphicsScene.cpp
View file @
46809871
...
...
@@ -558,7 +558,7 @@ bool UBGraphicsScene::inputDeviceRelease()
}
}
else
if
(
mCurrentStroke
)
{
if
(
eDrawingMode_Vector
==
DRAWING_MODE
){
if
(
eDrawingMode_Vector
==
UBDrawingController
::
drawingController
()
->
drawingMode
()
){
UBGraphicsStrokesGroup
*
pStrokes
=
new
UBGraphicsStrokesGroup
();
// Remove the strokes that were just drawn here and replace them by a stroke item
...
...
@@ -902,7 +902,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
}
}
if
(
eDrawingMode_Vector
==
DRAWING_MODE
){
if
(
eDrawingMode_Vector
==
UBDrawingController
::
drawingController
()
->
drawingMode
()
){
foreach
(
QGraphicsItem
*
item
,
toBeRemovedItems
){
UBGraphicsPolygonItem
*
poly
=
dynamic_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
NULL
!=
poly
){
...
...
@@ -920,7 +920,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
mRemovedItems
+=
toBeRemovedItems
;
}
if
(
eDrawingMode_Vector
==
DRAWING_MODE
){
if
(
eDrawingMode_Vector
==
UBDrawingController
::
drawingController
()
->
drawingMode
()
){
foreach
(
QGraphicsItem
*
item
,
toBeAddedItems
){
UBGraphicsPolygonItem
*
poly
=
dynamic_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
NULL
!=
poly
&&
NULL
!=
poly
->
strokesGroup
()){
...
...
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