summaryrefslogtreecommitdiff
path: root/noncore
authordrw <drw>2004-04-22 14:30:24 (UTC)
committer drw <drw>2004-04-22 14:30:24 (UTC)
commit00977d309bc991ffb4a84216881b53432c6d0b47 (patch) (unidiff)
tree7888656814ad09fb8930c198caadc56561687918 /noncore
parent162c71d6528515ea4b28520e9708c8ce9ca7fba2 (diff)
downloadopie-00977d309bc991ffb4a84216881b53432c6d0b47.zip
opie-00977d309bc991ffb4a84216881b53432c6d0b47.tar.gz
opie-00977d309bc991ffb4a84216881b53432c6d0b47.tar.bz2
Fixed disabling of screen blanking, implemented prev/next page scrolling and fixed search OWait useage
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/dagger/ChangeLog7
-rw-r--r--noncore/apps/dagger/README2
-rw-r--r--noncore/apps/dagger/TODO6
-rw-r--r--noncore/apps/dagger/mainwindow.cpp17
-rw-r--r--noncore/apps/dagger/mainwindow.h4
-rw-r--r--noncore/apps/dagger/navbar.cpp16
-rw-r--r--noncore/apps/dagger/navbar.h8
-rw-r--r--noncore/apps/dagger/opie-dagger.control4
-rw-r--r--noncore/apps/dagger/searchbar.cpp8
-rw-r--r--noncore/apps/dagger/textwidget.cpp8
-rw-r--r--noncore/apps/dagger/textwidget.h4
11 files changed, 50 insertions, 34 deletions
diff --git a/noncore/apps/dagger/ChangeLog b/noncore/apps/dagger/ChangeLog
index feb9a19..108419e 100644
--- a/noncore/apps/dagger/ChangeLog
+++ b/noncore/apps/dagger/ChangeLog
@@ -1,4 +1,11 @@
12004-04-22 Dan Williams <drw@handhelds.org>
2
3 * Released version 0.9.1
4 * Fixed the disabling of screen blanking
5 * Implement previous/next page scrolling
6 * Animate search OWait
7
12004-04-06 Dan Williams <drw@handhelds.org> 82004-04-06 Dan Williams <drw@handhelds.org>
2 9
3 * Released version 0.9.0 10 * Released version 0.9.0
4 * Initial check-in of new application 11 * Initial check-in of new application
diff --git a/noncore/apps/dagger/README b/noncore/apps/dagger/README
index 4a4bb61..00e9eed 100644
--- a/noncore/apps/dagger/README
+++ b/noncore/apps/dagger/README
@@ -1,11 +1,11 @@
1/************************************************************************ 1/************************************************************************
2/* 2/*
3/* Opie - Dagger 3/* Opie - Dagger
4/* =============== 4/* ===============
5/* Version 0.9.0 5/* Version 0.9.1
6/* 6/*
7/* A Bible study/reader application 7/* A Bible study/reader application
8/* 8/*
9/************************************************************************ 9/************************************************************************
10 10
11--------------------------------------------- 11---------------------------------------------
diff --git a/noncore/apps/dagger/TODO b/noncore/apps/dagger/TODO
index 2548dd3..1530bd6 100644
--- a/noncore/apps/dagger/TODO
+++ b/noncore/apps/dagger/TODO
@@ -1,11 +1,11 @@
1/************************************************************************ 1/************************************************************************
2/* 2/*
3/* Opie - Dagger 3/* Opie - Dagger
4/* =============== 4/* ===============
5/* Version 0.9.0 5/* Version 0.9.1
6/* 6/*
7/* A Bible study/reader application 7/* A Bible study/reader application
8/* 8/*
9/************************************************************************ 9/************************************************************************
10 10
11------------------------------------ 11------------------------------------
@@ -13,15 +13,13 @@ To-do for Opie-Dagger - April, 2004
13------------------------------------ 13------------------------------------
14 14
15====================== 15======================
16= Current release = 16= Current release =
17====================== 17======================
18 18
191. Implement search function callback to animate OWait dialog 191. Implement module installation
202. Implement previous/next page scrolling
213. Fix disablement of screen blanking
22 20
23====================== 21======================
24= Future releases = 22= Future releases =
25====================== 23======================
26 24
271. Margin notes \ No newline at end of file 251. Margin notes \ No newline at end of file
diff --git a/noncore/apps/dagger/mainwindow.cpp b/noncore/apps/dagger/mainwindow.cpp
index ace8f36..b2e00e8 100644
--- a/noncore/apps/dagger/mainwindow.cpp
+++ b/noncore/apps/dagger/mainwindow.cpp
@@ -70,12 +70,15 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ )
70 // Load initial configuration 70 // Load initial configuration
71 QTimer::singleShot( 100, this, SLOT( initConfig() ) ); 71 QTimer::singleShot( 100, this, SLOT( initConfig() ) );
72} 72}
73 73
74MainWindow::~MainWindow() 74MainWindow::~MainWindow()
75{ 75{
76 // Re-enable screen blanking if it was disabled
77 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
78
76 // Save Sword options 79 // Save Sword options
77 m_config.setGroup( "Sword" ); 80 m_config.setGroup( "Sword" );
78 m_config.writeEntry( "ModPath", m_modulePath ); 81 m_config.writeEntry( "ModPath", m_modulePath );
79 82
80 for ( QAction *a = m_actionSwordOpts.first(); a; a = m_actionSwordOpts.next() ) 83 for ( QAction *a = m_actionSwordOpts.first(); a; a = m_actionSwordOpts.next() )
81 m_config.writeEntry( a->text(), a->isOn() ); 84 m_config.writeEntry( a->text(), a->isOn() );
@@ -166,17 +169,17 @@ void MainWindow::initUI()
166 m_menuBar = new QMenuBar( m_barDock ); 169 m_menuBar = new QMenuBar( m_barDock );
167 m_menuBar->setMargin( 0 ); 170 m_menuBar->setMargin( 0 );
168 171
169 // Allocate toolbars 172 // Allocate toolbars
170 m_navToolbar = new NavBar( this ); 173 m_navToolbar = new NavBar( this );
171 m_navToolbar->navBtnsEnable( false ); 174 m_navToolbar->navBtnsEnable( false );
172 connect( m_navToolbar, SIGNAL(prevChapter()), this, SLOT(slotNavPrevChapter()) ); 175 connect( m_navToolbar, SIGNAL(prevPage()), this, SLOT(slotNavPrevPage()) );
173 connect( m_navToolbar, SIGNAL(prevVerse()), this, SLOT(slotNavPrevVerse()) ); 176 connect( m_navToolbar, SIGNAL(prevVerse()), this, SLOT(slotNavPrevVerse()) );
174 connect( m_navToolbar, SIGNAL(keyChanged(const QString &)), this, SLOT(slotNavKeyChanged(const QString &)) ); 177 connect( m_navToolbar, SIGNAL(keyChanged(const QString &)), this, SLOT(slotNavKeyChanged(const QString &)) );
175 connect( m_navToolbar, SIGNAL(nextVerse()), this, SLOT(slotNavNextVerse()) ); 178 connect( m_navToolbar, SIGNAL(nextVerse()), this, SLOT(slotNavNextVerse()) );
176 connect( m_navToolbar, SIGNAL(nextChapter()), this, SLOT(slotNavNextChapter()) ); 179 connect( m_navToolbar, SIGNAL(nextPage()), this, SLOT(slotNavNextPage()) );
177 connect( m_navToolbar, SIGNAL(autoScroll(bool)), this, SLOT(slotNavAutoScroll(bool)) ); 180 connect( m_navToolbar, SIGNAL(autoScroll(bool)), this, SLOT(slotNavAutoScroll(bool)) );
178 connect( m_navToolbar, SIGNAL(scrollRateChanged(int)), this, SLOT(slotNavScrollRateChanged(int)) ); 181 connect( m_navToolbar, SIGNAL(scrollRateChanged(int)), this, SLOT(slotNavScrollRateChanged(int)) );
179 182
180 m_searchToolbar = new SearchBar( this ); 183 m_searchToolbar = new SearchBar( this );
181 connect( m_searchToolbar, SIGNAL(sigResultClicked(const QString &)), this, SLOT(slotSearchResultClicked(const QString &)) ); 184 connect( m_searchToolbar, SIGNAL(sigResultClicked(const QString &)), this, SLOT(slotSearchResultClicked(const QString &)) );
182 185
@@ -329,13 +332,13 @@ int MainWindow::findBookmark( const QString &bookmark )
329 return id; 332 return id;
330} 333}
331 334
332void MainWindow::enableScreenBlanking( bool enable ) 335void MainWindow::enableScreenBlanking( bool enable )
333{ 336{
334 enable ? QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable 337 enable ? QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable
335 : QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; 338 : QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend;
336} 339}
337 340
338void MainWindow::initConfig() 341void MainWindow::initConfig()
339{ 342{
340 bool show; 343 bool show;
341 344
@@ -594,18 +597,18 @@ void MainWindow::slotViewNavToolbar( bool enabled )
594void MainWindow::slotViewSearchToolbar( bool enabled ) 597void MainWindow::slotViewSearchToolbar( bool enabled )
595{ 598{
596 enabled ? m_searchToolbar->show() 599 enabled ? m_searchToolbar->show()
597 : m_searchToolbar->hide(); 600 : m_searchToolbar->hide();
598} 601}
599 602
600void MainWindow::slotNavPrevChapter() 603void MainWindow::slotNavPrevPage()
601{ 604{
602 TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); 605 TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget());
603 if ( text ) 606 if ( text )
604 { 607 {
605 text->prevChapter(); 608 text->prevPage();
606 setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); 609 setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) );
607 m_navToolbar->setKey( text->getAbbrevKey() ); 610 m_navToolbar->setKey( text->getAbbrevKey() );
608 } 611 }
609} 612}
610 613
611void MainWindow::slotNavPrevVerse() 614void MainWindow::slotNavPrevVerse()
@@ -640,18 +643,18 @@ void MainWindow::slotNavNextVerse()
640 text->nextVerse(); 643 text->nextVerse();
641 setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); 644 setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) );
642 m_navToolbar->setKey( text->getAbbrevKey() ); 645 m_navToolbar->setKey( text->getAbbrevKey() );
643 } 646 }
644} 647}
645 648
646void MainWindow::slotNavNextChapter() 649void MainWindow::slotNavNextPage()
647{ 650{
648 TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget()); 651 TextWidget *text = reinterpret_cast<TextWidget *>(m_tabs.currentWidget());
649 if ( text ) 652 if ( text )
650 { 653 {
651 text->nextChapter(); 654 text->nextPage();
652 setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) ); 655 setCaption( QString( "%1 - Dagger" ).arg( text->getFullKey() ) );
653 m_navToolbar->setKey( text->getAbbrevKey() ); 656 m_navToolbar->setKey( text->getAbbrevKey() );
654 } 657 }
655} 658}
656 659
657void MainWindow::slotNavAutoScroll( bool enabled ) 660void MainWindow::slotNavAutoScroll( bool enabled )
diff --git a/noncore/apps/dagger/mainwindow.h b/noncore/apps/dagger/mainwindow.h
index 0c7f3c8..b114e33 100644
--- a/noncore/apps/dagger/mainwindow.h
+++ b/noncore/apps/dagger/mainwindow.h
@@ -108,17 +108,17 @@ private slots:
108 void slotBookmarkSelected(); 108 void slotBookmarkSelected();
109 void slotViewSwordOption( bool enabled ); 109 void slotViewSwordOption( bool enabled );
110 void slotViewNavToolbar( bool enabled ); 110 void slotViewNavToolbar( bool enabled );
111 void slotViewSearchToolbar( bool enabled ); 111 void slotViewSearchToolbar( bool enabled );
112 112
113 // Navigation toolbar slots 113 // Navigation toolbar slots
114 void slotNavPrevChapter(); 114 void slotNavPrevPage();
115 void slotNavPrevVerse(); 115 void slotNavPrevVerse();
116 void slotNavKeyChanged( const QString &newKey ); 116 void slotNavKeyChanged( const QString &newKey );
117 void slotNavNextVerse(); 117 void slotNavNextVerse();
118 void slotNavNextChapter(); 118 void slotNavNextPage();
119 void slotNavAutoScroll( bool enabled ); 119 void slotNavAutoScroll( bool enabled );
120 void slotNavScrollRateChanged( int newRate ); 120 void slotNavScrollRateChanged( int newRate );
121 121
122 // Search toolbar slots 122 // Search toolbar slots
123 void slotSearchResultClicked( const QString &key ); 123 void slotSearchResultClicked( const QString &key );
124 124
diff --git a/noncore/apps/dagger/navbar.cpp b/noncore/apps/dagger/navbar.cpp
index 4781af0..212dc36 100644
--- a/noncore/apps/dagger/navbar.cpp
+++ b/noncore/apps/dagger/navbar.cpp
@@ -24,16 +24,16 @@ file; see the file COPYING. If not, write to the Free Software Foundation, Inc.,
24#include <qlineedit.h> 24#include <qlineedit.h>
25 25
26NavBar::NavBar( QMainWindow *parent ) 26NavBar::NavBar( QMainWindow *parent )
27 : QToolBar( QString::null, parent, QMainWindow::Top, true ) 27 : QToolBar( QString::null, parent, QMainWindow::Top, true )
28{ 28{
29 // Initialize UI 29 // Initialize UI
30 m_actionPrevChapter = new QAction( tr( "Previous chapter" ), Resource::loadPixmap( "fastback" ), 30 m_actionPrevPage = new QAction( tr( "Previous page" ), Resource::loadPixmap( "fastback" ),
31 QString::null, 0, this, 0 ); 31 QString::null, 0, this, 0 );
32 m_actionPrevChapter->addTo( this ); 32 m_actionPrevPage->addTo( this );
33 connect( m_actionPrevChapter, SIGNAL(activated()), this, SIGNAL(prevChapter()) ); 33 connect( m_actionPrevPage, SIGNAL(activated()), this, SIGNAL(prevPage()) );
34 34
35 m_actionPrevVerse = new QAction( tr( "Previous verse" ), Resource::loadPixmap( "back" ), 35 m_actionPrevVerse = new QAction( tr( "Previous verse" ), Resource::loadPixmap( "back" ),
36 QString::null, 0, this, 0 ); 36 QString::null, 0, this, 0 );
37 m_actionPrevVerse->addTo( this ); 37 m_actionPrevVerse->addTo( this );
38 connect( m_actionPrevVerse, SIGNAL(activated()), this, SIGNAL(prevVerse()) ); 38 connect( m_actionPrevVerse, SIGNAL(activated()), this, SIGNAL(prevVerse()) );
39 39
@@ -43,16 +43,16 @@ NavBar::NavBar( QMainWindow *parent )
43 43
44 m_actionNextVerse = new QAction( tr( "Next verse" ), Resource::loadPixmap( "forward" ), 44 m_actionNextVerse = new QAction( tr( "Next verse" ), Resource::loadPixmap( "forward" ),
45 QString::null, 0, this, 0 ); 45 QString::null, 0, this, 0 );
46 m_actionNextVerse->addTo( this ); 46 m_actionNextVerse->addTo( this );
47 connect( m_actionNextVerse, SIGNAL(activated()), this, SIGNAL(nextVerse()) ); 47 connect( m_actionNextVerse, SIGNAL(activated()), this, SIGNAL(nextVerse()) );
48 48
49 m_actionNextChapter = new QAction( tr( "Next chapter" ), Resource::loadPixmap( "fastforward" ), 49 m_actionNextPage = new QAction( tr( "Next page" ), Resource::loadPixmap( "fastforward" ),
50 QString::null, 0, this, 0 ); 50 QString::null, 0, this, 0 );
51 m_actionNextChapter->addTo( this ); 51 m_actionNextPage->addTo( this );
52 connect( m_actionNextChapter, SIGNAL(activated()), this, SIGNAL(nextChapter()) ); 52 connect( m_actionNextPage, SIGNAL(activated()), this, SIGNAL(nextPage()) );
53 53
54 addSeparator(); 54 addSeparator();
55 55
56 m_scrollRate = new QSpinBox( 1, 100, 1, this ); 56 m_scrollRate = new QSpinBox( 1, 100, 1, this );
57 m_scrollRate->setMinimumWidth( 35 ); 57 m_scrollRate->setMinimumWidth( 35 );
58 connect( m_scrollRate, SIGNAL(valueChanged(int)), this, SIGNAL(scrollRateChanged(int)) ); 58 connect( m_scrollRate, SIGNAL(valueChanged(int)), this, SIGNAL(scrollRateChanged(int)) );
@@ -69,16 +69,16 @@ NavBar::NavBar( QMainWindow *parent )
69 m_key->installEventFilter( parent ); 69 m_key->installEventFilter( parent );
70 } 70 }
71} 71}
72 72
73void NavBar::navBtnsEnable( bool enabled ) 73void NavBar::navBtnsEnable( bool enabled )
74{ 74{
75 m_actionPrevChapter->setEnabled( enabled ); 75 m_actionPrevPage->setEnabled( enabled );
76 m_actionPrevVerse->setEnabled( enabled ); 76 m_actionPrevVerse->setEnabled( enabled );
77 m_actionNextVerse->setEnabled( enabled ); 77 m_actionNextVerse->setEnabled( enabled );
78 m_actionNextChapter->setEnabled( enabled ); 78 m_actionNextPage->setEnabled( enabled );
79 m_scrollRate->setEnabled( enabled ); 79 m_scrollRate->setEnabled( enabled );
80 m_actionScroll->setEnabled( enabled ); 80 m_actionScroll->setEnabled( enabled );
81} 81}
82 82
83void NavBar::setKey( const QString &newKey ) 83void NavBar::setKey( const QString &newKey )
84{ 84{
diff --git a/noncore/apps/dagger/navbar.h b/noncore/apps/dagger/navbar.h
index a37d6ff..0df2bf0 100644
--- a/noncore/apps/dagger/navbar.h
+++ b/noncore/apps/dagger/navbar.h
@@ -34,25 +34,25 @@ public:
34 void navBtnsEnable( bool enabled ); 34 void navBtnsEnable( bool enabled );
35 void setKey( const QString &newKey ); 35 void setKey( const QString &newKey );
36 void setAutoScrollRate( int scrollRate ); 36 void setAutoScrollRate( int scrollRate );
37 const int autoScrollRate() { return m_scrollRate->value(); } 37 const int autoScrollRate() { return m_scrollRate->value(); }
38 38
39private: 39private:
40 QAction *m_actionPrevChapter; // Action for going back 1 chapter 40 QAction *m_actionPrevPage; // Action for going back 1 page
41 QAction *m_actionPrevVerse; // Action for going back 1 verse 41 QAction *m_actionPrevVerse; // Action for going back 1 verse
42 QLineEdit *m_key; // Edit box to enter key to goto 42 QLineEdit *m_key; // Edit box to enter key to goto
43 QAction *m_actionNextVerse; // Action for going forward 1 verse 43 QAction *m_actionNextVerse; // Action for going forward 1 verse
44 QAction *m_actionNextChapter; // Action for going forward 1 chapter 44 QAction *m_actionNextPage; // Action for going forward 1 page
45 QSpinBox *m_scrollRate; // Spin box to adjust rate of auto-scrolling 45 QSpinBox *m_scrollRate; // Spin box to adjust rate of auto-scrolling
46 QAction *m_actionScroll; // Action to start/stop auto-scrolling 46 QAction *m_actionScroll; // Action to start/stop auto-scrolling
47 47
48signals: 48signals:
49 void prevChapter(); 49 void prevPage();
50 void prevVerse(); 50 void prevVerse();
51 void keyChanged( const QString &newKey ); 51 void keyChanged( const QString &newKey );
52 void nextVerse(); 52 void nextVerse();
53 void nextChapter(); 53 void nextPage();
54 void autoScroll( bool enabled ); 54 void autoScroll( bool enabled );
55 void scrollRateChanged( int newRate ); 55 void scrollRateChanged( int newRate );
56}; 56};
57 57
58#endif 58#endif
diff --git a/noncore/apps/dagger/opie-dagger.control b/noncore/apps/dagger/opie-dagger.control
index c401f03..4ded1f2 100644
--- a/noncore/apps/dagger/opie-dagger.control
+++ b/noncore/apps/dagger/opie-dagger.control
@@ -1,11 +1,9 @@
1Package: opie-dagger 1Package: opie-dagger
2Files: plugins/application/libdagger.so* bin/dagger pics/dagger apps/Applications/dagger.desktop 2Files: plugins/application/libdagger.so* bin/dagger pics/dagger apps/Applications/dagger.desktop
3Priority: optional 3Priority: optional
4Section: opie/applications 4Section: opie/applications
5Depends: task-opie-minimal, libopiecore2, libopieui2 5Depends: task-opie-minimal, libopiecore2, libopieui2
6Replaces: dagger
7Architecture: arm 6Architecture: arm
8Source: http://draknor.net/dagger/
9Maintainer: Dan Williams (drw@handhelds.org) 7Maintainer: Dan Williams (drw@handhelds.org)
10Description: A Bible study program utilizing the Sword library. 8Description: A Bible study program utilizing the Sword library.
11Version: 0.9.0 9Version: 0.9.1$EXTRAVERSION
diff --git a/noncore/apps/dagger/searchbar.cpp b/noncore/apps/dagger/searchbar.cpp
index 747d696..ff434dd 100644
--- a/noncore/apps/dagger/searchbar.cpp
+++ b/noncore/apps/dagger/searchbar.cpp
@@ -28,12 +28,17 @@ file; see the file COPYING. If not, write to the Free Software Foundation, Inc.,
28#include <qlineedit.h> 28#include <qlineedit.h>
29 29
30#include <listkey.h> 30#include <listkey.h>
31#include <regex.h> 31#include <regex.h>
32#include <versekey.h> 32#include <versekey.h>
33 33
34void searchCallback( char /*percent*/, void */*userData*/ )
35{
36 qApp->processEvents();
37}
38
34SearchBar::SearchBar( QMainWindow *parent ) 39SearchBar::SearchBar( QMainWindow *parent )
35 : QToolBar( QString::null, parent, QMainWindow::Top, true ) 40 : QToolBar( QString::null, parent, QMainWindow::Top, true )
36 , m_currText( 0x0 ) 41 , m_currText( 0x0 )
37{ 42{
38 // Initialize UI 43 // Initialize UI
39 m_searchText = new QLineEdit( this ); 44 m_searchText = new QLineEdit( this );
@@ -105,13 +110,14 @@ void SearchBar::slotFind()
105 Opie::Ui::OWait wait( pWidget ); 110 Opie::Ui::OWait wait( pWidget );
106 wait.show(); 111 wait.show();
107 qApp->processEvents(); 112 qApp->processEvents();
108 113
109 // Perform search 114 // Perform search
110 // TODO - implement search callback function to animate wait cursor 115 // TODO - implement search callback function to animate wait cursor
111 sword::ListKey results = m_currText->getModule()->Search( m_searchText->text().latin1(), REG_ICASE, 0 ); 116 sword::ListKey results = m_currText->getModule()->Search( m_searchText->text().latin1(), 0, REG_ICASE, 0, 0,
117 &searchCallback );
112 118
113 // Process results 119 // Process results
114 int count = results.Count(); 120 int count = results.Count();
115 bool found = count > 0; 121 bool found = count > 0;
116 if ( found ) 122 if ( found )
117 { 123 {
diff --git a/noncore/apps/dagger/textwidget.cpp b/noncore/apps/dagger/textwidget.cpp
index 8ff620d..9f7de66 100644
--- a/noncore/apps/dagger/textwidget.cpp
+++ b/noncore/apps/dagger/textwidget.cpp
@@ -75,14 +75,16 @@ TextWidget::~TextWidget()
75QString TextWidget::getCurrVerse() 75QString TextWidget::getCurrVerse()
76{ 76{
77 m_module->SetKey( m_key->getText() ); 77 m_module->SetKey( m_key->getText() );
78 return ( QString ) m_module->StripText(); 78 return ( QString ) m_module->StripText();
79} 79}
80 80
81void TextWidget::prevChapter() 81void TextWidget::prevPage()
82{ 82{
83 (*m_key) -= m_numVerses;
84 setText();
83} 85}
84 86
85void TextWidget::prevVerse() 87void TextWidget::prevVerse()
86{ 88{
87 (*m_key)--; 89 (*m_key)--;
88 setText(); 90 setText();
@@ -97,14 +99,16 @@ void TextWidget::setKey( const QString &newKey )
97void TextWidget::nextVerse() 99void TextWidget::nextVerse()
98{ 100{
99 (*m_key)++; 101 (*m_key)++;
100 setText(); 102 setText();
101} 103}
102 104
103void TextWidget::nextChapter() 105void TextWidget::nextPage()
104{ 106{
107 (*m_key) += m_numVerses;
108 setText();
105} 109}
106 110
107void TextWidget::slotNumVersesChanged( int numVerses ) 111void TextWidget::slotNumVersesChanged( int numVerses )
108{ 112{
109 m_numVerses = numVerses; 113 m_numVerses = numVerses;
110 setText(); 114 setText();
diff --git a/noncore/apps/dagger/textwidget.h b/noncore/apps/dagger/textwidget.h
index 647eae9..f78ef69 100644
--- a/noncore/apps/dagger/textwidget.h
+++ b/noncore/apps/dagger/textwidget.h
@@ -39,17 +39,17 @@ public:
39 QString getModuleName() { return QString( m_module->Name() ); } 39 QString getModuleName() { return QString( m_module->Name() ); }
40 sword::SWModule *getModule() { return m_module; } 40 sword::SWModule *getModule() { return m_module; }
41 QString getCurrVerse(); 41 QString getCurrVerse();
42 42
43 bool isBibleText() const { return m_isBibleText; } 43 bool isBibleText() const { return m_isBibleText; }
44 44
45 void prevChapter(); 45 void prevPage();
46 void prevVerse(); 46 void prevVerse();
47 void setKey( const QString &newKey ); 47 void setKey( const QString &newKey );
48 void nextVerse(); 48 void nextVerse();
49 void nextChapter(); 49 void nextPage();
50 50
51public slots: 51public slots:
52 void slotNumVersesChanged( int numVerses ); 52 void slotNumVersesChanged( int numVerses );
53 void slotFontChanged( const QFont *newFont ); 53 void slotFontChanged( const QFont *newFont );
54 void slotOptionChanged(); 54 void slotOptionChanged();
55 55