Esempio n. 1
0
void Spectro::on_btnMathOk_clicked()
{
    if(!selectedForOp.isEmpty())
    {
      for(int i=0; i<selectedForOp.size();i++)
      {
          QTableWidgetItem* item=selectedForOp[i];
          Tjcampdx current = Tjcampdx(spectra[item->row()]);
          if(addConst)
              current = current + ui->edtMathConstant->text().toDouble();
          else if(multConst)
              current = current * ui->edtMathConstant->text().toDouble();
          addSpectrum(current);
      }
      ui->btnAddConst->setChecked(false);
      ui->btnMultConst->setChecked(false);

      ui->lblMathConst->setEnabled(false);
      ui->btnMathOk->setEnabled(false);
      ui->edtMathConstant->setEnabled(false);

      ui->plot->replot();
      selectedForOp.clear();
    }
}
Esempio n. 2
0
void Spectro::on_bufferBar_cellClicked(int row, int column)
{
    if(!selectedForOp.isEmpty())
    {
      Tjcampdx other = Tjcampdx(spectra[row]);
      for(int i=0; i<selectedForOp.size();i++)
      {
          QTableWidgetItem* item=selectedForOp[i];
          Tjcampdx current = Tjcampdx(spectra[item->row()]);
          if(divData)
            current = current / other;
          else if(addData)
            current = current + other;
          else if(subData)
            current = current - other;
          addSpectrum(current);
      }

      ui->btnDivBuffer->setChecked(false);
      ui->btnAddBuffer->setChecked(false);
      ui->btnSubBuffer->setChecked(false);
      ui->plot->replot();
      selectedForOp.clear();
    }
}
Esempio n. 3
0
void Spectro::on_pushButton_clicked()
{
    bool ok1,ok2;
    //bbSpec->setVisible(true);
    double T = ui->edtTempBB->text().toDouble(&ok1);
    double max= ui->edtMaxBB->text().toDouble(&ok2);
    if(ok1 && ok2){
        Tjcampdx spec = spectro->getBlackBodySpec(max,T);
        addSpectrum(spec);
    }
    ui->plot->replot();
}
Esempio n. 4
0
void Spectro::on_actionOpenFile_triggered()
{
    QStringList filenames = QFileDialog::getOpenFileNames(this,"Open spectrum file",lastDir,tr("JCampDX (*.dx)"));
    if(!filenames.isEmpty())
    {
        for(int i=0; i<filenames.length();i++){
            Tjcampdx spectrum;
            spectrum.Open(filenames[i].toStdString());
            addSpectrum(spectrum);
        }
        lastDir=QFileInfo(filenames.back()).absolutePath();
    }
}
Esempio n. 5
0
void CQPlotSubwidget::addSpectrumSlot()
{
  if (mType == CPlotItem::plot2d)
    addSpectrum();
}
Esempio n. 6
0
ViSpectrumWidget::ViSpectrumWidget(QWidget *parent)
	: ViWidget(parent)
{
	mCurrentSpectrumIndex = -1;
	mCurrentTime = -1;
	mMainHeight = height() * MIRROR_RATIO;

	setMode(ViSpectrumWidget::Amplitude);
	setSpacing(1);
	setBars(256);

	QObject::connect(engine().data(), SIGNAL(spectrumChanged(ViRealSpectrum, qint64)), this, SLOT(addSpectrum(ViRealSpectrum, qint64)), Qt::DirectConnection);
	QObject::connect(engine().data(), SIGNAL(positionChanged(ViAudioPosition)), this, SLOT(update(ViAudioPosition)), Qt::DirectConnection);
}
Esempio n. 7
0
void BMPFileViewer::show(const boost::shared_ptr<Spectrum> s)
{
    addSpectrum(s);
    show();

}
Esempio n. 8
0
void Spectro::newMeasure(Tjcampdx spec){
    addSpectrum(spec);
    ui->progressMeasure->setEnabled(false);
}