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

0001 /*
0002     SPDX-FileCopyrightText: 2004 Ace Jones acejones @users.sourceforge.net
0003     SPDX-FileCopyrightText: 2004 Thomas Baumgart <thb@net-bembel.de>
0004 
0005     This file is part of libalkimia.
0006 
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef ALKFINANCEQUOTEPROCESS_H
0011 #define ALKFINANCEQUOTEPROCESS_H
0012 
0013 #include <alkimia/alk_export.h>
0014 
0015 #include <KProcess>
0016 
0017 /**
0018 Helper class to run the Finance::Quote process. This is used only for the purpose of obtaining
0019 a list of valid sources. The actual price quotes are obtained thru AlkFinanceQouteProcess.
0020 The class also contains functions to convert between the rather cryptic source names used
0021 by the Finance::Quote package, and more user-friendly names.
0022 
0023 @author Thomas Baumgart <thb@net-bembel.de> & Ace Jones acejones @users.sourceforge.net, Tony B<tonybloom@users.sourceforge.net>
0024  */
0025 class ALK_EXPORT AlkFinanceQuoteProcess : public KProcess
0026 {
0027     Q_OBJECT
0028 public:
0029     AlkFinanceQuoteProcess();
0030     void launch(const QString &scriptPath);
0031     bool isFinished() const;
0032     const QStringList getSourceList() const;
0033     const QString crypticName(const QString &niceName) const;
0034     const QString niceName(const QString &crypticName) const;
0035 
0036 public slots:
0037     void slotReceivedDataFromFilter();
0038     void slotProcessExited();
0039 
0040 private:
0041     class Private;
0042     Private *const d;
0043 };
0044 
0045 #endif // ALKFINANCEQUOTEPROCESS_H