Skip to content

Commit 67fd09f

Browse files
committed
minor fixes
1 parent 6a01f43 commit 67fd09f

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

relightlab/lightgeometry.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ LightsGeometry::LightsGeometry(QWidget *parent): QFrame(parent) {
2828
grid->addWidget(new QLabel("Image width:"), 2, 0);
2929
grid->addWidget(image_width = new QDoubleSpinBox, 2, 1);
3030
grid->addWidget(new QLabel("cm"), 2, 2);
31-
connect(image_width, &QDoubleSpinBox::valueChanged, [&](double v) { qRelightApp->project().dome.imageWidth = v; });
31+
connect(image_width, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [&](double v) { qRelightApp->project().dome.imageWidth = v; });
3232

3333
grid->addWidget(new QLabel("Diameter:"), 3, 0);
3434
grid->addWidget(diameter = new QDoubleSpinBox, 3, 1);
3535
grid->addWidget(new QLabel("cm"), 3, 2);
36-
connect(diameter, &QDoubleSpinBox::valueChanged, [&](double v) { qRelightApp->project().dome.domeDiameter = v; });
36+
connect(diameter, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [&](double v) { qRelightApp->project().dome.domeDiameter = v; });
3737

3838
grid->addWidget(new QLabel("Vertical offset:"), 4, 0);
3939
grid->addWidget(vertical_offset = new QDoubleSpinBox, 4, 1);
4040
grid->addWidget(new QLabel("cm"), 4, 2);
41-
connect(vertical_offset, &QDoubleSpinBox::valueChanged, [&](double v) { qRelightApp->project().dome.verticalOffset = v; });
41+
connect(vertical_offset, QOverload<double>::of(&QDoubleSpinBox::valueChanged), [&](double v) { qRelightApp->project().dome.verticalOffset = v; });
4242

4343

4444
lights = new QGraphicsView(&scene);

relightlab/lppanel.cpp

+1-13
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,9 @@
1212
#include <QFileDialog>
1313
#include <QTextBrowser>
1414

15-
void makePage(QWidget *widget, int margin_percent = 15) {
16-
QLayout *content = widget->layout();
17-
content->setContentsMargins(31, 31, 31, 13);
18-
19-
QHBoxLayout *page_layout = new QHBoxLayout;
20-
widget->setLayout(page_layout);
21-
22-
page_layout->addStretch(margin_percent);
23-
page_layout->addLayout(content, 100 - 2*margin_percent);
24-
page_layout->addStretch(margin_percent);
25-
}
2615

2716
LpPanel::LpPanel() {
28-
QVBoxLayout *content = new QVBoxLayout();
17+
QVBoxLayout *content = new QVBoxLayout(this);
2918

3019
QLabel *title = new QLabel("<h2>Load .lp file</h2>");
3120
content->addWidget(title);
@@ -47,7 +36,6 @@ LpPanel::LpPanel() {
4736
lp_filename = new QLineEdit();
4837
lp_filename->setEnabled(false);
4938
lp_layout->addWidget(lp_filename);
50-
5139
}
5240

5341

relightlab/relightlab.pro

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ HEADERS += \
9595
lightsframe.h \
9696
../src/lp.h \
9797
domepanel.h \
98-
lppanel.h
98+
lppanel.h \
99+
lightsgeometry.h
99100

100101
FORMS += \
101102
form.ui

0 commit comments

Comments
 (0)