Diffstat (limited to 'noncore/apps/dagger/textwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/dagger/textwidget.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 @@ -57,72 +57,76 @@ TextWidget::TextWidget( QWidget *parent, sword::SWModule *module, int numVerses, // this, SLOT(slotReferenceClicked(const QString&)) ); //connect( parent, SIGNAL( strongsNumbers( bool ) ), this, SLOT( slotStrongsNumbers( bool ) ) ); } else { m_key = new sword::SWKey( "" ); } m_module->SetKey( m_key ); setText(); } } TextWidget::~TextWidget() { // TODO - why does this cause a SIGSEV??? //delete m_key; } QString TextWidget::getCurrVerse() { m_module->SetKey( m_key->getText() ); return ( QString ) m_module->StripText(); } -void TextWidget::prevChapter() +void TextWidget::prevPage() { + (*m_key) -= m_numVerses; + setText(); } void TextWidget::prevVerse() { (*m_key)--; setText(); } void TextWidget::setKey( const QString &newKey ) { m_key->setText( newKey.latin1() ); setText(); } void TextWidget::nextVerse() { (*m_key)++; setText(); } -void TextWidget::nextChapter() +void TextWidget::nextPage() { + (*m_key) += m_numVerses; + setText(); } void TextWidget::slotNumVersesChanged( int numVerses ) { m_numVerses = numVerses; setText(); } void TextWidget::slotFontChanged( const QFont *newFont ) { setFont( *newFont ); // TODO - shouldn't have to reset text, but couldn't get repaint() to work setText(); } void TextWidget::slotOptionChanged() { setText(); } void TextWidget::setText() { if ( m_key->Error() ) return; |