Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

configuredlg.h

Go to the documentation of this file.
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 CONFIGUREDLG_H
00019 #define CONFIGUREDLG_H
00020 
00021 #include <opie2/ofontselector.h>
00022 #include <opie2/otabwidget.h>
00023 
00024 #include <qcheckbox.h>
00025 #include <qdialog.h>
00026 #include <qlineedit.h>
00027 #include <qradiobutton.h>
00028 #include <qspinbox.h>
00029 
00030 class QLabel;
00031 
00032 class ConfigureDlg : public QDialog
00033 {
00034     Q_OBJECT
00035 
00036 public:
00037     ConfigureDlg( QWidget *parent = 0x0, const QString &swordPath = 0x0, bool alwaysOpenNew = true,
00038                   int numVerses = 5, bool disableBlanking = false, int copyFormat = 0, const QFont *font = 0x0 );
00039 
00040     QString swordPath()     { return m_swordPath->text(); }
00041     bool    alwaysOpenNew() { return m_alwaysOpenNew->isChecked(); }
00042     int     numVerses()     { return m_numVerses->value(); }
00043     bool    screenBlank()   { return m_disableScreenBlank->isChecked(); }
00044     int     copyFormat()    { if ( m_copyFull->isChecked() )
00045                                   return 1;
00046                               else if ( m_copyVerse->isChecked() )
00047                                   return 2;
00048                               else if ( m_copyKey->isChecked() )
00049                                   return 3;
00050                               else
00051                                   return 0; }
00052     QFont   selectedFont()  { return m_font->selectedFont(); }
00053 
00054 private:
00055     Opie::Ui::OTabWidget     m_tabs; // Main widget
00056     Opie::Ui::OFontSelector *m_font; // Font selection widget
00057 
00058     // General tab's UI controls
00059     QLineEdit *m_swordPath;          // Contains path to Sword modules
00060     QCheckBox *m_alwaysOpenNew;      // Indicates whether to always open modules in a new tab
00061     QSpinBox  *m_numVerses;          // Contains number of verses to display for Bible modules
00062     QCheckBox *m_disableScreenBlank; // Indicates whether to disable automatic screen blanking
00063 
00064     // Copy tab's UI controls
00065     QRadioButton *m_copyTextFull;    // Verse (Text, Book cc:vv)
00066     QRadioButton *m_copyFull;        // Verse (Book cc:vv)
00067     QRadioButton *m_copyVerse;       // Verse
00068     QRadioButton *m_copyKey;         // Book cc:vv
00069     QLabel       *m_copyExample;     // Text of copy format example
00070 
00071 private slots:
00072     void slotCopyFormatSelected();
00073     void slotSelectSwordPath();
00074 };
00075 
00076 #endif

Generated on Sat Nov 5 16:16:48 2005 for OPIE by  doxygen 1.4.2