Brief description of class still missing. More...
#include <ChronogramWindow.h>
Public Slots | |
void | getSelection (SubSignalPool &sel) |
virtual void | refreshSignal (Signal *sig) |
Public Member Functions | |
ChronogramLayer * | chronogramLayer () 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) |
Brief description of class still missing.
Full description of class still missing
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); }
ChronogramLayer* ChronogramWindow::chronogramLayer | ( | ) | const [inline] |
Referenced by subPoolUpdate(), and updateLabels().
{return _chronogramLayer;}
void ChronogramWindow::fastFourierTransform | ( | DoubleSignal::SignalType | st | ) | [virtual] |
Implements GeopsyGui::SubPoolWindow.
References GeopsyCore::SubSignalPool::fastFourierTransform(), signalsUpdate(), GeopsyGui::SubPoolWindow::subPool(), and TRACE.
{ TRACE; subPool().fastFourierTransform(st); signalsUpdate(); }
void ChronogramWindow::focusInEvent | ( | QFocusEvent * | e | ) | [protected, virtual] |
References SciFigs::GraphContentLayer::graphContent(), and TRACE.
{ TRACE; _chronogramLayer->graphContent()->setFocus(e->reason()); }
void ChronogramWindow::getSelection | ( | SubSignalPool & | sel | ) | [slot] |
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::setLimits | ( | ) |
References GeopsyGui::ChronogramLayer::boundingRect(), SciFigs::GraphContentLayer::graph(), SciFigs::Axis::setRange(), GeopsyGui::SubPoolWindow::subPool(), TRACE, w, QGpCoreTools::Rect::x1(), QGpCoreTools::Rect::x2(), SciFigs::AxisWindow::xAxis(), QGpCoreTools::Rect::y1(), QGpCoreTools::Rect::y2(), and SciFigs::AxisWindow::yAxis().
Referenced by signalsUpdate(), and subPoolUpdate().
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] |
Implements GeopsyGui::SubPoolWindow.
References GeopsyCore::SubSignalPool::at(), chronogramLayer(), GeopsyCore::GeopsyPreferences::chronogramMakeUpFile(), SciFigs::AxisWindow::deepUpdate(), GeopsyCore::geopsyCore, SciFigs::GraphContentLayer::graph(), GeopsyCore::Signal::nameComponent(), GeopsyCore::GeopsyCoreEngine::preferences(), GeopsyCore::GeopsyPreferences::restoreGraphicMakeUp(), SciFigs::GraphicObject::restoreMakeUp(), setLimits(), setWindowTitle(), GeopsyGui::SubPoolWindow::subPool(), GeopsyGui::ChronogramLayer::subPoolUpdate(), TRACE, SciFigs::AxisWindow::updateInternalGeometry(), updateLabels(), and w.
{ TRACE; AxisWindow * w=_chronogramLayer->graph(); if(subPool().isEmpty()) { setWindowTitle(QString::null); return ; } chronogramLayer()->subPoolUpdate(&subPool()); if(subPool().count()==1) { Signal & sig=*subPool().at(0); QString traceName=sig.nameComponent(); setWindowTitle(traceName); } else { setWindowTitle(subPool().name()); } updateLabels(); setLimits(); if(geopsyCore->preferences()->restoreGraphicMakeUp()) { _chronogramLayer->graph()->restoreMakeUp(geopsyCore->preferences()->chronogramMakeUpFile()); } w->updateInternalGeometry(); w->deepUpdate(); }
void ChronogramWindow::updateLabels | ( | ) |
References SciFigs::Axis::addStringLabel(), chronogramLayer(), SciFigs::GraphContentLayer::graph(), GeopsyGui::ChronogramLayer::hitCount(), GeopsyCore::SubSignalPool::isEmpty(), GeopsyGui::ChronogramLayer::name(), SciFigs::Axis::removeStringLabels(), SciFigs::Axis::setAutoTicks(), SciFigs::Axis::setMajorTicks(), SciFigs::Axis::setMinorTicks(), SciFigs::Axis::setNumberType(), SciFigs::Axis::setReversedScale(), SciFigs::Axis::setScaleType(), SciFigs::Axis::setTitle(), GeopsyGui::SubPoolWindow::subPool(), GeopsyGui::ChronogramLayer::subPool(), QGpCoreTools::tr(), TRACE, w, SciFigs::AxisWindow::xAxis(), and SciFigs::AxisWindow::yAxis().
Referenced by subPoolUpdate().
{ TRACE; AxisWindow * w=_chronogramLayer->graph(); w->xAxis()->setTitle(tr( "Time" )); w->xAxis()->setNumberType(Number::Weeks); w->xAxis()->setScaleType(Scale::Linear); w->xAxis()->update(); w->xAxis()->setAutoTicks(true); Axis& a=*w->yAxis(); a.setReversedScale(true); a.setTitle( "" ); a.setAutoTicks(false); a.setMajorTicks(1.0); a.setMinorTicks(1.0); a.setScaleType(Scale::Linear); a.removeStringLabels(); const SubSignalPool * subPool=chronogramLayer()->subPool(); if(!subPool || subPool->isEmpty()) return; int n=_chronogramLayer->hitCount()-1; for(int i=0; i<n; i++ ) { a.addStringLabel(_chronogramLayer->name(i), false); } // Update axis... while adding the last label a.addStringLabel(_chronogramLayer->name(n), true); }