Signals | Public Member Functions | Protected Member Functions
ManualPick Class Reference

Brief description of class still missing. More...

#include <ManualPick.h>

List of all members.

Signals

void addRange (QString key, SparseTimeRange *r)
void releasePickTool ()
void removeSignal (Signal *sig)

Public Member Functions

void exec ()
void init (SubSignalPool subPool, QString key, TimeRange r)
 ManualPick (QWidget *parent=0)
 ~ManualPick ()

Protected Member Functions

void closeEvent (QCloseEvent *e)

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

ManualPick::ManualPick ( QWidget *  parent = 0)

Description of constructor still missing

References GeopsyGui::PickLayer::format(), GeopsyGui::SignalLayer::setClip(), GeopsyGui::PickFormat::setColor(), GeopsyGui::SignalLayer::setVariableArea(), GeopsyGui::PickFormat::setVisible(), and TRACE.

    : QWidget(parent)
{
  TRACE;
  setAttribute(Qt::WA_DeleteOnClose);
  setupUi(this);
  
  signalDisplay->yAxis()->setZoomEnabled(false);
  _sLayer=new SignalLayer(signalDisplay);
  _sLayer->setObjectName("signals");
  _sLayer->setVariableArea(false);
  _sLayer->setClip(SignalLayer::ClipOverlap);

  _wLayer=new TimeWindowLayer(_sLayer);
  _pLayer=new PickLayer(_sLayer);
  // Register pick names and set format
  QString pickName;
  for(int i=1; i<10; i++) {
    pickName=QString("%1_Begin").arg(i);
    _pLayer->format().setVisible(pickName, true);
    _pLayer->format().setColor(pickName, Qt::green);
    pickName=QString("%1___End").arg(i);
    _pLayer->format().setVisible(pickName, true);
    _pLayer->format().setColor(pickName, Qt::darkRed);
  }
}

References GeopsyCore::SparseTimeRange::add(), addRange(), GeopsyCore::SubSignalPool::first(), releasePickTool(), removeSignal(), and GeopsyCore::Signal::timePick().

{
  QString key=keyDisplay->text();
  SparseTimeRange * r=new SparseTimeRange;
  for(int i=1; i<10; i++) {
    QString pickBegin=QString("%1_Begin").arg(i);
    QString pickEnd=QString("%1___End").arg(i);
    double tBegin=_subPool.first()->timePick(pickBegin);
    double tEnd=_subPool.first()->timePick(pickEnd);
    if(tBegin==0.0 || tEnd==0.0) break;
    r->add(TimeRange(tBegin, tEnd));

  }
  emit addRange(key, r);
  // Delete temporary files attached to subPool
  foreach(Signal * sig, _subPool) {
    emit removeSignal(sig);
  }
  emit releasePickTool();
}

Member Function Documentation

void ManualPick::addRange ( QString  key,
SparseTimeRange r 
) [signal]

Referenced by ~ManualPick().

void ManualPick::closeEvent ( QCloseEvent *  e) [inline, protected]
{e->ignore();}
void ManualPick::exec ( )
void ManualPick::init ( SubSignalPool  subPool,
QString  key,
TimeRange  r 
)

References GeopsyGui::TimeWindowLayer::addTimeWindows(), GeopsyCore::SubSignalPool::at(), GeopsyCore::SubSignalPool::count(), GeopsyCore::TimeRange::end(), GeopsyGui::SignalLayer::minMaxY(), GeopsyCore::TimeRange::setEnd(), GeopsyGui::PickLayer::setPick(), GeopsyCore::TimeRange::setStart(), GeopsyCore::TimeRange::start(), GeopsyGui::SignalLayer::subPoolUpdate(), and GeopsyCore::SubSignalPool::timeRange().

{
  keyDisplay->setText(key);
  _subPool=subPool;
  _sLayer->subPoolUpdate(&_subPool);
  _pLayer->setPick("1_Begin");
  // Set limits
  TimeRange r=subPool.timeRange();
  if(r.start()==1e99) r.setStart(0.0);
  if(r.end()==-1e99) r.setEnd(1.0);
  signalDisplay->xAxis()->setRange(r.start(), r.end());
  double ymin=0, ymax=1;
  _sLayer->minMaxY(ymin, ymax);
  signalDisplay->yAxis()->setRange(ymin, ymax);
  // Measurement time range
  _windows.clear();
  _windows.resize(subPool.count());
  for(int i=0; i<subPool.count(); i++) {
    _windows[i].addOne(recRange);
    _wLayer->addTimeWindows(subPool.at(i), &_windows[i]);
  }
  updateLabels();
}
void ManualPick::releasePickTool ( ) [signal]

Referenced by ~ManualPick().

void ManualPick::removeSignal ( Signal sig) [signal]

Referenced by ~ManualPick().


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