Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

omgexperimentdesigner.h

Go to the documentation of this file.
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 OMGEXPERIMENTDESIGNER_H
00022 #define OMGEXPERIMENTDESIGNER_H
00023 
00024 #include <ui_omgexperimentdesignerbase.h>
00025 #include <omgexperiment.h>
00026 #include <omgspatialreferencesystem.h>
00027 #include <omgmodellerplugininterface.h>
00028 #include <omgalgorithmset.h>
00029 
00030 //
00031 // QT includes
00032 //
00033 #include <QDialog>
00034 #include <QVector>
00035 #include <QSettings>
00036 #include <QLineEdit>
00037 #include <QString>
00038 #include <QDebug>
00039 #include <QString>
00040 #include <QStringList>
00041 #include <QListIterator>
00042 #include <QComboBox>
00043 #include <QTextStream>
00044 #include <QListWidget>
00045 #include <QPushButton>
00046 #include <QRegExp>
00047 #include <QMessageBox>
00048 
00049 
00055 class OmgExperimentDesigner : public QDialog, private Ui::OmgExperimentDesignerBase
00056 {
00057   Q_OBJECT;
00058 
00059 public:
00060   OmgExperimentDesigner(QWidget* parent = 0, Qt::WFlags fl = 0 );
00061   ~OmgExperimentDesigner();
00062   /*$PUBLIC_FUNCTIONS$*/
00063 
00064 public slots:
00065   /*$PUBLIC_SLOTS$*/
00066 
00067 protected:
00068   /*$PROTECTED_FUNCTIONS$*/
00069 
00070 protected slots:
00071   /*$PROTECTED_SLOTS$*/
00072   void on_pbnCancel_clicked();
00073   void on_pbnOk_clicked();
00074   void on_toolFormatLayer_clicked();
00075   void setStatus(QString theMessage);
00076   /* Return an experiment object that represents all the models to be processed */
00077   OmgExperiment *  getExperiment();
00078   /* update the layer formats combo when a model layer set is changed */
00079   void on_cboModelLayerSet_currentIndexChanged(int theIndex);
00080   /* update the layer formats combo when a projection  layer set is changed */
00081   void on_cboProjectionLayerSet_currentIndexChanged(int theIndex);
00082   /* this method does the actual work of refreshing the map format combo */
00083   void refreshMapFormatCombo();
00086   void toolConfigureLocalitiesClicked();
00087   /* Select a file from the file system and populate the taxa list from the 
00088    * contents of the file. */
00089   void toolSelectLocalitiesFileClicked();
00090 
00091 signals:
00092   
00093   void experimentCreated(OmgExperiment *);
00095   void logMessage(QString);
00098   void experimentProgress(int theProgress);
00101   void experimentMaximum(int theSize);
00102 private:
00104   OmgAlgorithmSet mAlgorithmSet;
00105   // this is defined at the bottom of lib/omglocality.h
00106   OmgSpatialReferenceSystem::WktMap mWktMap;
00111   OmgModellerPluginInterface * mpModellerPlugin;
00115   bool checkLayersMatch();
00123   bool setComboToDefault(QComboBox * theCombo, QString theDefault, bool theAddItemFlag);
00124   void setSpeciesList(QString theFileNameQString);
00130   QStringList getSpeciesList(QString theFileName);
00131   void readSettings();
00132   void writeSettings(); 
00133   QStringList getListWidgetEntries(const QListWidget *theListWidget);
00134   QString mSpeciesFileName;
00135   bool mFirstNonIdRecord;
00136 };
00137 
00138 #endif
00139 

Generated on Mon Apr 28 15:07:11 2008 for openModellerDesktop by  doxygen 1.4.1-20050210