Skip to content
Snippets Groups Projects
Commit 57f1cae5 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

standardize this and that

parent 567820d5
Branches
Tags
1 merge request!2202DoubleSpinBox cleanup in view of #870
......@@ -17,11 +17,10 @@
#include "GUI/View/Numeric/SafeSpinBox.h"
#include "GUI/View/Numeric/ScientificSpinBox.h"
SphericalAxisForm::SphericalAxisForm(QFormLayout* form, QWidget* parent)
: QObject(parent)
, m_nbinsSpinBox(new SafeSpinBox)
, m_minimumSpinBox(new ScientificSpinBox(parent))
, m_maximumSpinBox(new ScientificSpinBox(parent))
SphericalAxisForm::SphericalAxisForm(QFormLayout* form)
: m_nbinsSpinBox(new SafeSpinBox)
, m_minimumSpinBox(new ScientificSpinBox)
, m_maximumSpinBox(new ScientificSpinBox)
, m_axisItem(nullptr)
{
m_nbinsSpinBox->setRange(1, 65536);
......
......@@ -21,14 +21,14 @@ class BasicAxisItem;
class SafeSpinBox;
class ScientificSpinBox;
/// The form for a spherical axis: contains the bare bone widgets for the user to enter
/// the number of bins and to select the range in degrees (minimum & maximum)
/// The input widgets will be inserted in the form given in the constructor
//! The form for a spherical axis: contains the bare bone widgets for the user to enter
//! the number of bins and to select the range in degrees (minimum & maximum)
//! The input widgets will be inserted in the form given in the constructor
class SphericalAxisForm : public QObject {
Q_OBJECT
public:
SphericalAxisForm(QFormLayout* form, QWidget* parent);
SphericalAxisForm(QFormLayout* form);
void setAxisItem(BasicAxisItem* axisItem);
void setEnabled(bool enabled);
......
......@@ -27,14 +27,14 @@ AlphaScanEditor::AlphaScanEditor(QWidget* parent, GrazingScanItem* item, bool al
auto* layout = new QFormLayout(body());
//... axis type combo
auto* typeComboBox = new QComboBox(this);
auto* typeComboBox = new QComboBox;
typeComboBox->addItem("Uniform axis");
typeComboBox->addItem("Non-uniform axis"); // for use with experimental data ?
const int idx = m_item->pointwiseAlphaAxisSelected() ? 1 : 0;
layout->addRow("Axis type:", typeComboBox);
//... axis parameters
m_form = new SphericalAxisForm(layout, this);
m_form = new SphericalAxisForm(layout);
connect(m_form, &SphericalAxisForm::dataChanged, this, &AlphaScanEditor::dataChanged);
//... beam distribution
......
......@@ -17,7 +17,6 @@
#include <QDoubleSpinBox>
#include <QLineEdit>
#include <QWidget>
class RealLimits;
class ScientificSpinBox;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment