summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/newaccount.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/apps/qashmoney/newaccount.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/apps/qashmoney/newaccount.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/newaccount.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/apps/qashmoney/newaccount.cpp b/noncore/apps/qashmoney/newaccount.cpp
index 7e57a18..5932182 100755
--- a/noncore/apps/qashmoney/newaccount.cpp
+++ b/noncore/apps/qashmoney/newaccount.cpp
@@ -31,102 +31,102 @@ NewAccount::NewAccount ( QWidget *parent, const char *name, bool modal ) : QDial
31 31
32 childlabel = new QLabel ( "Child of", this ); 32 childlabel = new QLabel ( "Child of", this );
33 childbox = new QComboBox ( FALSE, this ); 33 childbox = new QComboBox ( FALSE, this );
34 hideChildPulldownMenu (); 34 hideChildPulldownMenu ();
35 35
36 balancelabel = new QLabel ( "Balance", this ); 36 balancelabel = new QLabel ( "Balance", this );
37 37
38 balancebox = new QHBox ( this ); 38 balancebox = new QHBox ( this );
39 accountbalance = new QLineEdit ( balancebox ); 39 accountbalance = new QLineEdit ( balancebox );
40 accountbalance->setText ( "0.00" ); 40 accountbalance->setText ( "0.00" );
41 balancecalculator = new QPushButton( balancebox ); 41 balancecalculator = new QPushButton( balancebox );
42 balancecalculator->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/kcalc.png" ) ); 42 balancecalculator->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/kcalc.png" ) );
43 43
44 creditlimitlabel = new QLabel ( "Credit Limit", this ); 44 creditlimitlabel = new QLabel ( "Credit Limit", this );
45 45
46 creditlimitbox = new QHBox ( this ); 46 creditlimitbox = new QHBox ( this );
47 creditlimit = new QLineEdit ( creditlimitbox ); 47 creditlimit = new QLineEdit ( creditlimitbox );
48 creditlimitbox->setEnabled ( FALSE ); 48 creditlimitbox->setEnabled ( FALSE );
49 creditlimitcalculator = new QPushButton( creditlimitbox ); 49 creditlimitcalculator = new QPushButton( creditlimitbox );
50 creditlimitcalculator->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/kcalc.png" ) ); 50 creditlimitcalculator->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/kcalc.png" ) );
51 51
52 currencybox = new Currency ( this ); 52 currencybox = new Currency ( this );
53 53
54 typelabel = new QLabel ( "Type", this ); 54 typelabel = new QLabel ( "Type", this );
55 accounttype = new QComboBox ( FALSE, this ); 55 accounttype = new QComboBox ( FALSE, this );
56 accounttype->insertItem( tr( "Bank" ) ); 56 accounttype->insertItem( tr( "Bank" ) );
57 accounttype->insertItem( tr( "Cash" ) ); 57 accounttype->insertItem( tr( "Cash" ) );
58 accounttype->insertItem( tr( "Credit Card" ) ); 58 accounttype->insertItem( tr( "Credit Card" ) );
59 accounttype->insertItem( tr( "Equity" ) ); 59 accounttype->insertItem( tr( "Equity" ) );
60 accounttype->insertItem( tr( "Asset" ) ); 60 accounttype->insertItem( tr( "Asset" ) );
61 accounttype->insertItem( tr( "Liability" ) ); 61 accounttype->insertItem( tr( "Liability" ) );
62 62
63 layout = new QGridLayout ( this, 7, 2, 4, 2 ); 63 layout = new QGridLayout ( this, 7, 2, 4, 2 );
64 layout->addWidget ( namelabel , 0, 0, Qt::AlignLeft ); 64 layout->addWidget ( namelabel , 0, 0, Qt::AlignLeft );
65 layout->addWidget ( accountbox, 1, 0, Qt::AlignLeft ); 65 layout->addWidget ( accountbox, 1, 0, Qt::AlignLeft );
66 layout->addWidget ( datelabel, 2, 0, Qt::AlignLeft ); 66 layout->addWidget ( datelabel, 2, 0, Qt::AlignLeft );
67 layout->addWidget ( datebox, 3, 0, Qt::AlignLeft ); 67 layout->addWidget ( datebox, 3, 0, Qt::AlignLeft );
68 layout->addWidget ( childcheckbox, 4, 0, Qt::AlignLeft ); 68 layout->addWidget ( childcheckbox, 4, 0, Qt::AlignLeft );
69 layout->addWidget ( childlabel, 5, 0, Qt::AlignLeft ); 69 layout->addWidget ( childlabel, 5, 0, Qt::AlignLeft );
70 layout->addWidget ( childbox, 6, 0, Qt::AlignLeft ); 70 layout->addWidget ( childbox, 6, 0, Qt::AlignLeft );
71 layout->addWidget ( balancelabel, 0, 1, Qt::AlignLeft ); 71 layout->addWidget ( balancelabel, 0, 1, Qt::AlignLeft );
72 layout->addWidget ( balancebox, 1, 1, Qt::AlignLeft ); 72 layout->addWidget ( balancebox, 1, 1, Qt::AlignLeft );
73 layout->addWidget ( creditlimitlabel, 2, 1, Qt::AlignLeft ); 73 layout->addWidget ( creditlimitlabel, 2, 1, Qt::AlignLeft );
74 layout->addWidget ( creditlimitbox, 3, 1, Qt::AlignLeft ); 74 layout->addWidget ( creditlimitbox, 3, 1, Qt::AlignLeft );
75 layout->addWidget ( currencybox, 4, 1, Qt::AlignLeft ); 75 layout->addWidget ( currencybox, 4, 1, Qt::AlignLeft );
76 layout->addWidget ( typelabel, 5, 1, Qt::AlignLeft ); 76 layout->addWidget ( typelabel, 5, 1, Qt::AlignLeft );
77 layout->addWidget ( accounttype, 6, 1, Qt::AlignLeft ); 77 layout->addWidget ( accounttype, 6, 1, Qt::AlignLeft );
78 78
79 connect ( childcheckbox, SIGNAL ( clicked () ), this, SLOT ( showChildPulldownMenu() ) ); 79 connect ( childcheckbox, SIGNAL ( clicked() ), this, SLOT ( showChildPulldownMenu() ) );
80 connect ( balancecalculator, SIGNAL ( released() ), this, SLOT ( showCalculator() ) ); 80 connect ( balancecalculator, SIGNAL ( released() ), this, SLOT ( showCalculator() ) );
81 connect ( creditlimitcalculator, SIGNAL ( released() ), this, SLOT ( showCreditLimitCalculator() ) ); 81 connect ( creditlimitcalculator, SIGNAL ( released() ), this, SLOT ( showCreditLimitCalculator() ) );
82 connect ( accounttype, SIGNAL ( activated ( int ) ), this, SLOT ( activateCreditLimit ( int ) ) ); 82 connect ( accounttype, SIGNAL ( activated(int) ), this, SLOT ( activateCreditLimit(int) ) );
83 connect ( datebutton, SIGNAL ( released () ), this, SLOT ( showCalendar () ) ); 83 connect ( datebutton, SIGNAL ( released() ), this, SLOT ( showCalendar() ) );
84 connect ( descriptionbutton, SIGNAL ( released () ), this, SLOT ( addAccountDescription() ) ); 84 connect ( descriptionbutton, SIGNAL ( released() ), this, SLOT ( addAccountDescription() ) );
85} 85}
86 86
87NewAccount::~NewAccount () 87NewAccount::~NewAccount ()
88 { 88 {
89 } 89 }
90 90
91void NewAccount::showChildPulldownMenu () 91void NewAccount::showChildPulldownMenu ()
92 { 92 {
93 if ( childcheckbox->isChecked() == TRUE ) 93 if ( childcheckbox->isChecked() == TRUE )
94 { 94 {
95 childlabel->setEnabled ( TRUE ); 95 childlabel->setEnabled ( TRUE );
96 childbox->setEnabled ( TRUE ); 96 childbox->setEnabled ( TRUE );
97 } 97 }
98 else 98 else
99 hideChildPulldownMenu(); 99 hideChildPulldownMenu();
100 } 100 }
101 101
102void NewAccount::hideChildPulldownMenu () 102void NewAccount::hideChildPulldownMenu ()
103 { 103 {
104 childlabel->setEnabled ( FALSE ); 104 childlabel->setEnabled ( FALSE );
105 childbox->setEnabled ( FALSE ); 105 childbox->setEnabled ( FALSE );
106 } 106 }
107 107
108void NewAccount::showCalculator () 108void NewAccount::showCalculator ()
109 { 109 {
110 Calculator *calculator = new Calculator ( this ); 110 Calculator *calculator = new Calculator ( this );
111 calculator->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) ); 111 calculator->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) );
112 if ( calculator->exec () == QDialog::Accepted ) 112 if ( calculator->exec () == QDialog::Accepted )
113 accountbalance->setText ( calculator->display->text() ); 113 accountbalance->setText ( calculator->display->text() );
114 } 114 }
115 115
116void NewAccount::showCreditLimitCalculator () 116void NewAccount::showCreditLimitCalculator ()
117 { 117 {
118 Calculator *calculator = new Calculator ( this ); 118 Calculator *calculator = new Calculator ( this );
119 calculator->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) ); 119 calculator->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) );
120 if ( calculator->exec () == QDialog::Accepted ) 120 if ( calculator->exec () == QDialog::Accepted )
121 creditlimit->setText ( calculator->display->text() ); 121 creditlimit->setText ( calculator->display->text() );
122 } 122 }
123 123
124void NewAccount::activateCreditLimit ( int index ) 124void NewAccount::activateCreditLimit ( int index )
125 { 125 {
126 if ( index == 2 || index == 5 ) 126 if ( index == 2 || index == 5 )
127 creditlimitbox->setEnabled ( TRUE ); 127 creditlimitbox->setEnabled ( TRUE );
128 else 128 else
129 { 129 {
130 creditlimit->clear (); 130 creditlimit->clear ();
131 creditlimitbox->setEnabled ( FALSE ); 131 creditlimitbox->setEnabled ( FALSE );
132 } 132 }