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
b7f5cc27
Commit
b7f5cc27
authored
Apr 09, 2017
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sceneSize function to UBGraphicsScene
parent
5d48d55c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+18
-0
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+2
-0
No files found.
src/domain/UBGraphicsScene.cpp
View file @
b7f5cc27
...
...
@@ -2257,6 +2257,24 @@ QSize UBGraphicsScene::nominalSize()
return
mNominalSize
;
}
/**
* @brief Return the scene's boundary size, including any background item
*
* If no background item is present, this returns nominalSize()
*/
QSize
UBGraphicsScene
::
sceneSize
()
{
UBGraphicsPDFItem
*
pdfItem
=
qgraphicsitem_cast
<
UBGraphicsPDFItem
*>
(
backgroundObject
());
if
(
pdfItem
)
{
QRectF
targetRect
=
pdfItem
->
sceneBoundingRect
();
return
targetRect
.
size
().
toSize
();
}
else
return
nominalSize
();
}
void
UBGraphicsScene
::
setNominalSize
(
const
QSize
&
pSize
)
{
if
(
nominalSize
()
!=
pSize
)
...
...
src/domain/UBGraphicsScene.h
View file @
b7f5cc27
...
...
@@ -277,6 +277,8 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
QSize
nominalSize
();
QSize
sceneSize
();
void
setNominalSize
(
const
QSize
&
pSize
);
void
setNominalSize
(
int
pWidth
,
int
pHeight
);
...
...
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