Brief description of class still missing. More...
#include <MagnetoTelluricThread.h>
Public Member Functions | |
virtual void | addModel (GeophysicalModel *m) |
virtual void | clear () |
virtual ResultsThread * | clone () const |
virtual void | initModelGraphs (GraphicSheet *sheet) |
virtual void | initModelGraphs (const ResultsThread &o) |
virtual void | initResultsGraphs (GraphicSheet *sheet) |
virtual void | initResultsGraphs (const ResultsThread &o) |
virtual LegendWidget * | legend () const |
MagnetoTelluricThread (QObject *parent=0) | |
MagnetoTelluricThread (const MagnetoTelluricThread &o) | |
virtual void | modelDeepUpdate () |
virtual void | resultsDeepUpdate () |
virtual void | setModel (GeophysicalModel *m) |
virtual void | setModelLimits () |
virtual bool | setParameters (int &argc, char **argv) |
virtual void | setResultsLimits () |
~MagnetoTelluricThread () |
Brief description of class still missing.
Full description of class still missing
MagnetoTelluricThread::MagnetoTelluricThread | ( | QObject * | parent = 0 | ) |
Description of constructor still missing
References TRACE.
Referenced by clone().
: CurvesThread(parent) { TRACE; _res=0; _leg=0; _appRes=0; _phase=0; }
Description of constructor still missing
References TRACE.
: CurvesThread(o) { TRACE; _res=0; _leg=0; _appRes=0; _phase=0; }
void MagnetoTelluricThread::addModel | ( | GeophysicalModel * | m | ) | [virtual] |
Implements ResultsThread.
References SciFigs::LineLayer::addLine(), SciFigs::LineLayer::count(), SciFigs::PlotLine2D::curve(), QGpCoreWave::Profile::curve(), SciFigs::LegendWidget::legend(), SciFigs::Legend::pen(), QGpCoreWave::Resistivity1DModel::profile(), SciFigs::Legend::symbol(), and TRACE.
{ TRACE; Resistivity1DModel * mr=static_cast<Resistivity1DModel *>(m); int i; const Legend& leg=_leg->legend(); PlotLine2D * line; i=_res->count(); line=static_cast<PlotLine2D *>(_res->addLine(leg.pen(i), leg.symbol(i)) ); line->curve()=mr->profile().curve(); }
void MagnetoTelluricThread::clear | ( | ) | [virtual] |
Reimplemented from CurvesThread.
References SciFigs::LineLayer::clear(), resultsDeepUpdate(), and TRACE.
{ TRACE; _res->clear(); _appRes->clear(); _phase->clear(); resultsDeepUpdate(); }
virtual ResultsThread* MagnetoTelluricThread::clone | ( | ) | const [inline, virtual] |
Implements ResultsThread.
References MagnetoTelluricThread().
{return new MagnetoTelluricThread(*this);}
void MagnetoTelluricThread::initModelGraphs | ( | GraphicSheet * | sheet | ) | [virtual] |
Implements ResultsThread.
References SciFigs::GraphicSheet::addObject(), ResultsThread::createLegend(), SciFigs::GraphicSheet::printRight(), SciFigs::LineLayer::setReferenceLine(), SciFigs::Axis::setReversedScale(), SciFigs::Axis::setScaleType(), SciFigs::Axis::setTitle(), SciFigs::GraphicSheet::showObject(), QGpCoreTools::tr(), TRACE, w, SciFigs::AxisWindow::xAxis(), and SciFigs::AxisWindow::yAxis().
{ TRACE; AxisWindow * w; w=new AxisWindow; GraphicSheetMenu::setGraphGeometry(w, sheet->printRight(), 6.0, 0.5, 8.0); w->yAxis()->setReversedScale(true); w->yAxis()->setTitle(tr("Depth (m)")); w->xAxis()->setScaleType(Scale::Log); w->xAxis()->setTitle(tr("Resistivity (ohm m)")); _res=new LineLayer(w); _res->setObjectName("background Res"); _res->setReferenceLine(new PlotLine2D); sheet->addObject(w); sheet->showObject(w); _leg=createLegend(sheet, sheet->printRight(), 0.5, tr("Background models")); connect(_leg, SIGNAL(changed( Legend) ), _res, SLOT(setLegend( Legend) )); }
void MagnetoTelluricThread::initModelGraphs | ( | const ResultsThread & | o | ) | [virtual] |
Implements ResultsThread.
References SciFigs::LineLayer::addLine(), ResultsThread::createLegend(), SciFigs::GraphContentLayer::graph(), SciFigs::GraphicSheet::printRight(), SciFigs::LineLayer::setReferenceLine(), SciFigs::GraphicObject::sheet(), QGpCoreTools::tr(), TRACE, and w.
{ TRACE; const MagnetoTelluricThread& om=static_cast<const MagnetoTelluricThread&>(o); AxisWindow * w; w=om._res->graph(); _res=new LineLayer(w); _res->setObjectName("foreground Res"); _res->setReferenceLine(new PlotLine2D); _res->addLine(Pen(), Symbol()); _leg=createLegend(w->sheet(), w->sheet()->printRight(), 0.5, tr("Foreground models")); connect(_leg, SIGNAL(changed( Legend) ), _res, SLOT(setLegend( Legend) )); }
void MagnetoTelluricThread::initResultsGraphs | ( | GraphicSheet * | sheet | ) | [virtual] |
Reimplemented from CurvesThread.
References SciFigs::GraphicSheet::addObject(), SciFigs::GraphicSheet::autoResizeContent(), legend(), SciFigs::GraphicSheet::printRight(), SciFigs::LineLayer::setPointOptions(), SciFigs::LineLayer::setReferenceLine(), SciFigs::Axis::setReversedScale(), SciFigs::Axis::setTitle(), SciFigs::Axis::setUnitFactor(), SciFigs::GraphicSheet::showObject(), QGpCoreTools::tr(), TRACE, w, and SciFigs::AxisWindow::xAxis().
{ TRACE; AxisWindow * w; w=new AxisWindow; GraphicSheetMenu::setGraphGeometry(w, sheet->printRight(), 7.0, 0.5, 8.0); GraphicSheetMenu::setFrequencyTitles(w, tr("Apparent resistivity (ohm m)"), tr("Apparent condictivity (S/m)"), Number::Fixed); w->xAxis()->setUnitFactor(0.001); w->xAxis()->setTitle(tr("Frequency (kHz)")); w->xAxis()->setReversedScale(true); sheet->addObject(w); sheet->showObject(w); sheet->autoResizeContent(); _appRes=new LineLayer(w); _appRes->setObjectName(objectName()+" app. res."); _appRes->setReferenceLine(new MagnetoTelluricLine); _appRes->setPointOptions(new MagnetoTelluricPointOptions(MagnetoTelluricPointOptions::ApparentResistivity)); QObject::connect(legend(), SIGNAL(changed( Legend) ), _appRes, SLOT(setLegend( Legend) )); w=new AxisWindow; GraphicSheetMenu::setGraphGeometry(w, sheet->printRight(), 7.0, 0.5, 8.0); GraphicSheetMenu::setFrequencyTitles(w, tr("Phase (degrees)"), tr("1/phase (1/degrees)"), Number::Fixed); w->xAxis()->setUnitFactor(0.001); w->xAxis()->setTitle(tr("Frequency (kHz)")); w->xAxis()->setReversedScale(true); sheet->addObject(w); sheet->showObject(w); sheet->autoResizeContent(); _phase=new LineLayer(w); _phase->setObjectName(objectName()+" phase"); _phase->setReferenceLine(new MagnetoTelluricLine); _phase->setPointOptions(new MagnetoTelluricPointOptions(MagnetoTelluricPointOptions::PhaseDegrees)); QObject::connect(legend(), SIGNAL(changed( Legend) ), _phase, SLOT(setLegend( Legend) )); }
void MagnetoTelluricThread::initResultsGraphs | ( | const ResultsThread & | o | ) | [virtual] |
Reimplemented from CurvesThread.
References SciFigs::GraphContentLayer::graph(), legend(), SciFigs::LineLayer::setPointOptions(), SciFigs::LineLayer::setReferenceLine(), and TRACE.
{ TRACE; const MagnetoTelluricThread& om=static_cast<const MagnetoTelluricThread&>(o); _appRes=new LineLayer(om._appRes->graph()); _appRes->setObjectName(objectName()+" app. res."); _appRes->setReferenceLine(new MagnetoTelluricLine); _appRes->setPointOptions(new MagnetoTelluricPointOptions(MagnetoTelluricPointOptions::ApparentResistivity)); connect(legend(), SIGNAL(changed( Legend) ), _appRes, SLOT(setLegend( Legend) )); _phase=new LineLayer(om._phase->graph()); _phase->setObjectName(objectName()+" phase"); _phase->setReferenceLine(new MagnetoTelluricLine); _phase->setPointOptions(new MagnetoTelluricPointOptions(MagnetoTelluricPointOptions::PhaseDegrees)); QObject::connect(legend(), SIGNAL(changed( Legend) ), _phase, SLOT(setLegend( Legend) )); }
virtual LegendWidget* MagnetoTelluricThread::legend | ( | ) | const [inline, virtual] |
void MagnetoTelluricThread::modelDeepUpdate | ( | ) | [virtual] |
Implements ResultsThread.
References SciFigs::AxisWindow::deepUpdate(), SciFigs::GraphContentLayer::graph(), and TRACE.
{ TRACE; _res->graph()->deepUpdate(); }
void MagnetoTelluricThread::resultsDeepUpdate | ( | ) | [virtual] |
Reimplemented from CurvesThread.
References SciFigs::AxisWindow::deepUpdate(), SciFigs::GraphContentLayer::graph(), and TRACE.
Referenced by clear().
{ TRACE; _appRes->graph()->deepUpdate(); _phase->graph()->deepUpdate(); }
void MagnetoTelluricThread::setModel | ( | GeophysicalModel * | m | ) | [virtual] |
Implements ResultsThread.
References QGpCoreWave::Profile::curve(), SciFigs::LineLayer::line(), QGpCoreWave::Resistivity1DModel::profile(), and TRACE.
{ TRACE; Resistivity1DModel * mr=static_cast<Resistivity1DModel *>(m); static_cast<PlotLine2D *>(_res->line(0) )->curve()=mr->profile().curve(); }
void MagnetoTelluricThread::setModelLimits | ( | ) | [virtual] |
Implements ResultsThread.
References SciFigs::GraphContent::boundingRect(), SciFigs::GraphContentLayer::graph(), SciFigs::GraphContentLayer::graphContent(), SciFigs::Axis::setRange(), TRACE, QGpCoreTools::Rect::x1(), QGpCoreTools::Rect::x2(), SciFigs::AxisWindow::xAxis(), QGpCoreTools::Rect::y2(), and SciFigs::AxisWindow::yAxis().
bool MagnetoTelluricThread::setParameters | ( | int & | argc, |
char ** | argv | ||
) | [virtual] |
Reimplemented from CurvesThread.
References TRACE.
{ TRACE; return CurvesThread::setParameters(argc, argv); }
void MagnetoTelluricThread::setResultsLimits | ( | ) | [virtual] |
Reimplemented from CurvesThread.
References 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().
{ TRACE; Rect r; r=_appRes->boundingRect(); if(!r.isNull()) { _appRes->graph()->xAxis()->setRange(r.x1(), r.x2()); _appRes->graph()->yAxis()->setRange(r.y1()*0.9, r.y2()*1.1); } r=_phase->boundingRect(); if(!r.isNull()) { _phase->graph()->xAxis()->setRange(r.x1(), r.x2()); _phase->graph()->yAxis()->setRange(r.y1()*0.9, r.y2()*1.1); } }