File indexing completed on 2024-12-08 03:37:09

0001 /*
0002     SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef ATTICA_ACCOUNTBALANCE_H
0008 #define ATTICA_ACCOUNTBALANCE_H
0009 
0010 #include <QSharedDataPointer>
0011 #include <QString>
0012 
0013 #include "attica_export.h"
0014 
0015 namespace Attica
0016 {
0017 /**
0018  * @class AccountBalance accountbalance.h <Attica/AccountBalance>
0019  *
0020  * Represents the money in the account of the user
0021  */
0022 class ATTICA_EXPORT AccountBalance
0023 {
0024 public:
0025     typedef QList<AccountBalance> List;
0026     class Parser;
0027 
0028     /**
0029      * Creates an empty AccountBalance
0030      */
0031     AccountBalance();
0032 
0033     /**
0034      * Copy constructor.
0035      * @param other the AccountBalance to copy from
0036      */
0037     AccountBalance(const AccountBalance &other);
0038 
0039     /**
0040      * Assignment operator.
0041      * @param other the AccountBalance to assign from
0042      * @return pointer to this AccountBalance
0043      */
0044     AccountBalance &operator=(const AccountBalance &other);
0045 
0046     /**
0047      * Destructor.
0048      */
0049     ~AccountBalance();
0050 
0051     /**
0052      * Sets the currency in use.
0053      * @param currency the new currency (Euro, US Dollar)
0054      */
0055     void setCurrency(const QString &currency);
0056 
0057     /**
0058      * Gets the currency.
0059      * @return the currency
0060      */
0061     QString currency() const;
0062 
0063     /**
0064      * Sets the balance.
0065      * @param balance
0066      */
0067     void setBalance(const QString &name);
0068 
0069     /**
0070      * Gets the balance.
0071      * @return the amount of money in the account
0072      */
0073     QString balance() const;
0074 
0075 private:
0076     class Private;
0077     QSharedDataPointer<Private> d;
0078 };
0079 
0080 }
0081 
0082 #endif // ACCOUNTBALANCE_H