summaryrefslogtreecommitdiff
path: root/noncore/apps/dagger/navbar.cpp
authordrw <drw>2004-04-22 14:30:24 (UTC)
committer drw <drw>2004-04-22 14:30:24 (UTC)
commit00977d309bc991ffb4a84216881b53432c6d0b47 (patch) (unidiff)
tree7888656814ad09fb8930c198caadc56561687918 /noncore/apps/dagger/navbar.cpp
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/apps/dagger/navbar.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/dagger/navbar.cpp16
1 files changed, 8 insertions, 8 deletions
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
@@ -18,73 +18,73 @@ file; see the file COPYING. If not, write to the Free Software Foundation, Inc.,
18#include "navbar.h" 18#include "navbar.h"
19 19
20#include <qpe/config.h> 20#include <qpe/config.h>
21#include <qpe/resource.h> 21#include <qpe/resource.h>
22 22
23#include <qaction.h> 23#include <qaction.h>
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
40 m_key = new QLineEdit( this ); 40 m_key = new QLineEdit( this );
41 setStretchableWidget( m_key ); 41 setStretchableWidget( m_key );
42 connect(m_key, SIGNAL(textChanged(const QString &)), this, SIGNAL(keyChanged(const QString &)) ); 42 connect(m_key, SIGNAL(textChanged(const QString &)), this, SIGNAL(keyChanged(const QString &)) );
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)) );
59 59
60 m_actionScroll = new QAction( tr( "Auto-scroll" ), Resource::loadPixmap( "dagger/autoscroll" ), 60 m_actionScroll = new QAction( tr( "Auto-scroll" ), Resource::loadPixmap( "dagger/autoscroll" ),
61 QString::null, 0, this, 0 ); 61 QString::null, 0, this, 0 );
62 m_actionScroll->setToggleAction( true ); 62 m_actionScroll->setToggleAction( true );
63 connect( m_actionScroll, SIGNAL(toggled(bool)), this, SIGNAL(autoScroll(bool)) ); 63 connect( m_actionScroll, SIGNAL(toggled(bool)), this, SIGNAL(autoScroll(bool)) );
64 m_actionScroll->addTo( this ); 64 m_actionScroll->addTo( this );
65 65
66 if ( parent ) 66 if ( parent )
67 { 67 {
68 installEventFilter( parent ); 68 installEventFilter( 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{
85 disconnect( m_key, SIGNAL(textChanged(const QString &)), 0, 0 ); 85 disconnect( m_key, SIGNAL(textChanged(const QString &)), 0, 0 );
86 m_key->setText( newKey ); 86 m_key->setText( newKey );
87 connect(m_key, SIGNAL(textChanged(const QString &)), this, SIGNAL(keyChanged(const QString &)) ); 87 connect(m_key, SIGNAL(textChanged(const QString &)), this, SIGNAL(keyChanged(const QString &)) );
88} 88}
89 89
90void NavBar::setAutoScrollRate( int scrollRate ) 90void NavBar::setAutoScrollRate( int scrollRate )