forked from openlp/openlp
refactor video display
This commit is contained in:
parent
141a9b4358
commit
e0be3b5705
@ -28,6 +28,7 @@ from servicenoteform import ServiceNoteForm
|
|||||||
from serviceitemeditform import ServiceItemEditForm
|
from serviceitemeditform import ServiceItemEditForm
|
||||||
from screen import ScreenList
|
from screen import ScreenList
|
||||||
from maindisplay import MainDisplay
|
from maindisplay import MainDisplay
|
||||||
|
from maindisplay import VideoDisplay
|
||||||
from amendthemeform import AmendThemeForm
|
from amendthemeform import AmendThemeForm
|
||||||
from slidecontroller import SlideController
|
from slidecontroller import SlideController
|
||||||
from splashscreen import SplashScreen
|
from splashscreen import SplashScreen
|
||||||
|
@ -93,7 +93,6 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'Initilisation started')
|
log.debug(u'Initilisation started')
|
||||||
DisplayWidget.__init__(self, None)
|
DisplayWidget.__init__(self, None)
|
||||||
self.videoDisplay = VideoDisplay(parent, screens)
|
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.setWindowTitle(u'OpenLP Display')
|
self.setWindowTitle(u'OpenLP Display')
|
||||||
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
||||||
@ -171,8 +170,6 @@ class MainDisplay(DisplayWidget):
|
|||||||
else:
|
else:
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
self.primary = True
|
self.primary = True
|
||||||
self.videoDisplay.setup()
|
|
||||||
self.raise_()
|
|
||||||
|
|
||||||
def resetDisplay(self):
|
def resetDisplay(self):
|
||||||
log.debug(u'resetDisplay')
|
log.debug(u'resetDisplay')
|
||||||
|
@ -30,7 +30,7 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
from openlp.core.ui import AboutForm, SettingsForm, \
|
from openlp.core.ui import AboutForm, SettingsForm, \
|
||||||
ServiceManager, ThemeManager, MainDisplay, SlideController, \
|
ServiceManager, ThemeManager, MainDisplay, SlideController, \
|
||||||
PluginForm, MediaDockManager
|
PluginForm, MediaDockManager, VideoDisplay
|
||||||
from openlp.core.lib import RenderManager, PluginConfig, build_icon, \
|
from openlp.core.lib import RenderManager, PluginConfig, build_icon, \
|
||||||
OpenLPDockWidget, SettingsManager, PluginManager, Receiver, str_to_bool
|
OpenLPDockWidget, SettingsManager, PluginManager, Receiver, str_to_bool
|
||||||
from openlp.core.utils import check_latest_version, AppLocation
|
from openlp.core.utils import check_latest_version, AppLocation
|
||||||
@ -443,6 +443,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.serviceNotSaved = False
|
self.serviceNotSaved = False
|
||||||
self.settingsmanager = SettingsManager(screens)
|
self.settingsmanager = SettingsManager(screens)
|
||||||
self.generalConfig = PluginConfig(u'General')
|
self.generalConfig = PluginConfig(u'General')
|
||||||
|
self.videoDisplay = VideoDisplay(self, screens)
|
||||||
self.mainDisplay = MainDisplay(self, screens)
|
self.mainDisplay = MainDisplay(self, screens)
|
||||||
self.aboutForm = AboutForm(self, applicationVersion)
|
self.aboutForm = AboutForm(self, applicationVersion)
|
||||||
self.settingsForm = SettingsForm(self.screens, self, self)
|
self.settingsForm = SettingsForm(self.screens, self, self)
|
||||||
@ -572,11 +573,16 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
self.showMaximized()
|
self.showMaximized()
|
||||||
#screen_number = self.getMonitorNumber()
|
#screen_number = self.getMonitorNumber()
|
||||||
self.mainDisplay.setup()
|
self.mainDisplay.setup()
|
||||||
|
self.videoDisplay.setup()
|
||||||
if self.mainDisplay.isVisible():
|
if self.mainDisplay.isVisible():
|
||||||
self.mainDisplay.setFocus()
|
self.mainDisplay.setFocus()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
if str_to_bool(self.generalConfig.get_config(u'auto open', False)):
|
if str_to_bool(self.generalConfig.get_config(u'auto open', False)):
|
||||||
self.ServiceManagerContents.onLoadService(True)
|
self.ServiceManagerContents.onLoadService(True)
|
||||||
|
self.videoDisplay.lower()
|
||||||
|
self.mainDisplay.raise_()
|
||||||
|
|
||||||
|
print self.children()
|
||||||
|
|
||||||
def blankCheck(self):
|
def blankCheck(self):
|
||||||
if str_to_bool(self.generalConfig.get_config(u'screen blank', False)) \
|
if str_to_bool(self.generalConfig.get_config(u'screen blank', False)) \
|
||||||
@ -633,16 +639,19 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
if ret == QtGui.QMessageBox.Save:
|
if ret == QtGui.QMessageBox.Save:
|
||||||
self.ServiceManagerContents.onSaveService()
|
self.ServiceManagerContents.onSaveService()
|
||||||
self.mainDisplay.close()
|
self.mainDisplay.close()
|
||||||
|
self.videoDisplay.close()
|
||||||
self.cleanUp()
|
self.cleanUp()
|
||||||
event.accept()
|
event.accept()
|
||||||
elif ret == QtGui.QMessageBox.Discard:
|
elif ret == QtGui.QMessageBox.Discard:
|
||||||
self.mainDisplay.close()
|
self.mainDisplay.close()
|
||||||
|
self.videoDisplay.close()
|
||||||
self.cleanUp()
|
self.cleanUp()
|
||||||
event.accept()
|
event.accept()
|
||||||
else:
|
else:
|
||||||
event.ignore()
|
event.ignore()
|
||||||
else:
|
else:
|
||||||
self.mainDisplay.close()
|
self.mainDisplay.close()
|
||||||
|
self.videoDisplay.close()
|
||||||
self.cleanUp()
|
self.cleanUp()
|
||||||
event.accept()
|
event.accept()
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
if item.is_media():
|
if item.is_media():
|
||||||
self.Toolbar.setVisible(False)
|
self.Toolbar.setVisible(False)
|
||||||
self.Mediabar.setVisible(True)
|
self.Mediabar.setVisible(True)
|
||||||
self.volumeSlider.setAudioOutput(self.parent.mainDisplay.videoDisplay.audio)
|
#self.volumeSlider.setAudioOutput(self.parent.mainDisplay.videoDisplay.audio)
|
||||||
|
|
||||||
def enablePreviewToolBar(self, item):
|
def enablePreviewToolBar(self, item):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user