Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/mymoneyenums.h
Context not available. | |||||
20 | #define MYMONEYENUMS_H | 20 | #define MYMONEYENUMS_H | ||
---|---|---|---|---|---|
21 | 21 | | |||
22 | namespace eMyMoney { | 22 | namespace eMyMoney { | ||
23 | enum class Security { | 23 | /** | ||
24 | Stock, | 24 | * Account types currently supported. | ||
25 | MutualFund, | 25 | */ | ||
26 | Bond, | 26 | enum class Account { | ||
27 | Currency, | 27 | Unknown = 0, /**< For error handling */ | ||
28 | None | 28 | Checkings, /**< Standard checking account */ | ||
29 | Savings, /**< Typical savings account */ | ||||
30 | Cash, /**< Denotes a shoe-box or pillowcase stuffed | ||||
31 | with cash */ | ||||
32 | CreditCard, /**< Credit card accounts */ | ||||
33 | Loan, /**< Loan and mortgage accounts (liability) */ | ||||
34 | CertificateDep, /**< Certificates of Deposit */ | ||||
35 | Investment, /**< Investment account */ | ||||
36 | MoneyMarket, /**< Money Market Account */ | ||||
37 | Asset, /**< Denotes a generic asset account.*/ | ||||
38 | Liability, /**< Denotes a generic liability account.*/ | ||||
39 | Currency, /**< Denotes a currency trading account. */ | ||||
40 | Income, /**< Denotes an income account */ | ||||
41 | Expense, /**< Denotes an expense account */ | ||||
42 | AssetLoan, /**< Denotes a loan (asset of the owner of this object) */ | ||||
43 | Stock, /**< Denotes an security account as sub-account for an investment */ | ||||
44 | Equity, /**< Denotes an equity account e.g. opening/closeing balance */ | ||||
45 | | ||||
46 | /* insert new account types above this line */ | ||||
47 | MaxAccountTypes /**< Denotes the number of different account types */ | ||||
48 | }; | ||||
49 | | ||||
50 | inline uint qHash(const Account key, uint seed) { return ::qHash(static_cast<uint>(key), seed); } | ||||
51 | | ||||
52 | enum class Security { | ||||
53 | Stock, | ||||
54 | MutualFund, | ||||
55 | Bond, | ||||
56 | Currency, | ||||
57 | None | ||||
58 | }; | ||||
59 | | ||||
60 | inline uint qHash(const Security key, uint seed) { return ::qHash(static_cast<uint>(key), seed); } | ||||
61 | | ||||
62 | namespace Schedule { | ||||
63 | /** | ||||
64 | * This enum is used to describe all the possible schedule frequencies. | ||||
65 | * The special entry, Any, is used to combine all the other types. | ||||
66 | */ | ||||
67 | enum class Occurrence { | ||||
68 | Any = 0, | ||||
69 | Once = 1, | ||||
70 | Daily = 2, | ||||
71 | Weekly = 4, | ||||
72 | Fortnightly = 8, | ||||
73 | EveryOtherWeek = 16, | ||||
74 | EveryHalfMonth = 18, | ||||
75 | EveryThreeWeeks = 20, | ||||
76 | EveryThirtyDays = 30, | ||||
77 | Monthly = 32, | ||||
78 | EveryFourWeeks = 64, | ||||
79 | EveryEightWeeks = 126, | ||||
80 | EveryOtherMonth = 128, | ||||
81 | EveryThreeMonths = 256, | ||||
82 | TwiceYearly = 1024, | ||||
83 | EveryOtherYear = 2048, | ||||
84 | Quarterly = 4096, | ||||
85 | EveryFourMonths = 8192, | ||||
86 | Yearly = 16384 | ||||
87 | }; | ||||
88 | | ||||
89 | /** | ||||
90 | * This enum is used to describe the schedule type. | ||||
91 | */ | ||||
92 | enum class Type { | ||||
93 | Any = 0, | ||||
94 | Bill = 1, | ||||
95 | Deposit = 2, | ||||
96 | Transfer = 4, | ||||
97 | LoanPayment = 5 | ||||
98 | }; | ||||
99 | | ||||
100 | /** | ||||
101 | * This enum is used to describe the schedule's payment type. | ||||
102 | */ | ||||
103 | enum class PaymentType { | ||||
104 | Any = 0, | ||||
105 | DirectDebit = 1, | ||||
106 | DirectDeposit = 2, | ||||
107 | ManualDeposit = 4, | ||||
108 | Other = 8, | ||||
109 | WriteChecque = 16, | ||||
110 | StandingOrder = 32, | ||||
111 | BankTransfer = 64 | ||||
112 | }; | ||||
113 | | ||||
114 | /** | ||||
115 | * This enum is used by the auto-commit functionality. | ||||
116 | * | ||||
117 | * Depending upon the value of m_weekendOption the schedule can | ||||
118 | * be entered on a different date | ||||
119 | **/ | ||||
120 | enum class WeekendOption { | ||||
121 | MoveBefore = 0, | ||||
122 | MoveAfter = 1, | ||||
123 | MoveNothing = 2 | ||||
124 | }; | ||||
125 | } | ||||
126 | | ||||
127 | namespace TransactionFilter { | ||||
128 | // Make sure to keep the following enum valus in sync with the values | ||||
129 | // used by the GUI (for KMyMoney in kfindtransactiondlgdecl.ui) | ||||
130 | enum class Type { | ||||
131 | All = 0, | ||||
132 | Payments, | ||||
133 | Deposits, | ||||
134 | Transfers, | ||||
135 | // insert new constants above of this line | ||||
136 | LastType | ||||
137 | }; | ||||
138 | | ||||
139 | // Make sure to keep the following enum valus in sync with the values | ||||
140 | // used by the GUI (for KMyMoney in kfindtransactiondlgdecl.ui) | ||||
141 | enum class State { | ||||
142 | All = 0, | ||||
143 | NotReconciled, | ||||
144 | Cleared, | ||||
145 | Reconciled, | ||||
146 | Frozen, | ||||
147 | // insert new constants above of this line | ||||
148 | LastState | ||||
149 | }; | ||||
150 | | ||||
151 | // Make sure to keep the following enum valus in sync with the values | ||||
152 | // used by the GUI (for KMyMoney in kfindtransactiondlgdecl.ui) | ||||
153 | enum class Validity { | ||||
154 | Any = 0, | ||||
155 | Valid, | ||||
156 | Invalid, | ||||
157 | // insert new constants above of this line | ||||
158 | LastValidity | ||||
159 | }; | ||||
160 | | ||||
161 | // Make sure to keep the following enum valus in sync with the values | ||||
162 | // used by the GUI (for KMyMoney in kfindtransactiondlgdecl.ui) | ||||
163 | enum class Date { | ||||
164 | All = 0, | ||||
165 | AsOfToday, | ||||
166 | CurrentMonth, | ||||
167 | CurrentYear, | ||||
168 | MonthToDate, | ||||
169 | YearToDate, | ||||
170 | YearToMonth, | ||||
171 | LastMonth, | ||||
172 | LastYear, | ||||
173 | Last7Days, | ||||
174 | Last30Days, | ||||
175 | Last3Months, | ||||
176 | Last6Months, | ||||
177 | Last12Months, | ||||
178 | Next7Days, | ||||
179 | Next30Days, | ||||
180 | Next3Months, | ||||
181 | Next6Months, | ||||
182 | Next12Months, | ||||
183 | UserDefined, | ||||
184 | Last3ToNext3Months, | ||||
185 | Last11Months, | ||||
186 | CurrentQuarter, | ||||
187 | LastQuarter, | ||||
188 | NextQuarter, | ||||
189 | CurrentFiscalYear, | ||||
190 | LastFiscalYear, | ||||
191 | Today, | ||||
192 | Next18Months, | ||||
193 | // insert new constants above of this line | ||||
194 | LastDateItem | ||||
195 | }; | ||||
196 | } | ||||
197 | | ||||
198 | namespace File { | ||||
199 | /** | ||||
200 | * notificationObject identifies the type of the object | ||||
201 | * for which this notification is stored | ||||
202 | */ | ||||
203 | enum class Object { | ||||
204 | Account = 1, | ||||
205 | Institution, | ||||
206 | Payee, | ||||
207 | Transaction, | ||||
208 | Tag, | ||||
209 | Schedule, | ||||
210 | Security, | ||||
211 | OnlineJob | ||||
212 | }; | ||||
213 | | ||||
214 | /** | ||||
215 | * notificationMode identifies the type of notifiation | ||||
216 | * (add, modify, remove) | ||||
217 | */ | ||||
218 | enum class Mode { | ||||
219 | Add = 1, | ||||
220 | Modify, | ||||
221 | Remove | ||||
29 | }; | 222 | }; | ||
30 | 223 | | |||
31 | inline uint qHash(const Security key, uint seed) { return ::qHash(static_cast<uint>(key), seed); } | 224 | } | ||
32 | } | 225 | } | ||
33 | #endif | 226 | #endif | ||
Context not available. |