00001 /*************************************************************************** 00002 kequitypriceupdatedlg.h - description 00003 ------------------- 00004 begin : Tuesday June 22nd, 2004 00005 copyright : (C) 2000-2004 by Kevin Tambascio 00006 email : mte@users.sourceforge.net 00007 Javier Campos Morales <javi_c@users.sourceforge.net> 00008 Felix Rodriguez <frodriguez@users.sourceforge.net> 00009 John C <thetacoturtle@users.sourceforge.net> 00010 Thomas Baumgart <ipwizard@users.sourceforge.net> 00011 Kevin Tambascio <ktambascio@users.sourceforge.net> 00012 ***************************************************************************/ 00013 00014 /*************************************************************************** 00015 * * 00016 * This program is free software; you can redistribute it and/or modify * 00017 * it under the terms of the GNU General Public License as published by * 00018 * the Free Software Foundation; either version 2 of the License, or * 00019 * (at your option) any later version. * 00020 * * 00021 ***************************************************************************/ 00022 00023 #ifndef KEQUITYPRICEUPDATEDIALOG_H 00024 #define KEQUITYPRICEUPDATEDIALOG_H 00025 00026 // ---------------------------------------------------------------------------- 00027 // QT Includes 00028 00029 #include <qwidget.h> 00030 #include <qpair.h> 00031 #include <qdatastream.h> 00032 class QListViewItem; 00033 00034 // ---------------------------------------------------------------------------- 00035 // KDE Includes 00036 00037 #include <kprocess.h> 00038 00039 // ---------------------------------------------------------------------------- 00040 // Project Includes 00041 00042 #include "../converter/webpricequote.h" 00043 #include "../mymoney/mymoneysecurity.h" 00044 #include "../mymoney/mymoneyprice.h" 00045 #include "../dialogs/kequitypriceupdatedlgdecl.h" 00046 00051 class KEquityPriceUpdateDlg : public KEquityPriceUpdateDlgDecl 00052 { 00053 Q_OBJECT 00054 public: 00055 KEquityPriceUpdateDlg(QWidget *parent, const QString& securityId = QString()); 00056 ~KEquityPriceUpdateDlg(); 00057 void storePrices(void); 00058 MyMoneyPrice price(const QString& id) const; 00059 00060 protected slots: 00061 void slotUpdateSelectedClicked(void); 00062 void slotUpdateAllClicked(void); 00063 void slotUpdateSelection(void); 00064 00065 void logStatusMessage(const QString&); 00066 void logErrorMessage(const QString&); 00067 void slotReceivedQuote(const QString&, const QString&,const QDate&, const double&); 00068 void slotQuoteFailed(const QString& _id, const QString& _symbol); 00069 00070 protected: 00071 void addPricePair(const MyMoneySecurityPair& pair, bool dontCheckExistance = false); 00072 void addInvestment(const MyMoneySecurity& inv); 00073 void finishUpdate(void); 00074 00075 private: 00076 bool m_fUpdateAll; 00077 WebPriceQuote m_webQuote; 00078 }; 00079 00080 #endif 00081 // vim:cin:si:ai:et:ts=2:sw=2: