summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/transaction.cpp
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/transaction.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/transaction.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/noncore/apps/checkbook/transaction.cpp b/noncore/apps/checkbook/transaction.cpp
index 17be669..07d5ae1 100644
--- a/noncore/apps/checkbook/transaction.cpp
+++ b/noncore/apps/checkbook/transaction.cpp
@@ -1,93 +1,88 @@
1/* 1/*
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 =. 3 =.
4             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org> 4             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
5           .>+-= 5           .>+-=
6 _;:,     .>    :=|. This file is free software; you can 6 _;:,     .>    :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .: 19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "transaction.h" 29#include "transaction.h"
30#include "traninfo.h" 30#include "traninfo.h"
31 31
32#include <qpe/datebookmonth.h> 32#include <qpe/datebookmonth.h>
33#include <qpe/timestring.h>
34 33
35#include <qbuttongroup.h> 34#include <qbuttongroup.h>
36#include <qcombobox.h> 35#include <qcombobox.h>
37#include <qlabel.h> 36#include <qlabel.h>
38#include <qlayout.h> 37#include <qlayout.h>
39#include <qlineedit.h> 38#include <qlineedit.h>
40#include <qmultilineedit.h> 39#include <qmultilineedit.h>
41#include <qpopupmenu.h>
42#include <qpushbutton.h>
43#include <qradiobutton.h> 40#include <qradiobutton.h>
44#include <qscrollview.h>
45#include <qstring.h>
46#include <qwhatsthis.h> 41#include <qwhatsthis.h>
47 42
48Transaction::Transaction( QWidget *parent, const QString &acctname, TranInfo *info, 43Transaction::Transaction( QWidget *parent, const QString &acctname, TranInfo *info,
49 const QString &symbol ) 44 const QString &symbol )
50 : QDialog( parent, 0, TRUE, WStyle_ContextHelp ) 45 : QDialog( parent, 0, TRUE, WStyle_ContextHelp )
51{ 46{
52 QString tempstr = tr( "Transaction for " ); 47 QString tempstr = tr( "Transaction for " );
53 tempstr.append( acctname ); 48 tempstr.append( acctname );
54 setCaption( tempstr ); 49 setCaption( tempstr );
55 50
56 tran = info; 51 tran = info;
57 currencySymbol = symbol; 52 currencySymbol = symbol;
58 53
59 QVBoxLayout *vb = new QVBoxLayout( this ); 54 QVBoxLayout *vb = new QVBoxLayout( this );
60 55
61 QScrollView *sv = new QScrollView( this ); 56 QScrollView *sv = new QScrollView( this );
62 vb->addWidget( sv, 0, 0 ); 57 vb->addWidget( sv, 0, 0 );
63 sv->setResizePolicy( QScrollView::AutoOneFit ); 58 sv->setResizePolicy( QScrollView::AutoOneFit );
64 sv->setFrameStyle( QFrame::NoFrame ); 59 sv->setFrameStyle( QFrame::NoFrame );
65 60
66 QWidget *container = new QWidget( sv->viewport() ); 61 QWidget *container = new QWidget( sv->viewport() );
67 sv->addChild( container ); 62 sv->addChild( container );
68 63
69 QGridLayout *layout = new QGridLayout( container ); 64 QGridLayout *layout = new QGridLayout( container );
70 layout->setSpacing( 2 ); 65 layout->setSpacing( 2 );
71 layout->setMargin( 4 ); 66 layout->setMargin( 4 );
72 67
73 // Withdrawal/Deposit 68 // Withdrawal/Deposit
74 QButtonGroup *btngrp = new QButtonGroup( container ); 69 QButtonGroup *btngrp = new QButtonGroup( container );
75 btngrp->setColumnLayout(0, Qt::Vertical ); 70 btngrp->setColumnLayout(0, Qt::Vertical );
76 btngrp->layout()->setSpacing( 0 ); 71 btngrp->layout()->setSpacing( 0 );
77 btngrp->layout()->setMargin( 0 ); 72 btngrp->layout()->setMargin( 0 );
78 btngrp->setMaximumWidth( 220 ); 73 btngrp->setMaximumWidth( 220 );
79 QGridLayout *layout2 = new QGridLayout( btngrp->layout() ); 74 QGridLayout *layout2 = new QGridLayout( btngrp->layout() );
80 layout2->setSpacing( 2 ); 75 layout2->setSpacing( 2 );
81 layout2->setMargin( 2 ); 76 layout2->setMargin( 2 );
82 withBtn = new QRadioButton( tr( "Withdrawal" ), btngrp ); 77 withBtn = new QRadioButton( tr( "Withdrawal" ), btngrp );
83 QWhatsThis::add( withBtn, tr( "Select whether the transaction is a withdrawal or deposit here." ) ); 78 QWhatsThis::add( withBtn, tr( "Select whether the transaction is a withdrawal or deposit here." ) );
84 layout2->addWidget( withBtn, 0, 0 ); 79 layout2->addWidget( withBtn, 0, 0 );
85 connect( withBtn, SIGNAL( clicked() ), this, SLOT( slotWithdrawalClicked() ) ); 80 connect( withBtn, SIGNAL( clicked() ), this, SLOT( slotWithdrawalClicked() ) );
86 depBtn = new QRadioButton( tr( "Deposit" ), btngrp ); 81 depBtn = new QRadioButton( tr( "Deposit" ), btngrp );
87 QWhatsThis::add( depBtn, tr( "Select whether the transaction is a withdrawal or deposit here." ) ); 82 QWhatsThis::add( depBtn, tr( "Select whether the transaction is a withdrawal or deposit here." ) );
88 layout2->addWidget( depBtn, 0, 1 ); 83 layout2->addWidget( depBtn, 0, 1 );
89 btngrp->setMaximumSize( 320, withBtn->height() ); 84 btngrp->setMaximumSize( 320, withBtn->height() );
90 connect( depBtn, SIGNAL( clicked() ), this, SLOT( slotDepositClicked() ) ); 85 connect( depBtn, SIGNAL( clicked() ), this, SLOT( slotDepositClicked() ) );
91 layout->addMultiCellWidget( btngrp, 0, 0, 0, 3 ); 86 layout->addMultiCellWidget( btngrp, 0, 0, 0, 3 );
92 87
93 // Date 88 // Date