File indexing completed on 2024-12-01 04:37:42
0001 /* 0002 SPDX-FileCopyrightText: 2011 Alvaro Soliverez asoliverez @kde.org 0003 0004 This file is part of libalkimia. 0005 0006 SPDX-License-Identifier: LGPL-2.1-or-later 0007 */ 0008 0009 #ifndef ALKQUOTEITEM_H 0010 #define ALKQUOTEITEM_H 0011 0012 #include <alkimia/alkvalue.h> 0013 0014 #include <QDate> 0015 #include <QDBusArgument> 0016 #include <QMetaType> 0017 #include <QTime> 0018 0019 /** 0020 * This class represents a single quote of an equity 0021 * It holds information of use to assess the equity value 0022 */ 0023 0024 class ALK_NO_EXPORT AlkQuoteItem : public QObject 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit AlkQuoteItem(QObject *parent = 0); 0030 ~AlkQuoteItem(); 0031 0032 AlkQuoteItem(const AlkQuoteItem &item, QObject *parent = 0); 0033 0034 /** 0035 * This is the symbol of the equity 0036 */ 0037 const QString &symbol() const; 0038 0039 /** 0040 * Date and time of the quote 0041 */ 0042 const QDateTime &dateTime() const; 0043 0044 /** 0045 * Value of the share at the time of the quote 0046 */ 0047 const AlkValue ¤tValue() const; 0048 0049 /** 0050 * Value of the share when the market opened 0051 */ 0052 const AlkValue &openingValue() const; 0053 0054 /** 0055 * Highest value of the share since the market opened that day 0056 */ 0057 const AlkValue &highValue() const; 0058 0059 /** 0060 * Lowest value of the share since the market opened that day 0061 */ 0062 const AlkValue &lowValue() const; 0063 0064 /** 0065 * Value of the share when the market closed 0066 */ 0067 const AlkValue &closingValue() const; 0068 0069 /** 0070 * Number of shares traded 0071 */ 0072 const AlkValue &volume() const; 0073 0074 /** 0075 * Market capitalization 0076 */ 0077 const AlkValue &marketCap() const; 0078 0079 /** 0080 * Earning per share 0081 */ 0082 const AlkValue &earningsPerShare() const; 0083 0084 /** 0085 * Today's change 0086 */ 0087 const AlkValue &changeToday() const; 0088 0089 /** 0090 * Earnings Before Interest, Taxes, Depreciation, and Amortization 0091 */ 0092 const AlkValue &ebitda() const; 0093 0094 /** 0095 * Internal id 0096 */ 0097 const QString &recordId() const; 0098 0099 void setSymbol(const QString &symbol); 0100 void setDateTime(const QDateTime &datetime); 0101 void setCurrentValue(const AlkValue &value); 0102 void setOpeningValue(const AlkValue &value); 0103 void setHighValue(const AlkValue &value); 0104 void setLowValue(const AlkValue &value); 0105 void setClosingValue(const AlkValue &value); 0106 void setVolume(const AlkValue &value); 0107 void setMarketCap(const AlkValue &value); 0108 void setEarningsPerShare(const AlkValue &value); 0109 void setChangeToday(const AlkValue &value); 0110 void setEbitda(const AlkValue &value); 0111 void setRecordId(const QString &recordId); 0112 0113 private: 0114 /// \internal d-pointer class. 0115 class Private; 0116 /// \internal d-pointer instance. 0117 Private *const d; 0118 }; 0119 0120 ALK_NO_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const AlkQuoteItem &item); 0121 ALK_NO_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, AlkQuoteItem &item); 0122 0123 Q_DECLARE_METATYPE(AlkQuoteItem) 0124 0125 #endif