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
b8240514
Commit
b8240514
authored
Jan 03, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new player class
parent
34e778e1
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
439 additions
and
1 deletion
+439
-1
UBMediaPlayer.cpp
src/gui/UBMediaPlayer.cpp
+346
-0
UBMediaPlayer.h
src/gui/UBMediaPlayer.h
+92
-0
UBTeacherBarWidget.cpp
src/gui/UBTeacherBarWidget.cpp
+1
-1
No files found.
src/gui/UBMediaPlayer.cpp
0 → 100644
View file @
b8240514
This diff is collapsed.
Click to expand it.
src/gui/UBMediaPlayer.h
0 → 100644
View file @
b8240514
#ifndef UBUBMediaPlayer_H
#define UBUBMediaPlayer_H
#include <QtGui/QWidget>
#include <QtGui/QApplication>
#include <QtCore/QTimerEvent>
#include <QtGui/QShowEvent>
#include <QtGui/QIcon>
#include <QtCore/QBasicTimer>
#include <QtGui/QAction>
#include <phonon/audiooutput.h>
#include <phonon/backendcapabilities.h>
#include <phonon/effect.h>
#include <phonon/effectparameter.h>
#include <phonon/effectwidget.h>
#include <phonon/mediaobject.h>
#include <phonon/seekslider.h>
#include <phonon/videowidget.h>
#include <phonon/volumeslider.h>
QT_BEGIN_NAMESPACE
class
QPushButton
;
class
QLabel
;
class
QSlider
;
class
QTextEdit
;
QT_END_NAMESPACE
class
UBMediaPlayer
;
class
MediaVideoWidget
:
public
Phonon
::
VideoWidget
{
Q_OBJECT
;
public
:
MediaVideoWidget
(
UBMediaPlayer
*
player
,
QWidget
*
parent
=
0
);
protected
:
void
timerEvent
(
QTimerEvent
*
e
);
private
:
UBMediaPlayer
*
m_player
;
QBasicTimer
m_timer
;
// QAction m_action;
};
class
UBMediaPlayer
:
public
QWidget
{
Q_OBJECT
public
:
UBMediaPlayer
();
void
setFile
(
const
QString
&
text
);
void
setLocation
(
const
QString
&
location
);
void
setVolume
(
qreal
volume
);
public
slots
:
void
openFile
();
void
rewind
();
void
forward
();
// void updateTime();
void
finished
();
void
playPause
();
private
slots
:
void
stateChanged
(
Phonon
::
State
newstate
,
Phonon
::
State
oldstate
);
void
bufferStatus
(
int
percent
);
void
openUrl
();
void
hasVideoChanged
(
bool
);
private
:
void
initVideoWindow
();
QIcon
playIcon
;
QIcon
pauseIcon
;
QPushButton
*
playButton
;
// QPushButton *rewindButton;
// QPushButton *forwardButton;
Phonon
::
SeekSlider
*
slider
;
// QLabel *timeLabel;
QLabel
*
progressLabel
;
// QLabel *info;
QWidget
m_videoWindow
;
Phonon
::
MediaObject
m_MediaObject
;
Phonon
::
AudioOutput
m_AudioOutput
;
MediaVideoWidget
*
m_videoWidget
;
Phonon
::
Path
m_audioOutputPath
;
};
#endif // UBUBMediaPlayer_H
src/gui/UBTeacherBarWidget.cpp
View file @
b8240514
...
...
@@ -488,7 +488,7 @@ UBTeacherBarDropMediaZone::UBTeacherBarDropMediaZone(QWidget *parent, const char
mpTitleLabel
=
new
QLabel
(
tr
(
"Drop media here"
));
mpLayout
->
addWidget
(
mpTitleLabel
);
mpTabWidget
=
new
QTabWidget
();
mpTabWidget
->
setMinimumHeight
(
20
0
);
mpTabWidget
->
setMinimumHeight
(
12
0
);
mpTabWidget
->
addTab
(
mpImageTab
,
QIcon
(
":images/toolbar/extraTool.png"
),
""
);
mpTabWidget
->
addTab
(
mpVideoTab
,
QIcon
(
":images/libpalette/movieIcon.svg"
),
""
);
mpTabWidget
->
addTab
(
mpAudioTab
,
QIcon
(
":images/libpalette/soundIcon.svg"
),
""
);
...
...
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