Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joseph Pan
committed
Feb 26, 2014
0 parents
commit 4d383e3
Showing
371 changed files
with
5,110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#* | ||
*.o | ||
*.user | ||
.directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#include "EVMLyprIIRDialog.h" | ||
#include <string.h> | ||
#include "ui_EVMLyprIIRDialog.h" | ||
|
||
EVMLyprIIRDialog::EVMLyprIIRDialog(QWidget *parent, | ||
EVMLyprIIRProcessor *processor) : | ||
QDialog(parent), | ||
ui(new Ui::EVMLyprIIRDialog) | ||
{ | ||
this->processor = processor; | ||
ui->setupUi(this); | ||
|
||
alphaStr = "Amplification:"; | ||
lambdaStr = "Cut-off Wavelength:"; | ||
r1Str = "r1 (High cut-off?):"; | ||
r2Str = "r2 (Low cut-off?):"; | ||
chromStr = "ChromAttenuation:"; | ||
|
||
ui->alphaSlider->setValue(processor->alpha); | ||
ui->lambdaSlider->setValue(processor->lambda_c); | ||
ui->r1Slider->setValue(processor->r1 * 100); | ||
ui->r2Slider->setValue(processor->r2 * 100); | ||
ui->chromSlider->setValue(processor->chromAttenuation * 10); | ||
|
||
std::stringstream ss; | ||
ss << alphaStr.toStdString() << processor->alpha; | ||
ui->alphaLabel->setText(QString::fromStdString(ss.str())); | ||
|
||
ss.str(""); | ||
ss << lambdaStr.toStdString() << processor->lambda_c; | ||
ui->lambdaLabel->setText(QString::fromStdString(ss.str())); | ||
ss.str(""); | ||
ss << r1Str.toStdString() << processor->r1; | ||
ui->r1Label->setText(QString::fromStdString(ss.str())); | ||
ss.str(""); | ||
ss << r2Str.toStdString() << processor->r2; | ||
ui->r2Label->setText(QString::fromStdString(ss.str())); | ||
ss.str(""); | ||
ss << chromStr.toStdString() << processor->chromAttenuation; | ||
ui->chromLabel->setText(QString::fromStdString(ss.str())); | ||
} | ||
|
||
EVMLyprIIRDialog::~EVMLyprIIRDialog() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void EVMLyprIIRDialog::on_alphaSlider_valueChanged(int value) | ||
{ | ||
processor->alpha = value; | ||
std::stringstream ss; | ||
ss << alphaStr.toStdString() << processor->alpha; | ||
ui->alphaLabel->setText(QString::fromStdString(ss.str())); | ||
} | ||
|
||
void EVMLyprIIRDialog::on_lambdaSlider_valueChanged(int value) | ||
{ | ||
processor->lambda_c = value; | ||
std::stringstream ss; | ||
ss << lambdaStr.toStdString() << processor->lambda_c; | ||
ui->lambdaLabel->setText(QString::fromStdString(ss.str())); | ||
} | ||
|
||
void EVMLyprIIRDialog::on_r1Slider_valueChanged(int value) | ||
{ | ||
processor->r1 = value / 100.0; | ||
std::stringstream ss; | ||
ss << r1Str.toStdString() << processor->r1; | ||
ui->r1Label->setText(QString::fromStdString(ss.str())); | ||
} | ||
|
||
void EVMLyprIIRDialog::on_r2Slider_valueChanged(int value) | ||
{ | ||
processor->r2 = value / 100.0; | ||
std::stringstream ss; | ||
ss << r2Str.toStdString() << processor->r2; | ||
ui->r2Label->setText(QString::fromStdString(ss.str())); | ||
} | ||
|
||
void EVMLyprIIRDialog::on_chromSlider_valueChanged(int value) | ||
{ | ||
processor->chromAttenuation = value / 10.0; | ||
std::stringstream ss; | ||
ss << chromStr.toStdString() << processor->chromAttenuation; | ||
ui->chromLabel->setText(QString::fromStdString(ss.str())); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef EVMLYPRIIRDIALOG_H | ||
#define EVMLYPRIIRDIALOG_H | ||
|
||
#include <QDialog> | ||
#include "EVMLyprIIRProcessor.h" | ||
|
||
namespace Ui { | ||
class EVMLyprIIRDialog; | ||
} | ||
|
||
class EVMLyprIIRDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit EVMLyprIIRDialog(QWidget *parent = 0, | ||
EVMLyprIIRProcessor *processor = 0); | ||
~EVMLyprIIRDialog(); | ||
|
||
private slots: | ||
void on_alphaSlider_valueChanged(int value); | ||
|
||
void on_lambdaSlider_valueChanged(int value); | ||
|
||
void on_r1Slider_valueChanged(int value); | ||
|
||
void on_r2Slider_valueChanged(int value); | ||
|
||
void on_chromSlider_valueChanged(int value); | ||
|
||
private: | ||
Ui::EVMLyprIIRDialog *ui; | ||
EVMLyprIIRProcessor *processor; | ||
QString alphaStr, lambdaStr, r1Str, r2Str, chromStr; | ||
}; | ||
|
||
#endif // EVMLYPRIIRDIALOG_H |
Oops, something went wrong.