00001 /* 00002 * Qtstalker stock charter 00003 * 00004 * Copyright (C) 2001-2007 Stefan S. Stratigakos 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 00019 * USA. 00020 */ 00021 00022 #include "QuotePlugin.h" 00023 #include "FuturesData.h" 00024 #include "Setting.h" 00025 #include <qstring.h> 00026 #include <qcombobox.h> 00027 #include "DbPlugin.h" 00028 #include "Config.h" 00029 00030 class CME : public QuotePlugin 00031 { 00032 Q_OBJECT 00033 00034 public: 00035 CME (); 00036 virtual ~CME (); 00037 void update (); 00038 void parseToday (); 00039 void parseHistory (); 00040 void saveTodayData (QStringList &); 00041 void parse (Setting &); 00042 void cancelUpdate (); 00043 void loadSettings (); 00044 void saveSettings (); 00045 void buildGui (); 00046 00047 public slots: 00048 void methodChanged (const QString &); 00049 void startDownload (); 00050 void fileDone (QString); 00051 void timeoutError (); 00052 00053 private: 00054 FuturesData fd; 00055 QStringList urlList; 00056 int symbolLoop; 00057 QString file2; 00058 QComboBox *symbolCombo; 00059 QComboBox *methodCombo; 00060 QStringList symbolList; 00061 bool allSymbols; 00062 int downloadIndex; 00063 bool cancelFlag; 00064 DbPlugin plug; 00065 QStringList methodList; 00066 Config config; 00067 }; 00068 00069 extern "C" 00070 { 00071 QuotePlugin * createQuotePlugin (); 00072 } 00073