File indexing completed on 2024-04-28 16:13:26

0001 /*
0002     SPDX-FileCopyrightText: 2004 Ace Jones acejones @users.sourceforge.net
0003 
0004     This file is part of libalkimia.
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef ALKQUOTERECEIVER_H
0010 #define ALKQUOTERECEIVER_H
0011 
0012 #include <alkimia/alkvalue.h>
0013 
0014 #include <QDate>
0015 #include <QObject>
0016 #include <QStringList>
0017 
0018 class AlkOnlineQuote;
0019 
0020 namespace convertertest {
0021 /**
0022 Simple class to handle signals/slots for unit tests
0023 
0024 @author Ace Jones acejones @users.sourceforge.net
0025 */
0026 class ALK_NO_EXPORT AlkQuoteReceiver : public QObject
0027 {
0028     Q_OBJECT
0029 public:
0030     explicit AlkQuoteReceiver(AlkOnlineQuote *q, QObject *parent = 0);
0031     ~AlkQuoteReceiver();
0032     void setVerbose(bool verbose)
0033     {
0034         m_verbose = verbose;
0035     }
0036 
0037 public Q_SLOTS:
0038     void slotGetQuote(const QString &, const QString &, const QDate &, const double &);
0039     void slotStatus(const QString &);
0040     void slotError(const QString &);
0041 public:
0042     QStringList m_statuses;
0043     QStringList m_errors;
0044     AlkValue m_price;
0045     QDate m_date;
0046 protected:
0047     bool m_verbose;
0048 };
0049 } // end namespace convertertest
0050 
0051 #endif // ALKQUOTERECEIVER_H