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
02528620
Commit
02528620
authored
Sep 03, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'aleksei_kanash_dev' into develop
parents
0d1e848f
05f6cc36
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
12 deletions
+23
-12
UBBoardView.cpp
src/board/UBBoardView.cpp
+3
-0
UBGraphicsGroupContainerItem.cpp
src/domain/UBGraphicsGroupContainerItem.cpp
+14
-0
UBGraphicsGroupContainerItem.h
src/domain/UBGraphicsGroupContainerItem.h
+2
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+1
-1
UBCoreGraphicsScene.cpp
src/frameworks/UBCoreGraphicsScene.cpp
+3
-11
No files found.
src/board/UBBoardView.cpp
View file @
02528620
...
...
@@ -528,6 +528,8 @@ Here we determines cases when items should to get mouse press event at pressing
return
true
;
case
DelegateButton
:
:
Type
:
return
true
;
case
UBGraphicsMediaItem
:
:
Type
:
return
false
;
...
...
@@ -1123,6 +1125,7 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event)
else
{
if
(
isUBItem
(
movingItem
)
&&
DelegateButton
::
Type
!=
movingItem
->
type
()
&&
QGraphicsSvgItem
::
Type
!=
movingItem
->
type
()
&&
UBGraphicsDelegateFrame
::
Type
!=
movingItem
->
type
()
&&
UBToolWidget
::
Type
!=
movingItem
->
type
()
&&
...
...
src/domain/UBGraphicsGroupContainerItem.cpp
View file @
02528620
...
...
@@ -79,6 +79,8 @@ void UBGraphicsGroupContainerItem::addToGroup(QGraphicsItem *item)
item
->
setPos
(
mapFromItem
(
item
,
0
,
0
));
item
->
scene
()
->
removeItem
(
item
);
if
(
corescene
())
corescene
()
->
removeItemFromDeletion
(
item
);
item
->
setParentItem
(
this
);
// removing position from translation component of the new transform
...
...
@@ -225,6 +227,18 @@ void UBGraphicsGroupContainerItem::destroy() {
remove
();
}
void
UBGraphicsGroupContainerItem
::
clearSource
()
{
foreach
(
QGraphicsItem
*
child
,
childItems
())
{
UBGraphicsItem
*
item
=
dynamic_cast
<
UBGraphicsItem
*>
(
child
);
if
(
item
)
{
item
->
clearSource
();
}
}
}
void
UBGraphicsGroupContainerItem
::
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
mDelegate
->
mousePressEvent
(
event
))
{
...
...
src/domain/UBGraphicsGroupContainerItem.h
View file @
02528620
...
...
@@ -39,6 +39,8 @@ public:
virtual
void
setUuid
(
const
QUuid
&
pUuid
);
void
destroy
();
virtual
void
clearSource
();
protected
:
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
...
...
src/domain/UBGraphicsScene.cpp
View file @
02528620
...
...
@@ -1384,7 +1384,7 @@ UBGraphicsGroupContainerItem *UBGraphicsScene::createGroup(QList<QGraphicsItem *
}
foreach
(
QGraphicsItem
*
chItem
,
childItems
)
{
groupItem
->
addToGroup
(
chItem
);
mFastAccessItems
.
removeAll
(
i
tem
);
mFastAccessItems
.
removeAll
(
chI
tem
);
}
}
else
{
groupItem
->
addToGroup
(
item
);
...
...
src/frameworks/UBCoreGraphicsScene.cpp
View file @
02528620
...
...
@@ -53,6 +53,8 @@ UBCoreGraphicsScene::~UBCoreGraphicsScene()
void
UBCoreGraphicsScene
::
addItem
(
QGraphicsItem
*
item
)
{
addItemToDeletion
(
item
);
if
(
item
->
type
()
==
UBGraphicsGroupContainerItem
::
Type
&&
item
->
childItems
().
count
())
{
foreach
(
QGraphicsItem
*
curItem
,
item
->
childItems
())
{
removeItemFromDeletion
(
curItem
);
...
...
@@ -80,17 +82,7 @@ bool UBCoreGraphicsScene::deleteItem(QGraphicsItem* item)
{
if
(
mItemsToDelete
.
contains
(
item
))
{
UBGraphicsItem
*
item_casted
=
0
;
switch
(
item
->
type
())
{
case
UBGraphicsMediaItem
:
:
Type
:
item_casted
=
dynamic_cast
<
UBGraphicsMediaItem
*>
(
item
);
break
;
case
UBGraphicsW3CWidgetItem
:
:
Type
:
item_casted
=
dynamic_cast
<
UBGraphicsWidgetItem
*>
(
item
);
break
;
}
UBGraphicsItem
*
item_casted
=
dynamic_cast
<
UBGraphicsItem
*>
(
item
);
if
(
0
!=
item_casted
)
item_casted
->
clearSource
();
...
...
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