QuotePlugin Class Reference

#include <QuotePlugin.h>

Inheritance diagram for QuotePlugin:

Inheritance graph
[legend]
Collaboration diagram for QuotePlugin:

Collaboration graph
[legend]

List of all members.

Public Slots

void getFile (QString &)
void copyFile (QString &, QString &)
void getFileDone (QNetworkOperation *)
void copyFileDone (QNetworkOperation *)
void dataReady (const QByteArray &, QNetworkOperation *)
void slotTimeout ()
void getQuotes ()
void downloadComplete ()
void cancelDownload ()
void printStatusLogMessage (QString &)
void help ()
void slotWakeup ()

Signals

void signalGetFileDone (bool)
void signalCopyFileDone (QString)
void signalTimeout ()
void signalProgMessage (int, int)
void chartUpdated ()
void signalWakeup ()

Public Member Functions

 QuotePlugin ()
virtual ~QuotePlugin ()
bool setTFloat (QString &, bool)
void stripJunk (QString &, QString &)
void createDirectory (QString &, QString &)
void getPluginName (QString &)
void getHelpFile (QString &)
void buildGui ()
void enableGUI ()
void disableGUI ()
virtual void update ()
void setChartIndex (DBIndex *)

Public Attributes

QProgressBar * progressBar

Protected Attributes

QString file
float tfloat
bool saveFlag
QString pluginName
QString helpFile
QUrlOperator * op
QString data
QTimer * timer
int errorLoop
QString stringDone
QString stringCanceled
QTextEdit * statusLog
Toolbartoolbar
QVBoxLayout * vbox
QWidget * baseWidget
QGridLayout * grid
QSpinBox * retrySpin
QSpinBox * timeoutSpin
DBIndexchartIndex


Detailed Description

Todo:
Needs to be re-written to not use the QUrlOperator. See http://doc.trolltech.com/4.3/porting4-overview.html#url-operations-qurloperator

Definition at line 42 of file QuotePlugin.h.


Constructor & Destructor Documentation

QuotePlugin::QuotePlugin (  ) 

Definition at line 36 of file QuotePlugin.cpp.

References buildGui(), chartIndex, errorLoop, op, saveFlag, slotTimeout(), stringCanceled, stringDone, and timer.

QuotePlugin::~QuotePlugin (  )  [virtual]

Definition at line 51 of file QuotePlugin.cpp.

References op, and timer.


Member Function Documentation

void QuotePlugin::signalGetFileDone ( bool   )  [signal]

Referenced by getFileDone(), NYBOT::NYBOT(), and Yahoo::Yahoo().

void QuotePlugin::signalCopyFileDone ( QString   )  [signal]

Referenced by CME::CME(), and copyFileDone().

void QuotePlugin::signalTimeout (  )  [signal]

Referenced by CME::CME(), NYBOT::NYBOT(), slotTimeout(), and Yahoo::Yahoo().

void QuotePlugin::signalProgMessage ( int  ,
int   
) [signal]

void QuotePlugin::chartUpdated (  )  [signal]

Referenced by downloadComplete().

void QuotePlugin::signalWakeup (  )  [signal]

Referenced by NYBOT::parse(), CSV::parse(), CME::parse(), Yahoo::parseFundamental(), Yahoo::parseHistory(), Yahoo::parseQuote(), and slotWakeup().

bool QuotePlugin::setTFloat ( QString &  d,
bool  flag 
)

Definition at line 177 of file QuotePlugin.cpp.

References tfloat.

Referenced by NYBOT::parse(), CSV::parse(), CME::parse(), Yahoo::parseHistory(), Yahoo::parseQuote(), and CME::saveTodayData().

void QuotePlugin::stripJunk ( QString &  d,
QString &  s 
)

Definition at line 163 of file QuotePlugin.cpp.

Referenced by NYBOT::parse(), CSV::parse(), Yahoo::parseHistory(), and Yahoo::parseQuote().

void QuotePlugin::createDirectory ( QString &  d,
QString &  path 
)

Definition at line 212 of file QuotePlugin.cpp.

References Config::DataPath, and Config::getData().

Referenced by NYBOT::parse(), CSV::parse(), and CME::parse().

void QuotePlugin::getPluginName ( QString &  d  ) 

Definition at line 235 of file QuotePlugin.cpp.

References pluginName.

void QuotePlugin::getHelpFile ( QString &  d  ) 

Definition at line 240 of file QuotePlugin.cpp.

References helpFile.

void QuotePlugin::buildGui (  ) 

Reimplemented in CME, NYBOT, and Yahoo.

Definition at line 67 of file QuotePlugin.cpp.

References Toolbar::addButton(), baseWidget, cancelDownload(), Toolbar::getButton(), getQuotes(), grid, help(), Toolbar::Horizontal, progressBar, retrySpin, Toolbar::setButtonStatus(), statusLog, timeoutSpin, toolbar, and vbox.

Referenced by QuotePlugin().

void QuotePlugin::enableGUI (  ) 

Definition at line 363 of file QuotePlugin.cpp.

References Toolbar::setButtonStatus(), and toolbar.

Referenced by cancelDownload(), and downloadComplete().

void QuotePlugin::disableGUI (  ) 

Definition at line 371 of file QuotePlugin.cpp.

References Toolbar::setButtonStatus(), and toolbar.

Referenced by getQuotes().

void QuotePlugin::update (  )  [virtual]

Reimplemented in CME, CSV, NYBOT, and Yahoo.

Definition at line 391 of file QuotePlugin.cpp.

Referenced by getQuotes().

void QuotePlugin::setChartIndex ( DBIndex d  ) 

Definition at line 62 of file QuotePlugin.cpp.

References chartIndex.

Referenced by QtstalkerApp::slotQuotes().

void QuotePlugin::getFile ( QString &  url  )  [slot]

Definition at line 245 of file QuotePlugin.cpp.

References data, dataReady(), getFileDone(), op, timeoutSpin, and timer.

Referenced by Yahoo::startDownload(), NYBOT::timeoutError(), and NYBOT::update().

void QuotePlugin::copyFile ( QString &  url,
QString &  file 
) [slot]

Definition at line 264 of file QuotePlugin.cpp.

References copyFileDone(), op, timeoutSpin, and timer.

Referenced by CME::startDownload().

void QuotePlugin::getFileDone ( QNetworkOperation *  o  )  [slot]

Definition at line 282 of file QuotePlugin.cpp.

References signalGetFileDone(), and timer.

Referenced by getFile().

void QuotePlugin::copyFileDone ( QNetworkOperation *  o  )  [slot]

Definition at line 301 of file QuotePlugin.cpp.

References file, signalCopyFileDone(), and timer.

Referenced by copyFile().

void QuotePlugin::dataReady ( const QByteArray &  d,
QNetworkOperation *   
) [slot]

Definition at line 326 of file QuotePlugin.cpp.

References data.

Referenced by getFile().

void QuotePlugin::slotTimeout (  )  [slot]

Definition at line 333 of file QuotePlugin.cpp.

References op, signalTimeout(), and timer.

Referenced by QuotePlugin().

void QuotePlugin::getQuotes (  )  [slot]

Definition at line 341 of file QuotePlugin.cpp.

References disableGUI(), printStatusLogMessage(), statusLog, and update().

Referenced by buildGui().

void QuotePlugin::downloadComplete (  )  [slot]

Definition at line 350 of file QuotePlugin.cpp.

References chartUpdated(), and enableGUI().

Referenced by Yahoo::cancelUpdate(), CME::cancelUpdate(), Yahoo::fileDone(), NYBOT::fileDone(), CME::fileDone(), NYBOT::parse(), CSV::parse(), Yahoo::timeoutError(), NYBOT::timeoutError(), CME::timeoutError(), and Yahoo::update().

void QuotePlugin::cancelDownload (  )  [slot]

Definition at line 356 of file QuotePlugin.cpp.

References enableGUI(), and printStatusLogMessage().

Referenced by buildGui().

void QuotePlugin::printStatusLogMessage ( QString &  d  )  [slot]

Definition at line 379 of file QuotePlugin.cpp.

References statusLog.

Referenced by cancelDownload(), Yahoo::cancelUpdate(), CME::cancelUpdate(), Yahoo::fileDone(), NYBOT::fileDone(), CME::fileDone(), getQuotes(), CSV::openDb(), NYBOT::parse(), CSV::parse(), CME::parse(), Yahoo::parseFundamental(), Yahoo::parseHistory(), CME::parseHistory(), Yahoo::parseQuote(), Yahoo::printErrorList(), CSV::reloadTimerChanged(), CME::startDownload(), Yahoo::timeoutError(), NYBOT::timeoutError(), CME::timeoutError(), and Yahoo::update().

void QuotePlugin::help (  )  [slot]

Reimplemented in CSV.

Definition at line 384 of file QuotePlugin.cpp.

References helpFile.

Referenced by buildGui().

void QuotePlugin::slotWakeup (  )  [slot]

Definition at line 395 of file QuotePlugin.cpp.

References signalWakeup().


Member Data Documentation

QProgressBar* QuotePlugin::progressBar

Definition at line 67 of file QuotePlugin.h.

Referenced by buildGui(), Yahoo::cancelUpdate(), Yahoo::fileDone(), CSV::parse(), and Yahoo::startDownload().

QString QuotePlugin::file [protected]

Reimplemented in CSV, and NYBOT.

Definition at line 84 of file QuotePlugin.h.

Referenced by CME::CME(), copyFileDone(), Yahoo::parseHistory(), CME::parseHistory(), Yahoo::parseQuote(), CME::parseToday(), CME::startDownload(), CME::update(), and Yahoo::Yahoo().

float QuotePlugin::tfloat [protected]

Definition at line 85 of file QuotePlugin.h.

Referenced by NYBOT::parse(), CSV::parse(), CME::parse(), Yahoo::parseHistory(), Yahoo::parseQuote(), CME::saveTodayData(), and setTFloat().

bool QuotePlugin::saveFlag [protected]

Definition at line 86 of file QuotePlugin.h.

Referenced by QuotePlugin().

QString QuotePlugin::pluginName [protected]

Definition at line 87 of file QuotePlugin.h.

Referenced by CME::CME(), Yahoo::createAutoHistoryUrls(), CSV::CSV(), getPluginName(), NYBOT::NYBOT(), CSV::openDb(), NYBOT::parse(), CME::parse(), Yahoo::parseFundamental(), Yahoo::parseHistory(), Yahoo::parseQuote(), and Yahoo::Yahoo().

QString QuotePlugin::helpFile [protected]

Definition at line 88 of file QuotePlugin.h.

Referenced by CME::CME(), CSV::CSV(), getHelpFile(), CSV::help(), help(), NYBOT::NYBOT(), and Yahoo::Yahoo().

QUrlOperator* QuotePlugin::op [protected]

Definition at line 89 of file QuotePlugin.h.

Referenced by Yahoo::cancelUpdate(), CME::cancelUpdate(), copyFile(), getFile(), QuotePlugin(), slotTimeout(), and ~QuotePlugin().

QString QuotePlugin::data [protected]

Definition at line 90 of file QuotePlugin.h.

Referenced by dataReady(), NYBOT::fileDone(), getFile(), NYBOT::parse(), Yahoo::parseFundamental(), Yahoo::parseHistory(), and Yahoo::parseQuote().

QTimer* QuotePlugin::timer [protected]

Definition at line 91 of file QuotePlugin.h.

Referenced by Yahoo::cancelUpdate(), CME::cancelUpdate(), copyFile(), copyFileDone(), getFile(), getFileDone(), QuotePlugin(), slotTimeout(), and ~QuotePlugin().

int QuotePlugin::errorLoop [protected]

Definition at line 92 of file QuotePlugin.h.

Referenced by Yahoo::fileDone(), QuotePlugin(), Yahoo::timeoutError(), NYBOT::timeoutError(), CME::timeoutError(), Yahoo::update(), NYBOT::update(), and CME::update().

QString QuotePlugin::stringDone [protected]

Definition at line 93 of file QuotePlugin.h.

Referenced by Yahoo::fileDone(), CME::fileDone(), CSV::parse(), QuotePlugin(), Yahoo::timeoutError(), and CME::timeoutError().

QString QuotePlugin::stringCanceled [protected]

Definition at line 94 of file QuotePlugin.h.

Referenced by Yahoo::cancelUpdate(), CME::cancelUpdate(), CSV::parse(), and QuotePlugin().

QTextEdit* QuotePlugin::statusLog [protected]

Definition at line 95 of file QuotePlugin.h.

Referenced by buildGui(), getQuotes(), and printStatusLogMessage().

Toolbar* QuotePlugin::toolbar [protected]

Definition at line 96 of file QuotePlugin.h.

Referenced by Yahoo::buildGui(), buildGui(), CSV::createMainPage(), disableGUI(), and enableGUI().

QVBoxLayout* QuotePlugin::vbox [protected]

Definition at line 97 of file QuotePlugin.h.

Referenced by buildGui().

QWidget* QuotePlugin::baseWidget [protected]

Definition at line 98 of file QuotePlugin.h.

Referenced by Yahoo::buildGui(), NYBOT::buildGui(), CME::buildGui(), buildGui(), and CSV::createMainPage().

QGridLayout* QuotePlugin::grid [protected]

Definition at line 99 of file QuotePlugin.h.

Referenced by Yahoo::buildGui(), NYBOT::buildGui(), CME::buildGui(), buildGui(), and CSV::createMainPage().

QSpinBox* QuotePlugin::retrySpin [protected]

Definition at line 100 of file QuotePlugin.h.

Referenced by buildGui(), Yahoo::loadSettings(), NYBOT::loadSettings(), CME::loadSettings(), Yahoo::saveSettings(), NYBOT::saveSettings(), CME::saveSettings(), Yahoo::timeoutError(), NYBOT::timeoutError(), and CME::timeoutError().

QSpinBox* QuotePlugin::timeoutSpin [protected]

Definition at line 101 of file QuotePlugin.h.

Referenced by buildGui(), copyFile(), getFile(), Yahoo::loadSettings(), NYBOT::loadSettings(), CME::loadSettings(), Yahoo::saveSettings(), NYBOT::saveSettings(), and CME::saveSettings().

DBIndex* QuotePlugin::chartIndex [protected]

Definition at line 102 of file QuotePlugin.h.

Referenced by Yahoo::createAutoHistoryUrls(), Yahoo::newStock(), CSV::openDb(), NYBOT::parse(), CSV::parse(), CME::parse(), Yahoo::parseFundamental(), Yahoo::parseHistory(), Yahoo::parseQuote(), QuotePlugin(), and setChartIndex().


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