add experimental flag

This commit is contained in:
Tim Bentley 2019-04-09 18:21:35 +01:00
parent 737d320b3d
commit 0e57b10263
4 changed files with 14 additions and 19 deletions

View File

@ -129,6 +129,9 @@ class Settings(QtCore.QSettings):
``advanced/slide limits`` to ``SlideLimits.Wrap``. **NOTE**, this means that the rules have to cover all cases!
So, if the type of the old value is bool, then there must be two rules.
"""
on_monitor_default = True
if log.isEnabledFor(logging.DEBUG):
on_monitor_default = False
__default_settings__ = {
'settings/version': 0,
'advanced/add page break': False,
@ -185,6 +188,7 @@ class Settings(QtCore.QSettings):
'core/click live slide to unblank': False,
'core/blank warning': False,
'core/ccli number': '',
'core/experimental': False,
'core/has run wizard': False,
'core/language': '[en]',
'core/last version test': '',
@ -202,7 +206,7 @@ class Settings(QtCore.QSettings):
'core/view mode': 'default',
# The other display settings (display position and dimensions) are defined in the ScreenList class due to a
# circular dependency.
'core/display on monitor': False,
'core/display on monitor': on_monitor_default,
'core/override position': False,
'core/monitor': {},
'core/application version': '0.0',

View File

@ -24,6 +24,7 @@ The :mod:`~openlp.core.ui.media.playertab` module holds the configuration tab fo
"""
from PyQt5 import QtWidgets
from PyQt5.QtMultimedia import QCameraInfo, QAudioDeviceInfo, QAudio
from openlp.core.common import is_linux, is_win
from openlp.core.common.i18n import translate
@ -34,19 +35,6 @@ from openlp.core.ui.icons import UiIcons
LINUX_STREAM = 'v4l2:///dev/video0'
WIN_STREAM = 'dshow:// :dshow-vdev='
#from PyQt5.QtMultimedia import QCameraInfo, QAudioDeviceInfo, QAudio
#print('Video input:')
#for cam in QCameraInfo.availableCameras():
# print('===============')
### print(cam.deviceName())
# print(cam.description())#
#print()
#print('Audio input:')
#for au in QAudioDeviceInfo.availableDevices(QAudio.AudioInput):
# print('===============')
# print(au.deviceName())
class MediaTab(SettingsTab):
"""

View File

@ -41,7 +41,7 @@ class ScreensTab(SettingsTab):
"""
Initialise the screen settings tab
"""
self.icon_path = UiIcons().settings
self.icon_path = UiIcons().desktop
screens_translated = translate('OpenLP.ScreensTab', 'Screens')
super(ScreensTab, self).__init__(parent, 'Screens', screens_translated)
self.settings_section = 'core'

View File

@ -30,6 +30,7 @@ from openlp.core.state import State
from openlp.core.api.tab import ApiTab
from openlp.core.common.mixins import RegistryProperties
from openlp.core.common.registry import Registry
from openlp.core.common.settings import Settings
from openlp.core.lib import build_icon
from openlp.core.projectors.tab import ProjectorTab
from openlp.core.ui.advancedtab import AdvancedTab
@ -78,8 +79,8 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
self.insert_tab(self.advanced_tab)
self.insert_tab(self.screens_tab)
self.insert_tab(self.themes_tab)
self.insert_tab(self.advanced_tab)
self.insert_tab(self.player_tab)
if Settings().value('core/experimental'):
self.insert_tab(self.player_tab)
self.insert_tab(self.projector_tab)
self.insert_tab(self.api_tab)
for plugin in State().list_plugins():
@ -160,7 +161,8 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
self.themes_tab = ThemesTab(self)
self.projector_tab = ProjectorTab(self)
self.advanced_tab = AdvancedTab(self)
self.player_tab = MediaTab(self)
if Settings().value('core/experimental'):
self.player_tab = MediaTab(self)
self.api_tab = ApiTab(self)
self.screens_tab = ScreensTab(self)
except Exception as e:
@ -168,7 +170,8 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
self.general_tab.post_set_up()
self.themes_tab.post_set_up()
self.advanced_tab.post_set_up()
self.player_tab.post_set_up()
if Settings().value('core/experimental'):
self.player_tab.post_set_up()
self.api_tab.post_set_up()
for plugin in State().list_plugins():
if plugin.settings_tab: