PortfolioDialog Class Reference

#include <PortfolioDialog.h>

Collaboration diagram for PortfolioDialog:

Collaboration graph
[legend]

List of all members.

Public Slots

void modifyItem ()
void addItem ()
void deleteItem ()
void savePortfolio ()
void buttonStatus (QListViewItem *)
void slotHelp ()
void itemDoubleClicked (QListViewItem *, const QPoint &, int)

Public Member Functions

 PortfolioDialog (QString, DBIndex *)
 ~PortfolioDialog ()
void updatePortfolio ()
double futuresProfit (QString &, double)
void updatePortfolioItems ()

Private Attributes

QListView * plist
QListViewItem * item
QString portfolio
Toolbartoolbar
Config config
QLabel * balance
DBIndexindex


Detailed Description

Definition at line 34 of file PortfolioDialog.h.


Constructor & Destructor Documentation

PortfolioDialog::PortfolioDialog ( QString  p,
DBIndex i 
)

Definition at line 39 of file PortfolioDialog.cpp.

References Toolbar::addButton(), addItem(), balance, buttonStatus(), deleteItem(), Toolbar::getButton(), Toolbar::Horizontal, index, itemDoubleClicked(), modifyItem(), plist, portfolio, savePortfolio(), Toolbar::setButtonStatus(), slotHelp(), toolbar, and updatePortfolio().

PortfolioDialog::~PortfolioDialog (  ) 

Definition at line 111 of file PortfolioDialog.cpp.


Member Function Documentation

void PortfolioDialog::updatePortfolio (  ) 

Definition at line 115 of file PortfolioDialog.cpp.

References config, Config::getData(), item, plist, portfolio, Config::PortfolioPath, and updatePortfolioItems().

Referenced by PortfolioDialog().

double PortfolioDialog::futuresProfit ( QString &  sym,
double  diff 
)

Definition at line 408 of file PortfolioDialog.cpp.

References FuturesData::getRate(), and FuturesData::setSymbol().

Referenced by updatePortfolioItems().

void PortfolioDialog::updatePortfolioItems (  ) 

Definition at line 150 of file PortfolioDialog.cpp.

References balance, DBBase::close(), futuresProfit(), Bar::getClose(), Bar::getDateTimeString(), Bar::getEmptyFlag(), DBIndexItem::getFuturesType(), DBIndex::getIndexItem(), DbPlugin::getLastBar(), DBIndexItem::getPath(), DBIndexItem::getType(), index, item, DbPlugin::open(), and plist.

Referenced by addItem(), deleteItem(), modifyItem(), and updatePortfolio().

void PortfolioDialog::modifyItem (  )  [slot]

Definition at line 325 of file PortfolioDialog.cpp.

References PrefDialog::addComboItem(), PrefDialog::addDoubleItem(), PrefDialog::addSymbolItem(), config, PrefDialog::createPage(), Config::DataPath, PrefDialog::getCombo(), Config::getData(), PrefDialog::getDouble(), DBIndex::getIndexItem(), DBIndexItem::getPath(), PrefDialog::getSymbol(), index, item, plist, and updatePortfolioItems().

Referenced by itemDoubleClicked(), and PortfolioDialog().

void PortfolioDialog::addItem (  )  [slot]

Definition at line 254 of file PortfolioDialog.cpp.

References PrefDialog::addComboItem(), PrefDialog::addDoubleItem(), PrefDialog::addSymbolItem(), config, PrefDialog::createPage(), Config::DataPath, PrefDialog::getCombo(), Config::getData(), PrefDialog::getDouble(), PrefDialog::getSymbol(), plist, and updatePortfolioItems().

Referenced by PortfolioDialog().

void PortfolioDialog::deleteItem (  )  [slot]

Definition at line 305 of file PortfolioDialog.cpp.

References buttonStatus(), item, plist, and updatePortfolioItems().

Referenced by PortfolioDialog().

void PortfolioDialog::savePortfolio (  )  [slot]

Definition at line 231 of file PortfolioDialog.cpp.

References config, Config::getData(), item, plist, portfolio, and Config::PortfolioPath.

Referenced by PortfolioDialog().

void PortfolioDialog::buttonStatus ( QListViewItem *  i  )  [slot]

Definition at line 391 of file PortfolioDialog.cpp.

References Toolbar::setButtonStatus(), and toolbar.

Referenced by deleteItem(), and PortfolioDialog().

void PortfolioDialog::slotHelp (  )  [slot]

Definition at line 427 of file PortfolioDialog.cpp.

Referenced by PortfolioDialog().

void PortfolioDialog::itemDoubleClicked ( QListViewItem *  item,
const QPoint &  ,
int   
) [slot]

Definition at line 419 of file PortfolioDialog.cpp.

References modifyItem().

Referenced by PortfolioDialog().


Member Data Documentation

QListView* PortfolioDialog::plist [private]

Definition at line 55 of file PortfolioDialog.h.

Referenced by addItem(), deleteItem(), modifyItem(), PortfolioDialog(), savePortfolio(), updatePortfolio(), and updatePortfolioItems().

QListViewItem* PortfolioDialog::item [private]

Definition at line 56 of file PortfolioDialog.h.

Referenced by deleteItem(), modifyItem(), savePortfolio(), updatePortfolio(), and updatePortfolioItems().

QString PortfolioDialog::portfolio [private]

Definition at line 57 of file PortfolioDialog.h.

Referenced by PortfolioDialog(), savePortfolio(), and updatePortfolio().

Toolbar* PortfolioDialog::toolbar [private]

Definition at line 58 of file PortfolioDialog.h.

Referenced by buttonStatus(), and PortfolioDialog().

Config PortfolioDialog::config [private]

Definition at line 59 of file PortfolioDialog.h.

Referenced by addItem(), modifyItem(), savePortfolio(), and updatePortfolio().

QLabel* PortfolioDialog::balance [private]

Definition at line 60 of file PortfolioDialog.h.

Referenced by PortfolioDialog(), and updatePortfolioItems().

DBIndex* PortfolioDialog::index [private]

Definition at line 61 of file PortfolioDialog.h.

Referenced by modifyItem(), PortfolioDialog(), and updatePortfolioItems().


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