From 6ab287cfaab80092ad5e74f65b3c7f2f8b345b7f Mon Sep 17 00:00:00 2001 From: andreas Date: Mon, 19 Jul 2010 09:54:22 +0200 Subject: [PATCH] reverted changes --- openlp/core/ui/maindisplay.py | 28 +++++++++++++++------------- openlp/core/ui/mainwindow.py | 2 +- openlp/plugins/songs/lib/db.py | 14 -------------- 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/openlp/core/ui/maindisplay.py b/openlp/core/ui/maindisplay.py index c8dc06cf7..6183c23c2 100644 --- a/openlp/core/ui/maindisplay.py +++ b/openlp/core/ui/maindisplay.py @@ -167,7 +167,7 @@ class DisplayWidget(QtGui.QGraphicsView): def keyPressEvent(self, event): 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: Receiver.send_message(u'slidecontroller_live_previous') event.accept() @@ -233,8 +233,8 @@ class MainDisplay(DisplayWidget): self.setupBlank() self.blankFrame = None self.frame = None - # Hide desktop for now until we know where to put it - # and what size it should be. + #Hide desktop for now until we know where to put it + #and what size it should be. self.setVisible(False) def setup(self): @@ -245,12 +245,13 @@ class MainDisplay(DisplayWidget): self.screens, self.screens.monitor_number)) self.setVisible(False) self.screen = self.screens.current - # Sort out screen locations and sizes. + #Sort out screen locations and sizes 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.size().height()) - # Build a custom splash screen. + #Build a custom splash screen self.initialFrame = QtGui.QImage( self.screen[u'size'].width(), self.screen[u'size'].height(), @@ -269,7 +270,7 @@ class MainDisplay(DisplayWidget): self.transparent.fill(QtCore.Qt.transparent) self.displayImage(self.initialFrame) self.repaint() - # Build a Black screen. + #Build a Black screen painter = QtGui.QPainter() self.blankFrame = QtGui.QImage( self.screen[u'size'].width(), @@ -368,7 +369,7 @@ class MainDisplay(DisplayWidget): self.displayBlank.setPixmap(self.transparent) if self.isHidden(): self.setVisible(True) - # Trigger actions when display is active again. + #Trigger actions when display is active again Receiver.send_message(u'maindisplay_active') def addImageWithText(self, frame): @@ -419,7 +420,8 @@ class MainDisplay(DisplayWidget): log.debug(u'adddisplayVideo') self.displayImage(self.transparent) 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): """ @@ -507,7 +509,7 @@ class VideoDisplay(Phonon.VideoWidget): def keyPressEvent(self, event): 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: self.onMediaStop() event.accept() @@ -522,7 +524,7 @@ class VideoDisplay(Phonon.VideoWidget): log.debug(u'VideoDisplay Setup %s for %s ' % (self.screens, self.screens.monitor_number)) self.screen = self.screens.current - # Sort out screen locations and sizes. + #Sort out screen locations and sizes self.setGeometry(self.screen[u'size']) # To display or not to display? if not self.screen[u'primary']: # and self.isVisible(): @@ -549,10 +551,10 @@ class VideoDisplay(Phonon.VideoWidget): # if it is triggered from the plugin # """ # 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: # 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: # self.mediaObject.setCurrentSource(Phonon.MediaSource(message)) # self.message = message diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index b014747a2..ec34a483b 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -114,7 +114,7 @@ class Ui_MainWindow(object): MainWindow.setSizePolicy(sizePolicy) MainIcon = build_icon(u':/icon/openlp-logo-16x16.png') 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) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) diff --git a/openlp/plugins/songs/lib/db.py b/openlp/plugins/songs/lib/db.py index f37a23ff9..655043144 100644 --- a/openlp/plugins/songs/lib/db.py +++ b/openlp/plugins/songs/lib/db.py @@ -58,18 +58,6 @@ class Topic(BaseModel): """ pass -class SongsTopics(BaseModel): - """ - Songs topics model - """ - pass - -class AuthorsSongs(BaseModel): - """ - Songs authors model - """ - pass - def init_schema(url): """ Setup the songs database connection and initialise the database schema @@ -158,8 +146,6 @@ def init_schema(url): 'topics': relation(Topic, backref='songs', secondary=songs_topics_table)}) mapper(Topic, topics_table) - mapper(SongsTopics, songs_topics_table) - mapper(AuthorsSongs, authors_songs_table) metadata.create_all(checkfirst=True) return session