chiark / gitweb /
previous/next controls
authorThomas Thurman <tthurman@gnome.org>
Tue, 18 Jan 2011 01:04:40 +0000 (20:04 -0500)
committerThomas Thurman <tthurman@gnome.org>
Tue, 18 Jan 2011 01:04:40 +0000 (20:04 -0500)
src/view.py

index f925f29..27ca991 100644 (file)
@@ -10,5 +10,29 @@ class CommonPrayerWindow(QMainWindow):
                self._html = QTextBrowser()
                self.setCentralWidget(self._html)
 
+               self._prev = QAction("<-", self)
+               self._next = QAction("->", self)
+
+               self.connect(self._prev,
+                       SIGNAL('triggered()'),
+                       self,
+                       SLOT('goPrevious()'))
+
+               self.connect(self._next,
+                       SIGNAL('triggered()'),
+                       self,
+                       SLOT('goNext()'))
+
+               self.menuBar().addAction(self._prev)
+               self.menuBar().addAction(self._next)
+
+       def goPrevious(self):
+               self.emit(SIGNAL('move(QString)'),
+                       'previous')
+
+       def goNext(self):
+               self.emit(SIGNAL('move(QString)'),
+                       'next')
+
        def setHtml(self, html):
                self._html.setHtml(html)