1 | /* |
2 | SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
5 | */ |
6 | |
7 | #ifndef ATTICA_ACCOUNTBALANCE_H |
8 | #define ATTICA_ACCOUNTBALANCE_H |
9 | |
10 | #include <QSharedDataPointer> |
11 | #include <QString> |
12 | |
13 | #include "attica_export.h" |
14 | |
15 | namespace Attica |
16 | { |
17 | /*! |
18 | * \class Attica::AccountBalance |
19 | * \inheaderfile Attica/AccountBalance |
20 | * \inmodule Attica |
21 | * |
22 | * \brief Represents the money in the account of the user. |
23 | */ |
24 | class ATTICA_EXPORT AccountBalance |
25 | { |
26 | public: |
27 | /*! |
28 | * |
29 | */ |
30 | typedef QList<AccountBalance> List; |
31 | class Parser; |
32 | |
33 | /*! |
34 | * Creates an empty AccountBalance |
35 | */ |
36 | AccountBalance(); |
37 | |
38 | AccountBalance(const AccountBalance &other); |
39 | |
40 | AccountBalance &operator=(const AccountBalance &other); |
41 | |
42 | ~AccountBalance(); |
43 | |
44 | /*! |
45 | * Sets the currency in use. |
46 | * |
47 | * \a currency the new currency (Euro, US Dollar) |
48 | */ |
49 | void setCurrency(const QString ¤cy); |
50 | |
51 | /*! |
52 | * Returns the currency. |
53 | */ |
54 | QString currency() const; |
55 | |
56 | /*! |
57 | * Sets the balance. |
58 | * |
59 | * \a balance |
60 | */ |
61 | void setBalance(const QString &name); |
62 | |
63 | /*! |
64 | * Returns the amount of money in the account |
65 | */ |
66 | QString balance() const; |
67 | |
68 | private: |
69 | class Private; |
70 | QSharedDataPointer<Private> d; |
71 | }; |
72 | |
73 | } |
74 | |
75 | #endif // ACCOUNTBALANCE_H |
76 | |