alkimia  8.0.2
Classes | Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
AlkOnlineQuote Class Reference

#include <alkonlinequote.h>

Inheritance diagram for AlkOnlineQuote:

Classes

class  Errors
 
class  Private
 

Public Slots

bool launch (const QString &_symbol, const QString &_id, const QString &_source=QString())
 
const Errorserrors ()
 

Signals

void quote (QString id, QString symbol, QDate date, double price)
 
void failed (QString id, QString symbol)
 
void status (QString s)
 
void error (QString s)
 

Public Member Functions

 AlkOnlineQuote (AlkOnlineQuotesProfile *profile=0, QObject *=0)
 
 ~AlkOnlineQuote ()
 
AlkOnlineQuotesProfileprofile ()
 
void setProfile (AlkOnlineQuotesProfile *profile)
 
void setAcceptLanguage (const QString &language)
 

Private Attributes

Private *const d
 

Detailed Description

Retrieves a price quote from a web-based quote source

Author
Ace Jones acejo.nosp@m.nes@.nosp@m.users.nosp@m..sou.nosp@m.rcefo.nosp@m.rge..nosp@m.net

Definition at line 37 of file alkonlinequote.h.

Constructor & Destructor Documentation

◆ AlkOnlineQuote()

AlkOnlineQuote::AlkOnlineQuote ( AlkOnlineQuotesProfile profile = 0,
QObject *  _parent = 0 
)
explicit

◆ ~AlkOnlineQuote()

AlkOnlineQuote::~AlkOnlineQuote ( )

Definition at line 532 of file alkonlinequote.cpp.

References d.

Member Function Documentation

◆ error

void AlkOnlineQuote::error ( QString  s)
signal

◆ errors

const AlkOnlineQuote::Errors & AlkOnlineQuote::errors ( )
slot

If launch(), launchNative() or launchFinanceQuote() returns false, this method can be used to get details about the errors that occurred.

Returns
bit map of errors, see class Errors for details

Definition at line 579 of file alkonlinequote.cpp.

References d, and AlkOnlineQuote::Private::m_errors.

Referenced by AlkOnlineQuotesWidget::Private::slotCheckEntry().

◆ failed

void AlkOnlineQuote::failed ( QString  id,
QString  symbol 
)
signal

◆ launch

bool AlkOnlineQuote::launch ( const QString &  _symbol,
const QString &  _id,
const QString &  _source = QString() 
)
slot

This launches a web-based quote update for the given _symbol. When the quote is received back from the web source, it will be emitted on the 'quote' signal.

Parameters
_symbolthe trading symbol of the stock to fetch a price for
_idan arbitrary identifier, which will be emitted in the quote signal when a price is sent back.
_sourcethe source of the quote (must be a valid value returned by quoteSources(). Send QString() to use the default source.
Returns
bool Whether the quote fetch process was launched successfully In case of failures it returns false and errors() could be used to get error details.

Definition at line 566 of file alkonlinequote.cpp.

References d, AlkOnlineQuote::Private::launchFinanceQuote(), AlkOnlineQuote::Private::launchNative(), AlkOnlineQuote::Private::launchWebKitCssSelector(), and AlkOnlineQuote::Private::launchWebKitHtmlParser().

Referenced by AlkOnlineQuotesWidget::Private::slotCheckEntry().

◆ profile()

AlkOnlineQuotesProfile * AlkOnlineQuote::profile ( )

Definition at line 537 of file alkonlinequote.cpp.

References d, and AlkOnlineQuote::Private::m_profile.

Referenced by AlkOnlineQuote(), and setProfile().

◆ quote

void AlkOnlineQuote::quote ( QString  id,
QString  symbol,
QDate  date,
double  price 
)
signal

◆ setAcceptLanguage()

void AlkOnlineQuote::setAcceptLanguage ( const QString &  language)

Set accepted language the online quote should be returned for

Parameters
languageaccepted language to set

Definition at line 561 of file alkonlinequote.cpp.

References d, and AlkOnlineQuote::Private::m_acceptLanguage.

Referenced by AlkOnlineQuotesWidget::Private::slotCheckEntry().

◆ setProfile()

void AlkOnlineQuote::setProfile ( AlkOnlineQuotesProfile profile)

◆ status

void AlkOnlineQuote::status ( QString  s)
signal

Member Data Documentation

◆ d

Private* const AlkOnlineQuote::d
private

The documentation for this class was generated from the following files: