Brief description of class still missing. More...
#include <RefractionTargetWidget.h>
Public Member Functions | |
| void | addCurve (const RefractionCurve &curve) |
| void | addCurves (const QList< RefractionCurve > &curves) |
| QList< RefractionCurve > | curves () const |
| RefractionTargetWidget (QWidget *parent=0) | |
| ~RefractionTargetWidget () | |
Protected Slots | |
| virtual void | on_curveScroll_valueChanged (int v) |
| virtual void | setLimits () |
| void | sourceChanged (double loc) |
Brief description of class still missing.
Full description of class still missing
| RefractionTargetWidget::RefractionTargetWidget | ( | QWidget * | parent = 0 | ) |
Description of constructor still missing
References TRACE.
: CurveBrowser(parent) { TRACE; QHBoxLayout * layout=new QHBoxLayout; /*_sourceLabel=new QLabel(curveBox); _sourceLabel->setText(tr( "Source location" )); layout->addWidget(_sourceLabel); _sourceEdit=new DoubleSpinBox(curveBox); _sourceEdit->setSuffix( " m" ); _sourceEdit->setDecimals(2); _sourceEdit->setMinimum( -1e99); _sourceEdit->setMaximum(1e99); layout->addWidget(_sourceEdit); connect(_sourceEdit, SIGNAL(valueChanged( double) ), this, SLOT(sourceChanged( double) )); QVBoxLayout * vboxLayout=qobject_cast<QVBoxLayout *>(curveBox->layout()); ASSERT(vboxLayout); vboxLayout->addLayout(layout); AxisWindow * w=new AxisWindow(this); dock(w); // TODO add layer for sources LineLayer * l=new LineLayer(w); // Restrict layer to plot only RefractionLine RefractionLine * refLine=new RefractionLine; refLine->setPen(Pen( Qt::black, 0.6) ); refLine->setSymbol(Symbol(Symbol::Circle, 1.2, Pen(Qt::black, 0.0), Brush(Qt::black, Qt::SolidPattern) )); l->setReferenceLine(refLine); setProxy(new RefractionProxy); initLayer(l); setCurrentLayer(l); setWindowTitle(tr("Refraction target")); Settings::getSize(this, "RefractionTargetWidget" );*/ }
| void RefractionTargetWidget::addCurve | ( | const RefractionCurve & | curve | ) |
References SciFigs::LineLayer::addLine(), SciFigs::CurveBrowser::currentLayer(), QGpGuiWave::RefractionLine::setCurve(), and TRACE.
Referenced by addCurves().
{
TRACE;
RefractionLine * line=static_cast<RefractionLine *>(currentLayer()->addLine());
line->setCurve(curve);
}
| void RefractionTargetWidget::addCurves | ( | const QList< RefractionCurve > & | curves | ) |
References addCurve(), SciFigs::CurveBrowser::count(), setLimits(), and TRACE.
Referenced by TargetListWidget::setFrom().
| QList< RefractionCurve > RefractionTargetWidget::curves | ( | ) | const |
Reimplemented from SciFigs::CurveBrowser.
References SciFigs::CurveBrowser::count(), and TRACE.
Referenced by TargetListWidget::targetList().
{
TRACE;
QList<RefractionCurve> l;
int n=count();
for(int i=0;i<n;i++) {
RefractionCurve& c=curve(i);
l.append(c);
}
return l;
}
| void RefractionTargetWidget::on_curveScroll_valueChanged | ( | int | v | ) | [protected, virtual, slot] |
References SciFigs::CurveBrowser::count(), and TRACE.
| void RefractionTargetWidget::setLimits | ( | ) | [protected, virtual, slot] |
Reimplemented from SciFigs::CurveBrowser.
References SciFigs::GraphContent::boundingRect(), SciFigs::CurveBrowser::currentLayer(), SciFigs::GraphContentLayer::graph(), SciFigs::AxisWindow::graphContent(), SciFigs::Axis::setRange(), TRACE, w, QGpCoreTools::Rect::x1(), QGpCoreTools::Rect::x2(), SciFigs::AxisWindow::xAxis(), QGpCoreTools::Rect::y2(), and SciFigs::AxisWindow::yAxis().
Referenced by addCurves().
{
TRACE;
AxisWindow * w=currentLayer()->graph();
Rect r=w->graphContent()->boundingRect();
w->xAxis()->setRange(r.x1() * 0.95, r.x2() * 1.05);
w->yAxis()->setRange(0.0, r.y2() * 1.05);
}
| void RefractionTargetWidget::sourceChanged | ( | double | loc | ) | [protected, slot] |
References SciFigs::CurveBrowser::currentLine(), QGpCoreWave::RefractionCurve::setSource(), and TRACE.
{
TRACE;
int i=currentLine();
if(i>=0) {
curve(i).setSource(loc);
}
}