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 | |||
@@ -69,48 +69,52 @@ TextWidget::TextWidget( QWidget *parent, sword::SWModule *module, int numVerses, | |||
69 | TextWidget::~TextWidget() | 69 | TextWidget::~TextWidget() |
70 | { | 70 | { |
71 | // TODO - why does this cause a SIGSEV??? | 71 | // TODO - why does this cause a SIGSEV??? |
72 | //delete m_key; | 72 | //delete m_key; |
73 | } | 73 | } |
74 | 74 | ||
75 | QString TextWidget::getCurrVerse() | 75 | QString 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 | ||
81 | void TextWidget::prevChapter() | 81 | void TextWidget::prevPage() |
82 | { | 82 | { |
83 | (*m_key) -= m_numVerses; | ||
84 | setText(); | ||
83 | } | 85 | } |
84 | 86 | ||
85 | void TextWidget::prevVerse() | 87 | void TextWidget::prevVerse() |
86 | { | 88 | { |
87 | (*m_key)--; | 89 | (*m_key)--; |
88 | setText(); | 90 | setText(); |
89 | } | 91 | } |
90 | 92 | ||
91 | void TextWidget::setKey( const QString &newKey ) | 93 | void TextWidget::setKey( const QString &newKey ) |
92 | { | 94 | { |
93 | m_key->setText( newKey.latin1() ); | 95 | m_key->setText( newKey.latin1() ); |
94 | setText(); | 96 | setText(); |
95 | } | 97 | } |
96 | 98 | ||
97 | void TextWidget::nextVerse() | 99 | void TextWidget::nextVerse() |
98 | { | 100 | { |
99 | (*m_key)++; | 101 | (*m_key)++; |
100 | setText(); | 102 | setText(); |
101 | } | 103 | } |
102 | 104 | ||
103 | void TextWidget::nextChapter() | 105 | void TextWidget::nextPage() |
104 | { | 106 | { |
107 | (*m_key) += m_numVerses; | ||
108 | setText(); | ||
105 | } | 109 | } |
106 | 110 | ||
107 | void TextWidget::slotNumVersesChanged( int numVerses ) | 111 | void TextWidget::slotNumVersesChanged( int numVerses ) |
108 | { | 112 | { |
109 | m_numVerses = numVerses; | 113 | m_numVerses = numVerses; |
110 | setText(); | 114 | setText(); |
111 | } | 115 | } |
112 | 116 | ||
113 | void TextWidget::slotFontChanged( const QFont *newFont ) | 117 | void TextWidget::slotFontChanged( const QFont *newFont ) |
114 | { | 118 | { |
115 | setFont( *newFont ); | 119 | setFont( *newFont ); |
116 | // TODO - shouldn't have to reset text, but couldn't get repaint() to work | 120 | // TODO - shouldn't have to reset text, but couldn't get repaint() to work |