Public Member Functions | Protected Member Functions
MainWidget Class Reference

Brief description of class still missing. More...

#include <MainWidget.h>

List of all members.

Public Member Functions

 MainWidget (QWidget *parent=0)
void setBaseDirectory (const QString &d)
 ~MainWidget ()

Protected Member Functions

void keyReleaseEvent (QKeyEvent *e)

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

MainWidget::MainWidget ( QWidget *  parent = 0)

Description of constructor still missing

References SciFigs::Axis::addStringLabel(), GeopsyGui::PickLayer::format(), SciFigs::Axis::removeStringLabels(), SciFigs::Axis::setAutoTicks(), GeopsyGui::PickFormat::setColor(), SciFigs::Axis::setMajorTicks(), SciFigs::Axis::setMinorTicks(), SciFigs::Axis::setNumberType(), SciFigs::GraphContentLayer::setOpacity(), SciFigs::Axis::setReversedScale(), SciFigs::Axis::setScaleType(), SciFigs::Axis::setTitle(), GeopsyGui::PickFormat::setVisible(), SciFigs::Axis::setZoomEnabled(), QGpCoreTools::tr(), and TRACE.

  : QWidget(parent)
{
  TRACE;
  setupUi(this);

  eventList->setModel(new EventListModel(this));
  stationList->setModel(new StationListModel(this));
  connect(eventList->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
          this, SLOT(setCurrentEvent()));
  connect(stationList->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
          this, SLOT(setCurrentStation()));

  _signalLayer=new SignalLayer(signalPlot);
  _signalLayer->setObjectName("signals");

  _pickLayer=new PickLayer(_signalLayer);
  _pickLayer->setObjectName("picks");
  _pickLayer->setOpacity(0.4);
  PickFormat &f=_pickLayer->format();
  f.setVisible("Tp", true);
  f.setVisible("Ts", true);
  f.setColor("Tp", Qt::darkBlue);
  f.setColor("Ts", Qt::red);

  Axis * xAxis=signalPlot->xAxis();
  Axis * yAxis=signalPlot->yAxis();
  yAxis->setReversedScale(true);
  yAxis->setZoomEnabled(false);
  yAxis->setTitle("");
  yAxis->setAutoTicks(false);
  yAxis->setMajorTicks(1.0);
  yAxis->setMinorTicks(1.0);
  yAxis->setScaleType(Scale::Linear);
  yAxis->removeStringLabels();
  yAxis->addStringLabel("Z", false);
  yAxis->addStringLabel("N", false);
  yAxis->addStringLabel("E", true);

  xAxis->setTitle(tr("Time"));
  xAxis->setNumberType(Number::Weeks);
  xAxis->setScaleType(Scale::Linear);
  xAxis->setAutoTicks(true);

  signalPlot->xAxis()->setSizeInfo(15.0);
  signalPlot->yAxis()->setSizeInfo(10.0);
}

Description of destructor still missing

References TRACE.

{
  TRACE;
}

Member Function Documentation

void MainWidget::keyReleaseEvent ( QKeyEvent *  e) [protected]

References TRACE.

{
  TRACE;
  switch(e->key()) {
  case Qt::Key_Space:
    status();
    e->accept();
    break;
  case Qt::Key_F:
    filter();
    e->accept();
    break;
  case Qt::Key_S:
    save();
    e->accept();
    break;
  default:
    QWidget::keyReleaseEvent(e);
  }
}
void MainWidget::setBaseDirectory ( const QString &  d)

References Current, EventListModel::load(), EventListModel::setBaseDirectory(), and TRACE.

Referenced by main().

{
  TRACE;
  EventListModel * events=static_cast<EventListModel *>(eventList->model());
  events->setBaseDirectory(d);
  events->load();
  eventList->resizeColumnsToContents();
  stationList->resizeColumnsToContents();

  eventList->selectionModel()->select(eventList->model()->index(0,0), QItemSelectionModel::ClearAndSelect |
                                      QItemSelectionModel::Rows | QItemSelectionModel::Current);
}

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