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
ce160bf3
Commit
ce160bf3
authored
Jul 30, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
806916d2
199b605f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
26 deletions
+6
-26
UBImportPDF.cpp
src/adaptors/UBImportPDF.cpp
+1
-1
UBGraphicsMediaItem.h
src/domain/UBGraphicsMediaItem.h
+1
-1
UBGraphicsMediaItemDelegate.cpp
src/domain/UBGraphicsMediaItemDelegate.cpp
+4
-21
UBGraphicsMediaItemDelegate.h
src/domain/UBGraphicsMediaItemDelegate.h
+0
-3
No files found.
src/adaptors/UBImportPDF.cpp
View file @
ce160bf3
...
...
@@ -80,7 +80,7 @@ bool UBImportPDF::addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFi
for
(
int
pdfPageNumber
=
1
;
pdfPageNumber
<=
pdfPageCount
;
pdfPageNumber
++
)
{
int
pageIndex
=
documentPageCount
+
(
pdfPageNumber
-
1
)
;
int
pageIndex
=
documentPageCount
+
pdfPageNumber
;
UBApplication
::
showMessage
(
tr
(
"Importing page %1 of %2"
).
arg
(
pdfPageNumber
).
arg
(
pdfPageCount
),
true
);
UBGraphicsScene
*
scene
=
0
;
...
...
src/domain/UBGraphicsMediaItem.h
View file @
ce160bf3
...
...
@@ -32,7 +32,7 @@ public:
class
UBAudioPresentationWidget
:
public
QWidget
{
public
:
UBAudioPresentationWidget
::
UBAudioPresentationWidget
(
QWidget
*
parent
=
NULL
)
UBAudioPresentationWidget
(
QWidget
*
parent
=
NULL
)
:
QWidget
(
parent
)
,
mBorderSize
(
10
)
,
mTitleSize
(
10
)
...
...
src/domain/UBGraphicsMediaItemDelegate.cpp
View file @
ce160bf3
...
...
@@ -36,7 +36,6 @@ UBGraphicsMediaItemDelegate::UBGraphicsMediaItemDelegate(UBGraphicsMediaItem* pD
,
mMedia
(
pMedia
)
,
mToolBarShowTimer
(
NULL
)
,
m_iToolBarShowingInterval
(
5000
)
,
mToolBarIsShown
(
false
)
{
QPalette
palette
;
palette
.
setBrush
(
QPalette
::
Light
,
Qt
::
darkGray
);
...
...
@@ -53,18 +52,12 @@ UBGraphicsMediaItemDelegate::UBGraphicsMediaItemDelegate(UBGraphicsMediaItem* pD
connect
(
mToolBarShowTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
hideToolBar
()));
mToolBarShowTimer
->
setInterval
(
m_iToolBarShowingInterval
);
}
if
(
delegated
()
->
getMediaType
()
==
UBGraphicsMediaItem
::
mediaType_Video
)
{
connect
(
UBApplication
::
boardController
,
SIGNAL
(
zoomChanged
(
qreal
)),
this
,
SLOT
(
onZoomChanged
()));
}
}
bool
UBGraphicsMediaItemDelegate
::
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
Q_UNUSED
(
event
);
mToolBarItem
->
show
();
mToolBarIsShown
=
true
;
if
(
mToolBarShowTimer
)
mToolBarShowTimer
->
start
();
...
...
@@ -75,14 +68,6 @@ bool UBGraphicsMediaItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *even
void
UBGraphicsMediaItemDelegate
::
hideToolBar
()
{
mToolBarItem
->
hide
();
mToolBarIsShown
=
false
;
}
void
UBGraphicsMediaItemDelegate
::
onZoomChanged
()
{
positionHandles
();
if
(
!
mToolBarIsShown
)
hideToolBar
();
}
void
UBGraphicsMediaItemDelegate
::
buildButtons
()
...
...
@@ -136,18 +121,16 @@ void UBGraphicsMediaItemDelegate::positionHandles()
{
UBGraphicsItemDelegate
::
positionHandles
();
qreal
AntiScaleRatio
=
1
/
(
UBApplication
::
boardController
->
systemScaleFactor
()
*
UBApplication
::
boardController
->
currentZoom
());
UBGraphicsMediaItem
*
mediaItem
=
dynamic_cast
<
UBGraphicsMediaItem
*>
(
mDelegated
);
if
(
mediaItem
)
{
QRectF
toolBarRect
=
mToolBarItem
->
rect
();
if
(
mediaItem
->
getMediaType
()
==
UBGraphicsMediaItem
::
mediaType_Video
)
{
mToolBarItem
->
setPos
(
0
,
delegated
()
->
boundingRect
().
height
()
-
mToolBarItem
->
rect
().
height
());
//*AntiScaleRatio);
mToolBarItem
->
setPos
(
0
,
delegated
()
->
boundingRect
().
height
()
-
mToolBarItem
->
rect
().
height
());
// mToolBarItem->setScale(AntiScaleRatio);
toolBarRect
.
setWidth
(
delegated
()
->
boundingRect
().
width
());
//AntiScaleRatio);
toolBarRect
.
setWidth
(
delegated
()
->
boundingRect
().
width
());
}
else
if
(
mediaItem
->
getMediaType
()
==
UBGraphicsMediaItem
::
mediaType_Audio
)
{
...
...
@@ -156,8 +139,8 @@ void UBGraphicsMediaItemDelegate::positionHandles()
if
(
audioWidget
)
borderSize
=
audioWidget
->
borderSize
();
mToolBarItem
->
setPos
(
borderSize
,
delegated
()
->
boundingRect
().
height
()
-
(
mToolBarItem
->
rect
().
height
()
+
borderSize
));
//*AntiScaleRatio);
toolBarRect
.
setWidth
((
delegated
()
->
boundingRect
().
width
()
-
2
*
borderSize
));
///AntiScaleRatio);
mToolBarItem
->
setPos
(
borderSize
,
delegated
()
->
boundingRect
().
height
()
-
(
mToolBarItem
->
rect
().
height
()
+
borderSize
));
toolBarRect
.
setWidth
((
delegated
()
->
boundingRect
().
width
()
-
2
*
borderSize
));
mToolBarItem
->
show
();
}
...
...
src/domain/UBGraphicsMediaItemDelegate.h
View file @
ce160bf3
...
...
@@ -57,8 +57,6 @@ class UBGraphicsMediaItemDelegate : public UBGraphicsItemDelegate
void
hideToolBar
();
void
onZoomChanged
();
protected
:
virtual
void
buildButtons
();
...
...
@@ -73,7 +71,6 @@ class UBGraphicsMediaItemDelegate : public UBGraphicsItemDelegate
QTimer
*
mToolBarShowTimer
;
int
m_iToolBarShowingInterval
;
bool
mToolBarIsShown
;
};
#endif
/* UBGRAPHICSMEDIAITEMDELEGATE_H_ */
\ No newline at end of file
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