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