Diffstat (limited to 'noncore/apps/checkbook/traninfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/traninfo.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/noncore/apps/checkbook/traninfo.cpp b/noncore/apps/checkbook/traninfo.cpp index 460466c..dcba869 100644 --- a/noncore/apps/checkbook/traninfo.cpp +++ b/noncore/apps/checkbook/traninfo.cpp | |||
@@ -164,12 +164,27 @@ void TranInfo::write( Config *config, int entry ) | |||
164 | config->writeEntry( "Category", c ); | 164 | config->writeEntry( "Category", c ); |
165 | 165 | ||
166 | tempstr.setNum( a, 'f', 2 ); | 166 | tempstr.setNum( a, 'f', 2 ); |
167 | config->writeEntry( "Amount", tempstr ); | 167 | config->writeEntry( "Amount", tempstr ); |
168 | 168 | ||
169 | tempstr.setNum( f, 'f', 2 ); | 169 | tempstr.setNum( f, 'f', 2 ); |
170 | config->writeEntry( "TransactionFee", tempstr ); | 170 | config->writeEntry( "TransactionFee", tempstr ); |
171 | 171 | ||
172 | config->writeEntry( "CheckNumber", cn ); | 172 | config->writeEntry( "CheckNumber", cn ); |
173 | 173 | ||
174 | config->writeEntry( "Comments", n ); | 174 | config->writeEntry( "Comments", n ); |
175 | } | 175 | } |
176 | |||
177 | int TranInfoList::compareItems( QCollection::Item item1, QCollection::Item item2 ) | ||
178 | { | ||
179 | QDate d1 = ((TranInfo *)item1)->date(); | ||
180 | QDate d2 = ((TranInfo *)item2)->date(); | ||
181 | int r = -1; | ||
182 | |||
183 | if ( d1 < d2 ) | ||
184 | r = -1; | ||
185 | else if ( d1 == d2 ) | ||
186 | r = 0; | ||
187 | else if ( d1 > d2 ) | ||
188 | r = 1; | ||
189 | return( r ); | ||
190 | } \ No newline at end of file | ||