forked from openlp/openlp
reverted changes
This commit is contained in:
parent
2009e95ff0
commit
6ab287cfaa
@ -167,7 +167,7 @@ class DisplayWidget(QtGui.QGraphicsView):
|
|||||||
|
|
||||||
def keyPressEvent(self, event):
|
def keyPressEvent(self, event):
|
||||||
if isinstance(event, QtGui.QKeyEvent):
|
if isinstance(event, QtGui.QKeyEvent):
|
||||||
# Here accept the event and do something.
|
#here accept the event and do something
|
||||||
if event.key() == QtCore.Qt.Key_Up:
|
if event.key() == QtCore.Qt.Key_Up:
|
||||||
Receiver.send_message(u'slidecontroller_live_previous')
|
Receiver.send_message(u'slidecontroller_live_previous')
|
||||||
event.accept()
|
event.accept()
|
||||||
@ -233,8 +233,8 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.setupBlank()
|
self.setupBlank()
|
||||||
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
|
||||||
# and what size it should be.
|
#and what size it should be.
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
@ -245,12 +245,13 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.screens, self.screens.monitor_number))
|
self.screens, self.screens.monitor_number))
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
self.screen = self.screens.current
|
self.screen = self.screens.current
|
||||||
# Sort out screen locations and sizes.
|
#Sort out screen locations and sizes
|
||||||
self.setGeometry(self.screen[u'size'])
|
self.setGeometry(self.screen[u'size'])
|
||||||
self.scene.setSceneRect(0, 0, self.size().width(), self.size().height())
|
self.scene.setSceneRect(0, 0, self.size().width(),
|
||||||
|
self.size().height())
|
||||||
self.webView.setGeometry(0, 0, self.size().width(),
|
self.webView.setGeometry(0, 0, self.size().width(),
|
||||||
self.size().height())
|
self.size().height())
|
||||||
# Build a custom splash screen.
|
#Build a custom splash screen
|
||||||
self.initialFrame = QtGui.QImage(
|
self.initialFrame = QtGui.QImage(
|
||||||
self.screen[u'size'].width(),
|
self.screen[u'size'].width(),
|
||||||
self.screen[u'size'].height(),
|
self.screen[u'size'].height(),
|
||||||
@ -269,7 +270,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.transparent.fill(QtCore.Qt.transparent)
|
self.transparent.fill(QtCore.Qt.transparent)
|
||||||
self.displayImage(self.initialFrame)
|
self.displayImage(self.initialFrame)
|
||||||
self.repaint()
|
self.repaint()
|
||||||
# Build a Black screen.
|
#Build a Black screen
|
||||||
painter = QtGui.QPainter()
|
painter = QtGui.QPainter()
|
||||||
self.blankFrame = QtGui.QImage(
|
self.blankFrame = QtGui.QImage(
|
||||||
self.screen[u'size'].width(),
|
self.screen[u'size'].width(),
|
||||||
@ -368,7 +369,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.displayBlank.setPixmap(self.transparent)
|
self.displayBlank.setPixmap(self.transparent)
|
||||||
if self.isHidden():
|
if self.isHidden():
|
||||||
self.setVisible(True)
|
self.setVisible(True)
|
||||||
# Trigger actions when display is active again.
|
#Trigger actions when display is active again
|
||||||
Receiver.send_message(u'maindisplay_active')
|
Receiver.send_message(u'maindisplay_active')
|
||||||
|
|
||||||
def addImageWithText(self, frame):
|
def addImageWithText(self, frame):
|
||||||
@ -419,7 +420,8 @@ class MainDisplay(DisplayWidget):
|
|||||||
log.debug(u'adddisplayVideo')
|
log.debug(u'adddisplayVideo')
|
||||||
self.displayImage(self.transparent)
|
self.displayImage(self.transparent)
|
||||||
self.videoDisplay.setHtml(HTMLVIDEO %
|
self.videoDisplay.setHtml(HTMLVIDEO %
|
||||||
(path, self.screen[u'size'].width(), self.screen[u'size'].height()))
|
(path, self.screen[u'size'].width(),
|
||||||
|
self.screen[u'size'].height()))
|
||||||
|
|
||||||
def frameView(self, frame, transition=False):
|
def frameView(self, frame, transition=False):
|
||||||
"""
|
"""
|
||||||
@ -507,7 +509,7 @@ class VideoDisplay(Phonon.VideoWidget):
|
|||||||
|
|
||||||
def keyPressEvent(self, event):
|
def keyPressEvent(self, event):
|
||||||
if isinstance(event, QtGui.QKeyEvent):
|
if isinstance(event, QtGui.QKeyEvent):
|
||||||
# Here accept the event and do something.
|
#here accept the event and do something
|
||||||
if event.key() == QtCore.Qt.Key_Escape:
|
if event.key() == QtCore.Qt.Key_Escape:
|
||||||
self.onMediaStop()
|
self.onMediaStop()
|
||||||
event.accept()
|
event.accept()
|
||||||
@ -522,7 +524,7 @@ class VideoDisplay(Phonon.VideoWidget):
|
|||||||
log.debug(u'VideoDisplay Setup %s for %s ' % (self.screens,
|
log.debug(u'VideoDisplay Setup %s for %s ' % (self.screens,
|
||||||
self.screens.monitor_number))
|
self.screens.monitor_number))
|
||||||
self.screen = self.screens.current
|
self.screen = self.screens.current
|
||||||
# Sort out screen locations and sizes.
|
#Sort out screen locations and sizes
|
||||||
self.setGeometry(self.screen[u'size'])
|
self.setGeometry(self.screen[u'size'])
|
||||||
# To display or not to display?
|
# To display or not to display?
|
||||||
if not self.screen[u'primary']: # and self.isVisible():
|
if not self.screen[u'primary']: # and self.isVisible():
|
||||||
@ -549,10 +551,10 @@ class VideoDisplay(Phonon.VideoWidget):
|
|||||||
# if it is triggered from the plugin
|
# if it is triggered from the plugin
|
||||||
# """
|
# """
|
||||||
# log.debug(u'VideoDisplay Queue new media message %s' % message)
|
# log.debug(u'VideoDisplay Queue new media message %s' % message)
|
||||||
# # If not file take the stored one.
|
# #If not file take the stored one
|
||||||
# if not message:
|
# if not message:
|
||||||
# message = self.message
|
# message = self.message
|
||||||
# # Still no file name then stop as it was a normal video stopping.
|
# # still no file name then stop as it was a normal video stopping
|
||||||
# if message:
|
# if message:
|
||||||
# self.mediaObject.setCurrentSource(Phonon.MediaSource(message))
|
# self.mediaObject.setCurrentSource(Phonon.MediaSource(message))
|
||||||
# self.message = message
|
# self.message = message
|
||||||
|
@ -114,7 +114,7 @@ class Ui_MainWindow(object):
|
|||||||
MainWindow.setSizePolicy(sizePolicy)
|
MainWindow.setSizePolicy(sizePolicy)
|
||||||
MainIcon = build_icon(u':/icon/openlp-logo-16x16.png')
|
MainIcon = build_icon(u':/icon/openlp-logo-16x16.png')
|
||||||
MainWindow.setWindowIcon(MainIcon)
|
MainWindow.setWindowIcon(MainIcon)
|
||||||
# Set up the main container, which contains all the other form widgets.
|
# Set up the main container, which contains all the other form widgets
|
||||||
self.MainContent = QtGui.QWidget(MainWindow)
|
self.MainContent = QtGui.QWidget(MainWindow)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
|
@ -58,18 +58,6 @@ class Topic(BaseModel):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class SongsTopics(BaseModel):
|
|
||||||
"""
|
|
||||||
Songs topics model
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
class AuthorsSongs(BaseModel):
|
|
||||||
"""
|
|
||||||
Songs authors model
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def init_schema(url):
|
def init_schema(url):
|
||||||
"""
|
"""
|
||||||
Setup the songs database connection and initialise the database schema
|
Setup the songs database connection and initialise the database schema
|
||||||
@ -158,8 +146,6 @@ def init_schema(url):
|
|||||||
'topics': relation(Topic, backref='songs',
|
'topics': relation(Topic, backref='songs',
|
||||||
secondary=songs_topics_table)})
|
secondary=songs_topics_table)})
|
||||||
mapper(Topic, topics_table)
|
mapper(Topic, topics_table)
|
||||||
mapper(SongsTopics, songs_topics_table)
|
|
||||||
mapper(AuthorsSongs, authors_songs_table)
|
|
||||||
|
|
||||||
metadata.create_all(checkfirst=True)
|
metadata.create_all(checkfirst=True)
|
||||||
return session
|
return session
|
||||||
|
Loading…
Reference in New Issue
Block a user