Skip to content
Snippets Groups Projects
Commit 00a58f17 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

doxygen comment added

parent bc54aef8
No related branches found
No related tags found
1 merge request!832GUI: Beam intensity value validation fixed
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
#include <QDoubleValidator> #include <QDoubleValidator>
//! The FixupDoubleValidator class is a derivative of QDoubleValidator with non-empty "fixup"
//! method. If validator return QValidator::Intermediate, then "fixup" lets us know about that,
//! emiting fixupSignal();
class FixupDoubleValidator : public QDoubleValidator { class FixupDoubleValidator : public QDoubleValidator {
Q_OBJECT Q_OBJECT
public: public:
......
...@@ -68,7 +68,7 @@ GISASBeamEditor::GISASBeamEditor(QWidget* parent, BeamItem* item) ...@@ -68,7 +68,7 @@ GISASBeamEditor::GISASBeamEditor(QWidget* parent, BeamItem* item)
connect(azimuthalEditor, &DistributionEditor::distributionChanged, this, connect(azimuthalEditor, &DistributionEditor::distributionChanged, this,
&GISASBeamEditor::dataChanged); &GISASBeamEditor::dataChanged);
//! validate value while typing // validate value while typing
connect(intensityEditor, &QLineEdit::textEdited, [=]() { connect(intensityEditor, &QLineEdit::textEdited, [=]() {
QString str = intensityEditor->text(); QString str = intensityEditor->text();
int pos; int pos;
...@@ -77,8 +77,8 @@ GISASBeamEditor::GISASBeamEditor(QWidget* parent, BeamItem* item) ...@@ -77,8 +77,8 @@ GISASBeamEditor::GISASBeamEditor(QWidget* parent, BeamItem* item)
emit dataChanged(); emit dataChanged();
} }
}); });
//! if validator does not assert the input value, it says about that, // if validator does not assert the input value, it says about that,
//! and here we return to the last correct value // and here we return to the last correct value
connect(validator, &FixupDoubleValidator::fixupSignal, [=]() { connect(validator, &FixupDoubleValidator::fixupSignal, [=]() {
auto* editor = qobject_cast<QLineEdit*>(validator->parent()); auto* editor = qobject_cast<QLineEdit*>(validator->parent());
editor->setText(QString::number(item->intensity(),'g')); editor->setText(QString::number(item->intensity(),'g'));
......
...@@ -68,7 +68,7 @@ OffSpecularBeamEditor::OffSpecularBeamEditor(QWidget* parent, OffSpecularInstrum ...@@ -68,7 +68,7 @@ OffSpecularBeamEditor::OffSpecularBeamEditor(QWidget* parent, OffSpecularInstrum
connect(azimuthalEditor, &DistributionEditor::distributionChanged, this, connect(azimuthalEditor, &DistributionEditor::distributionChanged, this,
&OffSpecularBeamEditor::dataChanged); &OffSpecularBeamEditor::dataChanged);
//! validate value while typing // validate value while typing
connect(intensityEditor, &QLineEdit::textEdited, [=]() { connect(intensityEditor, &QLineEdit::textEdited, [=]() {
QString str = intensityEditor->text(); QString str = intensityEditor->text();
int pos; int pos;
...@@ -77,8 +77,8 @@ OffSpecularBeamEditor::OffSpecularBeamEditor(QWidget* parent, OffSpecularInstrum ...@@ -77,8 +77,8 @@ OffSpecularBeamEditor::OffSpecularBeamEditor(QWidget* parent, OffSpecularInstrum
emit dataChanged(); emit dataChanged();
} }
}); });
//! if validator does not assert the input value, it says about that, // if validator does not assert the input value, it says about that,
//! and here we return to the last correct value // and here we return to the last correct value
connect(validator, &FixupDoubleValidator::fixupSignal, [=]() { connect(validator, &FixupDoubleValidator::fixupSignal, [=]() {
auto* editor = qobject_cast<QLineEdit*>(validator->parent()); auto* editor = qobject_cast<QLineEdit*>(validator->parent());
editor->setText(QString::number(item->beamItem()->intensity(),'g')); editor->setText(QString::number(item->beamItem()->intensity(),'g'));
......
...@@ -78,7 +78,7 @@ SpecularBeamEditor::SpecularBeamEditor(QWidget* parent, SpecularBeamItem* item, ...@@ -78,7 +78,7 @@ SpecularBeamEditor::SpecularBeamEditor(QWidget* parent, SpecularBeamItem* item,
connect(footprintEditor, &FootprintCorrectionEditor::dataChanged, this, connect(footprintEditor, &FootprintCorrectionEditor::dataChanged, this,
&SpecularBeamEditor::dataChanged); &SpecularBeamEditor::dataChanged);
//! validate value while typing // validate value while typing
connect(intensityLineEdit, &QLineEdit::textEdited, [=]() { connect(intensityLineEdit, &QLineEdit::textEdited, [=]() {
QString str = intensityLineEdit->text(); QString str = intensityLineEdit->text();
int pos; int pos;
...@@ -87,8 +87,8 @@ SpecularBeamEditor::SpecularBeamEditor(QWidget* parent, SpecularBeamItem* item, ...@@ -87,8 +87,8 @@ SpecularBeamEditor::SpecularBeamEditor(QWidget* parent, SpecularBeamItem* item,
emit dataChanged(); emit dataChanged();
} }
}); });
//! if validator does not assert the input value, it says about that, // if validator does not assert the input value, it says about that,
//! and here we return to the last correct value // and here we return to the last correct value
connect(validator, &FixupDoubleValidator::fixupSignal, [=]() { connect(validator, &FixupDoubleValidator::fixupSignal, [=]() {
auto* editor = qobject_cast<QLineEdit*>(validator->parent()); auto* editor = qobject_cast<QLineEdit*>(validator->parent());
editor->setText(QString::number(item->intensity(),'g')); editor->setText(QString::number(item->intensity(),'g'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment