Skip to content

Commit

Permalink
better naming
Browse files Browse the repository at this point in the history
  • Loading branch information
toloudis committed Mar 4, 2024
1 parent 4645cf1 commit 9de381f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions agave_app/AppearanceSettingsWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ Section*
QAppearanceSettingsWidget::createAreaLightingControls(QAction* pLightRotationAction)
{
Section* section = new Section("Area Light", 0);
auto* sectionLayout = Controls::createMyFormLayout();
auto* sectionLayout = Controls::createAgaveFormLayout();

m_lt0gui.m_enableControlsCheckBox = new QCheckBox();
m_lt0gui.m_enableControlsCheckBox->setStatusTip(
Expand Down Expand Up @@ -306,7 +306,7 @@ Section*
QAppearanceSettingsWidget::createSkyLightingControls()
{
Section* section = new Section("Sky Light", 0);
auto* sectionLayout = Controls::createMyFormLayout();
auto* sectionLayout = Controls::createAgaveFormLayout();

auto* skylightTopLayout = new QHBoxLayout();
m_lt1gui.m_stintensitySlider = new QNumericSlider();
Expand Down Expand Up @@ -876,7 +876,7 @@ QAppearanceSettingsWidget::onNewImage(Scene* scene)

auto* fullLayout = new QVBoxLayout();

auto* sectionLayout = Controls::createMyFormLayout();
auto* sectionLayout = Controls::createAgaveFormLayout();

GradientWidget* editor =
new GradientWidget(scene->m_volume->channel(i)->m_histogram, &scene->m_material.m_gradientData[i]);
Expand Down
10 changes: 5 additions & 5 deletions agave_app/Controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ QIntSlider::setTracking(bool enabled)
}

void
MyFormLayout::addRow(const QString& label, QWidget* widget)
AgaveFormLayout::addRow(const QString& label, QWidget* widget)
{
int row = rowCount();
auto* labelWidget = new QLabel(label);
Expand All @@ -530,7 +530,7 @@ MyFormLayout::addRow(const QString& label, QWidget* widget)
}

void
MyFormLayout::addRow(const QString& label, QLayout* layout)
AgaveFormLayout::addRow(const QString& label, QLayout* layout)
{
int row = rowCount();
auto* labelWidget = new QLabel(label);
Expand All @@ -556,10 +556,10 @@ Controls::initFormLayout(QFormLayout& layout)
layout.setLabelAlignment(Qt::AlignRight);
}

MyFormLayout*
Controls::createMyFormLayout(QWidget* parent)
AgaveFormLayout*
Controls::createAgaveFormLayout(QWidget* parent)
{
MyFormLayout* layout = new MyFormLayout(parent);
AgaveFormLayout* layout = new AgaveFormLayout(parent);
// basically keep the label column a fixed width and let the widget column grow
layout->setColumnStretch(0, 1);
layout->setColumnStretch(1, 100);
Expand Down
6 changes: 3 additions & 3 deletions agave_app/Controls.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,11 @@ private slots:
QSlider m_slider;
};

class MyFormLayout : public QGridLayout
class AgaveFormLayout : public QGridLayout
{
Q_OBJECT
public:
MyFormLayout(QWidget* parent = nullptr)
AgaveFormLayout(QWidget* parent = nullptr)
: QGridLayout(parent)
{
}
Expand All @@ -211,7 +211,7 @@ class Controls
static QFormLayout* createFormLayout(QWidget* parent = nullptr);
static void initFormLayout(QFormLayout& layout);

static MyFormLayout* createMyFormLayout(QWidget* parent = nullptr);
static AgaveFormLayout* createAgaveFormLayout(QWidget* parent = nullptr);
};

/**
Expand Down
10 changes: 5 additions & 5 deletions agave_app/tfeditor/gradients.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ GradientWidget::GradientWidget(const Histogram& histogram, GradientData* dataObj
m_editor = new GradientEditor(m_histogram, this);
mainGroupLayout->addWidget(m_editor);

auto* sectionLayout = Controls::createMyFormLayout();
auto* sectionLayout = Controls::createAgaveFormLayout();

QButtonGroup* btnGroup = new QButtonGroup(this);
QPushButton* windowLevelButton = new QPushButton("Wnd/Lvl");
Expand Down Expand Up @@ -425,19 +425,19 @@ GradientWidget::GradientWidget(const Histogram& histogram, GradientData* dataObj
mainGroupLayout->addLayout(hbox);

QWidget* firstPageWidget = new QWidget;
auto* section0Layout = Controls::createMyFormLayout();
auto* section0Layout = Controls::createAgaveFormLayout();
firstPageWidget->setLayout(section0Layout);

QWidget* secondPageWidget = new QWidget;
auto* section1Layout = Controls::createMyFormLayout();
auto* section1Layout = Controls::createAgaveFormLayout();
secondPageWidget->setLayout(section1Layout);

QWidget* thirdPageWidget = new QWidget;
auto* section2Layout = Controls::createMyFormLayout();
auto* section2Layout = Controls::createAgaveFormLayout();
thirdPageWidget->setLayout(section2Layout);

QWidget* fourthPageWidget = new QWidget;
auto* section3Layout = Controls::createMyFormLayout();
auto* section3Layout = Controls::createAgaveFormLayout();
fourthPageWidget->setLayout(section3Layout);

QStackedLayout* stackedLayout = new QStackedLayout(mainGroupLayout);
Expand Down

0 comments on commit 9de381f

Please sign in to comment.