Brief description of class still missing. More...
#include <ToolTFA.h>
Public Slots | |
virtual void | start () |
void | stop () |
Public Member Functions | |
virtual void | setParameters (int &argc, char **argv) |
ToolTFA (QWidget *parent=0) | |
Protected Member Functions | |
virtual bool | initStations (SubSignalPool *subPool) |
virtual void | updateAllFields () |
Protected Attributes | |
ToolTFAd * | _d |
bool | _terminated |
Brief description of class still missing.
Full description of class still missing
ToolTFA::ToolTFA | ( | QWidget * | parent = 0 | ) |
Description of constructor still missing
References GeopsyGui::ToolBase::_childrenList, _d, GeopsyGui::ToolBase::loadLogParameters(), GeopsyGui::ToolBase::setWindowTitle(), start(), stop(), and TRACE.
: ToolBase(parent, 1) { TRACE; QVBoxLayout * baseLayout=new QVBoxLayout(this); _d=new ToolTFAd(this); baseLayout->addWidget(_d); setWindowTitle("TFA toolbox"); setWindowIcon(QIcon( ":/images/tfa-22x22.png" )); setObjectName("ToolTFA"); connect(_d->startBut,SIGNAL(clicked()),this,SLOT(start())); connect(_d->stopBut, SIGNAL(clicked()), this, SLOT(stop()) ); connect(_d->reLoadParam,SIGNAL(clicked()),this,SLOT(loadLogParameters())); _d->stopBut->setEnabled(false); _childrenList[0]=0; }
bool ToolTFA::initStations | ( | SubSignalPool * | subPool | ) | [protected, virtual] |
Reimplemented from GeopsyGui::ToolBase.
References _d, GeopsyGui::ToolBase::_subPool, and TRACE.
void ToolTFA::setParameters | ( | int & | argc, |
char ** | argv | ||
) | [virtual] |
By default loads parameters values from current settings. If you redefine this function do not forget to call this version before doing anything else.
Reimplemented from GeopsyGui::ToolBase.
References GeopsyGui::ToolBase::loadLogParameters(), and TRACE.
{ TRACE; ToolBase::setParameters(argc, argv); int i, j=1; for(i=1; i<argc; i++) { QByteArray arg=argv[i]; if(arg[0]=='-') { if(arg=="-param") { CoreApplication::checkOptionArg(i, argc, argv); loadLogParameters(argv[i] ); } else { argv[j++]=argv[i]; } } else { argv[j++]=argv[i]; } } if(j < argc) { argv[j]=0; argc=j; } }
void ToolTFA::start | ( | ) | [virtual, slot] |
Reimplemented from GeopsyGui::ToolBase.
References GeopsyGui::ToolBase::_childrenList, _d, GeopsyGui::ToolBase::_subPool, _terminated, _tfaRes, GeopsyCore::SubSignalPool::at(), GeopsyCore::SubSignalPool::count(), GeopsyCore::geopsyCore, geopsyGui, ToolTFAd::getParameters(), GeopsyGui::ToolBase::lockSubPool(), GeopsyCore::SubSignalPool::name(), GeopsyCore::GeopsyCoreEngine::setProgressMaximum(), GeopsyCore::GeopsyCoreEngine::setProgressValue(), str, GeopsyGui::ToolBase::subPoolLocked(), TRACE, and GeopsyGui::ToolBase::unlockSubPool().
Referenced by ToolTFA().
{ TRACE; MessageContext mc; if(subPoolLocked()) return; lockSubPool(); _d->stopBut->setEnabled(true); _d->startBut->setEnabled(false); if(!_tfaRes) { _childrenList[0]=static_cast<QWidget *>(new TFAResults); _tfaRes->createObjects(_subPool); QString str="TFA results - "; str+=_subPool->name(); _tfaRes->setWindowTitle(str); geopsyGui->addWindow(_tfaRes); } // Get parameters TFAParameters param; _d->getParameters(param); // Use index rather than _subPool, as signals may have been added to subpool // We are not processing them here. int nSig=_subPool->count(); geopsyCore->setProgressMaximum(nSig); _terminated=false; for(int i=0;i<nSig;i++) { if(_terminated) break; geopsyCore->setProgressValue(i); _tfaRes->compute(i, _subPool->at(i), param); } geopsyCore->setProgressValue(nSig); geopsyGui->showWindow(_tfaRes); unlockSubPool(); _d->startBut->setEnabled(true); }
void ToolTFA::stop | ( | ) | [slot] |
References _d, _terminated, GeopsyCore::geopsyCore, GeopsyCore::GeopsyCoreEngine::showMessage(), QGpCoreTools::tr(), and TRACE.
Referenced by ToolTFA().
{ TRACE; _terminated=true; geopsyCore->showMessage(tr("Computation stopped")); _d->stopBut->setEnabled(false); }
void ToolTFA::updateAllFields | ( | ) | [protected, virtual] |
ToolTFAd* ToolTFA::_d [protected] |
Referenced by initStations(), start(), stop(), ToolTFA(), and updateAllFields().
bool ToolTFA::_terminated [protected] |