Brief description of class still missing. More...
#include <CurvesThread.h>
Public Member Functions | |
| virtual void | clear () |
| const QList< Curve< Point2D > > & | curves () const |
| CurvesThread (QObject *parent=0) | |
| CurvesThread (const CurvesThread &o) | |
| virtual void | initResultsGraphs (GraphicSheet *sheet) |
| virtual void | initResultsGraphs (const ResultsThread &o) |
| virtual LegendWidget * | legend () const =0 |
| double | maxX () const |
| double | minX () const |
| virtual void | resultsDeepUpdate () |
| virtual void | run (GeophysicalModel *model)=0 |
| virtual bool | setParameters (int &argc, char **argv) |
| virtual void | setResultsLimits () |
| ~CurvesThread () | |
Protected Member Functions | |
| virtual void | run () |
Protected Attributes | |
| QList< Curve< Point2D > > | _curves |
| LineLayer * | _layer |
| QVector< double > | _x |
Brief description of class still missing.
Full description of class still missing
| CurvesThread::CurvesThread | ( | QObject * | parent = 0 | ) |
Description of constructor still missing
: ResultsThread(parent) { TRACE; _layer=0; connect(this, SIGNAL(finished()), this, SLOT(showCurves()), Qt::QueuedConnection); }
| CurvesThread::CurvesThread | ( | const CurvesThread & | o | ) |
| void CurvesThread::clear | ( | ) | [virtual] |
Reimplemented from ResultsThread.
Reimplemented in MagnetoTelluricThread, and Seismic1DThread.
References _layer, SciFigs::LineLayer::clear(), resultsDeepUpdate(), and TRACE.
{
TRACE;
_layer->clear();
resultsDeepUpdate();
}
| const QList< Curve<Point2D> >& CurvesThread::curves | ( | ) | const [inline] |
| void CurvesThread::initResultsGraphs | ( | GraphicSheet * | sheet | ) | [virtual] |
Implements ResultsThread.
Reimplemented in DispersionGridThread, MagnetoTelluricThread, DispersionThread, EllipticityThread, and ShAmplificationThread.
References _layer, SciFigs::GraphicSheet::addObject(), SciFigs::GraphicSheet::autoResizeContent(), legend(), SciFigs::GraphicSheet::printRight(), SciFigs::LineLayer::setReferenceLine(), SciFigs::GraphicSheet::showObject(), TRACE, and w.
{
TRACE;
AxisWindow * w=new AxisWindow;
GraphicSheetMenu::setGraphGeometry(w, sheet->printRight(), 10.0, 0.5, 8.0);
sheet->addObject(w);
sheet->showObject(w);
sheet->autoResizeContent();
_layer=new LineLayer(w);
_layer->setObjectName(objectName()+" curves");
_layer->setReferenceLine(new PlotLine2D);
QObject::connect(legend(), SIGNAL(changed( Legend) ), _layer, SLOT(setLegend( Legend) ));
}
| void CurvesThread::initResultsGraphs | ( | const ResultsThread & | o | ) | [virtual] |
Implements ResultsThread.
Reimplemented in DispersionGridThread, MagnetoTelluricThread, DispersionThread, EllipticityThread, and ShAmplificationThread.
References _layer, SciFigs::GraphContentLayer::graph(), legend(), SciFigs::LineLayer::setReferenceLine(), and TRACE.
{
TRACE;
const CurvesThread& oc=static_cast<const CurvesThread&>(o);
_layer=new LineLayer(oc._layer->graph());
_layer->setObjectName(objectName()+" curves");
_layer->setReferenceLine(new PlotLine2D);
connect(legend(), SIGNAL(changed( Legend) ), _layer, SLOT(setLegend( Legend) ));
}
| virtual LegendWidget* CurvesThread::legend | ( | ) | const [pure virtual] |
Implemented in MagnetoTelluricThread, and Seismic1DThread.
Referenced by initResultsGraphs().
| double CurvesThread::maxX | ( | ) | const [inline] |
| double CurvesThread::minX | ( | ) | const [inline] |
| void CurvesThread::resultsDeepUpdate | ( | ) | [virtual] |
Implements ResultsThread.
Reimplemented in MagnetoTelluricThread, and DispersionGridThread.
References _layer, SciFigs::AxisWindow::deepUpdate(), SciFigs::GraphContentLayer::graph(), and TRACE.
Referenced by clear().
{
TRACE;
_layer->graph()->deepUpdate();
}
| virtual void CurvesThread::run | ( | GeophysicalModel * | model | ) | [pure virtual] |
Implements ResultsThread.
Referenced by MainWindow::scan().
| void CurvesThread::run | ( | ) | [protected, virtual] |
Reimplemented from ResultsThread.
References _curves, ResultsThread::_models, ResultsThread::terminated(), and TRACE.
| bool CurvesThread::setParameters | ( | int & | argc, |
| char ** | argv | ||
| ) | [virtual] |
Reimplemented from ResultsThread.
Reimplemented in DispersionGridThread, DispersionThread, EllipticityThread, MagnetoTelluricThread, ShAmplificationThread, and Seismic1DThread.
References _x, QGpCoreTools::endl(), QGpCoreTools::Function, QGpCoreTools::InversedScale, QGpCoreTools::Curve< pointType >::line(), QGpCoreTools::LinearScale, QGpCoreTools::LogScale, QGpCoreTools::Curve< pointType >::resample(), QGpCoreTools::tr(), TRACE, QGpCoreTools::Curve< pointType >::xMultiply(), and QGpCoreTools::Curve< pointType >::xVector().
{
TRACE;
SamplingOption samplingType=LogScale;
int nSamples=100;
double minRange=0.2;
double maxRange=20.0;
int i, j=1;
for(i=1; i<argc; i++) {
QByteArray arg=argv[i];
if(arg[0]=='-') {
if(arg=="-s") {
CoreApplication::checkOptionArg(i, argc, argv);
if(strcmp(argv[i],"period")==0) {
samplingType=InversedScale;
} else if(strcmp(argv[i],"frequency")==0) {
samplingType=LinearScale;
} else {
samplingType=LogScale;
}
} else if(arg=="-min") {
CoreApplication::checkOptionArg(i, argc, argv);
minRange=atof(argv[i]);
} else if(arg=="-max") {
CoreApplication::checkOptionArg(i, argc, argv);
maxRange=atof(argv[i]);
} else if(arg=="-n") {
CoreApplication::checkOptionArg(i, argc, argv);
nSamples=atoi(argv[i]);
if(nSamples<=0) {
App::stream() << tr("gpdclive: negative or null number of samples (option -n)") << endl;
return false;
}
} else {
argv[j++]=argv[i];
}
} else {
argv[j++]=argv[i];
}
}
if(j < argc) {
argv[j]=0;
argc=j;
}
// Compute common sampling scale
Curve<Point1D> c;
c.line(minRange, maxRange);
c.resample(nSamples, minRange, maxRange, samplingType | Function);
c.xMultiply(2*M_PI); // convert to angular frequency
_x=c.xVector();
return true;
}
| void CurvesThread::setResultsLimits | ( | ) | [virtual] |
Implements ResultsThread.
Reimplemented in MagnetoTelluricThread.
References _layer, SciFigs::LineLayer::boundingRect(), SciFigs::GraphContentLayer::graph(), QGpCoreTools::Rect::isNull(), SciFigs::Axis::setRange(), TRACE, QGpCoreTools::Rect::x1(), QGpCoreTools::Rect::x2(), SciFigs::AxisWindow::xAxis(), QGpCoreTools::Rect::y1(), QGpCoreTools::Rect::y2(), and SciFigs::AxisWindow::yAxis().
QList< Curve<Point2D> > CurvesThread::_curves [protected] |
LineLayer* CurvesThread::_layer [protected] |
QVector<double> CurvesThread::_x [protected] |
Referenced by CurvesThread(), maxX(), minX(), and setParameters().