00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Tim Sutton * 00003 * tim@linfiniti.com * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 00021 #ifndef OMGGBIFCONSOLESEARCH_H 00022 #define OMGGBIFCONSOLESEARCH_H 00023 00024 #include <omgscrapergbif.h> 00025 00026 //qt includes 00027 #include <QSettings> 00028 00029 #include <QString> 00030 #include <QDir> 00031 #include <QDebug> 00032 #include <QString> 00033 #include <QListIterator> 00034 00035 //standard includes 00036 #include <iostream> 00037 #include <assert.h> 00038 00039 class QString; 00040 class QStringList; 00041 00042 class OmgGbifConsoleSearch : public QObject 00043 { 00044 Q_OBJECT; 00045 00046 public: 00047 OmgGbifConsoleSearch(QObject *parent=0); 00048 ~OmgGbifConsoleSearch(); 00049 bool search(QString theFileName); 00050 00051 public slots: 00052 void gettingTaxonID(); 00053 void gettingBody(); 00054 void fileWritten(QString theShapeFile, QString theTextFile,QString theTaxonName, int theCount); 00055 void fileNotWritten(QString theTaxonName); 00056 void showPoints(QString theFileName); 00057 void setStatus(QString); 00058 void appendLogMessage(QString); 00059 void setError(QString); 00060 00061 signals: 00062 void searchDone(); 00063 00064 private: 00065 00066 void setSearchList(QString theFileName); 00067 void processNextTaxon(); 00068 bool mBusyFlag; 00069 int mListPosition; 00070 int mListSize; 00071 OmgScraperGbif * mOmgScraperGbif; 00072 QStringList mNameList; 00073 00074 }; 00075 #endif