forked from openlp/openlp
Display Hook cleanups
This commit is contained in:
parent
dcd48d1042
commit
a766542854
@ -42,6 +42,14 @@ class DisplayManager(QtGui.QWidget):
|
|||||||
self.videoDisplay = VideoDisplay(self, screens)
|
self.videoDisplay = VideoDisplay(self, screens)
|
||||||
self.mainDisplay = MainDisplay(self, screens)
|
self.mainDisplay = MainDisplay(self, screens)
|
||||||
|
|
||||||
|
def setup(self):
|
||||||
|
self.videoDisplay.setup()
|
||||||
|
self.mainDisplay.setup()
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self.videoDisplay.close()
|
||||||
|
self.mainDisplay.close()
|
||||||
|
|
||||||
|
|
||||||
class DisplayWidget(QtGui.QWidget):
|
class DisplayWidget(QtGui.QWidget):
|
||||||
"""
|
"""
|
||||||
|
@ -29,8 +29,8 @@ import time
|
|||||||
from PyQt4 import QtCore, QtGui
|
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, SlideController, \
|
||||||
PluginForm, MediaDockManager, VideoDisplay, DisplayManager
|
PluginForm, MediaDockManager, DisplayManager
|
||||||
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,8 +443,6 @@ 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.displayManager = DisplayManager(screens)
|
self.displayManager = DisplayManager(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)
|
||||||
@ -576,8 +574,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
"""
|
"""
|
||||||
self.showMaximized()
|
self.showMaximized()
|
||||||
#screen_number = self.getMonitorNumber()
|
#screen_number = self.getMonitorNumber()
|
||||||
self.displayManager.mainDisplay.setup()
|
self.displayManager.setup()
|
||||||
self.displayManager.videoDisplay.setup()
|
|
||||||
if self.displayManager.mainDisplay.isVisible():
|
if self.displayManager.mainDisplay.isVisible():
|
||||||
self.displayManager.mainDisplay.setFocus()
|
self.displayManager.mainDisplay.setFocus()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
@ -631,8 +628,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
their locations
|
their locations
|
||||||
"""
|
"""
|
||||||
self.RenderManager.update_display()
|
self.RenderManager.update_display()
|
||||||
self.displayManager.mainDisplay.setup()
|
self.displayManager.setup()
|
||||||
self.displayManager.videoDisplay.setup()
|
|
||||||
self.setFocus()
|
self.setFocus()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
|
|
||||||
@ -672,8 +668,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
log.info(u'cleanup plugins')
|
log.info(u'cleanup plugins')
|
||||||
self.plugin_manager.finalise_plugins()
|
self.plugin_manager.finalise_plugins()
|
||||||
#Close down the displays
|
#Close down the displays
|
||||||
self.displayManager.mainDisplay.close()
|
self.displayManager.close()
|
||||||
self.displayManager.videoDisplay.close()
|
|
||||||
|
|
||||||
def serviceChanged(self, reset=False, serviceName=None):
|
def serviceChanged(self, reset=False, serviceName=None):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user