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
95380fc8
Commit
95380fc8
authored
Jan 23, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed video issue on linux
parent
2fcf8431
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
60 additions
and
43 deletions
+60
-43
UBImportDocument.cpp
src/adaptors/UBImportDocument.cpp
+1
-2
UBImportImage.cpp
src/adaptors/UBImportImage.cpp
+0
-1
UBImportPDF.cpp
src/adaptors/UBImportPDF.cpp
+0
-1
UBMediaWidget.cpp
src/customWidgets/UBMediaWidget.cpp
+23
-6
UBMediaWidget.h
src/customWidgets/UBMediaWidget.h
+1
-0
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+0
-2
UBTBPageEditWidget.cpp
src/gui/UBTBPageEditWidget.cpp
+6
-2
UBTeacherBarPreviewWidget.cpp
src/gui/UBTeacherBarPreviewWidget.cpp
+28
-28
UBTeacherBarPreviewWidget.h
src/gui/UBTeacherBarPreviewWidget.h
+1
-1
No files found.
src/adaptors/UBImportDocument.cpp
View file @
95380fc8
...
...
@@ -14,7 +14,6 @@
*/
#include "UBImportDocument.h"
#include "UBMetadataDcSubsetAdaptor.h"
#include "document/UBDocumentProxy.h"
#include "frameworks/UBFileSystemUtils.h"
...
...
@@ -49,7 +48,7 @@ QStringList UBImportDocument::supportedExtentions()
QString
UBImportDocument
::
importFileFilter
()
{
return
tr
(
"
Sankore 3.1
(*.ubz)"
);
return
tr
(
"
Open-Sankore
(*.ubz)"
);
}
...
...
src/adaptors/UBImportImage.cpp
View file @
95380fc8
...
...
@@ -14,7 +14,6 @@
*/
#include "UBImportImage.h"
#include "UBMetadataDcSubsetAdaptor.h"
#include "UBSvgSubsetAdaptor.h"
#include "document/UBDocumentProxy.h"
...
...
src/adaptors/UBImportPDF.cpp
View file @
95380fc8
...
...
@@ -14,7 +14,6 @@
*/
#include "UBImportPDF.h"
#include "UBMetadataDcSubsetAdaptor.h"
#include "UBSvgSubsetAdaptor.h"
#include "document/UBDocumentProxy.h"
...
...
src/customWidgets/UBMediaWidget.cpp
View file @
95380fc8
...
...
@@ -103,6 +103,21 @@ eMediaType UBMediaWidget::mediaType()
return
mType
;
}
void
UBMediaWidget
::
showEvent
(
QShowEvent
*
event
)
{
if
(
!
mpVideoWidget
){
mpVideoWidget
=
new
Phonon
::
VideoWidget
(
this
);
mMediaLayout
.
addStretch
(
1
);
mMediaLayout
.
addWidget
(
mpVideoWidget
,
0
);
mMediaLayout
.
addStretch
(
1
);
Phonon
::
createPath
(
mpMediaObject
,
mpVideoWidget
);
adaptSizeToVideo
();
mpMediaObject
->
play
();
mpMediaObject
->
stop
();
}
QWidget
::
showEvent
(
event
);
}
/**
* \brief Create the media player
*/
...
...
@@ -114,12 +129,14 @@ void UBMediaWidget::createMediaPlayer()
if
(
eMediaType_Video
==
mType
){
mMediaLayout
.
setContentsMargins
(
10
,
10
,
25
,
10
);
mpVideoWidget
=
new
Phonon
::
VideoWidget
(
this
);
mMediaLayout
.
addStretch
(
1
);
mMediaLayout
.
addWidget
(
mpVideoWidget
,
0
);
mMediaLayout
.
addStretch
(
1
);
Phonon
::
createPath
(
mpMediaObject
,
mpVideoWidget
);
adaptSizeToVideo
();
if
(
isVisible
()){
mpVideoWidget
=
new
Phonon
::
VideoWidget
(
this
);
mMediaLayout
.
addStretch
(
1
);
mMediaLayout
.
addWidget
(
mpVideoWidget
,
0
);
mMediaLayout
.
addStretch
(
1
);
Phonon
::
createPath
(
mpMediaObject
,
mpVideoWidget
);
adaptSizeToVideo
();
}
mpAudioOutput
=
new
Phonon
::
AudioOutput
(
Phonon
::
VideoCategory
,
this
);
Phonon
::
createPath
(
mpMediaObject
,
mpAudioOutput
);
}
else
if
(
eMediaType_Audio
==
mType
){
...
...
src/customWidgets/UBMediaWidget.h
View file @
95380fc8
...
...
@@ -71,6 +71,7 @@ public:
protected
:
void
resizeEvent
(
QResizeEvent
*
ev
);
void
showEvent
(
QShowEvent
*
event
);
private
slots
:
void
onPlayStopClicked
();
...
...
src/document/UBDocumentController.cpp
View file @
95380fc8
...
...
@@ -37,7 +37,6 @@
#include "board/UBBoardPaletteManager.h"
#include "board/UBDrawingController.h"
//#include "gui/UBKeyboardPalette.h"
#include "gui/UBThumbnailView.h"
#include "gui/UBDocumentTreeWidget.h"
...
...
@@ -69,7 +68,6 @@ UBDocumentController::UBDocumentController(UBMainWindow* mainWindow)
,
mToolsPalette
(
0
)
,
mToolsPalettePositionned
(
false
)
,
mTrashTi
(
0
)
// , mKeyboardPalette(0)
{
setupViews
();
setupToolbar
();
...
...
src/gui/UBTBPageEditWidget.cpp
View file @
95380fc8
...
...
@@ -200,9 +200,13 @@ void UBTBPageEditWidget::updateFields()
}
// Medias
foreach
(
QString
url
,
mpDataMgr
->
mediaUrls
()){
if
(
url
.
isEmpty
())
continue
;
QWidget
*
pWidget
=
mpMediaContainer
->
generateMediaWidget
(
url
);
mpDataMgr
->
medias
()
->
append
(
pWidget
);
mpMediaContainer
->
addWidget
(
pWidget
);
if
(
pWidget
!=
NULL
){
mpDataMgr
->
medias
()
->
append
(
pWidget
);
mpMediaContainer
->
addWidget
(
pWidget
);
}
}
// Links
foreach
(
sLink
link
,
*
mpDataMgr
->
urls
()){
...
...
src/gui/UBTeacherBarPreviewWidget.cpp
View file @
95380fc8
...
...
@@ -43,34 +43,34 @@ void UBTeacherBarPreviewMedia::loadWidgets(QList<QWidget*> pWidgetsList, bool is
}
int
UBTeacherBarPreviewMedia
::
loadMedia
(
QStringList
pMedias
)
{
int
addedMedia
=
0
;
// foreach(QString eachString, pMedias){
// if(!eachString.isEmpty()){
// QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(eachString);
// if(mimeType.contains("image")){
// UBDraggableLabel* label = new UBDraggableLabel();
// label->loadImage(eachString);
// mWidget->addWidget(label);
// mWidgetList[label]=eachString;
// addedMedia += 1;
// }
// else if(mimeType.contains("video") || mimeType.contains("audio")){
// UBDraggableMediaPlayer* mediaPlayer = new UBDraggableMediaPlayer();
// mediaPlayer->setFile(eachString);
// mWidget->addWidget(mediaPlayer);
// mWidgetList[mediaPlayer] = eachString;
// addedMedia += 1;
// }
// else{
// qWarning() << "pMediaPath" << eachString;
// qWarning() << "bad idea to come here";
// }
// }
// }
return
addedMedia
;
}
//
int UBTeacherBarPreviewMedia::loadMedia(QStringList pMedias)
//
{
//
int addedMedia = 0;
//
//
foreach(QString eachString, pMedias){
//
//
if(!eachString.isEmpty()){
//
//
QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(eachString);
//
//
if(mimeType.contains("image")){
//
//
UBDraggableLabel* label = new UBDraggableLabel();
//
//
label->loadImage(eachString);
//
//
mWidget->addWidget(label);
//
//
mWidgetList[label]=eachString;
//
//
addedMedia += 1;
//
//
}
//
//
else if(mimeType.contains("video") || mimeType.contains("audio")){
//
//
UBDraggableMediaPlayer* mediaPlayer = new UBDraggableMediaPlayer();
//
//
mediaPlayer->setFile(eachString);
//
//
mWidget->addWidget(mediaPlayer);
//
//
mWidgetList[mediaPlayer] = eachString;
//
//
addedMedia += 1;
//
//
}
//
//
else{
//
//
qWarning() << "pMediaPath" << eachString;
//
//
qWarning() << "bad idea to come here";
//
//
}
//
//
}
//
//
}
//
return addedMedia;
//
}
// -----------------------------------------------------------------------------------------------
UBActionPreview
::
UBActionPreview
(
QWidget
*
parent
,
const
char
*
name
)
:
QWidget
(
parent
)
...
...
src/gui/UBTeacherBarPreviewWidget.h
View file @
95380fc8
...
...
@@ -15,7 +15,7 @@ class UBTeacherBarPreviewMedia : public QWidget
public
:
UBTeacherBarPreviewMedia
(
QWidget
*
parent
=
0
,
const
char
*
name
=
"UBTeacherBarPreviewMedia"
);
~
UBTeacherBarPreviewMedia
();
int
loadMedia
(
QStringList
pMedias
);
//
int loadMedia(QStringList pMedias);
void
loadWidgets
(
QList
<
QWidget
*>
pWidgetList
,
bool
isResizable
=
true
);
void
cleanMedia
();
...
...
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