Diffstat (limited to 'noncore/apps/dagger/navbar.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/dagger/navbar.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/noncore/apps/dagger/navbar.h b/noncore/apps/dagger/navbar.h new file mode 100644 index 0000000..a37d6ff --- a/dev/null +++ b/noncore/apps/dagger/navbar.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | Dagger - A Bible study program utilizing the Sword library. | ||
3 | Copyright (c) 2004 Dan Williams <drw@handhelds.org> | ||
4 | |||
5 | This file is free software; you can redistribute it and/or modify it under | ||
6 | the terms of the GNU General Public License as published by the Free Software | ||
7 | Foundation; either version 2 of the License, or (at your option) any later version. | ||
8 | |||
9 | This file is distributed in the hope that it will be useful, but WITHOUT ANY | ||
10 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
11 | PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
12 | |||
13 | You should have received a copy of the GNU General Public License along with this | ||
14 | file; see the file COPYING. If not, write to the Free Software Foundation, Inc., | ||
15 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
16 | */ | ||
17 | |||
18 | #ifndef NAVBAR_H | ||
19 | #define NAVBAR_H | ||
20 | |||
21 | #include <qspinbox.h> | ||
22 | #include <qtoolbar.h> | ||
23 | |||
24 | class QAction; | ||
25 | class QLineEdit; | ||
26 | |||
27 | class NavBar : public QToolBar | ||
28 | { | ||
29 | Q_OBJECT | ||
30 | |||
31 | public: | ||
32 | NavBar( QMainWindow *parent = 0x0 ); | ||
33 | |||
34 | void navBtnsEnable( bool enabled ); | ||
35 | void setKey( const QString &newKey ); | ||
36 | void setAutoScrollRate( int scrollRate ); | ||
37 | const int autoScrollRate() { return m_scrollRate->value(); } | ||
38 | |||
39 | private: | ||
40 | QAction *m_actionPrevChapter; // Action for going back 1 chapter | ||
41 | QAction *m_actionPrevVerse; // Action for going back 1 verse | ||
42 | QLineEdit *m_key; // Edit box to enter key to goto | ||
43 | QAction *m_actionNextVerse; // Action for going forward 1 verse | ||
44 | QAction *m_actionNextChapter; // Action for going forward 1 chapter | ||
45 | QSpinBox *m_scrollRate; // Spin box to adjust rate of auto-scrolling | ||
46 | QAction *m_actionScroll; // Action to start/stop auto-scrolling | ||
47 | |||
48 | signals: | ||
49 | void prevChapter(); | ||
50 | void prevVerse(); | ||
51 | void keyChanged( const QString &newKey ); | ||
52 | void nextVerse(); | ||
53 | void nextChapter(); | ||
54 | void autoScroll( bool enabled ); | ||
55 | void scrollRateChanged( int newRate ); | ||
56 | }; | ||
57 | |||
58 | #endif | ||