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

omgdatafetcherwizardsearchpage.cpp

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 #include <omgdatafetcherwizardsearchpage.h>
00022 #include <omgpluginmessenger.h>
00023 #include <omgui.h> //ancilliary helper functions
00024 //qt includes
00025 #include <QSettings>
00026 
00027 //
00028 // QT includes
00029 //
00030 #include <QWizard>
00031 #include <QVBoxLayout>
00032 #include <QFile>
00033 
00034 
00035 OmgDataFetcherWizardSearchPage::OmgDataFetcherWizardSearchPage(QWidget *parent)
00036 : QWizardPage(parent),
00037   mpSearchWidget(new OmgDataFetcherWizardSearchWidget())
00038 {
00039   setTitle(tr("Search Criteria"));
00040   setSubTitle(tr("Use this page to define the search criteria."));
00041   QVBoxLayout *mypLayout = new QVBoxLayout;
00042   mypLayout->addWidget(mpSearchWidget);
00043   setLayout(mypLayout);
00044   //*after name means its compulsory
00045   registerField("leOutputPath", mpSearchWidget->getLeOutputPath());
00046   connect(mpSearchWidget, SIGNAL(dataChanged()), 
00047       this, SLOT(checkComplete()));
00048 }
00049 QListWidget * OmgDataFetcherWizardSearchPage::getTaxonListWidget()
00050 {
00051   return mpSearchWidget->getLstSearch();
00052 }
00053 void OmgDataFetcherWizardSearchPage::checkComplete() 
00054 {
00055   //this is a QWizardPage specified signal...
00056   emit completeChanged();
00057 }
00058 //reimplement from wizard page basW class
00059 bool OmgDataFetcherWizardSearchPage::isComplete() const
00060 {
00061   qDebug("isComplete called");
00062   if (mpSearchWidget->getLstSearch()->count() > 0 &&
00063       QFile::exists(mpSearchWidget->getLeOutputPath()->text()))
00064   {
00065     return true;
00066   }
00067   else
00068   {
00069     return false;
00070   }
00071 }
00072 

Generated on Mon Apr 28 15:06:59 2008 for openModellerDesktop by  doxygen 1.4.1-20050210