-rw-r--r-- | noncore/apps/checkbook/checkbook.cpp | 18 | ||||
-rw-r--r-- | noncore/apps/checkbook/listedit.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/checkbook/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/checkbook/password.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/checkbook/transaction.cpp | 14 |
5 files changed, 21 insertions, 21 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index 26b2533..1b933f2 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp | |||
@@ -84,25 +84,25 @@ Checkbook::Checkbook( QWidget *parent, CBInfo *i, Cfg *cfg ) | |||
84 | layout->setSpacing( 4 ); | 84 | layout->setSpacing( 4 ); |
85 | 85 | ||
86 | // Setup tabs for all info | 86 | // Setup tabs for all info |
87 | mainWidget = new OTabWidget( this ); | 87 | mainWidget = new OTabWidget( this ); |
88 | layout->addWidget( mainWidget ); | 88 | layout->addWidget( mainWidget ); |
89 | mainWidget->addTab( initInfo(), "checkbook/infotab", tr( "Info" ) ); | 89 | mainWidget->addTab( initInfo(), "checkbook/infotab", tr( "Info" ) ); |
90 | mainWidget->addTab( initTransactions(), "checkbook/trantab", tr( "Transactions" ) ); | 90 | mainWidget->addTab( initTransactions(), "checkbook/trantab", tr( "Transactions" ) ); |
91 | mainWidget->addTab( initCharts(), "checkbook/charttab", tr( "Charts" ) ); | 91 | mainWidget->addTab( initCharts(), "checkbook/charttab", tr( "Charts" ) ); |
92 | if( _pCfg->isShowLastTab() ) | 92 | if( _pCfg->isShowLastTab() ) |
93 | mainWidget->setCurrentTab( info->getLastTab() ); | 93 | mainWidget->setCurrentTab( info->getLastTab() ); |
94 | else | 94 | else |
95 | mainWidget->setCurrentTab( tr( "Info" ) ); | 95 | mainWidget->setCurrentTab( tr( "Info" ) ); |
96 | connect( mainWidget, SIGNAL( currentChanged(QWidget *) ), this, SLOT( slotTab(QWidget *) ) ); | 96 | connect( mainWidget, SIGNAL( currentChanged(QWidget*) ), this, SLOT( slotTab(QWidget*) ) ); |
97 | 97 | ||
98 | // Load checkbook information | 98 | // Load checkbook information |
99 | loadCheckbook(); | 99 | loadCheckbook(); |
100 | } | 100 | } |
101 | 101 | ||
102 | Checkbook::~Checkbook() | 102 | Checkbook::~Checkbook() |
103 | { | 103 | { |
104 | } | 104 | } |
105 | 105 | ||
106 | // --- initInfo --------------------------------------------------------------- | 106 | // --- initInfo --------------------------------------------------------------- |
107 | QWidget *Checkbook::initInfo() | 107 | QWidget *Checkbook::initInfo() |
108 | { | 108 | { |
@@ -125,26 +125,26 @@ QWidget *Checkbook::initInfo() | |||
125 | // Password protection | 125 | // Password protection |
126 | passwordCB = new QCheckBox( tr( "Password protect" ), container ); | 126 | passwordCB = new QCheckBox( tr( "Password protect" ), container ); |
127 | QWhatsThis::add( passwordCB, tr( "Click here to enable/disable password protection of this checkbook." ) ); | 127 | QWhatsThis::add( passwordCB, tr( "Click here to enable/disable password protection of this checkbook." ) ); |
128 | connect( passwordCB, SIGNAL( clicked() ), this, SLOT( slotPasswordClicked() ) ); | 128 | connect( passwordCB, SIGNAL( clicked() ), this, SLOT( slotPasswordClicked() ) ); |
129 | layout->addMultiCellWidget( passwordCB, 0, 0, 0, 1 ); | 129 | layout->addMultiCellWidget( passwordCB, 0, 0, 0, 1 ); |
130 | 130 | ||
131 | // Account name | 131 | // Account name |
132 | QLabel *label = new QLabel( tr( "Name:" ), container ); | 132 | QLabel *label = new QLabel( tr( "Name:" ), container ); |
133 | QWhatsThis::add( label, tr( "Enter name of checkbook here." ) ); | 133 | QWhatsThis::add( label, tr( "Enter name of checkbook here." ) ); |
134 | layout->addWidget( label, 1, 0 ); | 134 | layout->addWidget( label, 1, 0 ); |
135 | nameEdit = new QLineEdit( container ); | 135 | nameEdit = new QLineEdit( container ); |
136 | QWhatsThis::add( nameEdit, tr( "Enter name of checkbook here." ) ); | 136 | QWhatsThis::add( nameEdit, tr( "Enter name of checkbook here." ) ); |
137 | connect( nameEdit, SIGNAL( textChanged( const QString & ) ), | 137 | connect( nameEdit, SIGNAL( textChanged(const QString&) ), |
138 | this, SLOT( slotNameChanged( const QString & ) ) ); | 138 | this, SLOT( slotNameChanged(const QString&) ) ); |
139 | layout->addWidget( nameEdit, 1, 1 ); | 139 | layout->addWidget( nameEdit, 1, 1 ); |
140 | 140 | ||
141 | // Type of account | 141 | // Type of account |
142 | label = new QLabel( tr( "Type:" ), container ); | 142 | label = new QLabel( tr( "Type:" ), container ); |
143 | QWhatsThis::add( label, tr( "Select type of checkbook here." ) ); | 143 | QWhatsThis::add( label, tr( "Select type of checkbook here." ) ); |
144 | layout->addWidget( label, 2, 0 ); | 144 | layout->addWidget( label, 2, 0 ); |
145 | typeList = new QComboBox( container ); | 145 | typeList = new QComboBox( container ); |
146 | QWhatsThis::add( typeList, tr( "Select type of checkbook here." ) ); | 146 | QWhatsThis::add( typeList, tr( "Select type of checkbook here." ) ); |
147 | typeList->insertStringList( _pCfg->getAccountTypes() ); | 147 | typeList->insertStringList( _pCfg->getAccountTypes() ); |
148 | layout->addWidget( typeList, 2, 1 ); | 148 | layout->addWidget( typeList, 2, 1 ); |
149 | 149 | ||
150 | // Bank/institution name | 150 | // Bank/institution name |
@@ -168,26 +168,26 @@ QWidget *Checkbook::initInfo() | |||
168 | QWhatsThis::add( label, tr( "Enter PIN number for this checkbook here." ) ); | 168 | QWhatsThis::add( label, tr( "Enter PIN number for this checkbook here." ) ); |
169 | layout->addWidget( label, 5, 0 ); | 169 | layout->addWidget( label, 5, 0 ); |
170 | pinNumEdit = new QLineEdit( container ); | 170 | pinNumEdit = new QLineEdit( container ); |
171 | QWhatsThis::add( pinNumEdit, tr( "Enter PIN number for this checkbook here." ) ); | 171 | QWhatsThis::add( pinNumEdit, tr( "Enter PIN number for this checkbook here." ) ); |
172 | layout->addWidget( pinNumEdit, 5, 1 ); | 172 | layout->addWidget( pinNumEdit, 5, 1 ); |
173 | 173 | ||
174 | // Starting balance | 174 | // Starting balance |
175 | label = new QLabel( tr( "Starting balance:" ), container ); | 175 | label = new QLabel( tr( "Starting balance:" ), container ); |
176 | QWhatsThis::add( label, tr( "Enter the initial balance for this checkbook here." ) ); | 176 | QWhatsThis::add( label, tr( "Enter the initial balance for this checkbook here." ) ); |
177 | layout->addWidget( label, 6, 0 ); | 177 | layout->addWidget( label, 6, 0 ); |
178 | balanceEdit = new QLineEdit( container ); | 178 | balanceEdit = new QLineEdit( container ); |
179 | QWhatsThis::add( balanceEdit, tr( "Enter the initial balance for this checkbook here." ) ); | 179 | QWhatsThis::add( balanceEdit, tr( "Enter the initial balance for this checkbook here." ) ); |
180 | connect( balanceEdit, SIGNAL( textChanged( const QString & ) ), | 180 | connect( balanceEdit, SIGNAL( textChanged(const QString&) ), |
181 | this, SLOT( slotStartingBalanceChanged( const QString & ) ) ); | 181 | this, SLOT( slotStartingBalanceChanged(const QString&) ) ); |
182 | layout->addWidget( balanceEdit, 6, 1 ); | 182 | layout->addWidget( balanceEdit, 6, 1 ); |
183 | 183 | ||
184 | // Notes | 184 | // Notes |
185 | label = new QLabel( tr( "Notes:" ), container ); | 185 | label = new QLabel( tr( "Notes:" ), container ); |
186 | QWhatsThis::add( label, tr( "Enter any additional information for this checkbook here." ) ); | 186 | QWhatsThis::add( label, tr( "Enter any additional information for this checkbook here." ) ); |
187 | layout->addWidget( label, 7, 0 ); | 187 | layout->addWidget( label, 7, 0 ); |
188 | notesEdit = new QMultiLineEdit( container ); | 188 | notesEdit = new QMultiLineEdit( container ); |
189 | QWhatsThis::add( notesEdit, tr( "Enter any additional information for this checkbook here." ) ); | 189 | QWhatsThis::add( notesEdit, tr( "Enter any additional information for this checkbook here." ) ); |
190 | notesEdit->setMinimumHeight( 25 ); | 190 | notesEdit->setMinimumHeight( 25 ); |
191 | notesEdit->setMaximumHeight( 65 ); | 191 | notesEdit->setMaximumHeight( 65 ); |
192 | layout->addMultiCellWidget( notesEdit, 8, 8, 0, 1 ); | 192 | layout->addMultiCellWidget( notesEdit, 8, 8, 0, 1 ); |
193 | 193 | ||
@@ -204,25 +204,25 @@ QWidget *Checkbook::initTransactions() | |||
204 | layout->setSpacing( 2 ); | 204 | layout->setSpacing( 2 ); |
205 | layout->setMargin( 4 ); | 205 | layout->setMargin( 4 ); |
206 | 206 | ||
207 | // Sort selector | 207 | // Sort selector |
208 | QLabel *label = new QLabel( tr( "Sort by:" ), control ); | 208 | QLabel *label = new QLabel( tr( "Sort by:" ), control ); |
209 | QWhatsThis::add( label, tr( "Select checkbook sorting here." ) ); | 209 | QWhatsThis::add( label, tr( "Select checkbook sorting here." ) ); |
210 | layout->addMultiCellWidget( label, 0, 0, 0, 1 ); | 210 | layout->addMultiCellWidget( label, 0, 0, 0, 1 ); |
211 | _cbSortType=new QComboBox( control ); | 211 | _cbSortType=new QComboBox( control ); |
212 | _cbSortType->insertItem( tr("Entry Order") ); | 212 | _cbSortType->insertItem( tr("Entry Order") ); |
213 | _cbSortType->insertItem( tr("Date") ); | 213 | _cbSortType->insertItem( tr("Date") ); |
214 | _cbSortType->insertItem( tr("Number") ); | 214 | _cbSortType->insertItem( tr("Number") ); |
215 | layout->addMultiCellWidget( _cbSortType, 0, 0, 1, 2 ); | 215 | layout->addMultiCellWidget( _cbSortType, 0, 0, 1, 2 ); |
216 | connect( _cbSortType, SIGNAL( activated(const QString &) ), this, SLOT( slotSortChanged( const QString & ) ) ); | 216 | connect( _cbSortType, SIGNAL( activated(const QString&) ), this, SLOT( slotSortChanged(const QString&) ) ); |
217 | 217 | ||
218 | // Table | 218 | // Table |
219 | tranTable = new QListView( control ); | 219 | tranTable = new QListView( control ); |
220 | QFont fnt(QPEApplication::font()); | 220 | QFont fnt(QPEApplication::font()); |
221 | fnt.setPointSize( fnt.pointSize()-1 ); | 221 | fnt.setPointSize( fnt.pointSize()-1 ); |
222 | tranTable->setFont( fnt ); | 222 | tranTable->setFont( fnt ); |
223 | 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." ) ); | 223 | 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." ) ); |
224 | tranTable->addColumn( tr( "Id" ) ); | 224 | tranTable->addColumn( tr( "Id" ) ); |
225 | tranTable->setColumnWidthMode( COL_ID, QListView::Manual ); | 225 | tranTable->setColumnWidthMode( COL_ID, QListView::Manual ); |
226 | tranTable->setColumnWidth( COL_ID, 0); | 226 | tranTable->setColumnWidth( COL_ID, 0); |
227 | tranTable->addColumn( tr( "SortDate" ) ); | 227 | tranTable->addColumn( tr( "SortDate" ) ); |
228 | tranTable->setColumnWidthMode( COL_SORTDATE, QListView::Manual ); | 228 | tranTable->setColumnWidthMode( COL_SORTDATE, QListView::Manual ); |
@@ -230,27 +230,27 @@ QWidget *Checkbook::initTransactions() | |||
230 | tranTable->addColumn( tr( "Num" ) ); | 230 | tranTable->addColumn( tr( "Num" ) ); |
231 | tranTable->addColumn( tr( "Date" ) ); | 231 | tranTable->addColumn( tr( "Date" ) ); |
232 | //tranTable->addColumn( tr( "Cleared" ) ); | 232 | //tranTable->addColumn( tr( "Cleared" ) ); |
233 | tranTable->addColumn( tr( "Description" ) ); | 233 | tranTable->addColumn( tr( "Description" ) ); |
234 | int column = tranTable->addColumn( tr( "Amount" ) ); | 234 | int column = tranTable->addColumn( tr( "Amount" ) ); |
235 | tranTable->setColumnAlignment( column, Qt::AlignRight ); | 235 | tranTable->setColumnAlignment( column, Qt::AlignRight ); |
236 | column=tranTable->addColumn( tr("Balance") ); | 236 | column=tranTable->addColumn( tr("Balance") ); |
237 | tranTable->setColumnAlignment( column, Qt::AlignRight ); | 237 | tranTable->setColumnAlignment( column, Qt::AlignRight ); |
238 | tranTable->setAllColumnsShowFocus( TRUE ); | 238 | tranTable->setAllColumnsShowFocus( TRUE ); |
239 | tranTable->setSorting( -1 ); | 239 | tranTable->setSorting( -1 ); |
240 | layout->addMultiCellWidget( tranTable, 1, 1, 0, 2 ); | 240 | layout->addMultiCellWidget( tranTable, 1, 1, 0, 2 ); |
241 | QPEApplication::setStylusOperation( tranTable->viewport(), QPEApplication::RightOnHold ); | 241 | QPEApplication::setStylusOperation( tranTable->viewport(), QPEApplication::RightOnHold ); |
242 | connect( tranTable, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), | 242 | connect( tranTable, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), |
243 | this, SLOT( slotMenuTran(QListViewItem *, const QPoint &) ) ); | 243 | this, SLOT( slotMenuTran(QListViewItem*,const QPoint&) ) ); |
244 | connect( tranTable, SIGNAL( doubleClicked( QListViewItem * ) ), | 244 | connect( tranTable, SIGNAL( doubleClicked(QListViewItem*) ), |
245 | this, SLOT( slotEditTran() ) ); | 245 | this, SLOT( slotEditTran() ) ); |
246 | _sortCol=COL_ID; | 246 | _sortCol=COL_ID; |
247 | 247 | ||
248 | // Buttons | 248 | // Buttons |
249 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), control ); | 249 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), control ); |
250 | QWhatsThis::add( btn, tr( "Click here to add a new transaction." ) ); | 250 | QWhatsThis::add( btn, tr( "Click here to add a new transaction." ) ); |
251 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotNewTran() ) ); | 251 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotNewTran() ) ); |
252 | layout->addWidget( btn, 2, 0 ); | 252 | layout->addWidget( btn, 2, 0 ); |
253 | 253 | ||
254 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Edit" ), control ); | 254 | btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Edit" ), control ); |
255 | QWhatsThis::add( btn, tr( "Select a transaction and then click here to edit it." ) ); | 255 | QWhatsThis::add( btn, tr( "Select a transaction and then click here to edit it." ) ); |
256 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotEditTran() ) ); | 256 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotEditTran() ) ); |
diff --git a/noncore/apps/checkbook/listedit.cpp b/noncore/apps/checkbook/listedit.cpp index 37f05f0..d00e305 100644 --- a/noncore/apps/checkbook/listedit.cpp +++ b/noncore/apps/checkbook/listedit.cpp | |||
@@ -46,39 +46,39 @@ ListEdit::ListEdit( QWidget *parent, const char *sName ) | |||
46 | // create layout | 46 | // create layout |
47 | QGridLayout *layout=new QGridLayout(this); | 47 | QGridLayout *layout=new QGridLayout(this); |
48 | layout->setSpacing( 2 ); | 48 | layout->setSpacing( 2 ); |
49 | layout->setMargin( 4 ); | 49 | layout->setMargin( 4 ); |
50 | 50 | ||
51 | // type table | 51 | // type table |
52 | _typeTable = new QListView( this ); | 52 | _typeTable = new QListView( this ); |
53 | ColumnDef *def=first(); | 53 | ColumnDef *def=first(); |
54 | while( def ) { | 54 | while( def ) { |
55 | _typeTable->addColumn( def->getName() ); | 55 | _typeTable->addColumn( def->getName() ); |
56 | def=next(); | 56 | def=next(); |
57 | } | 57 | } |
58 | connect( _typeTable, SIGNAL( clicked(QListViewItem *, const QPoint &, int) ), this, SLOT( slotClick(QListViewItem *, const QPoint &, int ) ) ); | 58 | connect( _typeTable, SIGNAL( clicked(QListViewItem*,const QPoint&,int) ), this, SLOT( slotClick(QListViewItem*,const QPoint&,int) ) ); |
59 | layout->addMultiCellWidget(_typeTable, 0,4,0,4); | 59 | layout->addMultiCellWidget(_typeTable, 0,4,0,4); |
60 | _currentItem=NULL; | 60 | _currentItem=NULL; |
61 | 61 | ||
62 | // edit field | 62 | // edit field |
63 | _stack=new QWidgetStack( this ); | 63 | _stack=new QWidgetStack( this ); |
64 | _stack->setMaximumHeight(fh+5); | 64 | _stack->setMaximumHeight(fh+5); |
65 | layout->addMultiCellWidget(_stack, 5,5,0,2); | 65 | layout->addMultiCellWidget(_stack, 5,5,0,2); |
66 | _typeEdit = new QLineEdit( _stack ); | 66 | _typeEdit = new QLineEdit( _stack ); |
67 | _stack->raiseWidget(_typeEdit ); | 67 | _stack->raiseWidget(_typeEdit ); |
68 | connect( _typeEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( slotEditChanged(const QString &) ) ); | 68 | connect( _typeEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( slotEditChanged(const QString&) ) ); |
69 | 69 | ||
70 | // combo box | 70 | // combo box |
71 | _box=new QComboBox( _stack ); | 71 | _box=new QComboBox( _stack ); |
72 | connect( _box, SIGNAL( activated(const QString &) ), this, SLOT( slotActivated(const QString &) ) ); | 72 | connect( _box, SIGNAL( activated(const QString&) ), this, SLOT( slotActivated(const QString&) ) ); |
73 | 73 | ||
74 | 74 | ||
75 | // add button | 75 | // add button |
76 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "checkbook/add" ), tr( "Add" ), this ); | 76 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "checkbook/add" ), tr( "Add" ), this ); |
77 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotAdd() ) ); | 77 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotAdd() ) ); |
78 | layout->addWidget( btn, 5, 3 ); | 78 | layout->addWidget( btn, 5, 3 ); |
79 | 79 | ||
80 | // delete button | 80 | // delete button |
81 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), this ); | 81 | btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), this ); |
82 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotDel() ) ); | 82 | connect( btn, SIGNAL( clicked() ), this, SLOT( slotDel() ) ); |
83 | layout->addWidget( btn, 5, 4 ); | 83 | layout->addWidget( btn, 5, 4 ); |
84 | } | 84 | } |
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp index d0fac3b..254ce6a 100644 --- a/noncore/apps/checkbook/mainwindow.cpp +++ b/noncore/apps/checkbook/mainwindow.cpp | |||
@@ -163,25 +163,25 @@ void MainWindow::buildList() | |||
163 | { | 163 | { |
164 | posName = 0; | 164 | posName = 0; |
165 | } | 165 | } |
166 | cbList->addColumn( tr( "Checkbook Name" ) ); | 166 | cbList->addColumn( tr( "Checkbook Name" ) ); |
167 | if ( _cfg.getShowBalances() ) | 167 | if ( _cfg.getShowBalances() ) |
168 | { | 168 | { |
169 | int colnum = cbList->addColumn( tr( "Balance" ) ); | 169 | int colnum = cbList->addColumn( tr( "Balance" ) ); |
170 | cbList->setColumnAlignment( colnum, Qt::AlignRight ); | 170 | cbList->setColumnAlignment( colnum, Qt::AlignRight ); |
171 | } | 171 | } |
172 | cbList->setAllColumnsShowFocus( TRUE ); | 172 | cbList->setAllColumnsShowFocus( TRUE ); |
173 | cbList->setSorting( posName ); | 173 | cbList->setSorting( posName ); |
174 | QPEApplication::setStylusOperation( cbList->viewport(), QPEApplication::RightOnHold ); | 174 | QPEApplication::setStylusOperation( cbList->viewport(), QPEApplication::RightOnHold ); |
175 | connect( cbList, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), | 175 | connect( cbList, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), |
176 | this, SLOT( slotEdit() ) ); | 176 | this, SLOT( slotEdit() ) ); |
177 | setCentralWidget( cbList ); | 177 | setCentralWidget( cbList ); |
178 | 178 | ||
179 | for ( CBInfo *cb = checkbooks->first(); cb; cb = checkbooks->next() ) | 179 | for ( CBInfo *cb = checkbooks->first(); cb; cb = checkbooks->next() ) |
180 | { | 180 | { |
181 | addCheckbook( cb ); | 181 | addCheckbook( cb ); |
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | void MainWindow::addCheckbook( CBInfo *cb ) | 185 | void MainWindow::addCheckbook( CBInfo *cb ) |
186 | { | 186 | { |
187 | QListViewItem *lvi = new QListViewItem( cbList ); | 187 | QListViewItem *lvi = new QListViewItem( cbList ); |
diff --git a/noncore/apps/checkbook/password.cpp b/noncore/apps/checkbook/password.cpp index f381271..89a6bc6 100644 --- a/noncore/apps/checkbook/password.cpp +++ b/noncore/apps/checkbook/password.cpp | |||
@@ -66,25 +66,25 @@ Password::Password( QWidget *parent, const char *caption, const char *prompt ) | |||
66 | QLabel *label = new QLabel( prompt, this ); | 66 | QLabel *label = new QLabel( prompt, this ); |
67 | label->setAlignment( AlignLeft | AlignTop | WordBreak ); | 67 | label->setAlignment( AlignLeft | AlignTop | WordBreak ); |
68 | layout->addMultiCellWidget( label, 0, 0, 0, 1 ); | 68 | layout->addMultiCellWidget( label, 0, 0, 0, 1 ); |
69 | 69 | ||
70 | pw = new QLineEdit( this ); | 70 | pw = new QLineEdit( this ); |
71 | pw->setEchoMode( QLineEdit::Password ); | 71 | pw->setEchoMode( QLineEdit::Password ); |
72 | layout->addWidget( pw, 1, 0 ); | 72 | layout->addWidget( pw, 1, 0 ); |
73 | 73 | ||
74 | QPixmap *pic = new QPixmap( ( const char** ) showhideimage_data ); | 74 | QPixmap *pic = new QPixmap( ( const char** ) showhideimage_data ); |
75 | QPushButton *btn = new QPushButton( ( QIconSet ) *pic, QString::null, this ); | 75 | QPushButton *btn = new QPushButton( ( QIconSet ) *pic, QString::null, this ); |
76 | btn->setMaximumSize( pic->width() + 10, pic->height() + 10 ); | 76 | btn->setMaximumSize( pic->width() + 10, pic->height() + 10 ); |
77 | btn->setToggleButton( TRUE ); | 77 | btn->setToggleButton( TRUE ); |
78 | connect( btn, SIGNAL( toggled( bool ) ), this, SLOT( slotTogglePassword( bool ) ) ); | 78 | connect( btn, SIGNAL( toggled(bool) ), this, SLOT( slotTogglePassword(bool) ) ); |
79 | layout->addWidget( btn, 1, 1 ); | 79 | layout->addWidget( btn, 1, 1 ); |
80 | 80 | ||
81 | password == ""; | 81 | password == ""; |
82 | } | 82 | } |
83 | 83 | ||
84 | Password::~Password() | 84 | Password::~Password() |
85 | { | 85 | { |
86 | } | 86 | } |
87 | 87 | ||
88 | void Password::accept() | 88 | void Password::accept() |
89 | { | 89 | { |
90 | password = pw->text(); | 90 | password = pw->text(); |
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 ----------------------------------------------------------- |
181 | void Transaction::initFromInfo(TranInfo *info, bool bPopulateOld) | 181 | void 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 ); |