1
+ #ifndef ACCOUNTMETADATA_H
2
+ #define ACCOUNTMETADATA_H
3
+
4
+ #include < string>
5
+ #include " accounttype.h"
6
+ #include " customcurrency.h"
7
+ #include " remindersthreshold.h"
8
+ #include " sortby.h"
9
+ #include " transactiontype.h"
10
+
11
+ namespace Nickvision ::Money::Shared::Models
12
+ {
13
+ /* *
14
+ * @brief A model of metadata for an account.
15
+ */
16
+ class AccountMetadata
17
+ {
18
+ public:
19
+ /* *
20
+ * @brief Constructs an AccountMetadata.
21
+ * @param name The name of the account
22
+ * @param type The type of the account
23
+ */
24
+ AccountMetadata (const std::string& name, AccountType type);
25
+ /* *
26
+ * @brief Gets the name of the account.
27
+ * @return The name of the account
28
+ */
29
+ const std::string& getName () const ;
30
+ /* *
31
+ * @brief Sets the name of the account.
32
+ * @param name The new name of the account
33
+ */
34
+ void setName (const std::string& name);
35
+ /* *
36
+ * @brief Gets the type of the account.
37
+ * @return The type of the account
38
+ */
39
+ AccountType getType () const ;
40
+ /* *
41
+ * @brief Sets the type of the account.
42
+ * @param type The new type of the account
43
+ */
44
+ void setType (AccountType type);
45
+ /* *
46
+ * @brief Gets whether or not to use the custom currency provided by the metadata.
47
+ * @return True to use the custom currency, else false
48
+ */
49
+ bool getUseCustomCurrency () const ;
50
+ /* *
51
+ * @brief Sets whether or not to use the custom currency provided by the metadata.
52
+ * @param useCustomCurrency True to use the custom currency, else false
53
+ */
54
+ void setUseCustomCurrency (bool useCustomCurrency);
55
+ /* *
56
+ * @brief Gets the custom currency of the account.
57
+ * @brief getUseCustomCurrency() should be checked first to determine whether or not to utilize this custom currency.
58
+ * @return The custom currency of the account
59
+ */
60
+ const CustomCurrency& getCustomCurrency () const ;
61
+ /* *
62
+ * @brief Sets the custom currency of the account.
63
+ * @param customCurrency The new custom currency of the account
64
+ */
65
+ void setCustomCurrency (const CustomCurrency& customCurrency);
66
+ /* *
67
+ * @brief Gets the default transaction type of the account.
68
+ * @return The default transaction type of the account
69
+ */
70
+ TransactionType getDefaultTransactionType () const ;
71
+ /* *
72
+ * @brief Sets the default transaction type of the account.
73
+ * @param defaultTransactionType The new default transaction type of the account
74
+ */
75
+ void setDefaultTransactionType (TransactionType defaultTransactionType);
76
+ /* *
77
+ * @brief Gets the threshold for showing transaction reminders of the account.
78
+ * @return The threshold for showing transaction reminders of the account
79
+ */
80
+ RemindersThreshold getTransactionRemindersThreshold () const ;
81
+ /* *
82
+ * @brief Sets the threshold for showing transaction reminders of the account.
83
+ * @param remindersThreshold The new threshold for showing transaction reminders of the account
84
+ */
85
+ void setTransactionRemindersThreshold (RemindersThreshold remindersThreshold);
86
+ /* *
87
+ * @brief Gets whether or not to show the groups list on the account view.
88
+ * @return True to show groups list, else false
89
+ */
90
+ bool getShowGroupsList () const ;
91
+ /* *
92
+ * @brief Sets whether or not to show the groups list on the account view.
93
+ * @param showGroupsList True to show groups list, else false
94
+ */
95
+ void setShowGroupsList (bool showGroupsList);
96
+ /* *
97
+ * @brief Gets whether or not to show the tags list on the account view.
98
+ * @return True to show tags list, else false
99
+ */
100
+ bool getShowTagsList () const ;
101
+ /* *
102
+ * @brief Sets whether or not to show the tags list on the account view.
103
+ * @param showTagsList True to show tags list, else false
104
+ */
105
+ void setShowTagsList (bool showTagsList);
106
+ /* *
107
+ * @brief Gets the way in which to sort transactions on the account view.
108
+ * @return The SortBy value
109
+ */
110
+ SortBy getSortTransactionsBy () const ;
111
+ /* *
112
+ * @brief Sets the way in which to sort transactions on the account view.
113
+ * @param sortTransactionBy The new SortBy value
114
+ */
115
+ void setSortTransactionsBy (SortBy sortTransactionsBy);
116
+ /* *
117
+ * @brief Gets whether or not to sort transactions from first to last on the account view.
118
+ * @return True to sort first to last, else false
119
+ */
120
+ bool getSortFirstToLast () const ;
121
+ /* *
122
+ * @brief Sets whether or not to sort transactions from first to last on the account view.
123
+ * @param sortFirstToLast True to sort first to last, else false
124
+ */
125
+ void setSortFirstToLast (bool sortFirstToLast);
126
+
127
+ private:
128
+ std::string m_name;
129
+ AccountType m_type;
130
+ bool m_useCustomCurrency;
131
+ CustomCurrency m_customCurrency;
132
+ TransactionType m_defaultTransactionType;
133
+ RemindersThreshold m_transactionRemindersThreshold;
134
+ bool m_showGroupsList;
135
+ bool m_showTagsList;
136
+ SortBy m_sortTransactionsBy;
137
+ bool m_sortFirstToLast;
138
+ };
139
+ }
140
+
141
+ #endif // ACCOUNTMETADATA_H
0 commit comments