summaryrefslogtreecommitdiff
path: root/noncore/apps/dagger/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/dagger/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/dagger/mainwindow.cpp17
1 files changed, 10 insertions, 7 deletions
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
@@ -73,6 +73,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags /*fl*/ )
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 );
@@ -169,11 +172,11 @@ void MainWindow::initUI()
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
@@ -332,7 +335,7 @@ int MainWindow::findBookmark( const QString &bookmark )
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()
@@ -597,12 +600,12 @@ void MainWindow::slotViewSearchToolbar( bool enabled )
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 }
@@ -643,12 +646,12 @@ void MainWindow::slotNavNextVerse()
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 }