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.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/apps/checkbook/transaction.cpp b/noncore/apps/checkbook/transaction.cpp
index a72a48b..1b08b24 100644
--- a/noncore/apps/checkbook/transaction.cpp
+++ b/noncore/apps/checkbook/transaction.cpp
@@ -90,46 +90,46 @@ Transaction::Transaction( QWidget *parent, bool bNew, const QString &acctname,
90 90
91 // Date 91 // Date
92 QLabel *label = new QLabel( tr( "Date:" ), container ); 92 QLabel *label = new QLabel( tr( "Date:" ), container );
93 QWhatsThis::add( label, tr( "Select date of transaction here." ) ); 93 QWhatsThis::add( label, tr( "Select date of transaction here." ) );
94 layout->addWidget( label, 1, 0 ); 94 layout->addWidget( label, 1, 0 );
95 dateBtn = new QPushButton( TimeString::shortDate( QDate::currentDate() ), 95 dateBtn = new QPushButton( TimeString::shortDate( QDate::currentDate() ),
96 container ); 96 container );
97 QWhatsThis::add( dateBtn, tr( "Select date of transaction here." ) ); 97 QWhatsThis::add( dateBtn, tr( "Select date of transaction here." ) );
98 QPopupMenu *m1 = new QPopupMenu( container ); 98 QPopupMenu *m1 = new QPopupMenu( container );
99 datePicker = new DateBookMonth( m1, 0, TRUE ); 99 datePicker = new DateBookMonth( m1, 0, TRUE );
100 m1->insertItem( datePicker ); 100 m1->insertItem( datePicker );
101 dateBtn->setPopup( m1 ); 101 dateBtn->setPopup( m1 );
102 connect( datePicker, SIGNAL( dateClicked( int, int, int ) ), 102 connect( datePicker, SIGNAL( dateClicked(int,int,int) ),
103 this, SLOT( slotDateChanged( int, int, int ) ) ); 103 this, SLOT( slotDateChanged(int,int,int) ) );
104 layout->addWidget( dateBtn, 1, 1 ); 104 layout->addWidget( dateBtn, 1, 1 );
105 105
106 // Check number 106 // Check number
107 label = new QLabel( tr( "Number:" ), container ); 107 label = new QLabel( tr( "Number:" ), container );
108 QWhatsThis::add( label, tr( "Enter check number here." ) ); 108 QWhatsThis::add( label, tr( "Enter check number here." ) );
109 layout->addWidget( label, 1, 2 ); 109 layout->addWidget( label, 1, 2 );
110 numEdit = new QLineEdit( container ); 110 numEdit = new QLineEdit( container );
111 QWhatsThis::add( numEdit, tr( "Enter check number here." ) ); 111 QWhatsThis::add( numEdit, tr( "Enter check number here." ) );
112 numEdit->setMaximumWidth( 40 ); 112 numEdit->setMaximumWidth( 40 );
113 layout->addWidget( numEdit, 1, 3 ); 113 layout->addWidget( numEdit, 1, 3 );
114 114
115 // Description 115 // Description
116 label = new QLabel( tr( "Description:" ), container ); 116 label = new QLabel( tr( "Description:" ), container );
117 QWhatsThis::add( label, tr( "Enter description of transaction here." ) ); 117 QWhatsThis::add( label, tr( "Enter description of transaction here." ) );
118 layout->addWidget( label, 2, 0 ); 118 layout->addWidget( label, 2, 0 );
119 _cbDesc=new QComboBox( true, container ); 119 _cbDesc=new QComboBox( true, container );
120 _cbDesc->insertStringList( _pCfg->getPayees() ); 120 _cbDesc->insertStringList( _pCfg->getPayees() );
121 QWhatsThis::add( _cbDesc, tr( "Enter description of transaction here." ) ); 121 QWhatsThis::add( _cbDesc, tr( "Enter description of transaction here." ) );
122 layout->addMultiCellWidget( _cbDesc, 2, 2, 1, 3 ); 122 layout->addMultiCellWidget( _cbDesc, 2, 2, 1, 3 );
123 connect( _cbDesc, SIGNAL( activated(const QString &) ), this, SLOT( slotActivated(const QString &) ) ); 123 connect( _cbDesc, SIGNAL( activated(const QString&) ), this, SLOT( slotActivated(const QString&) ) );
124 124
125 125
126 // Category 126 // Category
127 label = new QLabel( tr( "Category:" ), container ); 127 label = new QLabel( tr( "Category:" ), container );
128 QWhatsThis::add( label, tr( "Select transaction category here." ) ); 128 QWhatsThis::add( label, tr( "Select transaction category here." ) );
129 layout->addWidget( label, 3, 0 ); 129 layout->addWidget( label, 3, 0 );
130 catList = new QComboBox( container ); 130 catList = new QComboBox( container );
131 QWhatsThis::add( catList, tr( "Select transaction category here." ) ); 131 QWhatsThis::add( catList, tr( "Select transaction category here." ) );
132 layout->addMultiCellWidget( catList, 3, 3, 1, 3 ); 132 layout->addMultiCellWidget( catList, 3, 3, 1, 3 );
133 133
134 // Type 134 // Type
135 label = new QLabel( tr( "Type:" ), container ); 135 label = new QLabel( tr( "Type:" ), container );
@@ -161,28 +161,28 @@ Transaction::Transaction( QWidget *parent, bool bNew, const QString &acctname,
161 QWhatsThis::add( label, tr( "Enter any additional information for this transaction here." ) ); 161 QWhatsThis::add( label, tr( "Enter any additional information for this transaction here." ) );
162 layout->addWidget( label, 7, 0 ); 162 layout->addWidget( label, 7, 0 );
163 noteEdit = new QMultiLineEdit( container ); 163 noteEdit = new QMultiLineEdit( container );
164 QWhatsThis::add( noteEdit, tr( "Enter any additional information for this transaction here." ) ); 164 QWhatsThis::add( noteEdit, tr( "Enter any additional information for this transaction here." ) );
165 layout->addMultiCellWidget( noteEdit, 8, 8, 0, 3 ); 165 layout->addMultiCellWidget( noteEdit, 8, 8, 0, 3 );
166 166
167 // init date 167 // init date
168 initFromInfo( info ); 168 initFromInfo( info );
169 169
170 // not new handlers 170 // not new handlers
171 connect( withBtn, SIGNAL( toggled(bool) ), this, SLOT( slotNotNew() ) ); 171 connect( withBtn, SIGNAL( toggled(bool) ), this, SLOT( slotNotNew() ) );
172 connect( depBtn, SIGNAL( toggled(bool) ), this, SLOT( slotNotNew() ) ); 172 connect( depBtn, SIGNAL( toggled(bool) ), this, SLOT( slotNotNew() ) );
173 connect( catList, SIGNAL(activated(const QString &)), this, SLOT( slotNotNew() ) ); 173 connect( catList, SIGNAL(activated(const QString&)), this, SLOT( slotNotNew() ) );
174 connect( typeList, SIGNAL(activated(const QString &)), this, SLOT( slotNotNew() ) ); 174 connect( typeList, SIGNAL(activated(const QString&)), this, SLOT( slotNotNew() ) );
175 connect( amtEdit, SIGNAL(textChanged(const QString &)), this, SLOT( slotNotNew() ) ); 175 connect( amtEdit, SIGNAL(textChanged(const QString&)), this, SLOT( slotNotNew() ) );
176 connect( feeEdit, SIGNAL(textChanged(const QString &)), this, SLOT( slotNotNew() ) ); 176 connect( feeEdit, SIGNAL(textChanged(const QString&)), this, SLOT( slotNotNew() ) );
177 connect( noteEdit, SIGNAL(textChanged()), this, SLOT( slotNotNew() ) ); 177 connect( noteEdit, SIGNAL(textChanged()), this, SLOT( slotNotNew() ) );
178} 178}
179 179
180// --- initFromInfo ----------------------------------------------------------- 180// --- initFromInfo -----------------------------------------------------------
181void Transaction::initFromInfo(TranInfo *info, bool bPopulateOld) 181void Transaction::initFromInfo(TranInfo *info, bool bPopulateOld)
182{ 182{
183 // Populate current values if provided 183 // Populate current values if provided
184 if ( info ) 184 if ( info )
185 { 185 {
186 if ( info->withdrawal() ) 186 if ( info->withdrawal() )
187 { 187 {
188 withBtn->setChecked( TRUE ); 188 withBtn->setChecked( TRUE );