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! ``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. 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__ = { __default_settings__ = {
'settings/version': 0, 'settings/version': 0,
'advanced/add page break': False, 'advanced/add page break': False,
@ -185,6 +188,7 @@ class Settings(QtCore.QSettings):
'core/click live slide to unblank': False, 'core/click live slide to unblank': False,
'core/blank warning': False, 'core/blank warning': False,
'core/ccli number': '', 'core/ccli number': '',
'core/experimental': False,
'core/has run wizard': False, 'core/has run wizard': False,
'core/language': '[en]', 'core/language': '[en]',
'core/last version test': '', 'core/last version test': '',
@ -202,7 +206,7 @@ class Settings(QtCore.QSettings):
'core/view mode': 'default', 'core/view mode': 'default',
# The other display settings (display position and dimensions) are defined in the ScreenList class due to a # The other display settings (display position and dimensions) are defined in the ScreenList class due to a
# circular dependency. # circular dependency.
'core/display on monitor': False, 'core/display on monitor': on_monitor_default,
'core/override position': False, 'core/override position': False,
'core/monitor': {}, 'core/monitor': {},
'core/application version': '0.0', '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 import QtWidgets
from PyQt5.QtMultimedia import QCameraInfo, QAudioDeviceInfo, QAudio
from openlp.core.common import is_linux, is_win from openlp.core.common import is_linux, is_win
from openlp.core.common.i18n import translate from openlp.core.common.i18n import translate
@ -34,19 +35,6 @@ from openlp.core.ui.icons import UiIcons
LINUX_STREAM = 'v4l2:///dev/video0' LINUX_STREAM = 'v4l2:///dev/video0'
WIN_STREAM = 'dshow:// :dshow-vdev=' 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): class MediaTab(SettingsTab):
""" """

View File

@ -41,7 +41,7 @@ class ScreensTab(SettingsTab):
""" """
Initialise the screen settings tab Initialise the screen settings tab
""" """
self.icon_path = UiIcons().settings self.icon_path = UiIcons().desktop
screens_translated = translate('OpenLP.ScreensTab', 'Screens') screens_translated = translate('OpenLP.ScreensTab', 'Screens')
super(ScreensTab, self).__init__(parent, 'Screens', screens_translated) super(ScreensTab, self).__init__(parent, 'Screens', screens_translated)
self.settings_section = 'core' 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.api.tab import ApiTab
from openlp.core.common.mixins import RegistryProperties from openlp.core.common.mixins import RegistryProperties
from openlp.core.common.registry import Registry from openlp.core.common.registry import Registry
from openlp.core.common.settings import Settings
from openlp.core.lib import build_icon from openlp.core.lib import build_icon
from openlp.core.projectors.tab import ProjectorTab from openlp.core.projectors.tab import ProjectorTab
from openlp.core.ui.advancedtab import AdvancedTab from openlp.core.ui.advancedtab import AdvancedTab
@ -78,7 +79,7 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
self.insert_tab(self.advanced_tab) self.insert_tab(self.advanced_tab)
self.insert_tab(self.screens_tab) self.insert_tab(self.screens_tab)
self.insert_tab(self.themes_tab) self.insert_tab(self.themes_tab)
self.insert_tab(self.advanced_tab) if Settings().value('core/experimental'):
self.insert_tab(self.player_tab) self.insert_tab(self.player_tab)
self.insert_tab(self.projector_tab) self.insert_tab(self.projector_tab)
self.insert_tab(self.api_tab) self.insert_tab(self.api_tab)
@ -160,6 +161,7 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
self.themes_tab = ThemesTab(self) self.themes_tab = ThemesTab(self)
self.projector_tab = ProjectorTab(self) self.projector_tab = ProjectorTab(self)
self.advanced_tab = AdvancedTab(self) self.advanced_tab = AdvancedTab(self)
if Settings().value('core/experimental'):
self.player_tab = MediaTab(self) self.player_tab = MediaTab(self)
self.api_tab = ApiTab(self) self.api_tab = ApiTab(self)
self.screens_tab = ScreensTab(self) self.screens_tab = ScreensTab(self)
@ -168,6 +170,7 @@ class SettingsForm(QtWidgets.QDialog, Ui_SettingsDialog, RegistryProperties):
self.general_tab.post_set_up() self.general_tab.post_set_up()
self.themes_tab.post_set_up() self.themes_tab.post_set_up()
self.advanced_tab.post_set_up() self.advanced_tab.post_set_up()
if Settings().value('core/experimental'):
self.player_tab.post_set_up() self.player_tab.post_set_up()
self.api_tab.post_set_up() self.api_tab.post_set_up()
for plugin in State().list_plugins(): for plugin in State().list_plugins():