#include <PortfolioDialog.h>
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 |
Toolbar * | toolbar |
Config | config |
QLabel * | balance |
DBIndex * | index |
Definition at line 34 of file PortfolioDialog.h.
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.
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] |
void PortfolioDialog::itemDoubleClicked | ( | QListViewItem * | item, | |
const QPoint & | , | |||
int | ||||
) | [slot] |
Definition at line 419 of file PortfolioDialog.cpp.
References modifyItem().
Referenced by PortfolioDialog().
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().