Public Member Functions
Seismic1DThread Class Reference

Brief description of class still missing. More...

#include <Seismic1DThread.h>

Inheritance diagram for Seismic1DThread:
CurvesThread ResultsThread QGpCoreTools::Thread DispersionGridThread DispersionThread EllipticityThread ShAmplificationThread

List of all members.

Public Member Functions

virtual void addModel (GeophysicalModel *m)
virtual void clear ()
virtual void initModelGraphs (GraphicSheet *sheet)
virtual void initModelGraphs (const ResultsThread &o)
virtual LegendWidgetlegend () const
virtual void modelDeepUpdate ()
 Seismic1DThread (QObject *parent=0)
 Seismic1DThread (const Seismic1DThread &o)
virtual void setModel (GeophysicalModel *m)
virtual void setModelLimits ()
virtual bool setParameters (int &argc, char **argv)
 ~Seismic1DThread ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

Seismic1DThread::Seismic1DThread ( QObject *  parent = 0)

Description of constructor still missing

References TRACE.

    : CurvesThread(parent)
{
  TRACE;
  _vp=0;
  _vs=0;
  _leg=0;
}

Description of constructor still missing

References TRACE.

    : CurvesThread(o)
{
  TRACE;
  _vp=0;
  _vs=0;
  _leg=0;
}

Description of destructor still missing

References TRACE.

{
  TRACE;
}

Member Function Documentation

void Seismic1DThread::clear ( ) [virtual]

Reimplemented from CurvesThread.

References SciFigs::LineLayer::clear(), and TRACE.

{
  TRACE;
  CurvesThread::clear();
  _vp->clear();
  _vs->clear();
}
void Seismic1DThread::initModelGraphs ( GraphicSheet sheet) [virtual]

Implements ResultsThread.

References SciFigs::GraphicSheet::addObject(), ResultsThread::createLegend(), SciFigs::GraphicSheet::printRight(), SciFigs::LineLayer::setReferenceLine(), SciFigs::Axis::setReversedScale(), 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()->setTitle(tr("Vp (m/s)"));
  _vp=new LineLayer(w);
  _vp->setObjectName("background Vp");
  _vp->setReferenceLine(new PlotLine2D);
  sheet->addObject(w);
  sheet->showObject(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()->setTitle(tr("Vs (m/s)"));
  _vs=new LineLayer(w);
  _vs->setObjectName("background Vs");
  _vs->setReferenceLine(new PlotLine2D);
  sheet->addObject(w);
  sheet->showObject(w);

  _leg=createLegend(sheet, sheet->printRight(), 0.5, tr("Background models"));
  connect(_leg, SIGNAL(changed( Legend) ), _vp, SLOT(setLegend( Legend) ));
  connect(_leg, SIGNAL(changed( Legend) ), _vs, SLOT(setLegend( Legend) ));
}
void Seismic1DThread::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 Seismic1DThread& os=static_cast<const Seismic1DThread&>(o);
  AxisWindow * w;

  w=os._vp->graph();
  _vp=new LineLayer(w);
  _vp->setObjectName("foreground Vp");
  _vp->setReferenceLine(new PlotLine2D);
  _vp->addLine(Pen(), Symbol());

  w=os._vs->graph();
  _vs=new LineLayer(w);
  _vs->setObjectName("foreground Vs");
  _vs->setReferenceLine(new PlotLine2D);
  _vs->addLine(Pen(), Symbol());

  _leg=createLegend(w->sheet(), w->sheet()->printRight(), 0.5, tr("Foreground models"));
  connect(_leg, SIGNAL(changed( Legend) ), _vp, SLOT(setLegend( Legend) ));
  connect(_leg, SIGNAL(changed( Legend) ), _vs, SLOT(setLegend( Legend) ));
}
virtual LegendWidget* Seismic1DThread::legend ( ) const [inline, virtual]

Implements CurvesThread.

{return _leg;}

Implements ResultsThread.

References QGpCoreWave::Profile::curve(), SciFigs::LineLayer::line(), TRACE, QGpCoreWave::Seismic1DModel::vpProfile(), and QGpCoreWave::Seismic1DModel::vsProfile().

{
  TRACE;
  Seismic1DModel * ms=static_cast<Seismic1DModel *>(m);
  static_cast<PlotLine2D *>(_vp->line(0) )->curve()=ms->vpProfile().curve();
  static_cast<PlotLine2D *>(_vs->line(0) )->curve()=ms->vsProfile().curve();
}
void Seismic1DThread::setModelLimits ( ) [virtual]

Implements ResultsThread.

References SciFigs::GraphContent::boundingRect(), SciFigs::GraphContentLayer::graph(), SciFigs::GraphContentLayer::graphContent(), SciFigs::Axis::setRange(), TRACE, QGpCoreTools::Rect::x2(), SciFigs::AxisWindow::xAxis(), QGpCoreTools::Rect::y2(), and SciFigs::AxisWindow::yAxis().

{
  TRACE;
  Rect rp=_vp->graphContent()->boundingRect();
  Rect rs=_vs->graphContent()->boundingRect();
  _vp->graph()->xAxis()->setRange(0.0, rp.x2()*1.1);
  _vs->graph()->xAxis()->setRange(0.0, rs.x2()*1.1);
  double maxDepth=rp.y2() > rs.y2() ? rp.y2() : rs.y2();
  maxDepth*=1.1;
  _vp->graph()->yAxis()->setRange(0.0, maxDepth);
  _vs->graph()->yAxis()->setRange(0.0, maxDepth);
}
bool Seismic1DThread::setParameters ( int &  argc,
char **  argv 
) [virtual]

Reimplemented from CurvesThread.

Reimplemented in DispersionGridThread, DispersionThread, EllipticityThread, and ShAmplificationThread.

References TRACE.

{
  TRACE;
  // TODO: add option for profile selection (rho, nu, vp, vs, qp, qs)
  return CurvesThread::setParameters(argc, argv);
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines