diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index b8baa97a5..a83d17862 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -45,6 +45,7 @@ class BackgroundType(object): Image = 2 Transparent = 3 Video = 4 + Stream = 5 @staticmethod def to_string(background_type): @@ -61,6 +62,8 @@ class BackgroundType(object): return 'transparent' elif background_type == BackgroundType.Video: return 'video' + elif background_type == BackgroundType.Stream: + return 'stream' @staticmethod def from_string(type_string): @@ -77,6 +80,8 @@ class BackgroundType(object): return BackgroundType.Transparent elif type_string == 'video': return BackgroundType.Video + elif type_string == 'stream': + return BackgroundType.Stream class BackgroundGradientType(object): diff --git a/openlp/core/ui/media/mediatab.py b/openlp/core/ui/media/mediatab.py index 315bc2bef..acc04569a 100644 --- a/openlp/core/ui/media/mediatab.py +++ b/openlp/core/ui/media/mediatab.py @@ -60,17 +60,28 @@ class MediaTab(SettingsTab): super(MediaTab, self).setupUi() self.live_media_group_box = QtWidgets.QGroupBox(self.left_column) self.live_media_group_box.setObjectName('live_media_group_box') + self.media_layout = QtWidgets.QVBoxLayout(self.live_media_group_box) self.media_layout.setObjectName('live_media_layout') + self.auto_start_check_box = QtWidgets.QCheckBox(self.live_media_group_box) self.auto_start_check_box.setObjectName('auto_start_check_box') self.media_layout.addWidget(self.auto_start_check_box) + self.left_layout.addWidget(self.live_media_group_box) + self.stream_media_group_box = QtWidgets.QGroupBox(self.left_column) self.stream_media_group_box.setObjectName('stream_media_group_box') + + self.stream_edit_field = QtWidgets.QLineEdit(self.stream_media_group_box) + self.stream_edit_field.setObjectName('stream_edit_field') + self.media_layout.addWidget(self.stream_edit_field) + + self.media_layout.addWidget(self.stream_media_group_box) self.media_layout = QtWidgets.QVBoxLayout(self.stream_media_group_box) self.media_layout.setObjectName('media_layout') self.left_layout.addWidget(self.stream_media_group_box) + self.left_layout.addStretch() self.right_layout.addStretch() # self.background_color_group_box = QtWidgets.QGroupBox(self.left_column) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 75f2ad154..58e6f026d 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -33,6 +33,7 @@ from openlp.core.common.registry import Registry from openlp.core.lib.theme import BackgroundType, BackgroundGradientType from openlp.core.lib.ui import critical_error_message_box from openlp.core.ui.themelayoutform import ThemeLayoutForm +from openlp.core.ui.media.vlcplayer import VIDEO_EXT from .themewizard import Ui_ThemeWizard log = logging.getLogger(__name__) @@ -323,6 +324,8 @@ class ThemeForm(QtWidgets.QWizard, Ui_ThemeWizard, RegistryProperties): self.video_color_button.color = self.theme.background_border_color self.video_path_edit.path = self.theme.background_filename self.setField('background_type', 4) + elif self.theme.background_type == BackgroundType.to_string(BackgroundType.Stream): + self.setField('background_type', 5) elif self.theme.background_type == BackgroundType.to_string(BackgroundType.Transparent): self.setField('background_type', 3) if self.theme.background_direction == BackgroundGradientType.to_string(BackgroundGradientType.Horizontal): diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index 0219ef758..f79bf0b35 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -64,7 +64,7 @@ class Ui_ThemeWizard(object): self.background_label = QtWidgets.QLabel(self.background_page) self.background_label.setObjectName('background_label') self.background_combo_box = QtWidgets.QComboBox(self.background_page) - self.background_combo_box.addItems(['', '', '', '', '']) + self.background_combo_box.addItems(['', '', '', '', '', '']) self.background_combo_box.setObjectName('background_combo_box') self.background_type_layout.addRow(self.background_label, self.background_combo_box) self.background_type_layout.setItem(1, QtWidgets.QFormLayout.LabelRole, self.spacer) @@ -410,6 +410,8 @@ class Ui_ThemeWizard(object): self.background_combo_box.setItemText(BackgroundType.Video, UiStrings().Video) self.background_combo_box.setItemText(BackgroundType.Transparent, translate('OpenLP.ThemeWizard', 'Transparent')) + self.background_combo_box.setItemText(BackgroundType.Stream, + translate('OpenLP.ThemeWizard', 'Live Stream')) self.color_label.setText(translate('OpenLP.ThemeWizard', 'color:')) self.gradient_start_label.setText(translate('OpenLP.ThemeWizard', 'Starting color:')) self.gradient_end_label.setText(translate('OpenLP.ThemeWizard', 'Ending color:'))