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
96b8d5c3
Commit
96b8d5c3
authored
Aug 12, 2011
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SANKORE-155
Work with objects on the page is difficult.
parent
de2fb68f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+37
-0
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+3
-0
No files found.
src/domain/UBGraphicsScene.cpp
View file @
96b8d5c3
...
@@ -130,6 +130,9 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent)
...
@@ -130,6 +130,9 @@ UBGraphicsScene::UBGraphicsScene(UBDocumentProxy* parent)
UBApplication
::
applicationController
->
initialHScroll
(),
UBApplication
::
applicationController
->
initialHScroll
(),
UBApplication
::
applicationController
->
initialVScroll
()));
UBApplication
::
applicationController
->
initialVScroll
()));
}
}
connect
(
this
,
SIGNAL
(
selectionChanged
()),
this
,
SLOT
(
selectionChangedProcessing
()));
}
}
...
@@ -138,6 +141,29 @@ UBGraphicsScene::~UBGraphicsScene()
...
@@ -138,6 +141,29 @@ UBGraphicsScene::~UBGraphicsScene()
// NOOP
// NOOP
}
}
void
UBGraphicsScene
::
selectionChangedProcessing
()
{
QList
<
QGraphicsItem
*>
allItemsList
=
items
();
for
(
int
i
=
0
;
i
<
allItemsList
.
size
();
i
++
)
{
QGraphicsItem
*
nextItem
=
allItemsList
.
at
(
i
);
qreal
zValue
=
nextItem
->
zValue
();
nextItem
->
setZValue
(
qreal
(
1
));
qDebug
()
<<
QString
(
" %1 "
).
arg
(
i
)
<<
QString
(
" %1 "
).
arg
(
zValue
);
}
QList
<
QGraphicsItem
*>
selItemsList
=
selectedItems
();
for
(
int
i
=
0
;
i
<
selItemsList
.
size
();
i
++
)
{
QGraphicsItem
*
nextItem
=
selItemsList
.
at
(
i
);
qreal
zValue
=
nextItem
->
zValue
();
nextItem
->
setZValue
(
2
);
qDebug
()
<<
QString
(
" >>> %1 <<< "
).
arg
(
i
)
<<
QString
(
" >>> %1 <<< "
).
arg
(
zValue
);
}
}
// MARK: -
// MARK: -
// MARK: Mouse/Tablet events handling
// MARK: Mouse/Tablet events handling
...
@@ -1063,6 +1089,7 @@ void UBGraphicsScene::addGraphicsWidget(UBGraphicsWidgetItem* graphicsWidget, co
...
@@ -1063,6 +1089,7 @@ void UBGraphicsScene::addGraphicsWidget(UBGraphicsWidgetItem* graphicsWidget, co
graphicsWidget
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
graphicsWidget
->
setFlag
(
QGraphicsItem
::
ItemIsSelectable
,
true
);
graphicsWidget
->
setZValue
(
getNextObjectZIndex
());
graphicsWidget
->
setZValue
(
getNextObjectZIndex
());
// QGraphicsScene::addWidget(graphicsWidget->widgetWebView());
addItem
(
graphicsWidget
);
addItem
(
graphicsWidget
);
qreal
ssf
=
1
/
UBApplication
::
boardController
->
systemScaleFactor
();
qreal
ssf
=
1
/
UBApplication
::
boardController
->
systemScaleFactor
();
...
@@ -1079,6 +1106,16 @@ void UBGraphicsScene::addGraphicsWidget(UBGraphicsWidgetItem* graphicsWidget, co
...
@@ -1079,6 +1106,16 @@ void UBGraphicsScene::addGraphicsWidget(UBGraphicsWidgetItem* graphicsWidget, co
UBApplication
::
undoStack
->
push
(
uc
);
UBApplication
::
undoStack
->
push
(
uc
);
setDocumentUpdated
();
setDocumentUpdated
();
// graphicsWidget->widgetWebView()->setParent(graphicsWidget->v));
// QObject *zz1= graphicsWidget->widgetWebView()->parent();
// QWidget *zz2= graphicsWidget->widgetWebView()->parentWidget();
//
// QObject *zz3= graphicsWidget->parent();
// QGraphicsWidget *zz4= graphicsWidget->parentWidget();
// graphicsWidget->widgetWebView()->loadUrl();
}
}
else
else
{
{
...
...
src/domain/UBGraphicsScene.h
View file @
96b8d5c3
...
@@ -271,6 +271,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
...
@@ -271,6 +271,9 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
void
setToolCursor
(
int
tool
);
void
setToolCursor
(
int
tool
);
void
selectionChangedProcessing
();
signals
:
signals
:
void
pageSizeChanged
();
void
pageSizeChanged
();
...
...
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