forked from openlp/openlp
Changed the clipselector gui a bit.
This commit is contained in:
parent
aefef04d97
commit
f16a781309
@ -1,3 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2014 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2014 Tim Bentley, Gerald Britton, Jonathan #
|
||||
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
||||
# Meinert Jordan, Armin Köhler, Erik Lundin, Edwin Lunando, Brian T. Meyer. #
|
||||
# Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias Põldaru, #
|
||||
# Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Dave Warnock, #
|
||||
# Frode Woldsund, Martin Zibricky, Patrick Zimmermann #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
# Software Foundation; version 2 of the License. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||
# more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License along #
|
||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.common import translate
|
||||
|
||||
@ -23,92 +51,6 @@ class Ui_MediaClipSelector(object):
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.gridLayout = QtGui.QGridLayout(self.centralwidget)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.close_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.close_pushbutton.setEnabled(True)
|
||||
self.close_pushbutton.setObjectName("close_pushbutton")
|
||||
self.gridLayout.addWidget(self.close_pushbutton, 10, 4, 1, 1)
|
||||
self.pause_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.pause_pushbutton.setEnabled(True)
|
||||
self.pause_pushbutton.setText("")
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(":/slides/media_playback_pause.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.pause_pushbutton.setIcon(icon)
|
||||
self.pause_pushbutton.setObjectName("pause_pushbutton")
|
||||
self.gridLayout.addWidget(self.pause_pushbutton, 6, 1, 1, 1)
|
||||
self.play_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.play_pushbutton.setEnabled(True)
|
||||
self.play_pushbutton.setText("")
|
||||
icon1 = QtGui.QIcon()
|
||||
icon1.addPixmap(QtGui.QPixmap(":/slides/media_playback_start.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.play_pushbutton.setIcon(icon1)
|
||||
self.play_pushbutton.setObjectName("play_pushbutton")
|
||||
self.gridLayout.addWidget(self.play_pushbutton, 6, 0, 1, 1)
|
||||
self.media_path_label = QtGui.QLabel(self.centralwidget)
|
||||
self.media_path_label.setEnabled(True)
|
||||
self.media_path_label.setObjectName("media_path_label")
|
||||
self.gridLayout.addWidget(self.media_path_label, 0, 0, 1, 2)
|
||||
self.preview_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.preview_pushbutton.setEnabled(True)
|
||||
self.preview_pushbutton.setObjectName("preview_pushbutton")
|
||||
self.gridLayout.addWidget(self.preview_pushbutton, 10, 2, 1, 1)
|
||||
self.start_point_label = QtGui.QLabel(self.centralwidget)
|
||||
self.start_point_label.setEnabled(True)
|
||||
self.start_point_label.setObjectName("start_point_label")
|
||||
self.gridLayout.addWidget(self.start_point_label, 7, 0, 1, 2)
|
||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem, 9, 3, 1, 1)
|
||||
self.start_timeedit = QtGui.QTimeEdit(self.centralwidget)
|
||||
self.start_timeedit.setEnabled(True)
|
||||
self.start_timeedit.setObjectName("start_timeedit")
|
||||
self.gridLayout.addWidget(self.start_timeedit, 7, 2, 1, 1)
|
||||
self.jump_end_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.jump_end_pushbutton.setEnabled(True)
|
||||
self.jump_end_pushbutton.setObjectName("jump_end_pushbutton")
|
||||
self.gridLayout.addWidget(self.jump_end_pushbutton, 8, 4, 1, 1)
|
||||
self.subtitle_track_label = QtGui.QLabel(self.centralwidget)
|
||||
self.subtitle_track_label.setEnabled(True)
|
||||
self.subtitle_track_label.setObjectName("subtitle_track_label")
|
||||
self.gridLayout.addWidget(self.subtitle_track_label, 4, 0, 1, 2)
|
||||
self.set_end_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.set_end_pushbutton.setEnabled(True)
|
||||
self.set_end_pushbutton.setObjectName("set_end_pushbutton")
|
||||
self.gridLayout.addWidget(self.set_end_pushbutton, 8, 3, 1, 1)
|
||||
self.set_start_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.set_start_pushbutton.setEnabled(True)
|
||||
self.set_start_pushbutton.setObjectName("set_start_pushbutton")
|
||||
self.gridLayout.addWidget(self.set_start_pushbutton, 7, 3, 1, 1)
|
||||
self.audio_track_label = QtGui.QLabel(self.centralwidget)
|
||||
self.audio_track_label.setEnabled(True)
|
||||
self.audio_track_label.setObjectName("audio_track_label")
|
||||
self.gridLayout.addWidget(self.audio_track_label, 3, 0, 1, 2)
|
||||
self.load_disc_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.load_disc_pushbutton.setEnabled(True)
|
||||
self.load_disc_pushbutton.setObjectName("load_disc_pushbutton")
|
||||
self.gridLayout.addWidget(self.load_disc_pushbutton, 0, 4, 1, 1)
|
||||
self.media_position_timeedit = QtGui.QTimeEdit(self.centralwidget)
|
||||
self.media_position_timeedit.setEnabled(True)
|
||||
self.media_position_timeedit.setObjectName("media_position_timeedit")
|
||||
self.gridLayout.addWidget(self.media_position_timeedit, 6, 4, 1, 1)
|
||||
self.end_point_label = QtGui.QLabel(self.centralwidget)
|
||||
self.end_point_label.setEnabled(True)
|
||||
self.end_point_label.setObjectName("end_point_label")
|
||||
self.gridLayout.addWidget(self.end_point_label, 8, 0, 1, 1)
|
||||
self.jump_start_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.jump_start_pushbutton.setEnabled(True)
|
||||
self.jump_start_pushbutton.setObjectName("jump_start_pushbutton")
|
||||
self.gridLayout.addWidget(self.jump_start_pushbutton, 7, 4, 1, 1)
|
||||
self.end_timeedit = QtGui.QTimeEdit(self.centralwidget)
|
||||
self.end_timeedit.setEnabled(True)
|
||||
self.end_timeedit.setObjectName("end_timeedit")
|
||||
self.gridLayout.addWidget(self.end_timeedit, 8, 2, 1, 1)
|
||||
self.title_label = QtGui.QLabel(self.centralwidget)
|
||||
self.title_label.setEnabled(True)
|
||||
self.title_label.setObjectName("title_label")
|
||||
self.gridLayout.addWidget(self.title_label, 2, 0, 1, 1)
|
||||
self.save_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.save_pushbutton.setEnabled(True)
|
||||
self.save_pushbutton.setObjectName("save_pushbutton")
|
||||
self.gridLayout.addWidget(self.save_pushbutton, 10, 3, 1, 1)
|
||||
self.media_path_combobox = QtGui.QComboBox(self.centralwidget)
|
||||
self.media_path_combobox.setEnabled(True)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
||||
@ -119,26 +61,76 @@ class Ui_MediaClipSelector(object):
|
||||
self.media_path_combobox.setEditable(True)
|
||||
self.media_path_combobox.setObjectName("media_path_combobox")
|
||||
self.gridLayout.addWidget(self.media_path_combobox, 0, 2, 1, 2)
|
||||
self.position_horizontalslider = QtGui.QSlider(self.centralwidget)
|
||||
self.position_horizontalslider.setEnabled(True)
|
||||
self.position_horizontalslider.setTracking(False)
|
||||
self.position_horizontalslider.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.position_horizontalslider.setInvertedAppearance(False)
|
||||
self.position_horizontalslider.setObjectName("position_horizontalslider")
|
||||
self.gridLayout.addWidget(self.position_horizontalslider, 6, 2, 1, 2)
|
||||
self.title_combo_box = QtGui.QComboBox(self.centralwidget)
|
||||
self.title_combo_box.setEnabled(True)
|
||||
self.title_combo_box.setProperty("currentText", "")
|
||||
self.title_combo_box.setObjectName("title_combo_box")
|
||||
self.gridLayout.addWidget(self.title_combo_box, 2, 2, 1, 2)
|
||||
self.audio_tracks_combobox = QtGui.QComboBox(self.centralwidget)
|
||||
self.audio_tracks_combobox.setEnabled(True)
|
||||
self.audio_tracks_combobox.setObjectName("audio_tracks_combobox")
|
||||
self.gridLayout.addWidget(self.audio_tracks_combobox, 3, 2, 1, 2)
|
||||
self.start_timeedit = QtGui.QTimeEdit(self.centralwidget)
|
||||
self.start_timeedit.setEnabled(True)
|
||||
self.start_timeedit.setObjectName("start_timeedit")
|
||||
self.gridLayout.addWidget(self.start_timeedit, 7, 2, 1, 1)
|
||||
self.end_timeedit = QtGui.QTimeEdit(self.centralwidget)
|
||||
self.end_timeedit.setEnabled(True)
|
||||
self.end_timeedit.setObjectName("end_timeedit")
|
||||
self.gridLayout.addWidget(self.end_timeedit, 8, 2, 1, 1)
|
||||
self.set_start_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.set_start_pushbutton.setEnabled(True)
|
||||
self.set_start_pushbutton.setObjectName("set_start_pushbutton")
|
||||
self.gridLayout.addWidget(self.set_start_pushbutton, 7, 3, 1, 1)
|
||||
self.load_disc_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.load_disc_pushbutton.setEnabled(True)
|
||||
self.load_disc_pushbutton.setObjectName("load_disc_pushbutton")
|
||||
self.gridLayout.addWidget(self.load_disc_pushbutton, 0, 4, 1, 1)
|
||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||
self.gridLayout.addItem(spacerItem, 9, 3, 1, 1)
|
||||
self.play_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.play_pushbutton.setEnabled(True)
|
||||
self.play_pushbutton.setText("")
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(":/slides/media_playback_start.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.play_pushbutton.setIcon(icon)
|
||||
self.play_pushbutton.setObjectName("play_pushbutton")
|
||||
self.gridLayout.addWidget(self.play_pushbutton, 6, 0, 1, 1)
|
||||
self.end_point_label = QtGui.QLabel(self.centralwidget)
|
||||
self.end_point_label.setEnabled(True)
|
||||
self.end_point_label.setObjectName("end_point_label")
|
||||
self.gridLayout.addWidget(self.end_point_label, 8, 0, 1, 1)
|
||||
self.subtitle_tracks_combobox = QtGui.QComboBox(self.centralwidget)
|
||||
self.subtitle_tracks_combobox.setEnabled(True)
|
||||
self.subtitle_tracks_combobox.setObjectName("subtitle_tracks_combobox")
|
||||
self.gridLayout.addWidget(self.subtitle_tracks_combobox, 4, 2, 1, 2)
|
||||
self.title_label = QtGui.QLabel(self.centralwidget)
|
||||
self.title_label.setEnabled(True)
|
||||
self.title_label.setObjectName("title_label")
|
||||
self.gridLayout.addWidget(self.title_label, 2, 0, 1, 1)
|
||||
self.audio_tracks_combobox = QtGui.QComboBox(self.centralwidget)
|
||||
self.audio_tracks_combobox.setEnabled(True)
|
||||
self.audio_tracks_combobox.setObjectName("audio_tracks_combobox")
|
||||
self.gridLayout.addWidget(self.audio_tracks_combobox, 3, 2, 1, 2)
|
||||
self.set_end_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.set_end_pushbutton.setEnabled(True)
|
||||
self.set_end_pushbutton.setObjectName("set_end_pushbutton")
|
||||
self.gridLayout.addWidget(self.set_end_pushbutton, 8, 3, 1, 1)
|
||||
self.save_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.save_pushbutton.setEnabled(True)
|
||||
self.save_pushbutton.setObjectName("save_pushbutton")
|
||||
self.gridLayout.addWidget(self.save_pushbutton, 10, 3, 1, 1)
|
||||
self.close_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.close_pushbutton.setEnabled(True)
|
||||
self.close_pushbutton.setObjectName("close_pushbutton")
|
||||
self.gridLayout.addWidget(self.close_pushbutton, 10, 4, 1, 1)
|
||||
self.start_point_label = QtGui.QLabel(self.centralwidget)
|
||||
self.start_point_label.setEnabled(True)
|
||||
self.start_point_label.setObjectName("start_point_label")
|
||||
self.gridLayout.addWidget(self.start_point_label, 7, 0, 1, 2)
|
||||
self.jump_start_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.jump_start_pushbutton.setEnabled(True)
|
||||
self.jump_start_pushbutton.setObjectName("jump_start_pushbutton")
|
||||
self.gridLayout.addWidget(self.jump_start_pushbutton, 7, 4, 1, 1)
|
||||
self.audio_track_label = QtGui.QLabel(self.centralwidget)
|
||||
self.audio_track_label.setEnabled(True)
|
||||
self.audio_track_label.setObjectName("audio_track_label")
|
||||
self.gridLayout.addWidget(self.audio_track_label, 3, 0, 1, 2)
|
||||
self.media_position_timeedit = QtGui.QTimeEdit(self.centralwidget)
|
||||
self.media_position_timeedit.setEnabled(True)
|
||||
self.media_position_timeedit.setObjectName("media_position_timeedit")
|
||||
self.gridLayout.addWidget(self.media_position_timeedit, 6, 4, 1, 1)
|
||||
self.media_view_frame = QtGui.QFrame(self.centralwidget)
|
||||
self.media_view_frame.setMinimumSize(QtCore.QSize(665, 375))
|
||||
self.media_view_frame.setStyleSheet("background-color:black;")
|
||||
@ -146,6 +138,30 @@ class Ui_MediaClipSelector(object):
|
||||
self.media_view_frame.setFrameShadow(QtGui.QFrame.Raised)
|
||||
self.media_view_frame.setObjectName("media_view_frame")
|
||||
self.gridLayout.addWidget(self.media_view_frame, 5, 0, 1, 5)
|
||||
self.subtitle_track_label = QtGui.QLabel(self.centralwidget)
|
||||
self.subtitle_track_label.setEnabled(True)
|
||||
self.subtitle_track_label.setObjectName("subtitle_track_label")
|
||||
self.gridLayout.addWidget(self.subtitle_track_label, 4, 0, 1, 2)
|
||||
self.jump_end_pushbutton = QtGui.QPushButton(self.centralwidget)
|
||||
self.jump_end_pushbutton.setEnabled(True)
|
||||
self.jump_end_pushbutton.setObjectName("jump_end_pushbutton")
|
||||
self.gridLayout.addWidget(self.jump_end_pushbutton, 8, 4, 1, 1)
|
||||
self.media_path_label = QtGui.QLabel(self.centralwidget)
|
||||
self.media_path_label.setEnabled(True)
|
||||
self.media_path_label.setObjectName("media_path_label")
|
||||
self.gridLayout.addWidget(self.media_path_label, 0, 0, 1, 2)
|
||||
self.title_combo_box = QtGui.QComboBox(self.centralwidget)
|
||||
self.title_combo_box.setEnabled(True)
|
||||
self.title_combo_box.setProperty("currentText", "")
|
||||
self.title_combo_box.setObjectName("title_combo_box")
|
||||
self.gridLayout.addWidget(self.title_combo_box, 2, 2, 1, 2)
|
||||
self.position_horizontalslider = QtGui.QSlider(self.centralwidget)
|
||||
self.position_horizontalslider.setEnabled(True)
|
||||
self.position_horizontalslider.setTracking(False)
|
||||
self.position_horizontalslider.setOrientation(QtCore.Qt.Horizontal)
|
||||
self.position_horizontalslider.setInvertedAppearance(False)
|
||||
self.position_horizontalslider.setObjectName("position_horizontalslider")
|
||||
self.gridLayout.addWidget(self.position_horizontalslider, 6, 1, 1, 3)
|
||||
#MediaClipSelector.setCentralWidget(self.centralwidget)
|
||||
|
||||
self.retranslateUi(MediaClipSelector)
|
||||
@ -155,8 +171,7 @@ class Ui_MediaClipSelector(object):
|
||||
MediaClipSelector.setTabOrder(self.title_combo_box, self.audio_tracks_combobox)
|
||||
MediaClipSelector.setTabOrder(self.audio_tracks_combobox, self.subtitle_tracks_combobox)
|
||||
MediaClipSelector.setTabOrder(self.subtitle_tracks_combobox, self.play_pushbutton)
|
||||
MediaClipSelector.setTabOrder(self.play_pushbutton, self.pause_pushbutton)
|
||||
MediaClipSelector.setTabOrder(self.pause_pushbutton, self.position_horizontalslider)
|
||||
MediaClipSelector.setTabOrder(self.play_pushbutton, self.position_horizontalslider)
|
||||
MediaClipSelector.setTabOrder(self.position_horizontalslider, self.media_position_timeedit)
|
||||
MediaClipSelector.setTabOrder(self.media_position_timeedit, self.start_timeedit)
|
||||
MediaClipSelector.setTabOrder(self.start_timeedit, self.set_start_pushbutton)
|
||||
@ -164,27 +179,25 @@ class Ui_MediaClipSelector(object):
|
||||
MediaClipSelector.setTabOrder(self.jump_start_pushbutton, self.end_timeedit)
|
||||
MediaClipSelector.setTabOrder(self.end_timeedit, self.set_end_pushbutton)
|
||||
MediaClipSelector.setTabOrder(self.set_end_pushbutton, self.jump_end_pushbutton)
|
||||
MediaClipSelector.setTabOrder(self.jump_end_pushbutton, self.preview_pushbutton)
|
||||
MediaClipSelector.setTabOrder(self.preview_pushbutton, self.save_pushbutton)
|
||||
MediaClipSelector.setTabOrder(self.jump_end_pushbutton, self.save_pushbutton)
|
||||
MediaClipSelector.setTabOrder(self.save_pushbutton, self.close_pushbutton)
|
||||
|
||||
def retranslateUi(self, MediaClipSelector):
|
||||
MediaClipSelector.setWindowTitle(translate("MediaPlugin.MediaClipSelector", "Select media clip", None))
|
||||
self.close_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Close", None))
|
||||
self.media_path_label.setText(translate("MediaPlugin.MediaClipSelector", "Media path", None))
|
||||
self.preview_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Preview current clip", None))
|
||||
self.start_point_label.setText(translate("MediaPlugin.MediaClipSelector", "Start point", None))
|
||||
self.start_timeedit.setDisplayFormat(translate("MediaPlugin.MediaClipSelector", "HH:mm:ss.z", None))
|
||||
self.jump_end_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Jump to end point", None))
|
||||
self.subtitle_track_label.setText(translate("MediaPlugin.MediaClipSelector", "Subtitle track", None))
|
||||
self.set_end_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Set current position as end point", None))
|
||||
self.set_start_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Set current position as start point", None))
|
||||
self.audio_track_label.setText(translate("MediaPlugin.MediaClipSelector", "Audio track", None))
|
||||
self.load_disc_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Load disc", None))
|
||||
self.media_position_timeedit.setDisplayFormat(translate("MediaPlugin.MediaClipSelector", "HH:mm:ss.z", None))
|
||||
self.end_point_label.setText(translate("MediaPlugin.MediaClipSelector", "End point", None))
|
||||
self.jump_start_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Jump to start point", None))
|
||||
self.end_timeedit.setDisplayFormat(translate("MediaPlugin.MediaClipSelector", "HH:mm:ss.z", None))
|
||||
self.set_start_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Set current position as start point", None))
|
||||
self.load_disc_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Load disc", None))
|
||||
self.end_point_label.setText(translate("MediaPlugin.MediaClipSelector", "End point", None))
|
||||
self.title_label.setText(translate("MediaPlugin.MediaClipSelector", "Title", None))
|
||||
self.set_end_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Set current position as end point", None))
|
||||
self.save_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Save current clip", None))
|
||||
self.close_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Close", None))
|
||||
self.start_point_label.setText(translate("MediaPlugin.MediaClipSelector", "Start point", None))
|
||||
self.jump_start_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Jump to start point", None))
|
||||
self.audio_track_label.setText(translate("MediaPlugin.MediaClipSelector", "Audio track", None))
|
||||
self.media_position_timeedit.setDisplayFormat(translate("MediaPlugin.MediaClipSelector", "HH:mm:ss.z", None))
|
||||
self.subtitle_track_label.setText(translate("MediaPlugin.MediaClipSelector", "Subtitle track", None))
|
||||
self.jump_end_pushbutton.setText(translate("MediaPlugin.MediaClipSelector", "Jump to end point", None))
|
||||
self.media_path_label.setText(translate("MediaPlugin.MediaClipSelector", "Media path", None))
|
||||
|
||||
|
@ -68,6 +68,11 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector):
|
||||
self.toggle_disable_load_media(False)
|
||||
# most actions auto-connect due to the functions name, so only a few left to do
|
||||
self.close_pushbutton.clicked.connect(self.reject)
|
||||
# setup play/pause icon
|
||||
self.play_icon = QtGui.QIcon()
|
||||
self.play_icon.addPixmap(QtGui.QPixmap(":/slides/media_playback_start.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
self.pause_icon = QtGui.QIcon()
|
||||
self.pause_icon.addPixmap(QtGui.QPixmap(":/slides/media_playback_pause.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||
|
||||
def reject(self):
|
||||
"""
|
||||
@ -174,23 +179,20 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector):
|
||||
self.title_combo_box.setDisabled(False)
|
||||
self.toggle_disable_load_media(False)
|
||||
|
||||
@QtCore.pyqtSlot(bool)
|
||||
def on_pause_pushbutton_clicked(self, clicked):
|
||||
"""
|
||||
Pause the playback
|
||||
|
||||
:param clicked: Given from signal, not used.
|
||||
"""
|
||||
self.vlc_media_player.pause()
|
||||
|
||||
@QtCore.pyqtSlot(bool)
|
||||
def on_play_pushbutton_clicked(self, clicked):
|
||||
"""
|
||||
Start the playback
|
||||
Toggle the playback
|
||||
|
||||
:param clicked: Given from signal, not used.
|
||||
"""
|
||||
self.vlc_media_player.play()
|
||||
if self.vlc_media_player.get_state() == vlc.State.Playing:
|
||||
self.vlc_media_player.pause()
|
||||
self.play_pushbutton.setIcon(self.play_icon)
|
||||
else:
|
||||
self.vlc_media_player.play()
|
||||
self.media_state_wait(vlc.State.Playing)
|
||||
self.play_pushbutton.setIcon(self.pause_icon)
|
||||
|
||||
@QtCore.pyqtSlot(bool)
|
||||
def on_set_start_pushbutton_clicked(self, clicked):
|
||||
@ -394,7 +396,6 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector):
|
||||
:param action: If True elements are disabled, if False they are enabled.
|
||||
"""
|
||||
self.play_pushbutton.setDisabled(action)
|
||||
self.pause_pushbutton.setDisabled(action)
|
||||
self.position_horizontalslider.setDisabled(action)
|
||||
self.media_position_timeedit.setDisabled(action)
|
||||
self.start_timeedit.setDisabled(action)
|
||||
@ -403,7 +404,6 @@ class MediaClipSelectorForm(QtGui.QDialog, Ui_MediaClipSelector):
|
||||
self.end_timeedit.setDisabled(action)
|
||||
self.set_end_pushbutton.setDisabled(action)
|
||||
self.jump_end_pushbutton.setDisabled(action)
|
||||
self.preview_pushbutton.setDisabled(action)
|
||||
self.save_pushbutton.setDisabled(action)
|
||||
|
||||
@QtCore.pyqtSlot(bool)
|
||||
|
@ -42,71 +42,59 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="10" column="4">
|
||||
<widget class="QPushButton" name="close_pushbutton">
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="media_path_combobox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QPushButton" name="pause_pushbutton">
|
||||
<item row="7" column="2">
|
||||
<widget class="QTimeEdit" name="start_timeedit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>../images/media_playback_pause.png</normaloff>../images/media_playback_pause.png</iconset>
|
||||
<property name="displayFormat">
|
||||
<string>HH:mm:ss.z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="play_pushbutton">
|
||||
<item row="8" column="2">
|
||||
<widget class="QTimeEdit" name="end_timeedit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>../images/media_playback_start.png</normaloff>../images/media_playback_start.png</iconset>
|
||||
<property name="displayFormat">
|
||||
<string>HH:mm:ss.z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="media_path_label">
|
||||
<item row="7" column="3">
|
||||
<widget class="QPushButton" name="set_start_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Media path</string>
|
||||
<string>Set current position as start point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<widget class="QPushButton" name="preview_pushbutton">
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="load_disc_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preview current clip</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="start_point_label">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start point</string>
|
||||
<string>Load disc</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -126,83 +114,17 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QTimeEdit" name="start_timeedit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
<string>HH:mm:ss.z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="4">
|
||||
<widget class="QPushButton" name="jump_end_pushbutton">
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="play_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Jump to end point</string>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QLabel" name="subtitle_track_label">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Subtitle track</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
<widget class="QPushButton" name="set_end_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set current position as end point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="3">
|
||||
<widget class="QPushButton" name="set_start_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set current position as start point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="audio_track_label">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Audio track</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QPushButton" name="load_disc_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Load disc</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<widget class="QTimeEdit" name="media_position_timeedit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
<string>HH:mm:ss.z</string>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normaloff>../images/media_playback_start.png</normaloff>../images/media_playback_start.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -216,24 +138,11 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="4">
|
||||
<widget class="QPushButton" name="jump_start_pushbutton">
|
||||
<item row="4" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="subtitle_tracks_combobox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Jump to start point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QTimeEdit" name="end_timeedit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
<string>HH:mm:ss.z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
@ -246,6 +155,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="audio_tracks_combobox">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="3">
|
||||
<widget class="QPushButton" name="set_end_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set current position as end point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="3">
|
||||
<widget class="QPushButton" name="save_pushbutton">
|
||||
<property name="enabled">
|
||||
@ -256,60 +182,54 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="media_path_combobox">
|
||||
<item row="10" column="4">
|
||||
<widget class="QPushButton" name="close_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2" colspan="2">
|
||||
<widget class="QSlider" name="position_horizontalslider">
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="start_point_label">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="tracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
<property name="text">
|
||||
<string>Start point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="title_combo_box">
|
||||
<item row="7" column="4">
|
||||
<widget class="QPushButton" name="jump_start_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText" stdset="0">
|
||||
<string/>
|
||||
<property name="text">
|
||||
<string>Jump to start point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="audio_tracks_combobox">
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QLabel" name="audio_track_label">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Audio track</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="subtitle_tracks_combobox">
|
||||
<item row="6" column="4">
|
||||
<widget class="QTimeEdit" name="media_position_timeedit">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="displayFormat">
|
||||
<string>HH:mm:ss.z</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="5">
|
||||
@ -331,6 +251,62 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QLabel" name="subtitle_track_label">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Subtitle track</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="4">
|
||||
<widget class="QPushButton" name="jump_end_pushbutton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Jump to end point</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="media_path_label">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Media path</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QComboBox" name="title_combo_box">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText" stdset="0">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="3">
|
||||
<widget class="QSlider" name="position_horizontalslider">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="tracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedAppearance">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -341,7 +317,6 @@
|
||||
<tabstop>audio_tracks_combobox</tabstop>
|
||||
<tabstop>subtitle_tracks_combobox</tabstop>
|
||||
<tabstop>play_pushbutton</tabstop>
|
||||
<tabstop>pause_pushbutton</tabstop>
|
||||
<tabstop>position_horizontalslider</tabstop>
|
||||
<tabstop>media_position_timeedit</tabstop>
|
||||
<tabstop>start_timeedit</tabstop>
|
||||
@ -350,7 +325,6 @@
|
||||
<tabstop>end_timeedit</tabstop>
|
||||
<tabstop>set_end_pushbutton</tabstop>
|
||||
<tabstop>jump_end_pushbutton</tabstop>
|
||||
<tabstop>preview_pushbutton</tabstop>
|
||||
<tabstop>save_pushbutton</tabstop>
|
||||
<tabstop>close_pushbutton</tabstop>
|
||||
</tabstops>
|
||||
|
@ -130,6 +130,7 @@ class TestMediaClipSelectorForm(TestCase, TestMixin):
|
||||
# GIVEN: Mocked methods and some entries in the title combobox.
|
||||
with patch('PyQt4.QtGui.QDialog.exec_') as mocked_exec:
|
||||
self.form.exec_()
|
||||
self.form.vlc_media_player.get_length.return_value = 1000
|
||||
self.form.audio_tracks_combobox.itemData = MagicMock()
|
||||
self.form.subtitle_tracks_combobox.itemData = MagicMock()
|
||||
self.form.audio_tracks_combobox.itemData.return_value = None
|
||||
@ -138,7 +139,7 @@ class TestMediaClipSelectorForm(TestCase, TestMixin):
|
||||
self.form.title_combo_box.insertItem(1, 'Test Title 1')
|
||||
|
||||
# WHEN: There exists audio and subtitle tracks and the index is updated.
|
||||
self.form.vlc_media_player.audio_get_track_description.return_value = [(-1, b'Disabled'),
|
||||
self.form.vlc_media_player.audio_get_track_description.return_value = [(-1, b'Disabled'),
|
||||
(0, b'Audio Track 1')]
|
||||
self.form.vlc_media_player.video_get_spu_description.return_value = [(-1, b'Disabled'),
|
||||
(0, b'Subtitle Track 1')]
|
||||
|
Loading…
Reference in New Issue
Block a user