summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/configuration.cpp
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/configuration.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/configuration.cpp76
1 files changed, 76 insertions, 0 deletions
diff --git a/noncore/apps/checkbook/configuration.cpp b/noncore/apps/checkbook/configuration.cpp
new file mode 100644
index 0000000..37208da
--- a/dev/null
+++ b/noncore/apps/checkbook/configuration.cpp
@@ -0,0 +1,76 @@
1/*
2                This file is part of the OPIE Project
3 =.
4             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
5           .>+-=
6 _;:,     .>    :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
26
27*/
28
29#include "configuration.h"
30
31#include <qcheckbox.h>
32#include <qfontmetrics.h>
33#include <qlabel.h>
34#include <qlayout.h>
35#include <qlineedit.h>
36#include <qstring.h>
37#include <qwhatsthis.h>
38
39Configuration::Configuration( QWidget *parent, const QString &cs, bool sl, bool sb )
40 : QDialog( parent, 0, TRUE, WStyle_ContextHelp )
41{
42 setCaption( tr( "Configure Checkbook" ) );
43
44 QFontMetrics fm = fontMetrics();
45 int fh = fm.height();
46
47 QGridLayout *layout = new QGridLayout( this );
48 layout->setSpacing( 4 );
49 layout->setMargin( 4 );
50
51 QLabel *label = new QLabel( tr( "Enter currency symbol:" ), this );
52 QWhatsThis::add( label, tr( "Enter your local currency symbol here." ) );
53 label->setMaximumHeight( fh + 3 );
54 layout->addWidget( label, 0, 0 );
55
56 symbolEdit = new QLineEdit( cs, this );
57 QWhatsThis::add( symbolEdit, tr( "Enter your local currency symbol here." ) );
58 symbolEdit->setMaximumHeight( fh + 5 );
59 symbolEdit->setFocus();
60 layout->addWidget( symbolEdit, 0, 1 );
61
62 lockCB = new QCheckBox( tr( "Show whether checkbook is password\nprotected" ), this );
63 QWhatsThis::add( lockCB, tr( "Click here to select whether or not the main window will display that the checkbook is protected with a password." ) );
64 lockCB->setChecked( sl );
65 layout->addMultiCellWidget( lockCB, 1, 1, 0, 1 );
66
67 balCB = new QCheckBox( tr( "Show checkbook balances" ), this );
68 QWhatsThis::add( balCB, tr( "Click here to select whether or not the main window will display the current balance for each checkbook." ) );
69 balCB->setMaximumHeight( fh + 5 );
70 balCB->setChecked( sb );
71 layout->addMultiCellWidget( balCB, 2, 2, 0, 1 );
72}
73
74Configuration::~Configuration()
75{
76}