alkimia
8.0.3
src
alkquotereceiver.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright 2004 Ace Jones <acejones@users.sourceforge.net> *
3
* *
4
* This file is part of libalkimia. *
5
* *
6
* libalkimia is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU General Public License *
8
* as published by the Free Software Foundation; either version 2.1 of *
9
* the License or (at your option) version 3 or any later version. *
10
* *
11
* libalkimia is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU General Public License *
17
* along with this program. If not, see <http://www.gnu.org/licenses/> *
18
***************************************************************************/
19
20
#include "
alkquotereceiver.h
"
21
#include "
alkonlinequote.h
"
22
23
#include <QtDebug>
24
25
convertertest::AlkQuoteReceiver::AlkQuoteReceiver
(
AlkOnlineQuote
*q, QObject *parent)
26
: QObject(parent)
27
{
28
connect(q, SIGNAL(quote(QString,QString,QDate,
double
)),
29
this
, SLOT(
slotGetQuote
(QString,QString,QDate,
double
)));
30
connect(q, SIGNAL(status(QString)),
31
this
, SLOT(
slotStatus
(QString)));
32
connect(q, SIGNAL(error(QString)),
33
this
, SLOT(
slotError
(QString)));
34
}
35
36
convertertest::AlkQuoteReceiver::~AlkQuoteReceiver
()
37
{
38
}
39
40
void
convertertest::AlkQuoteReceiver::slotGetQuote
(
const
QString &a,
const
QString &b,
41
const
QDate &d,
const
double
&m)
42
{
43
if
(m_verbose) {
44
qDebug() <<
"test::AlkQuoteReceiver::slotGetQuote( , "
<< a <<
" , "
<< b <<
" , "
<< d
45
<<
" , "
<< m <<
" )"
;
46
}
47
m_price =
AlkValue
(m);
48
m_date = d;
49
}
50
51
void
convertertest::AlkQuoteReceiver::slotStatus
(
const
QString &msg)
52
{
53
if
(m_verbose) {
54
qDebug() <<
"test::AlkQuoteReceiver::slotStatus( "
<< msg <<
" )"
;
55
}
56
57
m_statuses += msg;
58
}
59
60
void
convertertest::AlkQuoteReceiver::slotError
(
const
QString &msg)
61
{
62
if
(m_verbose) {
63
qDebug() <<
"test::AlkQuoteReceiver::slotError( "
<< msg <<
" )"
;
64
}
65
66
m_errors += msg;
67
}
convertertest::AlkQuoteReceiver::slotStatus
void slotStatus(const QString &)
Definition:
alkquotereceiver.cpp:51
convertertest::AlkQuoteReceiver::slotGetQuote
void slotGetQuote(const QString &, const QString &, const QDate &, const double &)
Definition:
alkquotereceiver.cpp:40
convertertest::AlkQuoteReceiver::~AlkQuoteReceiver
~AlkQuoteReceiver()
Definition:
alkquotereceiver.cpp:36
alkquotereceiver.h
alkonlinequote.h
convertertest::AlkQuoteReceiver::AlkQuoteReceiver
AlkQuoteReceiver(AlkOnlineQuote *q, QObject *parent=0)
Definition:
alkquotereceiver.cpp:25
AlkOnlineQuote
Definition:
alkonlinequote.h:38
AlkValue
convertertest::AlkQuoteReceiver::slotError
void slotError(const QString &)
Definition:
alkquotereceiver.cpp:60
Generated by
1.8.18