00001 /* 00002 Dagger - A Bible study program utilizing the Sword library. 00003 Copyright (c) 2004 Dan Williams <drw@handhelds.org> 00004 00005 This file is free software; you can redistribute it and/or modify it under 00006 the terms of the GNU General Public License as published by the Free Software 00007 Foundation; either version 2 of the License, or (at your option) any later version. 00008 00009 This file is distributed in the hope that it will be useful, but WITHOUT ANY 00010 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 00011 PARTICULAR PURPOSE. See the GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License along with this 00014 file; see the file COPYING. If not, write to the Free Software Foundation, Inc., 00015 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00016 */ 00017 00018 #ifndef NAVBAR_H 00019 #define NAVBAR_H 00020 00021 #include <qspinbox.h> 00022 #include <qtoolbar.h> 00023 00024 class QAction; 00025 class QLineEdit; 00026 00027 class NavBar : public QToolBar 00028 { 00029 Q_OBJECT 00030 00031 public: 00032 NavBar( QMainWindow *parent = 0x0 ); 00033 00034 void navBtnsEnable( bool enabled ); 00035 void setKey( const QString &newKey ); 00036 void setAutoScrollRate( int scrollRate ); 00037 const int autoScrollRate() { return m_scrollRate->value(); } 00038 00039 private: 00040 QAction *m_actionPrevPage; // Action for going back 1 page 00041 QAction *m_actionPrevVerse; // Action for going back 1 verse 00042 QLineEdit *m_key; // Edit box to enter key to goto 00043 QAction *m_actionNextVerse; // Action for going forward 1 verse 00044 QAction *m_actionNextPage; // Action for going forward 1 page 00045 QSpinBox *m_scrollRate; // Spin box to adjust rate of auto-scrolling 00046 QAction *m_actionScroll; // Action to start/stop auto-scrolling 00047 00048 signals: 00049 void prevPage(); 00050 void prevVerse(); 00051 void keyChanged( const QString &newKey ); 00052 void nextVerse(); 00053 void nextPage(); 00054 void autoScroll( bool enabled ); 00055 void scrollRateChanged( int newRate ); 00056 }; 00057 00058 #endif
1.4.2