#include <mymoneytransactionfilter.h>
Inheritance diagram for MyMoneyTransactionFilter:


Public Types | |
| enum | typeOptionE { allTypes = 0, payments, deposits, transfers, typeOptionCount } |
| enum | stateOptionE { allStates = 0, notReconciled, cleared, reconciled, frozen, stateOptionCount } |
| enum | validityOptionE { anyValidity = 0, valid, invalid, validityOptionCount } |
| enum | dateOptionE { allDates = 0, asOfToday, currentMonth, currentYear, monthToDate, yearToDate, yearToMonth, lastMonth, lastYear, last7Days, last30Days, last3Months, last6Months, last12Months, next7Days, next30Days, next3Months, next6Months, next12Months, userDefined, last3ToNext3Months, last11Months, currentQuarter, lastQuarter, nextQuarter, currentFiscalYear, lastFiscalYear, today, dateOptionCount } |
Public Member Functions | |
| MyMoneyTransactionFilter () | |
| MyMoneyTransactionFilter (const QCString &id) | |
| ~MyMoneyTransactionFilter () | |
| void | clear (void) |
| void | clearAccountFilter (void) |
| void | setTextFilter (const QRegExp &exp) |
| void | addAccount (const QCString &id) |
| void | addAccount (const QCStringList &ids) |
| void | addCategory (const QCString &id) |
| void | addCategory (const QCStringList &ids) |
| void | setDateFilter (const QDate &from, const QDate &to) |
| void | setDateFilter (dateOptionE range) |
| void | setAmountFilter (const MyMoneyMoney &from, const MyMoneyMoney &to) |
| void | addPayee (const QCString &id) |
| void | addType (const int type) |
| void | addValidity (const int type) |
| void | addState (const int state) |
| void | setNumberFilter (const QString &from, const QString &to) |
| bool | match (const MyMoneyTransaction &transaction) |
| bool | match (const MyMoneySplit *const sp) const |
| void | setReportAllSplits (const bool report=true) |
| void | setConsiderCategory (const bool check=true) |
| const QValueList< MyMoneySplit > & | matchingSplits (void) const |
| const QDate | fromDate (void) const |
| const QDate | toDate (void) const |
| bool | includesCategory (const QCString &cat) const |
| bool | includesAccount (const QCString &acc) const |
| bool | includesPayee (const QCString &pye) const |
| bool | dateFilter (QDate &from, QDate &to) const |
| bool | amountFilter (MyMoneyMoney &from, MyMoneyMoney &to) const |
| bool | numberFilter (QString &from, QString &to) const |
| bool | payees (QCStringList &list) const |
| bool | accounts (QCStringList &list) const |
| bool | categories (QCStringList &list) const |
| bool | firstType (int &i) const |
| bool | types (QValueList< int > &list) const |
| bool | firstState (int &i) const |
| bool | states (QValueList< int > &list) const |
| bool | textFilter (QRegExp &text) const |
| FilterSet | filterSet (void) const |
| void | removeReference (const QCString &id) |
Static Public Member Functions | |
| static bool | translateDateRange (dateOptionE range, QDate &start, QDate &end) |
| static void | setFiscalYearStart (int firstMonth, int firstDay) |
Protected Attributes | |
| FilterSet | m_filterSet |
| bool | m_reportAllSplits |
| bool | m_considerCategory |
| QRegExp | m_text |
| QAsciiDict< char > | m_accounts |
| QAsciiDict< char > | m_payees |
| QAsciiDict< char > | m_categories |
| QIntDict< char > | m_states |
| QIntDict< char > | m_types |
| QIntDict< char > | m_validity |
| QString | m_fromNr |
| QString | m_toNr |
| QDate | m_fromDate |
| QDate | m_toDate |
| MyMoneyMoney | m_fromAmount |
| MyMoneyMoney | m_toAmount |
| QValueList< MyMoneySplit > | m_matchingSplits |
Private Member Functions | |
| int | splitState (const MyMoneySplit &split) const |
| int | splitType (const MyMoneyTransaction &t, const MyMoneySplit &split) const |
| validityOptionE | validTransaction (const MyMoneyTransaction &transaction) const |
Classes | |
| union | FilterSet |
|
|
|
|
|
|
|
|
|
|
|
|
This is the standard constructor for a transaction filter. It creates the object and calls setReportAllSplits() to report all matching splits as separate entries. Use setReportAllSplits() to override this behaviour. |
|
|
This is a convenience constructor to allow construction of a simple account filter. It is basically the same as the following:
: MyMoneyTransactionFilter filter; filter.setReportAllSplits(false); filter.addAccount(id); :
|
|
|
|
|
|
This method returns whether an account filter has been set, and if so, it returns all the accounts set in the filter.
|
|
|
This is a convenience method and behaves exactly like the above method but for a list of id's. |
|
|
This method will add the account with id
|
|
|
This is a convenience method and behaves exactly like the above method but for a list of id's. |
|
|
This method will add the category with id
|
|
|
This method will add the payee with id
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
This method is used to return information about the presence of an amount filter.
|
|
|
This method returns whether a category filter has been set, and if so, it returns all the categories set in the filter.
|
|
|
This method is used to clear the filter. All settings will be removed. Reimplemented in MyMoneyReport. |
|
|
This method is used to clear the accounts filter only. |
|
||||||||||||
|
This method is used to return information about the presence of a date filter.
|
|
|
|
|
|
This method returns whether a state filter has been set, and if so, it returns the first state in the filter.
|
|
|
This method returns whether a type filter has been set, and if so, it returns the first type in the filter.
|
|
|
This method returns the from date set in the filter. If no value has been set up for this filter, then QDate() is returned.
|
|
|
This method is used to return information about the presence of a specific account in the account filter. The account in question is included in the filter set, if it has been set or no account filter is set.
|
|
|
This method is used to return information about the presence of a specific category in the category filter. The category in question is included in the filter set, if it has been set or no category filter is set.
|
|
|
This method is used to return information about the presence of a specific payee in the account filter. The payee in question is included in the filter set, if it has been set or no account filter is set.
|
|
|
This method is used to check a specific split against the text and amount filter. The split will match if all specified and checked filters match. If the filter is cleared using the clear() method, any split matches.
|
|
|
This method is used to check a specific transaction against the filter. The transaction will match the whole filter, if all specified filters match. If the filter is cleared using the clear() method, any transaciton matches.
|
|
|
This method returns a list of the matching splits for the filter. If m_reportAllSplits is set to false, then only the very first split will be returned. Use setReportAllSplits() to change the behaviour.
|
|
||||||||||||
|
This method is used to return information about the presence of an number filter.
|
|
|
This method returns whether a payee filter has been set, and if so, it returns all the payees set in the filter.
|
|
|
This member removes all references to object identified by |
|
||||||||||||
|
This method sets the amount filter to match only transactions with an amount in the range specified by
|
|
|
|
|
|
Reimplemented in MyMoneyReport. |
|
||||||||||||
|
This method sets the date filter to match only transactions with posting dates in the date range specified by
Reimplemented in MyMoneyReport. |
|
||||||||||||
|
|
|
||||||||||||
|
This method sets the number filter to match only transactions with a number in the range specified by
|
|
|
This method is used to switch the amount of splits reported by matchingSplits(). If the argument
|
|
|
This method is used to set the regular expression filter to the value specified as parameter
|
|
|
This is a conversion tool from MyMoneySplit::reconcileFlagE to MyMoneyTransactionFilter::stateE types
|
|
||||||||||||
|
This is a conversion tool from MyMoneySplit::action to MyMoneyTransactionFilter::typeE types
|
|
|
|
|
|
This method returns whether a text filter has been set, and if so, it returns the text filter.
|
|
|
This method returns the to date set in the filter. If no value has been set up for this filter, then QDate() is returned.
|
|
||||||||||||||||
|
This method translates a plain-language date range into QDate start & end
|
|
|
|
|
|
This method checks if a transaction is valid or not. A transaction is considered valid, if the sum of all splits is zero, invalid otherwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.1