Public Slots | Public Member Functions | Protected Member Functions
ChronogramWindow Class Reference

Brief description of class still missing. More...

#include <ChronogramWindow.h>

Inheritance diagram for ChronogramWindow:
GeopsyGui::SubPoolWindow

List of all members.

Public Slots

void getSelection (SubSignalPool &sel)
virtual void refreshSignal (Signal *sig)

Public Member Functions

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

Protected Member Functions

virtual void focusInEvent (QFocusEvent *e)

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

ChronogramWindow::ChronogramWindow ( QWidget *  parent = 0)

Description of constructor still missing

References GeopsyGui::SubPoolWindow::addSignals(), SciFigs::GraphContentLayer::addTrackingAction(), CHRONOGRAMLAYER_TRACKING_ID, GeopsyCore::GeopsyPreferences::chronogramMakeUpFile(), GeopsyCore::geopsyCore, getSelection(), SciFigs::GraphContentLayer::graph(), SciFigs::AxisWindow::graphContent(), SciFigs::GraphContentLayer::graphContent(), GeopsyCore::GeopsyCoreEngine::preferences(), GeopsyCore::GeopsyPreferences::restoreChronogramMakeUp(), SciFigs::GraphicObject::restoreMakeUp(), SciFigs::XMLSciFigs::restoreString(), SciFigs::Axis::setNumberType(), SciFigs::GraphicObject::setObjectName(), SciFigs::Axis::setReversedScale(), SciFigs::Axis::setSizeInfo(), SciFigs::Axis::setZoomEnabled(), QGpCoreTools::tr(), TRACE, w, SciFigs::AxisWindow::xAxis(), and SciFigs::AxisWindow::yAxis().

    : SubPoolWindow(parent)
{
  TRACE;
  setObjectName("chronogram");
  QVBoxLayout * l=new QVBoxLayout(this);
  l->setMargin(1);
  AxisWindow * w=new AxisWindow(this);
  l->addWidget(w);
  w->setObjectName("chronogram");
  setWindowIcon(QIcon( ":/images/chronogram-22x22.png" ));
  Settings::getSize(this, "GraphicWindow" );

  _chronogramLayer=new ChronogramLayer(w);
  _chronogramLayer->setObjectName("chronogram");
  _chronogramLayer->addTrackingAction(tr("&Select"), CHRONOGRAMLAYER_TRACKING_ID,
                                      tr("Once selected, the selection can be dragged and dropped to other viewers."));

  w->xAxis()->setNumberType(Number::Weeks);
  w->yAxis()->setReversedScale(true);
  w->yAxis()->setZoomEnabled(false);
  w->xAxis()->setSizeInfo(15.0);
  w->yAxis()->setSizeInfo(10.0);

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

  // Restore default properties
  QSettings reg;
  QString plotProperties=reg.value("ChronogramPlot").toString();
  if(!plotProperties.isEmpty()) {
    XMLSciFigs s;
    s.restoreString(plotProperties, _chronogramLayer->graphContent(), XMLSciFigs::MakeUp);
  }

  if(geopsyCore->preferences()->restoreChronogramMakeUp() &&
      !geopsyCore->preferences()->chronogramMakeUpFile().isEmpty()) {
    _chronogramLayer->graph()->restoreMakeUp(geopsyCore->preferences()->chronogramMakeUpFile());
  }
}

Description of destructor still missing

References SciFigs::GraphContentLayer::graphContent(), SciFigs::XMLSciFigs::saveString(), and TRACE.

{
  TRACE;
  Settings::setSize(this, "GraphicWindow" );
  // Save as default properties
  QSettings reg;
  XMLSciFigs s;
  QString plotProperties=s.saveString(_chronogramLayer->graphContent(), XMLSciFigs::MakeUp);
  reg.setValue("ChronogramPlot", plotProperties);
}

Member Function Documentation

Referenced by subPoolUpdate(), and updateLabels().

{return _chronogramLayer;}
void ChronogramWindow::focusInEvent ( QFocusEvent *  e) [protected, virtual]

References SciFigs::GraphContentLayer::graphContent(), and TRACE.

{
  TRACE;
  _chronogramLayer->graphContent()->setFocus(e->reason());
}

References GeopsyCore::SubSignalPool::isEmpty(), GeopsyGui::ChronogramLayer::selection(), GeopsyCore::SubSignalPool::setName(), GeopsyGui::SubPoolWindow::subPool(), QGpCoreTools::tr(), and TRACE.

Referenced by ChronogramWindow().

{
  TRACE;
  sel=_chronogramLayer->selection();
  sel.setName(tr("Selected from %1").arg(subPool().name()));
  // If nothing is selected, put everything in the selection
  if(sel.isEmpty()) {
    sel=subPool();
  }
}
void ChronogramWindow::refreshSignal ( Signal sig) [virtual, slot]

Call this slot to refresh one signal. If sig does not exist in this subPool, this is function does nothing, else signalsUpdate() is called.

Reimplemented from GeopsyGui::SubPoolWindow.

References SciFigs::AxisWindow::deepUpdate(), SciFigs::GraphContentLayer::graph(), GeopsyGui::ChronogramLayer::rangeUpdate(), and TRACE.

{
  TRACE;
  _chronogramLayer->rangeUpdate();
  _chronogramLayer->graph()->deepUpdate();
}
void ChronogramWindow::setWindowTitle ( QString  title) [virtual]

Reimplemented from GeopsyGui::SubPoolWindow.

References TRACE.

Referenced by subPoolUpdate().

{
  TRACE;
  SubPoolWindow::setWindowTitle( "Chronogram - " + title);
}
void ChronogramWindow::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 SciFigs::AxisWindow::deepUpdate(), SciFigs::GraphContentLayer::graph(), setLimits(), GeopsyGui::SubPoolWindow::subPool(), and TRACE.

Referenced by fastFourierTransform().

{
  TRACE;
  if(subPool().isEmpty()) return;
  setLimits();
  _chronogramLayer->graph()->deepUpdate();
  SubPoolWindow::signalsUpdate();
}
void ChronogramWindow::subPoolUpdate ( ) [virtual]

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