Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
heterophyllus committed Feb 26, 2021
1 parent 454c010 commit 0e2b1e0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/dispersion_formula.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#define DISPERSION_FORMULA_H

#include <QVector>
#include <QStringList>

/**
* @class DispersionFormula
Expand Down
42 changes: 21 additions & 21 deletions src/dispersion_plot_form.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,68 +163,68 @@ void DispersionPlotForm::on_comboBoxChanged()
}


// get unused coefficients
int invalid_start = m_tableCoefs->rowCount();
// unused coefficients
int unused_start = m_tableCoefs->rowCount();

switch (ui->comboBox_Formula->currentIndex()) {
case 0:
case 0: // Polynomial
break;
case 1: // Schott
invalid_start = 6;
unused_start = 6;
break;
case 2: // Sellmeier 1
invalid_start = 6;
unused_start = 6;
break;
case 3: // Herzberger
invalid_start = 6;
unused_start = 6;
break;
case 4: // Sellmeier 2
invalid_start = 5;
unused_start = 5;
break;
case 5: // Conrady
invalid_start = 3;
unused_start = 3;
break;
case 6: // Sellmeier 3
invalid_start = 8;
unused_start = 8;
break;
case 7: // Handbook of Optics 1
invalid_start = 4;
unused_start = 4;
break;
case 8: // Handbook of Optics 2
invalid_start = 4;
unused_start = 4;
break;
case 9: // Sellmeier 4
invalid_start = 5;
unused_start = 5;
break;
case 10: // Extended 1
invalid_start = 8;
unused_start = 8;
break;
case 11: // Sellmeier 5
invalid_start = 9;
unused_start = 9;
break;
case 12: // Extended 2
invalid_start = 8;
unused_start = 8;
break;
case 13: // Laurent
invalid_start = 12;
unused_start = 12;
break;
case 14: // Glass Manufacturer Laurent
invalid_start = 7;
unused_start = 7;
break;
case 15: // Glass Manufacturer Sellmeier
invalid_start = 12;
unused_start = 12;
break;
case 16: // Cauchy
invalid_start = 3;
unused_start = 3;
break;
case 17: // Hartman
invalid_start = 3;
unused_start = 3;
break;
}


// disable and encolor invalid cells
for(int row = invalid_start; row < rowCount; row++)
for(int row = unused_start; row < rowCount; row++)
{
item = m_tableCoefs->item(row,0);
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
Expand Down
2 changes: 1 addition & 1 deletion src/spectral_line.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#define SPECTRAL_LINE_H

#include<QString>
#include<QStringList>

/**
* @class SpectralLine
* @brief Container class for Fraunhofer spectral line
*/
class SpectralLine
Expand Down

0 comments on commit 0e2b1e0

Please sign in to comment.