Public Slots | Public Member Functions | Protected Attributes
MapWindow Class Reference

#include <MapWindow.h>

Inheritance diagram for MapWindow:
GeopsyGui::SubPoolWindow

List of all members.

Public Slots

void getSelection (SubSignalPool &sel)

Public Member Functions

virtual void fastFourierTransform (DoubleSignal::SignalType st)
 MapWindow (QWidget *parent=0)
void setLimits ()
virtual void setWindowTitle (QString title)
virtual void signalsUpdate ()
virtual void subPoolUpdate ()
 ~MapWindow ()

Protected Attributes

ArrayMap_map

Constructor & Destructor Documentation

MapWindow::MapWindow ( QWidget *  parent = 0)

References _map, GeopsyGui::SubPoolWindow::addSignals(), SciFigs::GraphContentLayer::addTrackingAction(), GeopsyCore::geopsyCore, getSelection(), SciFigs::AxisWindow::graphContent(), GeopsyGui::ArrayMap::mapLayer(), GeopsyCore::GeopsyPreferences::mapMakeUpFile(), GeopsyCore::GeopsyCoreEngine::preferences(), SciFigs::GraphicObject::restoreMakeUp(), GeopsyCore::GeopsyPreferences::restoreMapMakeUp(), GeopsyGui::ArrayMap::setObjectName(), SciFigs::Axis::setSizeInfo(), SciFigs::Axis::setSizeType(), SciFigs::Axis::setTitle(), QGpCoreTools::tr(), TRACE, SciFigs::AxisWindow::updateExternalGeometry(), SciFigs::AxisWindow::xAxis(), and SciFigs::AxisWindow::yAxis().

  : SubPoolWindow(parent)
{
  TRACE;
  setObjectName("map");
  QVBoxLayout * l=new QVBoxLayout(this);
  l->setMargin(1);
  _map=new ArrayMap(this);
  l->addWidget(_map);
  _map->setObjectName("map");
  setWindowIcon(QIcon( ":/images/map-22x22.png" ));
  Settings::getSize(this,"MapWindow");
  _map->xAxis()->setTitle("X (m)");
  _map->xAxis()->setSizeType(Axis::Scaled);
  _map->xAxis()->setSizeInfo(1000);
  _map->yAxis()->setTitle("Y (m)");
  _map->yAxis()->setSizeType(Axis::Scaled);
  _map->yAxis()->setSizeInfo(1000);
  _map->mapLayer()->addTrackingAction(tr("&Select stations"), 0, tr("Once selected, the stations can be dragged and dropped to other viewers."));
  _map->updateExternalGeometry();

  // Drag and drop to transfert signal selection
  SigSelectionDnD * sigDnD=new SigSelectionDnD(_map->graphContent());
  connect(sigDnD,SIGNAL(selectionDropped(const SubSignalPool&)),
          this,SLOT(addSignals(const SubSignalPool&)));
  connect(sigDnD,SIGNAL(getSelection(SubSignalPool&)),
          this,SLOT(getSelection(SubSignalPool&)));
  connect(_map->graphContent(),SIGNAL(mouseTrackingBegin()),
          sigDnD,SLOT(disableFilter()));
  connect(_map->graphContent(),SIGNAL(mouseTrackingEnd()),
          sigDnD,SLOT(enableFilter()));

  // Make up
  if(geopsyCore->preferences()->restoreMapMakeUp() &&
      !geopsyCore->preferences()->mapMakeUpFile().isEmpty()) {
    _map->restoreMakeUp(geopsyCore->preferences()->mapMakeUpFile());
  }
}

References TRACE.

{
  TRACE;
  Settings::setSize(this,"MapWindow");
}

Member Function Documentation

void MapWindow::getSelection ( SubSignalPool sel) [slot]
void MapWindow::setWindowTitle ( QString  title) [virtual]

Reimplemented from GeopsyGui::SubPoolWindow.

References TRACE.

Referenced by subPoolUpdate().

{
  TRACE;
  SubPoolWindow::setWindowTitle("Map - "+title);
}
void MapWindow::signalsUpdate ( ) [virtual]

Function to redefine in child class to update view after changes to waveforms. Do not forget to call this function on exit.

The default implementation send signal signalTypeChanged() with argument set to UndefinedSignalType (as if the signals of the SubPool have not the same type).

Reimplemented from GeopsyGui::SubPoolWindow.

References _map, GeopsyGui::ArrayMap::addLine(), SciFigs::LineLayer::clear(), SciFigs::AxisWindow::deepUpdate(), GeopsyCore::SubSignalPool::end(), QGpCoreTools::Curve< pointType >::first(), GeopsyGui::ArrayMap::mapLayer(), GeopsyCore::Signal::name(), GeopsyCore::Signal::receiver(), QGpCoreTools::Curve< pointType >::resize(), setLimits(), QGpCoreTools::NamedPoint::setName(), GeopsyGui::SubPoolWindow::subPool(), and TRACE.

Referenced by fastFourierTransform(), GeopsyMainWindow::newMapWindow(), and subPoolUpdate().

{
  TRACE;
  if(subPool().isEmpty()) return;
  _map->mapLayer()->clear();
  SubSignalPool::iterator it;
  for(it=subPool().begin();it!=subPool().end();++it) {
    Signal * sig=*it;
    Curve<NamedPoint>& c=static_cast<NameLine *>(_map->addLine())->curve();
    c.resize(1);
    NamedPoint& p=c.first();
    p=sig->receiver();
    p.setName(sig->name());
  }
  setLimits();
  _map->deepUpdate();
  SubPoolWindow::signalsUpdate();
}
void MapWindow::subPoolUpdate ( ) [virtual]

Member Data Documentation

ArrayMap* MapWindow::_map [protected]

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