Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyfile.h
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | |||||
157 | 157 | | |||
158 | public: | 158 | public: | ||
159 | friend class MyMoneyNotifier; | 159 | friend class MyMoneyNotifier; | ||
160 | 160 | | |||
161 | /** | 161 | /** | ||
162 | * This is the function to access the MyMoneyFile object. | 162 | * This is the function to access the MyMoneyFile object. | ||
163 | * It returns a pointer to the single instance of the object. | 163 | * It returns a pointer to the single instance of the object. | ||
164 | */ | 164 | */ | ||
165 | static inline MyMoneyFile* instance() { | 165 | static MyMoneyFile* instance(); | ||
166 | return &file; | | |||
167 | } | | |||
168 | 166 | | |||
169 | /** | 167 | /** | ||
170 | * This is the destructor for any MyMoneyFile object | 168 | * This is the destructor for any MyMoneyFile object | ||
171 | */ | 169 | */ | ||
172 | ~MyMoneyFile(); | 170 | ~MyMoneyFile(); | ||
173 | 171 | | |||
174 | /** | 172 | /** | ||
175 | * @deprecated This is a convenience constructor. Do not use it anymore. | 173 | * @deprecated This is a convenience constructor. Do not use it anymore. | ||
176 | * It will be deprecated in a future version of the engine. | 174 | * It will be deprecated in a future version of the engine. | ||
177 | * | 175 | * | ||
178 | * @param storage pointer to object that implements the IMyMoneyStorage | 176 | * @param storage pointer to object that implements the IMyMoneyStorage | ||
179 | * interface. | 177 | * interface. | ||
180 | */ | 178 | */ | ||
181 | explicit MyMoneyFile(IMyMoneyStorage *storage); | 179 | explicit MyMoneyFile(IMyMoneyStorage *storage); | ||
182 | 180 | | |||
183 | // general get functions | 181 | // general get functions | ||
184 | const MyMoneyPayee& user() const; | 182 | MyMoneyPayee user() const; | ||
185 | 183 | | |||
186 | // general set functions | 184 | // general set functions | ||
187 | void setUser(const MyMoneyPayee& user); | 185 | void setUser(const MyMoneyPayee& user); | ||
188 | 186 | | |||
189 | /** | 187 | /** | ||
190 | * This method is used to attach a storage object to the MyMoneyFile object | 188 | * This method is used to attach a storage object to the MyMoneyFile object | ||
191 | * Without an attached storage object, the MyMoneyFile object is | 189 | * Without an attached storage object, the MyMoneyFile object is | ||
192 | * of no use. | 190 | * of no use. | ||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 257 | /** | |||
260 | * @sa startTransaction() | 258 | * @sa startTransaction() | ||
261 | */ | 259 | */ | ||
262 | void rollbackTransaction(); | 260 | void rollbackTransaction(); | ||
263 | 261 | | |||
264 | /** | 262 | /** | ||
265 | * This method is used to return the standard liability account | 263 | * This method is used to return the standard liability account | ||
266 | * @return MyMoneyAccount liability account(group) | 264 | * @return MyMoneyAccount liability account(group) | ||
267 | */ | 265 | */ | ||
268 | const MyMoneyAccount& liability() const; | 266 | MyMoneyAccount liability() const; | ||
269 | 267 | | |||
270 | /** | 268 | /** | ||
271 | * This method is used to return the standard asset account | 269 | * This method is used to return the standard asset account | ||
272 | * @return MyMoneyAccount asset account(group) | 270 | * @return MyMoneyAccount asset account(group) | ||
273 | */ | 271 | */ | ||
274 | const MyMoneyAccount& asset() const; | 272 | MyMoneyAccount asset() const; | ||
275 | 273 | | |||
276 | /** | 274 | /** | ||
277 | * This method is used to return the standard expense account | 275 | * This method is used to return the standard expense account | ||
278 | * @return MyMoneyAccount expense account(group) | 276 | * @return MyMoneyAccount expense account(group) | ||
279 | */ | 277 | */ | ||
280 | const MyMoneyAccount& expense() const; | 278 | MyMoneyAccount expense() const; | ||
281 | 279 | | |||
282 | /** | 280 | /** | ||
283 | * This method is used to return the standard income account | 281 | * This method is used to return the standard income account | ||
284 | * @return MyMoneyAccount income account(group) | 282 | * @return MyMoneyAccount income account(group) | ||
285 | */ | 283 | */ | ||
286 | const MyMoneyAccount& income() const; | 284 | MyMoneyAccount income() const; | ||
287 | 285 | | |||
288 | /** | 286 | /** | ||
289 | * This method is used to return the standard equity account | 287 | * This method is used to return the standard equity account | ||
290 | * @return MyMoneyAccount equity account(group) | 288 | * @return MyMoneyAccount equity account(group) | ||
291 | */ | 289 | */ | ||
292 | const MyMoneyAccount& equity() const; | 290 | MyMoneyAccount equity() const; | ||
293 | 291 | | |||
294 | /** | 292 | /** | ||
295 | * This method returns the account information for the opening | 293 | * This method returns the account information for the opening | ||
296 | * balances account for the given @p security. If the respective | 294 | * balances account for the given @p security. If the respective | ||
297 | * account does not exist, it will be created. The name is constructed | 295 | * account does not exist, it will be created. The name is constructed | ||
298 | * using MyMoneyFile::openingBalancesPrefix() and appending " (xxx)" in | 296 | * using MyMoneyFile::openingBalancesPrefix() and appending " (xxx)" in | ||
299 | * case the @p security is not the baseCurrency(). The account created | 297 | * case the @p security is not the baseCurrency(). The account created | ||
300 | * will be a sub-account of the standard equity account provided by equity(). | 298 | * will be a sub-account of the standard equity account provided by equity(). | ||
301 | * | 299 | * | ||
302 | * @param security Security for which the account is searched | 300 | * @param security Security for which the account is searched | ||
303 | * | 301 | * | ||
304 | * @return The opening balance account | 302 | * @return The opening balance account | ||
305 | * | 303 | * | ||
306 | * @note No notifications will be sent! | 304 | * @note No notifications will be sent! | ||
307 | */ | 305 | */ | ||
308 | const MyMoneyAccount openingBalanceAccount(const MyMoneySecurity& security); | 306 | MyMoneyAccount openingBalanceAccount(const MyMoneySecurity& security); | ||
309 | 307 | | |||
310 | /** | 308 | /** | ||
311 | * This method is essentially the same as the above, except it works on | 309 | * This method is essentially the same as the above, except it works on | ||
312 | * const objects. If there is no opening balance account, this method | 310 | * const objects. If there is no opening balance account, this method | ||
313 | * WILL NOT create one. Instead it will thrown an exception. | 311 | * WILL NOT create one. Instead it will thrown an exception. | ||
314 | * | 312 | * | ||
315 | * @param security Security for which the account is searched | 313 | * @param security Security for which the account is searched | ||
316 | * | 314 | * | ||
317 | * @return The opening balance account | 315 | * @return The opening balance account | ||
318 | * | 316 | * | ||
319 | * @note No notifications will be sent! | 317 | * @note No notifications will be sent! | ||
320 | */ | 318 | */ | ||
321 | const MyMoneyAccount openingBalanceAccount(const MyMoneySecurity& security) const; | 319 | MyMoneyAccount openingBalanceAccount(const MyMoneySecurity& security) const; | ||
322 | 320 | | |||
323 | /** | 321 | /** | ||
324 | * Create an opening balance transaction for the account @p acc | 322 | * Create an opening balance transaction for the account @p acc | ||
325 | * with a value of @p balance. If the corresponding opening balance account | 323 | * with a value of @p balance. If the corresponding opening balance account | ||
326 | * for the account's currency does not exist it will be created. If it exists | 324 | * for the account's currency does not exist it will be created. If it exists | ||
327 | * and it's opening date is later than the opening date of @p acc, | 325 | * and it's opening date is later than the opening date of @p acc, | ||
328 | * the opening date of the opening balances account will be adjusted to the | 326 | * the opening date of the opening balances account will be adjusted to the | ||
329 | * one of @p acc. | 327 | * one of @p acc. | ||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Line(s) | |||||
561 | /** | 559 | /** | ||
562 | * This method is used to extract a transaction from the file global | 560 | * This method is used to extract a transaction from the file global | ||
563 | * transaction pool through an id. In case of an invalid id, an | 561 | * transaction pool through an id. In case of an invalid id, an | ||
564 | * exception will be thrown. | 562 | * exception will be thrown. | ||
565 | * | 563 | * | ||
566 | * @param id id of transaction as QString. | 564 | * @param id id of transaction as QString. | ||
567 | * @return reference to the requested transaction | 565 | * @return reference to the requested transaction | ||
568 | */ | 566 | */ | ||
569 | const MyMoneyTransaction transaction(const QString& id) const; | 567 | MyMoneyTransaction transaction(const QString& id) const; | ||
570 | 568 | | |||
571 | /** | 569 | /** | ||
572 | * This method is used to extract a transaction from the file global | 570 | * This method is used to extract a transaction from the file global | ||
573 | * transaction pool through an index into an account. | 571 | * transaction pool through an index into an account. | ||
574 | * | 572 | * | ||
575 | * @param account id of the account as QString | 573 | * @param account id of the account as QString | ||
576 | * @param idx number of transaction in this account | 574 | * @param idx number of transaction in this account | ||
577 | * @return reference to MyMoneyTransaction object | 575 | * @return reference to MyMoneyTransaction object | ||
578 | */ | 576 | */ | ||
579 | const MyMoneyTransaction transaction(const QString& account, const int idx) const; | 577 | MyMoneyTransaction transaction(const QString& account, const int idx) const; | ||
580 | 578 | | |||
581 | /** | 579 | /** | ||
582 | * This method is used to pull a list of transactions from the file | 580 | * This method is used to pull a list of transactions from the file | ||
583 | * global transaction pool. It returns all those transactions | 581 | * global transaction pool. It returns all those transactions | ||
584 | * that match the filter passed as argument. If the filter is empty, | 582 | * that match the filter passed as argument. If the filter is empty, | ||
585 | * the whole journal will be returned. | 583 | * the whole journal will be returned. | ||
586 | * The list returned is sorted according to the transactions posting date. | 584 | * The list returned is sorted according to the transactions posting date. | ||
587 | * If more than one transaction exists for the same date, the order among | 585 | * If more than one transaction exists for the same date, the order among | ||
588 | * them is undefined. | 586 | * them is undefined. | ||
589 | * | 587 | * | ||
590 | * @param filter MyMoneyTransactionFilter object with the match criteria | 588 | * @param filter MyMoneyTransactionFilter object with the match criteria | ||
591 | * | 589 | * | ||
592 | * @return set of transactions in form of a QList<MyMoneyTransaction> | 590 | * @return set of transactions in form of a QList<MyMoneyTransaction> | ||
593 | */ | 591 | */ | ||
594 | const QList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; | 592 | QList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; | ||
595 | 593 | | |||
596 | void transactionList(QList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; | 594 | void transactionList(QList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; | ||
597 | 595 | | |||
598 | void transactionList(QList<QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; | 596 | void transactionList(QList<QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; | ||
599 | 597 | | |||
600 | /** | 598 | /** | ||
601 | * This method is used to remove a transaction from the transaction | 599 | * This method is used to remove a transaction from the transaction | ||
602 | * pool (journal). | 600 | * pool (journal). | ||
603 | * | 601 | * | ||
604 | * @param transaction const reference to transaction to be deleted | 602 | * @param transaction const reference to transaction to be deleted | ||
605 | */ | 603 | */ | ||
606 | void removeTransaction(const MyMoneyTransaction& transaction); | 604 | void removeTransaction(const MyMoneyTransaction& transaction); | ||
607 | 605 | | |||
608 | /** | 606 | /** | ||
609 | * This method is used to return the actual balance of an account | 607 | * This method is used to return the actual balance of an account | ||
610 | * without it's sub-ordinate accounts. If a @p date is presented, | 608 | * without it's sub-ordinate accounts. If a @p date is presented, | ||
611 | * the balance at the beginning of this date (not including any | 609 | * the balance at the beginning of this date (not including any | ||
612 | * transaction on this date) is returned. Otherwise all recorded | 610 | * transaction on this date) is returned. Otherwise all recorded | ||
613 | * transactions are included in the balance. | 611 | * transactions are included in the balance. | ||
614 | * | 612 | * | ||
615 | * @param id id of the account in question | 613 | * @param id id of the account in question | ||
616 | * @param date return balance for specific date (default = QDate()) | 614 | * @param date return balance for specific date (default = QDate()) | ||
617 | * @return balance of the account as MyMoneyMoney object | 615 | * @return balance of the account as MyMoneyMoney object | ||
618 | */ | 616 | */ | ||
619 | const MyMoneyMoney balance(const QString& id, const QDate& date) const; | 617 | MyMoneyMoney balance(const QString& id, const QDate& date) const; | ||
620 | const MyMoneyMoney balance(const QString& id) const; | 618 | MyMoneyMoney balance(const QString& id) const; | ||
621 | 619 | | |||
622 | /** | 620 | /** | ||
623 | * This method is used to return the cleared balance of an account | 621 | * This method is used to return the cleared balance of an account | ||
624 | * without it's sub-ordinate accounts for a specific date. All | 622 | * without it's sub-ordinate accounts for a specific date. All | ||
625 | * recorded transactions are included in the balance. | 623 | * recorded transactions are included in the balance. | ||
626 | * This method is used by the reconcialition functionality | 624 | * This method is used by the reconcialition functionality | ||
627 | * | 625 | * | ||
628 | * @param id id of the account in question | 626 | * @param id id of the account in question | ||
629 | * @param date return cleared balance for specific date | 627 | * @param date return cleared balance for specific date | ||
630 | * @return balance of the account as MyMoneyMoney object | 628 | * @return balance of the account as MyMoneyMoney object | ||
631 | */ | 629 | */ | ||
632 | const MyMoneyMoney clearedBalance(const QString& id, const QDate& date) const; | 630 | MyMoneyMoney clearedBalance(const QString& id, const QDate& date) const; | ||
633 | 631 | | |||
634 | 632 | | |||
635 | /** | 633 | /** | ||
636 | * This method is used to return the actual balance of an account | 634 | * This method is used to return the actual balance of an account | ||
637 | * including it's sub-ordinate accounts. If a @p date is presented, | 635 | * including it's sub-ordinate accounts. If a @p date is presented, | ||
638 | * the balance at the beginning of this date (not including any | 636 | * the balance at the beginning of this date (not including any | ||
639 | * transaction on this date) is returned. Otherwise all recorded | 637 | * transaction on this date) is returned. Otherwise all recorded | ||
640 | * transactions are included in the balance. | 638 | * transactions are included in the balance. | ||
641 | * | 639 | * | ||
642 | * @param id id of the account in question | 640 | * @param id id of the account in question | ||
643 | * @param date return balance for specific date (default = QDate()) | 641 | * @param date return balance for specific date (default = QDate()) | ||
644 | * @return balance of the account as MyMoneyMoney object | 642 | * @return balance of the account as MyMoneyMoney object | ||
645 | */ | 643 | */ | ||
646 | const MyMoneyMoney totalBalance(const QString& id, const QDate& date) const; | 644 | MyMoneyMoney totalBalance(const QString& id, const QDate& date) const; | ||
647 | const MyMoneyMoney totalBalance(const QString& id) const; | 645 | MyMoneyMoney totalBalance(const QString& id) const; | ||
648 | 646 | | |||
649 | /** | 647 | /** | ||
650 | * This method returns the number of transactions currently known to file | 648 | * This method returns the number of transactions currently known to file | ||
651 | * in the range 0..MAXUINT | 649 | * in the range 0..MAXUINT | ||
652 | * | 650 | * | ||
653 | * @param account QString reference to account id. If account is empty | 651 | * @param account QString reference to account id. If account is empty | ||
654 | + all transactions (the journal) will be counted. If account | 652 | + all transactions (the journal) will be counted. If account | ||
655 | * is not empty it returns the number of transactions | 653 | * is not empty it returns the number of transactions | ||
656 | * that have splits in this account. | 654 | * that have splits in this account. | ||
657 | * | 655 | * | ||
658 | * @return number of transactions in journal/account | 656 | * @return number of transactions in journal/account | ||
659 | */ | 657 | */ | ||
660 | unsigned int transactionCount(const QString& account) const; | 658 | unsigned int transactionCount(const QString& account) const; | ||
661 | unsigned int transactionCount() const; | 659 | unsigned int transactionCount() const; | ||
662 | 660 | | |||
663 | /** | 661 | /** | ||
664 | * This method returns a QMap filled with the number of transactions | 662 | * This method returns a QMap filled with the number of transactions | ||
665 | * per account. The account id serves as index into the map. If one | 663 | * per account. The account id serves as index into the map. If one | ||
666 | * needs to have all transactionCounts() for many accounts, this method | 664 | * needs to have all transactionCounts() for many accounts, this method | ||
667 | * is faster than calling transactionCount(const QString& account) many | 665 | * is faster than calling transactionCount(const QString& account) many | ||
668 | * times. | 666 | * times. | ||
669 | * | 667 | * | ||
670 | * @return QMap with numbers of transactions per account | 668 | * @return QMap with numbers of transactions per account | ||
671 | */ | 669 | */ | ||
672 | const QMap<QString, unsigned long> transactionCountMap() const; | 670 | QMap<QString, unsigned long> transactionCountMap() const; | ||
673 | 671 | | |||
674 | /** | 672 | /** | ||
675 | * This method returns the number of institutions currently known to file | 673 | * This method returns the number of institutions currently known to file | ||
676 | * in the range 0..MAXUINT | 674 | * in the range 0..MAXUINT | ||
677 | * | 675 | * | ||
678 | * @return number of institutions known to file | 676 | * @return number of institutions known to file | ||
679 | */ | 677 | */ | ||
680 | unsigned int institutionCount() const; | 678 | unsigned int institutionCount() const; | ||
681 | 679 | | |||
682 | /** | 680 | /** | ||
683 | * This method returns the number of accounts currently known to file | 681 | * This method returns the number of accounts currently known to file | ||
684 | * in the range 0..MAXUINT | 682 | * in the range 0..MAXUINT | ||
685 | * | 683 | * | ||
686 | * @return number of accounts currently known inside a MyMoneyFile object | 684 | * @return number of accounts currently known inside a MyMoneyFile object | ||
687 | */ | 685 | */ | ||
688 | unsigned int accountCount() const; | 686 | unsigned int accountCount() const; | ||
689 | 687 | | |||
690 | /** | 688 | /** | ||
691 | * Returns the institution of a given ID | 689 | * Returns the institution of a given ID | ||
692 | * | 690 | * | ||
693 | * @param id id of the institution to locate | 691 | * @param id id of the institution to locate | ||
694 | * @return MyMoneyInstitution object filled with data. If the institution | 692 | * @return MyMoneyInstitution object filled with data. If the institution | ||
695 | * could not be found, an exception will be thrown | 693 | * could not be found, an exception will be thrown | ||
696 | */ | 694 | */ | ||
697 | const MyMoneyInstitution& institution(const QString& id) const; | 695 | MyMoneyInstitution institution(const QString& id) const; | ||
698 | 696 | | |||
699 | /** | 697 | /** | ||
700 | * This method returns a list of the institutions | 698 | * This method returns a list of the institutions | ||
701 | * inside a MyMoneyFile object | 699 | * inside a MyMoneyFile object | ||
702 | * | 700 | * | ||
703 | * @param list reference to the list. It will be cleared by this method first | 701 | * @param list reference to the list. It will be cleared by this method first | ||
704 | */ | 702 | */ | ||
705 | void institutionList(QList<MyMoneyInstitution>& list) const; | 703 | void institutionList(QList<MyMoneyInstitution>& list) const; | ||
706 | 704 | | |||
707 | /** | 705 | /** | ||
708 | * This method returns a list of the institutions | 706 | * This method returns a list of the institutions | ||
709 | * inside a MyMoneyFile object. This is a convenience method | 707 | * inside a MyMoneyFile object. This is a convenience method | ||
710 | * to the one above | 708 | * to the one above | ||
711 | * | 709 | * | ||
712 | * @return QList containing the institution objects | 710 | * @return QList containing the institution objects | ||
713 | */ | 711 | */ | ||
714 | const QList<MyMoneyInstitution> institutionList() const; | 712 | QList<MyMoneyInstitution> institutionList() const; | ||
715 | 713 | | |||
716 | /** | 714 | /** | ||
717 | * Returns the account addressed by its id. | 715 | * Returns the account addressed by its id. | ||
718 | * | 716 | * | ||
719 | * @param id id of the account to locate. | 717 | * @param id id of the account to locate. | ||
720 | * @return MyMoneyAccount object carrying the @p id. An exception is thrown | 718 | * @return MyMoneyAccount object carrying the @p id. An exception is thrown | ||
721 | * if the id is unknown | 719 | * if the id is unknown | ||
722 | */ | 720 | */ | ||
723 | const MyMoneyAccount& account(const QString& id) const; | 721 | MyMoneyAccount account(const QString& id) const; | ||
tbaumgart: You need to change
const MyMoneyAccount& MyMoneyQifReader::findAccount(const MyMoneyAccount&… | |||||
724 | 722 | | |||
725 | /** | 723 | /** | ||
726 | * Returns the account addressed by its name. | 724 | * Returns the account addressed by its name. | ||
727 | * | 725 | * | ||
728 | * @param name name of the account to locate. | 726 | * @param name name of the account to locate. | ||
729 | * @return First MyMoneyAccount object found carrying the @p name. | 727 | * @return First MyMoneyAccount object found carrying the @p name. | ||
730 | * An empty MyMoneyAccount object will be returned if the name is not found. | 728 | * An empty MyMoneyAccount object will be returned if the name is not found. | ||
731 | */ | 729 | */ | ||
732 | const MyMoneyAccount& accountByName(const QString& name) const; | 730 | MyMoneyAccount accountByName(const QString& name) const; | ||
733 | 731 | | |||
734 | /** | 732 | /** | ||
735 | * Returns the sub-account addressed by its name. | 733 | * Returns the sub-account addressed by its name. | ||
736 | * | 734 | * | ||
737 | * @param acc account to search in | 735 | * @param acc account to search in | ||
738 | * @param name name of the account to locate. | 736 | * @param name name of the account to locate. | ||
739 | * @return First MyMoneyAccount object found carrying the @p name. | 737 | * @return First MyMoneyAccount object found carrying the @p name. | ||
740 | * An empty MyMoneyAccount object will be returned if the name is not found. | 738 | * An empty MyMoneyAccount object will be returned if the name is not found. | ||
741 | */ | 739 | */ | ||
742 | const MyMoneyAccount& subAccountByName(const MyMoneyAccount& acc, const QString& name) const; | 740 | MyMoneyAccount subAccountByName(const MyMoneyAccount& acc, const QString& name) const; | ||
743 | 741 | | |||
744 | /** | 742 | /** | ||
745 | * This method returns a list of accounts inside a MyMoneyFile object. | 743 | * This method returns a list of accounts inside a MyMoneyFile object. | ||
746 | * An optional parameter is a list of id's. If this list is emtpy (the default) | 744 | * An optional parameter is a list of id's. If this list is emtpy (the default) | ||
747 | * the returned list contains all accounts, otherwise only those referenced | 745 | * the returned list contains all accounts, otherwise only those referenced | ||
748 | * in the id-list. | 746 | * in the id-list. | ||
749 | * | 747 | * | ||
750 | * @param list reference to QList receiving the account objects | 748 | * @param list reference to QList receiving the account objects | ||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | |||||
819 | /** | 817 | /** | ||
820 | * This method is used to retrieve information about a payee | 818 | * This method is used to retrieve information about a payee | ||
821 | * An exception will be thrown upon error conditions. | 819 | * An exception will be thrown upon error conditions. | ||
822 | * | 820 | * | ||
823 | * @param id QString reference to id of payee | 821 | * @param id QString reference to id of payee | ||
824 | * | 822 | * | ||
825 | * @return MyMoneyPayee object of payee | 823 | * @return MyMoneyPayee object of payee | ||
826 | */ | 824 | */ | ||
827 | const MyMoneyPayee& payee(const QString& id) const; | 825 | MyMoneyPayee payee(const QString& id) const; | ||
828 | 826 | | |||
829 | /** | 827 | /** | ||
830 | * This method is used to retrieve the id to a corresponding | 828 | * This method is used to retrieve the id to a corresponding | ||
831 | * name of a payee/receiver. | 829 | * name of a payee/receiver. | ||
832 | * An exception will be thrown upon error conditions. | 830 | * An exception will be thrown upon error conditions. | ||
833 | * | 831 | * | ||
834 | * @param payee QString reference to name of payee | 832 | * @param payee QString reference to name of payee | ||
835 | * | 833 | * | ||
836 | * @return MyMoneyPayee object of payee | 834 | * @return MyMoneyPayee object of payee | ||
837 | */ | 835 | */ | ||
838 | const MyMoneyPayee& payeeByName(const QString& payee) const; | 836 | MyMoneyPayee payeeByName(const QString& payee) const; | ||
839 | 837 | | |||
840 | /** | 838 | /** | ||
841 | * This method is used to modify an existing payee | 839 | * This method is used to modify an existing payee | ||
842 | * | 840 | * | ||
843 | * An exception will be thrown upon error conditions | 841 | * An exception will be thrown upon error conditions | ||
844 | * | 842 | * | ||
845 | * @param payee MyMoneyPayee reference to payee information | 843 | * @param payee MyMoneyPayee reference to payee information | ||
846 | */ | 844 | */ | ||
Show All 11 Lines | |||||
858 | void removePayee(const MyMoneyPayee& payee); | 856 | void removePayee(const MyMoneyPayee& payee); | ||
859 | 857 | | |||
860 | /** | 858 | /** | ||
861 | * This method returns a list of the payees | 859 | * This method returns a list of the payees | ||
862 | * inside a MyMoneyStorage object | 860 | * inside a MyMoneyStorage object | ||
863 | * | 861 | * | ||
864 | * @return QList<MyMoneyPayee> containing the payee information | 862 | * @return QList<MyMoneyPayee> containing the payee information | ||
865 | */ | 863 | */ | ||
866 | const QList<MyMoneyPayee> payeeList() const; | 864 | QList<MyMoneyPayee> payeeList() const; | ||
867 | 865 | | |||
868 | /** | 866 | /** | ||
869 | * This method is used to create a new tag | 867 | * This method is used to create a new tag | ||
870 | * | 868 | * | ||
871 | * An exception will be thrown upon error conditions | 869 | * An exception will be thrown upon error conditions | ||
872 | * | 870 | * | ||
873 | * @param tag MyMoneyTag reference to tag information | 871 | * @param tag MyMoneyTag reference to tag information | ||
874 | */ | 872 | */ | ||
875 | void addTag(MyMoneyTag& tag); | 873 | void addTag(MyMoneyTag& tag); | ||
876 | 874 | | |||
877 | /** | 875 | /** | ||
878 | * This method is used to retrieve information about a tag | 876 | * This method is used to retrieve information about a tag | ||
879 | * An exception will be thrown upon error conditions. | 877 | * An exception will be thrown upon error conditions. | ||
880 | * | 878 | * | ||
881 | * @param id QString reference to id of tag | 879 | * @param id QString reference to id of tag | ||
882 | * | 880 | * | ||
883 | * @return MyMoneyTag object of tag | 881 | * @return MyMoneyTag object of tag | ||
884 | */ | 882 | */ | ||
885 | const MyMoneyTag& tag(const QString& id) const; | 883 | MyMoneyTag tag(const QString& id) const; | ||
886 | 884 | | |||
887 | /** | 885 | /** | ||
888 | * This method is used to retrieve the id to a corresponding | 886 | * This method is used to retrieve the id to a corresponding | ||
889 | * name of a tag. | 887 | * name of a tag. | ||
890 | * An exception will be thrown upon error conditions. | 888 | * An exception will be thrown upon error conditions. | ||
891 | * | 889 | * | ||
892 | * @param tag QString reference to name of tag | 890 | * @param tag QString reference to name of tag | ||
893 | * | 891 | * | ||
894 | * @return MyMoneyTag object of tag | 892 | * @return MyMoneyTag object of tag | ||
895 | */ | 893 | */ | ||
896 | const MyMoneyTag& tagByName(const QString& tag) const; | 894 | MyMoneyTag tagByName(const QString& tag) const; | ||
897 | 895 | | |||
898 | /** | 896 | /** | ||
899 | * This method is used to modify an existing tag | 897 | * This method is used to modify an existing tag | ||
900 | * | 898 | * | ||
901 | * An exception will be thrown upon error conditions | 899 | * An exception will be thrown upon error conditions | ||
902 | * | 900 | * | ||
903 | * @param tag MyMoneyTag reference to tag information | 901 | * @param tag MyMoneyTag reference to tag information | ||
904 | */ | 902 | */ | ||
Show All 11 Lines | |||||
916 | void removeTag(const MyMoneyTag& tag); | 914 | void removeTag(const MyMoneyTag& tag); | ||
917 | 915 | | |||
918 | /** | 916 | /** | ||
919 | * This method returns a list of the tags | 917 | * This method returns a list of the tags | ||
920 | * inside a MyMoneyStorage object | 918 | * inside a MyMoneyStorage object | ||
921 | * | 919 | * | ||
922 | * @return QList<MyMoneyTag> containing the tag information | 920 | * @return QList<MyMoneyTag> containing the tag information | ||
923 | */ | 921 | */ | ||
924 | const QList<MyMoneyTag> tagList() const; | 922 | QList<MyMoneyTag> tagList() const; | ||
925 | 923 | | |||
926 | /** | 924 | /** | ||
927 | * This method returns a list of the cost centers | 925 | * This method returns a list of the cost centers | ||
928 | * inside a MyMoneyStorage object | 926 | * inside a MyMoneyStorage object | ||
929 | * | 927 | * | ||
930 | * @return QList<MyMoneyCostCenter> containing the cost center information | 928 | * @return QList<MyMoneyCostCenter> containing the cost center information | ||
931 | */ | 929 | */ | ||
932 | void costCenterList(QList< MyMoneyCostCenter >& list) const; | 930 | void costCenterList(QList< MyMoneyCostCenter >& list) const; | ||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 1007 | /** | |||
1010 | * This method is used to retrieve a single MyMoneySchedule object. | 1008 | * This method is used to retrieve a single MyMoneySchedule object. | ||
1011 | * The id of the object must be supplied in the parameter @p id. | 1009 | * The id of the object must be supplied in the parameter @p id. | ||
1012 | * | 1010 | * | ||
1013 | * An exception will be thrown upon erroneous situations. | 1011 | * An exception will be thrown upon erroneous situations. | ||
1014 | * | 1012 | * | ||
1015 | * @param id QString containing the id of the MyMoneySchedule object | 1013 | * @param id QString containing the id of the MyMoneySchedule object | ||
1016 | * @return MyMoneySchedule object | 1014 | * @return MyMoneySchedule object | ||
1017 | */ | 1015 | */ | ||
1018 | const MyMoneySchedule schedule(const QString& id) const; | 1016 | MyMoneySchedule schedule(const QString& id) const; | ||
1019 | 1017 | | |||
1020 | /** | 1018 | /** | ||
1021 | * This method is used to extract a list of scheduled transactions | 1019 | * This method is used to extract a list of scheduled transactions | ||
1022 | * according to the filter criteria passed as arguments. | 1020 | * according to the filter criteria passed as arguments. | ||
1023 | * | 1021 | * | ||
1024 | * @param accountId only search for scheduled transactions that reference | 1022 | * @param accountId only search for scheduled transactions that reference | ||
1025 | * account @p accountId. If accountId is the empty string, | 1023 | * account @p accountId. If accountId is the empty string, | ||
1026 | * this filter is off. Default is @p QString(). | 1024 | * this filter is off. Default is @p QString(). | ||
Show All 11 Lines | |||||
1038 | * are searched for. Default is all dates (QDate()). | 1036 | * are searched for. Default is all dates (QDate()). | ||
1039 | * @param endDate only schedules with payment dates ending prior to @p endDate | 1037 | * @param endDate only schedules with payment dates ending prior to @p endDate | ||
1040 | * are searched for. Default is all dates (QDate()). | 1038 | * are searched for. Default is all dates (QDate()). | ||
1041 | * @param overdue if true, only those schedules that are overdue are | 1039 | * @param overdue if true, only those schedules that are overdue are | ||
1042 | * searched for. Default is false (all schedules will be returned). | 1040 | * searched for. Default is false (all schedules will be returned). | ||
1043 | * | 1041 | * | ||
1044 | * @return const QList<MyMoneySchedule> list of schedule objects. | 1042 | * @return const QList<MyMoneySchedule> list of schedule objects. | ||
1045 | */ | 1043 | */ | ||
1046 | const QList<MyMoneySchedule> scheduleList(const QString& accountId, | 1044 | QList<MyMoneySchedule> scheduleList(const QString& accountId, | ||
1047 | const eMyMoney::Schedule::Type type, | 1045 | const eMyMoney::Schedule::Type type, | ||
1048 | const eMyMoney::Schedule::Occurrence occurrence, | 1046 | const eMyMoney::Schedule::Occurrence occurrence, | ||
1049 | const eMyMoney::Schedule::PaymentType paymentType, | 1047 | const eMyMoney::Schedule::PaymentType paymentType, | ||
1050 | const QDate& startDate, | 1048 | const QDate& startDate, | ||
1051 | const QDate& endDate, | 1049 | const QDate& endDate, | ||
1052 | const bool overdue) const; | 1050 | const bool overdue) const; | ||
1053 | const QList<MyMoneySchedule> scheduleList(const QString& accountId) const; | 1051 | QList<MyMoneySchedule> scheduleList(const QString& accountId) const; | ||
1054 | const QList<MyMoneySchedule> scheduleList() const; | 1052 | QList<MyMoneySchedule> scheduleList() const; | ||
1055 | 1053 | | |||
1056 | const QStringList consistencyCheck(); | 1054 | QStringList consistencyCheck(); | ||
1057 | 1055 | | |||
1058 | /** | 1056 | /** | ||
1059 | * MyMoneyFile::openingBalancesPrefix() is a special string used | 1057 | * MyMoneyFile::openingBalancesPrefix() is a special string used | ||
1060 | * to generate the name for opening balances accounts. See openingBalanceAccount() | 1058 | * to generate the name for opening balances accounts. See openingBalanceAccount() | ||
1061 | * for details. | 1059 | * for details. | ||
1062 | */ | 1060 | */ | ||
1063 | static const QString openingBalancesPrefix(); | 1061 | static QString openingBalancesPrefix(); | ||
1064 | 1062 | | |||
1065 | /** | 1063 | /** | ||
1066 | * MyMoneyFile::AccountSeperator is used as the separator | 1064 | * MyMoneyFile::AccountSeperator is used as the separator | ||
1067 | * between account names to form a hierarchy. | 1065 | * between account names to form a hierarchy. | ||
1068 | */ | 1066 | */ | ||
1069 | static const QString AccountSeperator; | 1067 | static const QString AccountSeperator; | ||
1070 | 1068 | | |||
1071 | /** | 1069 | /** | ||
Show All 27 Lines | 1089 | /** | |||
1099 | * @param value2 value found in the $ record for split transactions | 1097 | * @param value2 value found in the $ record for split transactions | ||
1100 | * | 1098 | * | ||
1101 | * @return id of the account for the split. If no name is specified | 1099 | * @return id of the account for the split. If no name is specified | ||
1102 | * or the account was not found and not created the | 1100 | * or the account was not found and not created the | ||
1103 | * return value will be "". | 1101 | * return value will be "". | ||
1104 | */ | 1102 | */ | ||
1105 | QString checkCategory(const QString& name, const MyMoneyMoney& value, const MyMoneyMoney& value2); | 1103 | QString checkCategory(const QString& name, const MyMoneyMoney& value, const MyMoneyMoney& value2); | ||
1106 | 1104 | | |||
1107 | const QList<MyMoneySchedule> scheduleListEx(int scheduleTypes, | | |||
1108 | int scheduleOcurrences, | | |||
1109 | int schedulePaymentTypes, | | |||
1110 | QDate startDate, | | |||
1111 | const QStringList& accounts = QStringList()) const; | | |||
1112 | | ||||
1113 | /** | 1105 | /** | ||
1114 | * This method is used to add a new security object to the engine. | 1106 | * This method is used to add a new security object to the engine. | ||
1115 | * The ID of the object is the trading symbol, so there is no need for an additional | 1107 | * The ID of the object is the trading symbol, so there is no need for an additional | ||
1116 | * ID since the symbol is guaranteed to be unique. | 1108 | * ID since the symbol is guaranteed to be unique. | ||
1117 | * | 1109 | * | ||
1118 | * An exception will be thrown upon erroneous situations. | 1110 | * An exception will be thrown upon erroneous situations. | ||
1119 | * | 1111 | * | ||
1120 | * @param security reference to the MyMoneySecurity object | 1112 | * @param security reference to the MyMoneySecurity object | ||
Show All 26 Lines | 1136 | /** | |||
1147 | * If no security with the given id is found, then a corresponding | 1139 | * If no security with the given id is found, then a corresponding | ||
1148 | * currency is searched. If @p id is empty, the baseCurrency() is returned. | 1140 | * currency is searched. If @p id is empty, the baseCurrency() is returned. | ||
1149 | * | 1141 | * | ||
1150 | * An exception will be thrown upon erroneous situations. | 1142 | * An exception will be thrown upon erroneous situations. | ||
1151 | * | 1143 | * | ||
1152 | * @param id QString containing the id of the MyMoneySecurity object | 1144 | * @param id QString containing the id of the MyMoneySecurity object | ||
1153 | * @return MyMoneySecurity object | 1145 | * @return MyMoneySecurity object | ||
1154 | */ | 1146 | */ | ||
1155 | const MyMoneySecurity& security(const QString& id) const; | 1147 | MyMoneySecurity security(const QString& id) const; | ||
1156 | 1148 | | |||
1157 | /** | 1149 | /** | ||
1158 | * This method is used to retrieve a list of all MyMoneySecurity objects. | 1150 | * This method is used to retrieve a list of all MyMoneySecurity objects. | ||
1159 | */ | 1151 | */ | ||
1160 | const QList<MyMoneySecurity> securityList() const; | 1152 | QList<MyMoneySecurity> securityList() const; | ||
1161 | 1153 | | |||
1162 | /** | 1154 | /** | ||
1163 | * This method is used to add a new currency object to the engine. | 1155 | * This method is used to add a new currency object to the engine. | ||
1164 | * The ID of the object is the trading symbol, so there is no need for an additional | 1156 | * The ID of the object is the trading symbol, so there is no need for an additional | ||
1165 | * ID since the symbol is guaranteed to be unique. | 1157 | * ID since the symbol is guaranteed to be unique. | ||
1166 | * | 1158 | * | ||
1167 | * An exception will be thrown upon erroneous situations. | 1159 | * An exception will be thrown upon erroneous situations. | ||
1168 | * | 1160 | * | ||
Show All 26 Lines | 1185 | /** | |||
1195 | * The id of the object must be supplied in the parameter @p id. | 1187 | * The id of the object must be supplied in the parameter @p id. | ||
1196 | * If @p id is empty, this method returns baseCurrency(). | 1188 | * If @p id is empty, this method returns baseCurrency(). | ||
1197 | * | 1189 | * | ||
1198 | * An exception will be thrown upon erroneous situations. | 1190 | * An exception will be thrown upon erroneous situations. | ||
1199 | * | 1191 | * | ||
1200 | * @param id QString containing the id of the MyMoneySchedule object | 1192 | * @param id QString containing the id of the MyMoneySchedule object | ||
1201 | * @return MyMoneySchedule object | 1193 | * @return MyMoneySchedule object | ||
1202 | */ | 1194 | */ | ||
1203 | const MyMoneySecurity& currency(const QString& id) const; | 1195 | MyMoneySecurity currency(const QString& id) const; | ||
1204 | 1196 | | |||
1205 | /** | 1197 | /** | ||
1206 | * This method is used to retrieve the map of ancient currencies (together with their last prices) | 1198 | * This method is used to retrieve the map of ancient currencies (together with their last prices) | ||
1207 | * known to the engine. | 1199 | * known to the engine. | ||
1208 | * | 1200 | * | ||
1209 | * An exception will be thrown upon erroneous situations. | 1201 | * An exception will be thrown upon erroneous situations. | ||
1210 | * | 1202 | * | ||
1211 | * @return QMap of all MyMoneySecurity and MyMoneyPrice objects. | 1203 | * @return QMap of all MyMoneySecurity and MyMoneyPrice objects. | ||
1212 | */ | 1204 | */ | ||
1213 | const QMap<MyMoneySecurity, MyMoneyPrice> ancientCurrencies() const; | 1205 | QMap<MyMoneySecurity, MyMoneyPrice> ancientCurrencies() const; | ||
1214 | 1206 | | |||
1215 | /** | 1207 | /** | ||
1216 | * This method is used to retrieve the list of available currencies | 1208 | * This method is used to retrieve the list of available currencies | ||
1217 | * known to the engine. | 1209 | * known to the engine. | ||
1218 | * | 1210 | * | ||
1219 | * An exception will be thrown upon erroneous situations. | 1211 | * An exception will be thrown upon erroneous situations. | ||
1220 | * | 1212 | * | ||
1221 | * @return QList of all MyMoneySecurity objects. | 1213 | * @return QList of all MyMoneySecurity objects. | ||
1222 | */ | 1214 | */ | ||
1223 | const QList<MyMoneySecurity> availableCurrencyList() const; | 1215 | QList<MyMoneySecurity> availableCurrencyList() const; | ||
1224 | 1216 | | |||
1225 | /** | 1217 | /** | ||
1226 | * This method is used to retrieve the list of stored currencies | 1218 | * This method is used to retrieve the list of stored currencies | ||
1227 | * known to the engine. | 1219 | * known to the engine. | ||
1228 | * | 1220 | * | ||
1229 | * An exception will be thrown upon erroneous situations. | 1221 | * An exception will be thrown upon erroneous situations. | ||
1230 | * | 1222 | * | ||
1231 | * @return QList of all MyMoneySecurity objects. | 1223 | * @return QList of all MyMoneySecurity objects. | ||
1232 | */ | 1224 | */ | ||
1233 | const QList<MyMoneySecurity> currencyList() const; | 1225 | QList<MyMoneySecurity> currencyList() const; | ||
1234 | 1226 | | |||
1235 | /** | 1227 | /** | ||
1236 | * This method retrieves a MyMoneySecurity object representing | 1228 | * This method retrieves a MyMoneySecurity object representing | ||
1237 | * the selected base currency. If the base currency is not | 1229 | * the selected base currency. If the base currency is not | ||
1238 | * selected (e.g. due to a previous call to setBaseCurrency()) | 1230 | * selected (e.g. due to a previous call to setBaseCurrency()) | ||
1239 | * a standard MyMoneySecurity object will be returned. See | 1231 | * a standard MyMoneySecurity object will be returned. See | ||
1240 | * MyMoneySecurity() for details. | 1232 | * MyMoneySecurity() for details. | ||
1241 | * | 1233 | * | ||
1242 | * An exception will be thrown upon erroneous situations. | 1234 | * An exception will be thrown upon erroneous situations. | ||
1243 | * | 1235 | * | ||
1244 | * @return MyMoneySecurity describing base currency | 1236 | * @return MyMoneySecurity describing base currency | ||
1245 | */ | 1237 | */ | ||
1246 | const MyMoneySecurity& baseCurrency() const; | 1238 | MyMoneySecurity baseCurrency() const; | ||
1247 | 1239 | | |||
1248 | /** | 1240 | /** | ||
1249 | * This method returns the foreign currency of the given two | 1241 | * This method returns the foreign currency of the given two | ||
1250 | * currency ids. If second is the base currency id then @a first | 1242 | * currency ids. If second is the base currency id then @a first | ||
1251 | * is returned otherwise @a second is returned. | 1243 | * is returned otherwise @a second is returned. | ||
1252 | */ | 1244 | */ | ||
1253 | const QString& foreignCurrency(const QString& first, const QString& second) const; | 1245 | QString foreignCurrency(const QString& first, const QString& second) const; | ||
1254 | 1246 | | |||
1255 | /** | 1247 | /** | ||
1256 | * This method allows to select the base currency. It does | 1248 | * This method allows to select the base currency. It does | ||
1257 | * not perform any changes to the data in the engine. It merely | 1249 | * not perform any changes to the data in the engine. It merely | ||
1258 | * stores a reference to the base currency. The currency | 1250 | * stores a reference to the base currency. The currency | ||
1259 | * passed as argument must exist in the engine. | 1251 | * passed as argument must exist in the engine. | ||
1260 | * | 1252 | * | ||
1261 | * An exception will be thrown upon erroneous situations. | 1253 | * An exception will be thrown upon erroneous situations. | ||
Show All 31 Lines | |||||
1293 | MyMoneyPrice price(const QString& fromId, const QString& toId) const; | 1285 | MyMoneyPrice price(const QString& fromId, const QString& toId) const; | ||
1294 | MyMoneyPrice price(const QString& fromId) const; | 1286 | MyMoneyPrice price(const QString& fromId) const; | ||
1295 | 1287 | | |||
1296 | /** | 1288 | /** | ||
1297 | * This method returns a list of all prices. | 1289 | * This method returns a list of all prices. | ||
1298 | * | 1290 | * | ||
1299 | * @return MyMoneyPriceList of all MyMoneyPrice objects. | 1291 | * @return MyMoneyPriceList of all MyMoneyPrice objects. | ||
1300 | */ | 1292 | */ | ||
1301 | const MyMoneyPriceList priceList() const; | 1293 | MyMoneyPriceList priceList() const; | ||
1302 | 1294 | | |||
1303 | /** | 1295 | /** | ||
1304 | * This method allows to interrogate the engine, if a known account | 1296 | * This method allows to interrogate the engine, if a known account | ||
1305 | * with id @p id has a subaccount with the name @p name. | 1297 | * with id @p id has a subaccount with the name @p name. | ||
1306 | * | 1298 | * | ||
1307 | * @param id id of the account to look at | 1299 | * @param id id of the account to look at | ||
1308 | * @param name account name that needs to be searched force | 1300 | * @param name account name that needs to be searched force | ||
1309 | * @retval true account with name @p name found as subaccounts | 1301 | * @retval true account with name @p name found as subaccounts | ||
1310 | * @retval false no subaccount present with that name | 1302 | * @retval false no subaccount present with that name | ||
1311 | */ | 1303 | */ | ||
1312 | bool hasAccount(const QString& id, const QString& name) const; | 1304 | bool hasAccount(const QString& id, const QString& name) const; | ||
1313 | 1305 | | |||
1314 | /** | 1306 | /** | ||
1315 | * This method is used to retrieve the list of all reports | 1307 | * This method is used to retrieve the list of all reports | ||
1316 | * known to the engine. | 1308 | * known to the engine. | ||
1317 | * | 1309 | * | ||
1318 | * An exception will be thrown upon erroneous situations. | 1310 | * An exception will be thrown upon erroneous situations. | ||
1319 | * | 1311 | * | ||
1320 | * @return QList of all MyMoneyReport objects. | 1312 | * @return QList of all MyMoneyReport objects. | ||
1321 | */ | 1313 | */ | ||
1322 | const QList<MyMoneyReport> reportList() const; | 1314 | QList<MyMoneyReport> reportList() const; | ||
1323 | 1315 | | |||
1324 | /** | 1316 | /** | ||
1325 | * Adds a report to the file-global institution pool. A | 1317 | * Adds a report to the file-global institution pool. A | ||
1326 | * respective report-ID will be generated for this object. | 1318 | * respective report-ID will be generated for this object. | ||
1327 | * The ID is stored as QString in the object passed as argument. | 1319 | * The ID is stored as QString in the object passed as argument. | ||
1328 | * | 1320 | * | ||
1329 | * An exception will be thrown upon error conditions. | 1321 | * An exception will be thrown upon error conditions. | ||
1330 | * | 1322 | * | ||
Show All 24 Lines | 1346 | /** | |||
1355 | * This method is used to retrieve a single MyMoneyReport object. | 1347 | * This method is used to retrieve a single MyMoneyReport object. | ||
1356 | * The id of the object must be supplied in the parameter @p id. | 1348 | * The id of the object must be supplied in the parameter @p id. | ||
1357 | * | 1349 | * | ||
1358 | * An exception will be thrown upon erroneous situations. | 1350 | * An exception will be thrown upon erroneous situations. | ||
1359 | * | 1351 | * | ||
1360 | * @param id QString containing the id of the MyMoneyReport object | 1352 | * @param id QString containing the id of the MyMoneyReport object | ||
1361 | * @return MyMoneyReport object | 1353 | * @return MyMoneyReport object | ||
1362 | */ | 1354 | */ | ||
1363 | const MyMoneyReport report(const QString& id) const; | 1355 | MyMoneyReport report(const QString& id) const; | ||
1364 | 1356 | | |||
1365 | /** | 1357 | /** | ||
1366 | * This method is used to remove an existing MyMoneyReport object | 1358 | * This method is used to remove an existing MyMoneyReport object | ||
1367 | * from the engine. The id attribute of the object must be set. | 1359 | * from the engine. The id attribute of the object must be set. | ||
1368 | * | 1360 | * | ||
1369 | * An exception will be thrown upon erroneous situations. | 1361 | * An exception will be thrown upon erroneous situations. | ||
1370 | * | 1362 | * | ||
1371 | * @param report const reference to the MyMoneyReport object to be updated | 1363 | * @param report const reference to the MyMoneyReport object to be updated | ||
1372 | */ | 1364 | */ | ||
1373 | void removeReport(const MyMoneyReport& report); | 1365 | void removeReport(const MyMoneyReport& report); | ||
1374 | 1366 | | |||
1375 | /** | 1367 | /** | ||
1376 | * This method is used to retrieve the list of all budgets | 1368 | * This method is used to retrieve the list of all budgets | ||
1377 | * known to the engine. | 1369 | * known to the engine. | ||
1378 | * | 1370 | * | ||
1379 | * An exception will be thrown upon erroneous situations. | 1371 | * An exception will be thrown upon erroneous situations. | ||
1380 | * | 1372 | * | ||
1381 | * @return QList of all MyMoneyBudget objects. | 1373 | * @return QList of all MyMoneyBudget objects. | ||
1382 | */ | 1374 | */ | ||
1383 | const QList<MyMoneyBudget> budgetList() const; | 1375 | QList<MyMoneyBudget> budgetList() const; | ||
1384 | 1376 | | |||
1385 | /** | 1377 | /** | ||
1386 | * Adds a budget to the file-global institution pool. A | 1378 | * Adds a budget to the file-global institution pool. A | ||
1387 | * respective budget-ID will be generated for this object. | 1379 | * respective budget-ID will be generated for this object. | ||
1388 | * The ID is stored as QString in the object passed as argument. | 1380 | * The ID is stored as QString in the object passed as argument. | ||
1389 | * | 1381 | * | ||
1390 | * An exception will be thrown upon error conditions. | 1382 | * An exception will be thrown upon error conditions. | ||
1391 | * | 1383 | * | ||
1392 | * @param budget The complete budget information in a | 1384 | * @param budget The complete budget information in a | ||
1393 | * MyMoneyBudget object | 1385 | * MyMoneyBudget object | ||
1394 | */ | 1386 | */ | ||
1395 | void addBudget(MyMoneyBudget& budget); | 1387 | void addBudget(MyMoneyBudget &budget); | ||
1396 | 1388 | | |||
1397 | 1389 | | |||
1398 | /** | 1390 | /** | ||
1399 | * This method is used to retrieve the id to a corresponding | 1391 | * This method is used to retrieve the id to a corresponding | ||
1400 | * name of a budget. | 1392 | * name of a budget. | ||
1401 | * An exception will be thrown upon error conditions. | 1393 | * An exception will be thrown upon error conditions. | ||
1402 | * | 1394 | * | ||
1403 | * @param budget QString reference to name of budget | 1395 | * @param budget QString reference to name of budget | ||
1404 | * | 1396 | * | ||
1405 | * @return MyMoneyBudget refernce to object of budget | 1397 | * @return MyMoneyBudget refernce to object of budget | ||
1406 | */ | 1398 | */ | ||
1407 | const MyMoneyBudget budgetByName(const QString& budget) const; | 1399 | MyMoneyBudget budgetByName(const QString& budget) const; | ||
1408 | 1400 | | |||
1409 | 1401 | | |||
1410 | /** | 1402 | /** | ||
1411 | * Modifies an already existing budget in the file global | 1403 | * Modifies an already existing budget in the file global | ||
1412 | * budget pool. | 1404 | * budget pool. | ||
1413 | * | 1405 | * | ||
1414 | * An exception will be thrown upon error conditions. | 1406 | * An exception will be thrown upon error conditions. | ||
1415 | * | 1407 | * | ||
Show All 13 Lines | 1420 | /** | |||
1429 | * This method is used to retrieve a single MyMoneyBudget object. | 1421 | * This method is used to retrieve a single MyMoneyBudget object. | ||
1430 | * The id of the object must be supplied in the parameter @p id. | 1422 | * The id of the object must be supplied in the parameter @p id. | ||
1431 | * | 1423 | * | ||
1432 | * An exception will be thrown upon erroneous situations. | 1424 | * An exception will be thrown upon erroneous situations. | ||
1433 | * | 1425 | * | ||
1434 | * @param id QString containing the id of the MyMoneyBudget object | 1426 | * @param id QString containing the id of the MyMoneyBudget object | ||
1435 | * @return MyMoneyBudget object | 1427 | * @return MyMoneyBudget object | ||
1436 | */ | 1428 | */ | ||
1437 | const MyMoneyBudget budget(const QString& id) const; | 1429 | MyMoneyBudget budget(const QString& id) const; | ||
1438 | 1430 | | |||
1439 | /** | 1431 | /** | ||
1440 | * This method is used to remove an existing MyMoneyBudget object | 1432 | * This method is used to remove an existing MyMoneyBudget object | ||
1441 | * from the engine. The id attribute of the object must be set. | 1433 | * from the engine. The id attribute of the object must be set. | ||
1442 | * | 1434 | * | ||
1443 | * An exception will be thrown upon erroneous situations. | 1435 | * An exception will be thrown upon erroneous situations. | ||
1444 | * | 1436 | * | ||
1445 | * @param budget const reference to the MyMoneyBudget object to be updated | 1437 | * @param budget const reference to the MyMoneyBudget object to be updated | ||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | |||||
1517 | bool hasNewerTransaction(const QString& accId, const QDate& date) const; | 1509 | bool hasNewerTransaction(const QString& accId, const QDate& date) const; | ||
1518 | 1510 | | |||
1519 | 1511 | | |||
1520 | /** | 1512 | /** | ||
1521 | * Clear all internal caches (used internally for performance measurements) | 1513 | * Clear all internal caches (used internally for performance measurements) | ||
1522 | */ | 1514 | */ | ||
1523 | void clearCache(); | 1515 | void clearCache(); | ||
1524 | 1516 | | |||
1525 | void forceDataChanged() { | 1517 | void forceDataChanged(); | ||
1526 | emit dataChanged(); | | |||
1527 | } | | |||
1528 | 1518 | | |||
1529 | void preloadCache(); | 1519 | void preloadCache(); | ||
1530 | 1520 | | |||
1531 | /** | 1521 | /** | ||
1532 | * This returns @p true if file and online balance of a specific | 1522 | * This returns @p true if file and online balance of a specific | ||
1533 | * @p account are matching. Returns false if there is no online balance. | 1523 | * @p account are matching. Returns false if there is no online balance. | ||
1534 | * | 1524 | * | ||
1535 | * @param account @p account to be checked | 1525 | * @param account @p account to be checked | ||
Show All 23 Lines | |||||
1559 | */ | 1549 | */ | ||
1560 | void modifyOnlineJob(const onlineJob job); | 1550 | void modifyOnlineJob(const onlineJob job); | ||
1561 | 1551 | | |||
1562 | /** | 1552 | /** | ||
1563 | * @brief Returns onlineJob identified by jobId | 1553 | * @brief Returns onlineJob identified by jobId | ||
1564 | * @param jobId | 1554 | * @param jobId | ||
1565 | * @return | 1555 | * @return | ||
1566 | */ | 1556 | */ | ||
1567 | const onlineJob getOnlineJob(const QString &jobId) const; | 1557 | onlineJob getOnlineJob(const QString &jobId) const; | ||
1568 | 1558 | | |||
1569 | /** | 1559 | /** | ||
1570 | * @brief Returns all onlineJobs | 1560 | * @brief Returns all onlineJobs | ||
1571 | * @return all online jobs, caller gains ownership | 1561 | * @return all online jobs, caller gains ownership | ||
1572 | */ | 1562 | */ | ||
1573 | const QList<onlineJob> onlineJobList() const; | 1563 | QList<onlineJob> onlineJobList() const; | ||
1574 | 1564 | | |||
1575 | /** | 1565 | /** | ||
1576 | * @brief Returns the number of onlineJobs | 1566 | * @brief Returns the number of onlineJobs | ||
1577 | */ | 1567 | */ | ||
1578 | int countOnlineJobs() const; | 1568 | int countOnlineJobs() const; | ||
1579 | 1569 | | |||
1580 | /** | 1570 | /** | ||
1581 | * @brief Remove onlineJob | 1571 | * @brief Remove onlineJob | ||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 1648 | private: | |||
1670 | /** | 1660 | /** | ||
1671 | * This method creates an opening balances account. The name is constructed | 1661 | * This method creates an opening balances account. The name is constructed | ||
1672 | * using MyMoneyFile::openingBalancesPrefix() and appending " (xxx)" in | 1662 | * using MyMoneyFile::openingBalancesPrefix() and appending " (xxx)" in | ||
1673 | * case the @p security is not the baseCurrency(). The account created | 1663 | * case the @p security is not the baseCurrency(). The account created | ||
1674 | * will be a sub-account of the standard equity account provided by equity(). | 1664 | * will be a sub-account of the standard equity account provided by equity(). | ||
1675 | * | 1665 | * | ||
1676 | * @param security Security for which the account is searched | 1666 | * @param security Security for which the account is searched | ||
1677 | */ | 1667 | */ | ||
1678 | const MyMoneyAccount createOpeningBalanceAccount(const MyMoneySecurity& security); | 1668 | MyMoneyAccount createOpeningBalanceAccount(const MyMoneySecurity& security); | ||
1679 | 1669 | | |||
1680 | const MyMoneyAccount openingBalanceAccount_internal(const MyMoneySecurity& security) const; | 1670 | MyMoneyAccount openingBalanceAccount_internal(const MyMoneySecurity& security) const; | ||
1681 | 1671 | | |||
1682 | /** | 1672 | /** | ||
1683 | * Make sure that the splits value has the precision of the corresponding account | 1673 | * Make sure that the splits value has the precision of the corresponding account | ||
1684 | */ | 1674 | */ | ||
1685 | void fixSplitPrecision(MyMoneyTransaction& t) const; | 1675 | void fixSplitPrecision(MyMoneyTransaction& t) const; | ||
1686 | 1676 | | |||
1687 | private: | 1677 | private: | ||
1688 | /// \internal d-pointer class. | 1678 | /// \internal d-pointer class. | ||
Show All 33 Lines |
You need to change
into
and change
to
in that method (around line 894).
Also, there is another signature that needs to be updated. The method
should be converted to