Diffstat (limited to 'noncore/apps/checkbook/checkbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index b325f45..1231f42 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp | |||
@@ -200,49 +200,52 @@ QWidget *Checkbook::initInfo() | |||
200 | 200 | ||
201 | // --- initTransactions ------------------------------------------------------- | 201 | // --- initTransactions ------------------------------------------------------- |
202 | QWidget *Checkbook::initTransactions() | 202 | QWidget *Checkbook::initTransactions() |
203 | { | 203 | { |
204 | QWidget *control = new QWidget( mainWidget, tr("Transactions") ); | 204 | QWidget *control = new QWidget( mainWidget, tr("Transactions") ); |
205 | 205 | ||
206 | QGridLayout *layout = new QGridLayout( control ); | 206 | QGridLayout *layout = new QGridLayout( control ); |
207 | layout->setSpacing( 2 ); | 207 | layout->setSpacing( 2 ); |
208 | layout->setMargin( 4 ); | 208 | layout->setMargin( 4 ); |
209 | 209 | ||
210 | // Sort selector | 210 | // Sort selector |
211 | QLabel *label = new QLabel( tr( "Sort by:" ), control ); | 211 | QLabel *label = new QLabel( tr( "Sort by:" ), control ); |
212 | QWhatsThis::add( label, tr( "Select checkbook sorting here." ) ); | 212 | QWhatsThis::add( label, tr( "Select checkbook sorting here." ) ); |
213 | layout->addMultiCellWidget( label, 0, 0, 0, 1 ); | 213 | layout->addMultiCellWidget( label, 0, 0, 0, 1 ); |
214 | _cbSortType=new QComboBox( control ); | 214 | _cbSortType=new QComboBox( control ); |
215 | _cbSortType->insertItem( tr("Entry Order") ); | 215 | _cbSortType->insertItem( tr("Entry Order") ); |
216 | _cbSortType->insertItem( tr("Date") ); | 216 | _cbSortType->insertItem( tr("Date") ); |
217 | _cbSortType->insertItem( tr("Number") ); | 217 | _cbSortType->insertItem( tr("Number") ); |
218 | layout->addMultiCellWidget( _cbSortType, 0, 0, 1, 2 ); | 218 | layout->addMultiCellWidget( _cbSortType, 0, 0, 1, 2 ); |
219 | connect( _cbSortType, SIGNAL( activated(const QString&) ), this, SLOT( slotSortChanged(const QString&) ) ); | 219 | connect( _cbSortType, SIGNAL( activated(const QString&) ), this, SLOT( slotSortChanged(const QString&) ) ); |
220 | 220 | ||
221 | // Table | 221 | // Table |
222 | tranTable = new QListView( control ); | 222 | tranTable = new QListView( control ); |
223 | QFont fnt(QPEApplication::font()); | 223 | QFont fnt(QPEApplication::font()); |
224 | fnt.setPointSize( fnt.pointSize()-1 ); | 224 | if( _pCfg->getUseSmallFont() ) |
225 | { | ||
226 | fnt.setPointSize( fnt.pointSize()-1 ); | ||
227 | } | ||
225 | tranTable->setFont( fnt ); | 228 | tranTable->setFont( fnt ); |
226 | QWhatsThis::add( tranTable, tr( "This is a listing of all transactions entered for this checkbook.\n\nTo sort entries by a specific field, click on the column name." ) ); | 229 | QWhatsThis::add( tranTable, tr( "This is a listing of all transactions entered for this checkbook.\n\nTo sort entries by a specific field, click on the column name." ) ); |
227 | tranTable->addColumn( tr( "Id" ) ); | 230 | tranTable->addColumn( tr( "Id" ) ); |
228 | tranTable->setColumnWidthMode( COL_ID, QListView::Manual ); | 231 | tranTable->setColumnWidthMode( COL_ID, QListView::Manual ); |
229 | tranTable->setColumnWidth( COL_ID, 0); | 232 | tranTable->setColumnWidth( COL_ID, 0); |
230 | tranTable->addColumn( tr( "SortDate" ) ); | 233 | tranTable->addColumn( tr( "SortDate" ) ); |
231 | tranTable->setColumnWidthMode( COL_SORTDATE, QListView::Manual ); | 234 | tranTable->setColumnWidthMode( COL_SORTDATE, QListView::Manual ); |
232 | tranTable->setColumnWidth( COL_SORTDATE, 0); | 235 | tranTable->setColumnWidth( COL_SORTDATE, 0); |
233 | tranTable->addColumn( tr( "Num" ) ); | 236 | tranTable->addColumn( tr( "Num" ) ); |
234 | tranTable->addColumn( tr( "Date" ) ); | 237 | tranTable->addColumn( tr( "Date" ) ); |
235 | //tranTable->addColumn( tr( "Cleared" ) ); | 238 | //tranTable->addColumn( tr( "Cleared" ) ); |
236 | tranTable->addColumn( tr( "Description" ) ); | 239 | tranTable->addColumn( tr( "Description" ) ); |
237 | int column = tranTable->addColumn( tr( "Amount" ) ); | 240 | int column = tranTable->addColumn( tr( "Amount" ) ); |
238 | tranTable->setColumnAlignment( column, Qt::AlignRight ); | 241 | tranTable->setColumnAlignment( column, Qt::AlignRight ); |
239 | column=tranTable->addColumn( tr("Balance") ); | 242 | column=tranTable->addColumn( tr("Balance") ); |
240 | tranTable->setColumnAlignment( column, Qt::AlignRight ); | 243 | tranTable->setColumnAlignment( column, Qt::AlignRight ); |
241 | tranTable->setAllColumnsShowFocus( TRUE ); | 244 | tranTable->setAllColumnsShowFocus( TRUE ); |
242 | tranTable->setSorting( -1 ); | 245 | tranTable->setSorting( -1 ); |
243 | layout->addMultiCellWidget( tranTable, 1, 1, 0, 2 ); | 246 | layout->addMultiCellWidget( tranTable, 1, 1, 0, 2 ); |
244 | QPEApplication::setStylusOperation( tranTable->viewport(), QPEApplication::RightOnHold ); | 247 | QPEApplication::setStylusOperation( tranTable->viewport(), QPEApplication::RightOnHold ); |
245 | connect( tranTable, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), | 248 | connect( tranTable, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), |
246 | this, SLOT( slotMenuTran(QListViewItem*,const QPoint&) ) ); | 249 | this, SLOT( slotMenuTran(QListViewItem*,const QPoint&) ) ); |
247 | connect( tranTable, SIGNAL( doubleClicked(QListViewItem*) ), | 250 | connect( tranTable, SIGNAL( doubleClicked(QListViewItem*) ), |
248 | this, SLOT( slotEditTran() ) ); | 251 | this, SLOT( slotEditTran() ) ); |