alkimia
8.0.3
|
#include <alkonlinequotesource.h>
Classes | |
class | Private |
Public Member Functions | |
AlkOnlineQuoteSource () | |
AlkOnlineQuoteSource (const QString &name, AlkOnlineQuotesProfile *profile) | |
AlkOnlineQuoteSource (const QString &name, const QString &url, const QString &sym, const QString &price, const QString &date, const QString &dateformat, bool skipStripping=false) | |
~AlkOnlineQuoteSource () | |
AlkOnlineQuoteSource (const AlkOnlineQuoteSource &other) | |
AlkOnlineQuoteSource & | operator= (AlkOnlineQuoteSource other) |
bool | isEmpty () |
bool | isValid () |
bool | read () |
bool | write () |
void | rename (const QString &name) |
void | remove () |
QString | name () const |
QString | url () const |
QString | sym () const |
QString | price () const |
QString | date () const |
QString | dateformat () const |
QString | financeQuoteName () const |
bool | skipStripping () const |
bool | isGHNS () |
bool | isReadOnly () |
bool | isFinanceQuote () const |
void | setName (const QString &name) |
void | setUrl (const QString &url) |
void | setSym (const QString &symbol) |
void | setPrice (const QString &price) |
void | setDate (const QString &date) |
void | setDateformat (const QString &dateformat) |
void | setSkipStripping (bool state) |
void | setGHNS (bool state) |
QString | ghnsWriteFileName () |
void | setProfile (AlkOnlineQuotesProfile *profile) |
AlkOnlineQuotesProfile * | profile () |
Static Public Member Functions | |
static bool | isFinanceQuote (const QString &name) |
Protected Attributes | |
Private * | d |
Friends | |
void | swap (AlkOnlineQuoteSource &first, AlkOnlineQuoteSource &second) |
This is a helper class to store information about an online source for stock prices or currency exchange rates.
Definition at line 35 of file alkonlinequotesource.h.
AlkOnlineQuoteSource::AlkOnlineQuoteSource | ( | ) |
Definition at line 195 of file alkonlinequotesource.cpp.
|
explicit |
Definition at line 227 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuotesProfile::defaultQuoteSources(), AlkOnlineQuoteSource::Private::m_name, AlkOnlineQuoteSource::Private::m_profile, name(), AlkOnlineQuotesProfile::None, profile(), read(), and AlkOnlineQuotesProfile::type().
|
explicit |
Definition at line 211 of file alkonlinequotesource.cpp.
References d, date(), dateformat(), AlkOnlineQuoteSource::Private::m_date, AlkOnlineQuoteSource::Private::m_dateformat, AlkOnlineQuoteSource::Private::m_isGHNSSource, AlkOnlineQuoteSource::Private::m_name, AlkOnlineQuoteSource::Private::m_price, AlkOnlineQuoteSource::Private::m_skipStripping, AlkOnlineQuoteSource::Private::m_sym, AlkOnlineQuoteSource::Private::m_url, name(), price(), skipStripping(), sym(), and url().
AlkOnlineQuoteSource::~AlkOnlineQuoteSource | ( | ) |
Definition at line 239 of file alkonlinequotesource.cpp.
References d.
AlkOnlineQuoteSource::AlkOnlineQuoteSource | ( | const AlkOnlineQuoteSource & | other | ) |
Definition at line 200 of file alkonlinequotesource.cpp.
QString AlkOnlineQuoteSource::date | ( | ) | const |
Definition at line 274 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_date.
Referenced by AlkOnlineQuoteSource(), and setDate().
QString AlkOnlineQuoteSource::dateformat | ( | ) | const |
Definition at line 279 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_dateformat.
Referenced by AlkOnlineQuoteSource(), and setDateformat().
QString AlkOnlineQuoteSource::financeQuoteName | ( | ) | const |
Returns the name of the "Finance::Quote" source. This function only makes sense if the current source is of the specified type.
Definition at line 291 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_name.
QString AlkOnlineQuoteSource::ghnsWriteFileName | ( | ) |
Definition at line 372 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::ghnsWriteFilePath().
bool AlkOnlineQuoteSource::isEmpty | ( | ) |
Definition at line 244 of file alkonlinequotesource.cpp.
References d, isValid(), and AlkOnlineQuoteSource::Private::m_url.
Referenced by AlkOnlineQuotesProfile::Private::quoteSourcesGHNS().
bool AlkOnlineQuoteSource::isFinanceQuote | ( | ) | const |
Checks whether the current source is of type "Finance::Quote"
Definition at line 357 of file alkonlinequotesource.cpp.
References d, fqName, and AlkOnlineQuoteSource::Private::m_name.
Referenced by AlkOnlineQuote::launch(), and AlkOnlineQuotesWidget::Private::slotLoadWidgets().
|
static |
Checks whether the specified source name is of type "Finance::Quote"
Definition at line 367 of file alkonlinequotesource.cpp.
bool AlkOnlineQuoteSource::isGHNS | ( | ) |
Definition at line 342 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_isGHNSSource.
bool AlkOnlineQuoteSource::isReadOnly | ( | ) |
Definition at line 347 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_readOnly.
bool AlkOnlineQuoteSource::isValid | ( | ) |
Definition at line 249 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_name.
Referenced by isEmpty(), and AlkOnlineQuotesWidget::Private::loadQuotesList().
QString AlkOnlineQuoteSource::name | ( | ) | const |
Definition at line 254 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_name.
Referenced by AlkOnlineQuoteSource(), AlkOnlineQuotesProfile::Private::defaultQuoteSources(), isFinanceQuote(), rename(), setName(), and AlkOnlineQuotesWidget::Private::slotDuplicateEntry().
AlkOnlineQuoteSource & AlkOnlineQuoteSource::operator= | ( | AlkOnlineQuoteSource | other | ) |
Definition at line 205 of file alkonlinequotesource.cpp.
References swap.
QString AlkOnlineQuoteSource::price | ( | ) | const |
Definition at line 269 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_price.
Referenced by AlkOnlineQuoteSource(), and setPrice().
AlkOnlineQuotesProfile * AlkOnlineQuoteSource::profile | ( | ) |
Definition at line 383 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_profile.
Referenced by AlkOnlineQuoteSource(), and setProfile().
bool AlkOnlineQuoteSource::read | ( | ) |
Definition at line 388 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuotesProfile::hasGHNSSupport(), AlkOnlineQuoteSource::Private::m_profile, AlkOnlineQuoteSource::Private::read(), and AlkOnlineQuoteSource::Private::readFromGHNSFile().
Referenced by AlkOnlineQuoteSource().
void AlkOnlineQuoteSource::remove | ( | ) |
Definition at line 428 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuotesProfile::hasGHNSSupport(), AlkOnlineQuoteSource::Private::m_isGHNSSource, AlkOnlineQuoteSource::Private::m_profile, AlkOnlineQuotesProfile::None, AlkOnlineQuoteSource::Private::remove(), AlkOnlineQuoteSource::Private::removeGHNSFile(), and AlkOnlineQuotesProfile::type().
Referenced by rename(), and AlkOnlineQuotesWidget::resetConfig().
void AlkOnlineQuoteSource::rename | ( | const QString & | name | ) |
Definition at line 418 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuoteSource::Private::m_name, AlkOnlineQuoteSource::Private::m_profile, name(), AlkOnlineQuotesProfile::None, remove(), AlkOnlineQuotesProfile::type(), and write().
void AlkOnlineQuoteSource::setDate | ( | const QString & | date | ) |
Definition at line 321 of file alkonlinequotesource.cpp.
References d, date(), and AlkOnlineQuoteSource::Private::m_date.
void AlkOnlineQuoteSource::setDateformat | ( | const QString & | dateformat | ) |
Definition at line 326 of file alkonlinequotesource.cpp.
References d, dateformat(), and AlkOnlineQuoteSource::Private::m_dateformat.
void AlkOnlineQuoteSource::setGHNS | ( | bool | state | ) |
Definition at line 336 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuoteSource::Private::m_isGHNSSource, and AlkOnlineQuoteSource::Private::m_storageChanged.
Referenced by AlkOnlineQuotesWidget::Private::slotDuplicateEntry().
void AlkOnlineQuoteSource::setName | ( | const QString & | name | ) |
Definition at line 301 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuoteSource::Private::m_name, and name().
Referenced by AlkOnlineQuotesProfile::Private::defaultQuoteSources(), and AlkOnlineQuotesWidget::Private::slotDuplicateEntry().
void AlkOnlineQuoteSource::setPrice | ( | const QString & | price | ) |
Definition at line 316 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuoteSource::Private::m_price, and price().
void AlkOnlineQuoteSource::setProfile | ( | AlkOnlineQuotesProfile * | profile | ) |
Definition at line 377 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuoteSource::Private::m_profile, AlkOnlineQuotesProfile::name(), and profile().
Referenced by AlkOnlineQuotesProfile::Private::defaultQuoteSources().
void AlkOnlineQuoteSource::setSkipStripping | ( | bool | state | ) |
Definition at line 331 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_skipStripping.
void AlkOnlineQuoteSource::setSym | ( | const QString & | symbol | ) |
Definition at line 311 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_sym.
void AlkOnlineQuoteSource::setUrl | ( | const QString & | url | ) |
Definition at line 306 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuoteSource::Private::m_url, and url().
bool AlkOnlineQuoteSource::skipStripping | ( | ) | const |
Definition at line 296 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_skipStripping.
Referenced by AlkOnlineQuoteSource().
QString AlkOnlineQuoteSource::sym | ( | ) | const |
Definition at line 264 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_sym.
Referenced by AlkOnlineQuoteSource().
QString AlkOnlineQuoteSource::url | ( | ) | const |
Definition at line 259 of file alkonlinequotesource.cpp.
References d, and AlkOnlineQuoteSource::Private::m_url.
Referenced by AlkOnlineQuoteSource(), and setUrl().
bool AlkOnlineQuoteSource::write | ( | ) |
Definition at line 399 of file alkonlinequotesource.cpp.
References d, AlkOnlineQuotesProfile::hasGHNSSupport(), AlkOnlineQuoteSource::Private::m_isGHNSSource, AlkOnlineQuoteSource::Private::m_profile, AlkOnlineQuoteSource::Private::m_storageChanged, AlkOnlineQuoteSource::Private::remove(), AlkOnlineQuoteSource::Private::removeGHNSFile(), AlkOnlineQuoteSource::Private::write(), and AlkOnlineQuoteSource::Private::writeToGHNSFile().
Referenced by rename(), AlkOnlineQuotesWidget::Private::slotDuplicateEntry(), and AlkOnlineQuotesWidget::Private::slotNewEntry().
|
friend |
Definition at line 91 of file alkonlinequotesource.h.
Referenced by operator=().
|
protected |
Definition at line 88 of file alkonlinequotesource.h.
Referenced by AlkOnlineQuoteSource(), date(), dateformat(), financeQuoteName(), ghnsWriteFileName(), isEmpty(), isFinanceQuote(), isGHNS(), isReadOnly(), isValid(), name(), price(), profile(), read(), remove(), rename(), setDate(), setDateformat(), setGHNS(), setName(), setPrice(), setProfile(), setSkipStripping(), setSym(), setUrl(), skipStripping(), sym(), url(), write(), and ~AlkOnlineQuoteSource().