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
1afbc194
Commit
1afbc194
authored
11 years ago
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
selection take care about two special classes text and media item. Fixed issue: 30
parent
29a36c46
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
7 deletions
+34
-7
UBBoardView.cpp
src/board/UBBoardView.cpp
+8
-7
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+12
-0
UBGraphicsMediaItem.h
src/domain/UBGraphicsMediaItem.h
+3
-0
UBGraphicsTextItem.cpp
src/domain/UBGraphicsTextItem.cpp
+9
-0
UBGraphicsTextItem.h
src/domain/UBGraphicsTextItem.h
+2
-0
No files found.
src/board/UBBoardView.cpp
View file @
1afbc194
...
...
@@ -534,12 +534,7 @@ Here we determines cases when items should to get mouse press event at pressing
case
UBGraphicsTriangle
:
:
Type
:
case
UBGraphicsCompass
:
:
Type
:
case
UBGraphicsCache
:
:
Type
:
return
true
;
case
UBGraphicsDelegateFrame
:
:
Type
:
case
QGraphicsSvgItem
:
:
Type
:
return
true
;
case
DelegateButton
:
:
Type
:
return
true
;
...
...
@@ -1233,7 +1228,6 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
{
if
(
isUBItem
(
movingItem
)
&&
DelegateButton
::
Type
!=
movingItem
->
type
()
&&
QGraphicsSvgItem
::
Type
!=
movingItem
->
type
()
&&
UBGraphicsDelegateFrame
::
Type
!=
movingItem
->
type
()
&&
UBGraphicsCache
::
Type
!=
movingItem
->
type
()
&&
QGraphicsWebView
::
Type
!=
movingItem
->
type
()
&&
// for W3C widgets as Tools.
...
...
@@ -1250,7 +1244,14 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
if
(
movingItem
->
isSelected
())
bReleaseIsNeed
=
true
;
movingItem
->
setSelected
(
true
);
UBGraphicsTextItem
*
textItem
=
dynamic_cast
<
UBGraphicsTextItem
*>
(
movingItem
);
UBGraphicsMediaItem
*
movieItem
=
dynamic_cast
<
UBGraphicsMediaItem
*>
(
movingItem
);
if
(
textItem
)
textItem
->
setSelected
(
true
);
else
if
(
movieItem
)
movieItem
->
setSelected
(
true
);
else
movingItem
->
setSelected
(
true
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsMediaItem.cpp
View file @
1afbc194
...
...
@@ -121,6 +121,18 @@ UBGraphicsMediaItem::~UBGraphicsMediaItem()
}
void
UBGraphicsMediaItem
::
setSelected
(
bool
selected
)
{
if
(
selected
){
Delegate
()
->
createControls
();
if
(
mediaType_Audio
==
mMediaType
)
Delegate
()
->
frame
()
->
setOperationMode
(
UBGraphicsDelegateFrame
::
ResizingHorizontally
);
else
Delegate
()
->
frame
()
->
setOperationMode
(
UBGraphicsDelegateFrame
::
Resizing
);
}
UBGraphicsProxyWidget
::
setSelected
(
selected
);
}
QVariant
UBGraphicsMediaItem
::
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
)
{
if
((
change
==
QGraphicsItem
::
ItemEnabledChange
)
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsMediaItem.h
View file @
1afbc194
...
...
@@ -91,6 +91,9 @@ public:
virtual
void
setSourceUrl
(
const
QUrl
&
pSourceUrl
);
void
setSelected
(
bool
selected
);
public
slots
:
void
toggleMute
();
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsTextItem.cpp
View file @
1afbc194
...
...
@@ -77,6 +77,15 @@ UBGraphicsTextItem::~UBGraphicsTextItem()
{
}
void
UBGraphicsTextItem
::
setSelected
(
bool
selected
)
{
if
(
selected
){
Delegate
()
->
createControls
();
Delegate
()
->
frame
()
->
setOperationMode
(
UBGraphicsDelegateFrame
::
Resizing
);
}
QGraphicsTextItem
::
setSelected
(
selected
);
}
QVariant
UBGraphicsTextItem
::
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
)
{
QVariant
newValue
=
value
;
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsTextItem.h
View file @
1afbc194
...
...
@@ -92,6 +92,8 @@ class UBGraphicsTextItem : public QGraphicsTextItem, public UBItem, public UBRes
virtual
void
setUuid
(
const
QUuid
&
pUuid
);
void
setHtml
(
const
QString
&
text
);
void
setSelected
(
bool
selected
);
signals
:
void
textUndoCommandAdded
(
UBGraphicsTextItem
*
textItem
);
...
...
This diff is collapsed.
Click to expand it.
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