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
529106dc
Commit
529106dc
authored
Aug 15, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue 891
parent
4eda8fd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
UBBoardView.cpp
src/board/UBBoardView.cpp
+26
-0
UBBoardView.h
src/board/UBBoardView.h
+2
-0
No files found.
src/board/UBBoardView.cpp
View file @
529106dc
...
...
@@ -144,6 +144,8 @@ UBBoardView::init ()
movingItem
=
NULL
;
mWidgetMoved
=
false
;
connectToStylusPalette
();
}
UBGraphicsScene
*
...
...
@@ -1440,3 +1442,27 @@ UBBoardView::setToolCursor (int tool)
}
}
void
UBBoardView
::
connectToStylusPalette
()
{
connect
(
UBApplication
::
mainWindow
->
actionPen
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionEraser
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionMarker
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionPointer
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionPlay
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionZoomIn
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionZoomOut
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionCapture
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionHand
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionLine
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionText
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
connect
(
UBApplication
::
mainWindow
->
actionSelector
,
SIGNAL
(
triggered
(
bool
)),
this
,
SLOT
(
onTriggeredAction
(
bool
)));
}
void
UBBoardView
::
onTriggeredAction
(
bool
checked
)
{
Q_UNUSED
(
checked
);
QList
<
QGraphicsItem
*>
it
=
scene
()
->
selectedItems
();
foreach
(
QGraphicsItem
*
i
,
it
){
i
->
setSelected
(
false
);
}
}
src/board/UBBoardView.h
View file @
529106dc
...
...
@@ -94,6 +94,7 @@ class UBBoardView : public QGraphicsView
private
:
void
init
();
void
connectToStylusPalette
();
inline
bool
shouldDisplayItem
(
QGraphicsItem
*
item
)
{
...
...
@@ -151,6 +152,7 @@ class UBBoardView : public QGraphicsView
private
slots
:
void
settingChanged
(
QVariant
newValue
);
void
onTriggeredAction
(
bool
checked
);
public
slots
:
...
...
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