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
0d1e848f
Commit
0d1e848f
authored
12 years ago
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/anatoly_dev' into develop
parents
b3c19870
5816a17f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
191 additions
and
182 deletions
+191
-182
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+160
-150
UBDocumentController.h
src/document/UBDocumentController.h
+3
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+11
-20
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+0
-12
UBCoreGraphicsScene.cpp
src/frameworks/UBCoreGraphicsScene.cpp
+4
-0
UBCoreGraphicsScene.h
src/frameworks/UBCoreGraphicsScene.h
+13
-0
No files found.
src/document/UBDocumentController.cpp
View file @
0d1e848f
This diff is collapsed.
Click to expand it.
src/document/UBDocumentController.h
View file @
0d1e848f
...
...
@@ -111,6 +111,9 @@ class UBDocumentController : public UBDocumentContainer
bool
mToolsPalettePositionned
;
UBDocumentGroupTreeItem
*
mTrashTi
;
void
moveDocumentToTrash
(
UBDocumentGroupTreeItem
*
groupTi
,
UBDocumentProxyTreeItem
*
proxyTi
);
void
moveFolderToTrash
(
UBDocumentGroupTreeItem
*
groupTi
);
private
slots
:
void
documentZoomSliderValueChanged
(
int
value
);
void
loadDocumentProxies
();
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsScene.cpp
View file @
0d1e848f
...
...
@@ -263,7 +263,6 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent)
,
mCrossedBackground
(
false
)
,
mIsDesktopMode
(
false
)
,
mZoomFactor
(
1
)
,
mIsModified
(
true
)
,
mBackgroundObject
(
0
)
,
mPreviousWidth
(
0
)
,
mInputDeviceIsPressed
(
false
)
...
...
@@ -1116,15 +1115,14 @@ void UBGraphicsScene::clearItems()
{
QGraphicsItem
*
item
=
itItems
.
next
();
if
(
!
item
->
parentItem
())
{
UBGraphicsPolygonItem
*
pi
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
)
;
bool
isGroup
=
qgraphicsitem_cast
<
UBGraphicsGroupContainerItem
*>
(
item
)
!=
NULL
;
bool
isPolygon
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
)
!=
NULL
;
bool
isStrokesGroup
=
qgraphicsitem_cast
<
UBGraphicsStrokesGroup
*>
(
item
)
!=
NULL
;
if
(
!
pi
&&
!
mTools
.
contains
(
item
)
&&
!
isBackgroundObject
(
item
))
{
removeItem
(
item
);
removedItems
<<
item
;
}
if
(
!
isGroup
&&
!
isPolygon
&&
!
isStrokesGroup
&&
!
mTools
.
contains
(
item
)
&&
!
isBackgroundObject
(
item
))
{
removeItem
(
item
);
removedItems
<<
item
;
}
}
...
...
@@ -1587,7 +1585,6 @@ UBGraphicsTextItem *UBGraphicsScene::addTextHtml(const QString &pString, const Q
void
UBGraphicsScene
::
addItem
(
QGraphicsItem
*
item
)
{
setModified
(
true
);
UBCoreGraphicsScene
::
addItem
(
item
);
UBGraphicsItem
::
assignZValue
(
item
,
mZLayerController
->
generateZLevel
(
item
));
...
...
@@ -1600,8 +1597,6 @@ void UBGraphicsScene::addItem(QGraphicsItem* item)
void
UBGraphicsScene
::
addItems
(
const
QSet
<
QGraphicsItem
*>&
items
)
{
setModified
(
true
);
foreach
(
QGraphicsItem
*
item
,
items
)
{
UBCoreGraphicsScene
::
addItem
(
item
);
UBGraphicsItem
::
assignZValue
(
item
,
mZLayerController
->
generateZLevel
(
item
));
...
...
@@ -1614,7 +1609,6 @@ void UBGraphicsScene::addItems(const QSet<QGraphicsItem*>& items)
void
UBGraphicsScene
::
removeItem
(
QGraphicsItem
*
item
)
{
setModified
(
true
);
item
->
setSelected
(
false
);
UBCoreGraphicsScene
::
removeItem
(
item
);
UBApplication
::
boardController
->
freezeW3CWidget
(
item
,
true
);
...
...
@@ -1627,8 +1621,6 @@ void UBGraphicsScene::removeItem(QGraphicsItem* item)
void
UBGraphicsScene
::
removeItems
(
const
QSet
<
QGraphicsItem
*>&
items
)
{
setModified
(
true
);
foreach
(
QGraphicsItem
*
item
,
items
)
UBCoreGraphicsScene
::
removeItem
(
item
);
...
...
@@ -1786,7 +1778,6 @@ void UBGraphicsScene::addRuler(QPointF center)
addItem
(
ruler
);
ruler
->
setVisible
(
true
);
setModified
(
true
);
}
void
UBGraphicsScene
::
addProtractor
(
QPointF
center
)
...
...
@@ -1804,7 +1795,6 @@ void UBGraphicsScene::addProtractor(QPointF center)
protractor
->
moveBy
(
center
.
x
()
-
itemSceneCenter
.
x
(),
center
.
y
()
-
itemSceneCenter
.
y
());
protractor
->
setVisible
(
true
);
setModified
(
true
);
}
void
UBGraphicsScene
::
addTriangle
(
QPointF
center
)
...
...
@@ -1822,7 +1812,6 @@ void UBGraphicsScene::addTriangle(QPointF center)
triangle
->
moveBy
(
center
.
x
()
-
itemSceneCenter
.
x
(),
center
.
y
()
-
itemSceneCenter
.
y
());
triangle
->
setVisible
(
true
);
setModified
(
true
);
}
void
UBGraphicsScene
::
addMagnifier
(
UBMagnifierParams
params
)
...
...
@@ -1881,6 +1870,7 @@ void UBGraphicsScene::moveMagnifier()
{
QPoint
magnifierPos
=
QPoint
(
magniferControlViewWidget
->
pos
().
x
()
+
magniferControlViewWidget
->
size
().
width
()
/
2
,
magniferControlViewWidget
->
pos
().
y
()
+
magniferControlViewWidget
->
size
().
height
()
/
2
);
moveMagnifier
(
magnifierPos
,
true
);
setModified
(
true
);
}
}
...
...
@@ -1913,6 +1903,7 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos, bool forceGrab)
void
UBGraphicsScene
::
closeMagnifier
()
{
DisposeMagnifierQWidgets
();
setModified
(
true
);
}
void
UBGraphicsScene
::
zoomInMagnifier
()
...
...
@@ -1930,6 +1921,7 @@ void UBGraphicsScene::zoomOutMagnifier()
{
magniferControlViewWidget
->
setZoom
(
magniferControlViewWidget
->
params
.
zoom
-
0.5
);
magniferDisplayViewWidget
->
setZoom
(
magniferDisplayViewWidget
->
params
.
zoom
-
0.5
);
setModified
(
true
);
}
}
...
...
@@ -1941,6 +1933,7 @@ void UBGraphicsScene::resizedMagnifier(qreal newPercent)
magniferControlViewWidget
->
grabPoint
();
magniferDisplayViewWidget
->
setSize
(
newPercent
);
magniferDisplayViewWidget
->
grabPoint
();
setModified
(
true
);
}
}
...
...
@@ -1956,7 +1949,6 @@ void UBGraphicsScene::addCompass(QPointF center)
compass
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
QVariant
(
UBItemLayerType
::
Tool
));
compass
->
setVisible
(
true
);
setModified
(
true
);
}
void
UBGraphicsScene
::
addCache
()
...
...
@@ -1986,7 +1978,6 @@ void UBGraphicsScene::addMask(const QPointF ¢er)
curtain
->
setRect
(
rect
);
curtain
->
setVisible
(
true
);
curtain
->
setSelected
(
true
);
setModified
(
true
);
}
void
UBGraphicsScene
::
setRenderingQuality
(
UBItem
::
RenderingQuality
pRenderingQuality
)
...
...
This diff is collapsed.
Click to expand it.
src/domain/UBGraphicsScene.h
View file @
0d1e848f
...
...
@@ -179,16 +179,6 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
bool
isEmpty
()
const
;
bool
isModified
()
const
{
return
mIsModified
;
}
void
setModified
(
bool
pModified
)
{
mIsModified
=
pModified
;
}
void
setDocument
(
UBDocumentProxy
*
pDocument
);
UBDocumentProxy
*
document
()
const
...
...
@@ -380,8 +370,6 @@ public slots:
bool
mIsDesktopMode
;
qreal
mZoomFactor
;
bool
mIsModified
;
QGraphicsItem
*
mBackgroundObject
;
QPointF
mPreviousPoint
;
...
...
This diff is collapsed.
Click to expand it.
src/frameworks/UBCoreGraphicsScene.cpp
View file @
0d1e848f
...
...
@@ -23,6 +23,7 @@
UBCoreGraphicsScene
::
UBCoreGraphicsScene
(
QObject
*
parent
)
:
QGraphicsScene
(
parent
)
,
mIsModified
(
true
)
{
//NOOP
}
...
...
@@ -60,6 +61,8 @@ void UBCoreGraphicsScene::addItem(QGraphicsItem* item)
if
(
item
->
scene
()
!=
this
)
QGraphicsScene
::
addItem
(
item
);
setModified
(
true
);
}
...
...
@@ -70,6 +73,7 @@ void UBCoreGraphicsScene::removeItem(QGraphicsItem* item, bool forceDelete)
{
deleteItem
(
item
);
}
setModified
(
true
);
}
bool
UBCoreGraphicsScene
::
deleteItem
(
QGraphicsItem
*
item
)
...
...
This diff is collapsed.
Click to expand it.
src/frameworks/UBCoreGraphicsScene.h
View file @
0d1e848f
...
...
@@ -33,8 +33,21 @@ class UBCoreGraphicsScene : public QGraphicsScene
void
removeItemFromDeletion
(
QGraphicsItem
*
item
);
void
addItemToDeletion
(
QGraphicsItem
*
item
);
bool
isModified
()
const
{
return
mIsModified
;
}
void
setModified
(
bool
pModified
)
{
mIsModified
=
pModified
;
}
private
:
QSet
<
QGraphicsItem
*>
mItemsToDelete
;
bool
mIsModified
;
};
#endif
/* UBCOREGRAPHICSSCENE_H_ */
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