10#include "alkfinancequoteprocess.h"
16class AlkFinanceQuoteProcess::Private
24 Private() : m_isDone(false)
29AlkFinanceQuoteProcess::AlkFinanceQuoteProcess()
32 d->m_fqNames[
"aex"] =
"AEX";
33 d->m_fqNames[
"aex_futures"] =
"AEX Futures";
34 d->m_fqNames[
"aex_options"] =
"AEX Options";
35 d->m_fqNames[
"amfiindia"] =
"AMFI India";
36 d->m_fqNames[
"asegr"] =
"ASE";
37 d->m_fqNames[
"asia"] =
"Asia (Yahoo, ...)";
38 d->m_fqNames[
"asx"] =
"ASX";
39 d->m_fqNames[
"australia"] =
"Australia (ASX, Yahoo, ...)";
40 d->m_fqNames[
"bmonesbittburns"] =
"BMO NesbittBurns";
41 d->m_fqNames[
"brasil"] =
"Brasil (Yahoo, ...)";
42 d->m_fqNames[
"canada"] =
"Canada (Yahoo, ...)";
43 d->m_fqNames[
"canadamutual"] =
"Canada Mutual (Fund Library, ...)";
44 d->m_fqNames[
"deka"] =
"Deka Investments";
45 d->m_fqNames[
"dutch"] =
"Dutch (AEX, ...)";
46 d->m_fqNames[
"dwsfunds"] =
"DWS";
47 d->m_fqNames[
"europe"] =
"Europe (Yahoo, ...)";
48 d->m_fqNames[
"fidelity"] =
"Fidelity (Fidelity, ...)";
49 d->m_fqNames[
"fidelity_direct"] =
"Fidelity Direct";
50 d->m_fqNames[
"financecanada"] =
"Finance Canada";
51 d->m_fqNames[
"ftportfolios"] =
"First Trust (First Trust, ...)";
52 d->m_fqNames[
"ftportfolios_direct"] =
"First Trust Portfolios";
53 d->m_fqNames[
"fundlibrary"] =
"Fund Library";
54 d->m_fqNames[
"greece"] =
"Greece (ASE, ...)";
55 d->m_fqNames[
"indiamutual"] =
"India Mutual (AMFI, ...)";
56 d->m_fqNames[
"maninv"] =
"Man Investments";
57 d->m_fqNames[
"fool"] =
"Motley Fool";
58 d->m_fqNames[
"nasdaq"] =
"Nasdaq (Yahoo, ...)";
59 d->m_fqNames[
"nz"] =
"New Zealand (Yahoo, ...)";
60 d->m_fqNames[
"nyse"] =
"NYSE (Yahoo, ...)";
61 d->m_fqNames[
"nzx"] =
"NZX";
62 d->m_fqNames[
"platinum"] =
"Platinum Asset Management";
63 d->m_fqNames[
"seb_funds"] =
"SEB";
64 d->m_fqNames[
"sharenet"] =
"Sharenet";
65 d->m_fqNames[
"za"] =
"South Africa (Sharenet, ...)";
66 d->m_fqNames[
"troweprice_direct"] =
"T. Rowe Price";
67 d->m_fqNames[
"troweprice"] =
"T. Rowe Price";
68 d->m_fqNames[
"tdefunds"] =
"TD Efunds";
69 d->m_fqNames[
"tdwaterhouse"] =
"TD Waterhouse Canada";
70 d->m_fqNames[
"tiaacref"] =
"TIAA-CREF";
71 d->m_fqNames[
"trustnet"] =
"Trustnet";
72 d->m_fqNames[
"uk_unit_trusts"] =
"U.K. Unit Trusts";
73 d->m_fqNames[
"unionfunds"] =
"Union Investments";
74 d->m_fqNames[
"tsp"] =
"US Govt. Thrift Savings Plan";
75 d->m_fqNames[
"usfedbonds"] =
"US Treasury Bonds";
76 d->m_fqNames[
"usa"] =
"USA (Yahoo, Fool ...)";
77 d->m_fqNames[
"vanguard"] =
"Vanguard";
78 d->m_fqNames[
"vwd"] =
"VWD";
79 d->m_fqNames[
"yahoo"] =
"Yahoo";
80 d->m_fqNames[
"yahoo_asia"] =
"Yahoo Asia";
81 d->m_fqNames[
"yahoo_australia"] =
"Yahoo Australia";
82 d->m_fqNames[
"yahoo_brasil"] =
"Yahoo Brasil";
83 d->m_fqNames[
"yahoo_europe"] =
"Yahoo Europe";
84 d->m_fqNames[
"yahoo_nz"] =
"Yahoo New Zealand";
85 d->m_fqNames[
"zifunds"] =
"Zuerich Investments";
86 connect(
this, SIGNAL(readyReadStandardOutput()),
this, SLOT(slotReceivedDataFromFilter()));
91void AlkFinanceQuoteProcess::slotReceivedDataFromFilter()
99void AlkFinanceQuoteProcess::slotProcessExited()
109 qDebug() <<
"running perl" << scriptPath <<
"-t";
111 *
this <<
"perl" << scriptPath <<
"-t";
115 qWarning(
"Unable to start FQ script");
119void AlkFinanceQuoteProcess::launch(
const QString &scriptPath)
123 qDebug() <<
"running" <<
"perl" << scriptPath <<
"-l";
125 *
this <<
"perl" << scriptPath <<
"-l";
129 qWarning(
"Unable to start FQ script");
133bool AlkFinanceQuoteProcess::isFinished()
const
138const QStringList AlkFinanceQuoteProcess::getSourceList()
const
140 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
147 for (it = raw.
begin(); it != raw.
end(); ++it) {
148 if (d->m_fqNames[*it].
isEmpty()) {
151 sources.
append(d->m_fqNames[*it]);
158const QString AlkFinanceQuoteProcess::crypticName(
const QString &niceName)
const
161 Private::fqNameMap::const_iterator it;
162 for (it = d->m_fqNames.
begin(); it != d->m_fqNames.
end(); ++it) {
163 if (niceName == it.value()) {
171const QString AlkFinanceQuoteProcess::niceName(
const QString &crypticName)
const
173 QString ret(d->m_fqNames[crypticName]);
void testLaunch(const QString &scriptPath)
Check that all modules for Finance::Quote are installed.
void setOutputChannelMode(OutputChannelMode mode)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
void append(QList< T > &&value)
bool isEmpty() const const
QByteArray readAllStandardOutput()
bool waitForStarted(int msecs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
void sort(Qt::CaseSensitivity cs)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)