diff --git a/weboob/frontends/qvideoob/ui/video.ui b/weboob/frontends/qvideoob/ui/video.ui
index 58ab2b41..acf5e957 100644
--- a/weboob/frontends/qvideoob/ui/video.ui
+++ b/weboob/frontends/qvideoob/ui/video.ui
@@ -51,6 +51,28 @@
QFrame::Sunken
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ -
+
+
+ true
+
+
+ true
+
+
+
+
-
@@ -62,8 +84,11 @@
QFrame::Raised
-
-
-
+
+ QFormLayout::ExpandingFieldsGrow
+
+
-
+
75
@@ -71,65 +96,30 @@
- Author
-
-
-
- -
-
-
-
- 75
- true
-
-
-
- Date
-
-
-
- -
-
-
-
- 75
- true
-
-
-
- Rating
-
-
-
- -
-
-
- TextLabel
-
-
-
- -
-
-
- TextLabel
-
-
-
- -
-
-
- TextLabel
+ URL
-
-
-
- TextLabel
+
+
+ true
+
+
+ ArrowCursor
+
+
+ true
+
+
+ false
+
+
+ true
- -
+
-
@@ -142,11 +132,90 @@
+ -
+
+
+ TextLabel
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Author
+
+
+
+ -
+
+
+ TextLabel
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Date
+
+
+
+ -
+
+
+ TextLabel
+
+
+
+ -
+
+
+
+ 75
+ true
+
+
+
+ Rating
+
+
+
+ -
+
+
+ TextLabel
+
+
+
+
+
+ Phonon::VideoPlayer
+ QWidget
+
+
+
+ Phonon::SeekSlider
+ QWidget
+
+
+
diff --git a/weboob/frontends/qvideoob/ui/video_ui.py b/weboob/frontends/qvideoob/ui/video_ui.py
index a32a5c3a..54a733de 100644
--- a/weboob/frontends/qvideoob/ui/video_ui.py
+++ b/weboob/frontends/qvideoob/ui/video_ui.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'video.ui'
#
-# Created: Sat Apr 17 10:11:11 2010
+# Created: Sat Apr 17 12:19:03 2010
# by: PyQt4 UI code generator 4.6
#
# WARNING! All changes made in this file will be lost!
@@ -35,53 +35,80 @@ class Ui_Video(object):
self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame.setFrameShadow(QtGui.QFrame.Sunken)
self.frame.setObjectName("frame")
+ self.verticalLayout_2 = QtGui.QVBoxLayout(self.frame)
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ self.videoPlayer = phonon.Phonon.VideoPlayer(self.frame)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.MinimumExpanding)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.videoPlayer.sizePolicy().hasHeightForWidth())
+ self.videoPlayer.setSizePolicy(sizePolicy)
+ self.videoPlayer.setObjectName("videoPlayer")
+ self.verticalLayout_2.addWidget(self.videoPlayer)
+ self.seekSlider = phonon.Phonon.SeekSlider(self.frame)
+ self.seekSlider.setIconVisible(True)
+ self.seekSlider.setTracking(True)
+ self.seekSlider.setObjectName("seekSlider")
+ self.verticalLayout_2.addWidget(self.seekSlider)
self.verticalLayout.addWidget(self.frame)
self.frame_2 = QtGui.QFrame(Video)
self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
self.frame_2.setObjectName("frame_2")
self.formLayout = QtGui.QFormLayout(self.frame_2)
+ self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
self.formLayout.setObjectName("formLayout")
- self.label = QtGui.QLabel(self.frame_2)
+ self.label_4 = QtGui.QLabel(self.frame_2)
font = QtGui.QFont()
font.setWeight(75)
font.setBold(True)
- self.label.setFont(font)
- self.label.setObjectName("label")
- self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label)
- self.label_2 = QtGui.QLabel(self.frame_2)
- font = QtGui.QFont()
- font.setWeight(75)
- font.setBold(True)
- self.label_2.setFont(font)
- self.label_2.setObjectName("label_2")
- self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label_2)
- self.label_3 = QtGui.QLabel(self.frame_2)
- font = QtGui.QFont()
- font.setWeight(75)
- font.setBold(True)
- self.label_3.setFont(font)
- self.label_3.setObjectName("label_3")
- self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_3)
- self.authorLabel = QtGui.QLabel(self.frame_2)
- self.authorLabel.setObjectName("authorLabel")
- self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.authorLabel)
- self.dateLabel = QtGui.QLabel(self.frame_2)
- self.dateLabel.setObjectName("dateLabel")
- self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.dateLabel)
- self.ratingLabel = QtGui.QLabel(self.frame_2)
- self.ratingLabel.setObjectName("ratingLabel")
- self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.ratingLabel)
- self.durationLabel = QtGui.QLabel(self.frame_2)
- self.durationLabel.setObjectName("durationLabel")
- self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.durationLabel)
+ self.label_4.setFont(font)
+ self.label_4.setObjectName("label_4")
+ self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_4)
+ self.urlEdit = QtGui.QLineEdit(self.frame_2)
+ self.urlEdit.setReadOnly(True)
+ self.urlEdit.setObjectName("urlEdit")
+ self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.urlEdit)
self.label_8 = QtGui.QLabel(self.frame_2)
font = QtGui.QFont()
font.setWeight(75)
font.setBold(True)
self.label_8.setFont(font)
self.label_8.setObjectName("label_8")
- self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_8)
+ self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_8)
+ self.durationLabel = QtGui.QLabel(self.frame_2)
+ self.durationLabel.setObjectName("durationLabel")
+ self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.durationLabel)
+ self.label = QtGui.QLabel(self.frame_2)
+ font = QtGui.QFont()
+ font.setWeight(75)
+ font.setBold(True)
+ self.label.setFont(font)
+ self.label.setObjectName("label")
+ self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label)
+ self.authorLabel = QtGui.QLabel(self.frame_2)
+ self.authorLabel.setObjectName("authorLabel")
+ self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.authorLabel)
+ self.label_2 = QtGui.QLabel(self.frame_2)
+ font = QtGui.QFont()
+ font.setWeight(75)
+ font.setBold(True)
+ self.label_2.setFont(font)
+ self.label_2.setObjectName("label_2")
+ self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.label_2)
+ self.dateLabel = QtGui.QLabel(self.frame_2)
+ self.dateLabel.setObjectName("dateLabel")
+ self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.dateLabel)
+ self.label_3 = QtGui.QLabel(self.frame_2)
+ font = QtGui.QFont()
+ font.setWeight(75)
+ font.setBold(True)
+ self.label_3.setFont(font)
+ self.label_3.setObjectName("label_3")
+ self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.label_3)
+ self.ratingLabel = QtGui.QLabel(self.frame_2)
+ self.ratingLabel.setObjectName("ratingLabel")
+ self.formLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.ratingLabel)
self.verticalLayout.addWidget(self.frame_2)
self.retranslateUi(Video)
@@ -90,12 +117,14 @@ class Ui_Video(object):
def retranslateUi(self, Video):
Video.setWindowTitle(QtGui.QApplication.translate("Video", "Video", None, QtGui.QApplication.UnicodeUTF8))
self.titleLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
- self.label.setText(QtGui.QApplication.translate("Video", "Author", None, QtGui.QApplication.UnicodeUTF8))
- self.label_2.setText(QtGui.QApplication.translate("Video", "Date", None, QtGui.QApplication.UnicodeUTF8))
- self.label_3.setText(QtGui.QApplication.translate("Video", "Rating", None, QtGui.QApplication.UnicodeUTF8))
- self.authorLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
- self.dateLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
- self.ratingLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
- self.durationLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_4.setText(QtGui.QApplication.translate("Video", "URL", None, QtGui.QApplication.UnicodeUTF8))
self.label_8.setText(QtGui.QApplication.translate("Video", "Duration", None, QtGui.QApplication.UnicodeUTF8))
+ self.durationLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
+ self.label.setText(QtGui.QApplication.translate("Video", "Author", None, QtGui.QApplication.UnicodeUTF8))
+ self.authorLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("Video", "Date", None, QtGui.QApplication.UnicodeUTF8))
+ self.dateLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_3.setText(QtGui.QApplication.translate("Video", "Rating", None, QtGui.QApplication.UnicodeUTF8))
+ self.ratingLabel.setText(QtGui.QApplication.translate("Video", "TextLabel", None, QtGui.QApplication.UnicodeUTF8))
+from PyQt4 import phonon
diff --git a/weboob/frontends/qvideoob/video.py b/weboob/frontends/qvideoob/video.py
index e72d4564..cb784304 100644
--- a/weboob/frontends/qvideoob/video.py
+++ b/weboob/frontends/qvideoob/video.py
@@ -18,7 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""
+from PyQt4.QtCore import QUrl
from PyQt4.QtGui import QDialog
+from PyQt4.phonon import Phonon
from weboob.frontends.qvideoob.ui.video_ui import Ui_Video
@@ -30,6 +32,7 @@ class Video(QDialog):
self.video = video
self.setWindowTitle("Video - %s" % video.title)
+ self.ui.urlEdit.setText(video.url)
self.ui.titleLabel.setText(video.title)
self.ui.durationLabel.setText('%d:%02d:%02d' % (video.duration/3600, (video.duration%3600)/60, video.duration%60))
self.ui.authorLabel.setText(unicode(video.author))
@@ -38,3 +41,11 @@ class Video(QDialog):
self.ui.ratingLabel.setText('%s / %s' % (video.rating, video.rating_max))
else:
self.ui.ratingLabel.setText('%s' % video.rating)
+
+ self.ui.seekSlider.setMediaObject(self.ui.videoPlayer.mediaObject())
+ self.ui.videoPlayer.load(Phonon.MediaSource(QUrl(video.url)))
+ self.ui.videoPlayer.play()
+
+ def closeEvent(self, event):
+ self.ui.videoPlayer.stop()
+ event.accept()