mirror of https://gitlab.com/openlp/openlp.git
Cleanups
This commit is contained in:
parent
f813c98fdd
commit
961df67a33
|
@ -154,9 +154,10 @@ class DisplayWidget(QtGui.QGraphicsView):
|
||||||
"""
|
"""
|
||||||
log.info(u'MainDisplay loaded')
|
log.info(u'MainDisplay loaded')
|
||||||
|
|
||||||
def __init__(self, parent=None, name=None):
|
def __init__(self, parent=None, name=None, primary=False):
|
||||||
QtGui.QWidget.__init__(self, None)
|
QtGui.QWidget.__init__(self, None)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
|
self.primary = primary
|
||||||
self.hotkey_map = {
|
self.hotkey_map = {
|
||||||
QtCore.Qt.Key_Return: 'servicemanager_next_item',
|
QtCore.Qt.Key_Return: 'servicemanager_next_item',
|
||||||
QtCore.Qt.Key_Space: 'slidecontroller_live_next_noloop',
|
QtCore.Qt.Key_Space: 'slidecontroller_live_next_noloop',
|
||||||
|
@ -189,6 +190,14 @@ class DisplayWidget(QtGui.QGraphicsView):
|
||||||
else:
|
else:
|
||||||
event.ignore()
|
event.ignore()
|
||||||
|
|
||||||
|
def resetDisplay(self):
|
||||||
|
log.debug(u'resetDisplay')
|
||||||
|
Receiver.send_message(u'slidecontroller_live_stop_loop')
|
||||||
|
if self.primary:
|
||||||
|
self.setVisible(False)
|
||||||
|
else:
|
||||||
|
self.setVisible(True)
|
||||||
|
|
||||||
class MainDisplay(DisplayWidget):
|
class MainDisplay(DisplayWidget):
|
||||||
"""
|
"""
|
||||||
This is the form that is used to display things on the projector.
|
This is the form that is used to display things on the projector.
|
||||||
|
@ -206,7 +215,7 @@ class MainDisplay(DisplayWidget):
|
||||||
The list of screens.
|
The list of screens.
|
||||||
"""
|
"""
|
||||||
log.debug(u'Initialisation started')
|
log.debug(u'Initialisation started')
|
||||||
DisplayWidget.__init__(self, parent)
|
DisplayWidget.__init__(self, parent, primary=True)
|
||||||
self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
|
self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
|
||||||
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
|
@ -222,7 +231,6 @@ class MainDisplay(DisplayWidget):
|
||||||
self.setupText()
|
self.setupText()
|
||||||
self.setupAlert()
|
self.setupAlert()
|
||||||
self.setupBlank()
|
self.setupBlank()
|
||||||
self.primary = True
|
|
||||||
self.blankFrame = None
|
self.blankFrame = None
|
||||||
self.frame = None
|
self.frame = None
|
||||||
#Hide desktop for now until we know where to put it
|
#Hide desktop for now until we know where to put it
|
||||||
|
@ -319,14 +327,6 @@ class MainDisplay(DisplayWidget):
|
||||||
self.displayBlank.setZValue(10)
|
self.displayBlank.setZValue(10)
|
||||||
self.scene.addItem(self.displayBlank)
|
self.scene.addItem(self.displayBlank)
|
||||||
|
|
||||||
def resetDisplay(self):
|
|
||||||
log.debug(u'resetDisplay')
|
|
||||||
Receiver.send_message(u'slidecontroller_live_stop_loop')
|
|
||||||
if self.primary:
|
|
||||||
self.setVisible(False)
|
|
||||||
else:
|
|
||||||
self.setVisible(True)
|
|
||||||
|
|
||||||
# def hideDisplayForVideo(self):
|
# def hideDisplayForVideo(self):
|
||||||
# """
|
# """
|
||||||
# Hides the main display if for the video to be played
|
# Hides the main display if for the video to be played
|
||||||
|
@ -531,8 +531,8 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||||
Shutting down so clean up connections
|
Shutting down so clean up connections
|
||||||
"""
|
"""
|
||||||
self.onMediaStop()
|
self.onMediaStop()
|
||||||
for pth in self.outputPaths():
|
for path in self.outputPaths():
|
||||||
disconnected = pth.disconnect()
|
disconnected = path.disconnect()
|
||||||
|
|
||||||
# def onMediaBackground(self, message=None):
|
# def onMediaBackground(self, message=None):
|
||||||
# """
|
# """
|
||||||
|
@ -657,8 +657,8 @@ class AudioPlayer(QtCore.QObject):
|
||||||
Shutting down so clean up connections
|
Shutting down so clean up connections
|
||||||
"""
|
"""
|
||||||
self.onMediaStop()
|
self.onMediaStop()
|
||||||
for pth in self.mediaObject.outputPaths():
|
for path in self.mediaObject.outputPaths():
|
||||||
disconnected = pth.disconnect()
|
disconnected = path.disconnect()
|
||||||
|
|
||||||
def onMediaQueue(self, message):
|
def onMediaQueue(self, message):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -38,7 +38,7 @@ from openlp.core.utils import check_latest_version, AppLocation, add_actions, \
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
media_manager_style = """
|
MEDIA_MANAGER_STYLE = """
|
||||||
QToolBox::tab {
|
QToolBox::tab {
|
||||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||||
stop: 0 palette(button), stop: 1.0 palette(dark));
|
stop: 0 palette(button), stop: 1.0 palette(dark));
|
||||||
|
@ -174,7 +174,7 @@ class Ui_MainWindow(object):
|
||||||
self.MediaManagerDock = OpenLPDockWidget(MainWindow)
|
self.MediaManagerDock = OpenLPDockWidget(MainWindow)
|
||||||
self.MediaManagerDock.setWindowIcon(
|
self.MediaManagerDock.setWindowIcon(
|
||||||
build_icon(u':/system/system_mediamanager.png'))
|
build_icon(u':/system/system_mediamanager.png'))
|
||||||
self.MediaManagerDock.setStyleSheet(media_manager_style)
|
self.MediaManagerDock.setStyleSheet(MEDIA_MANAGER_STYLE)
|
||||||
self.MediaManagerDock.setMinimumWidth(
|
self.MediaManagerDock.setMinimumWidth(
|
||||||
self.settingsmanager.mainwindow_left)
|
self.settingsmanager.mainwindow_left)
|
||||||
self.MediaManagerDock.setObjectName(u'MediaManagerDock')
|
self.MediaManagerDock.setObjectName(u'MediaManagerDock')
|
||||||
|
|
Loading…
Reference in New Issue