Skip to content

Commit d756939

Browse files
committed
minor rearrangement of lights frame.
1 parent 8abe67b commit d756939

File tree

5 files changed

+12
-17
lines changed

5 files changed

+12
-17
lines changed

relightlab/domepanel.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ DomePanel::DomePanel(QWidget *parent): QFrame(parent) {
2323
QHBoxLayout *content = new QHBoxLayout(this);
2424
//content->setHorizontalSpacing(20);
2525

26-
QPushButton *sphere = new QPushButton(QIcon::fromTheme("folder"), "New reflective sphere...");
27-
sphere->setProperty("class", "large");
28-
sphere->setMinimumWidth(200);
29-
sphere->setMaximumWidth(300);
30-
connect(sphere, SIGNAL(clicked()), parent, SLOT(newSphere()));
31-
content->addWidget(sphere, 0, Qt::AlignTop);
3226

3327
QPushButton *save = new QPushButton(QIcon::fromTheme("save"), "Export dome...");
3428
save->setProperty("class", "large");

relightlab/lightgeometry.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ LightsGeometry::LightsGeometry(QWidget *parent): QFrame(parent) {
3434

3535
content->addWidget( new QLabel("Filename:"), 0, 0);
3636
content->addWidget(filename = new QLineEdit, 0, 1);
37+
filename->setEnabled(false);
3738

3839
content->addWidget( new QLabel("Number of images:"), 1, 0);
3940
content->addWidget(images_number = new QSpinBox, 1, 1);

relightlab/lightsframe.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ LightsFrame::LightsFrame() {
2525
content->addWidget(new QLabel("<h2>Lights direction setup</h2>"));
2626
content->addSpacing(30);
2727

28-
content->addWidget(dome_panel = new DomePanel(this));
29-
3028
content->addWidget(sphere_panel = new SpherePanel(this));
3129
content->addSpacing(30);
3230

31+
content->addWidget(dome_panel = new DomePanel(this));
32+
content->addSpacing(30);
33+
3334
geometry = new LightsGeometry(this);
3435
content->addWidget(geometry);
3536

@@ -43,9 +44,6 @@ void LightsFrame::clear() {
4344
sphere_panel->clear();
4445
}
4546

46-
void LightsFrame::newSphere() {
47-
sphere_panel->newSphere();
48-
}
4947

5048
void LightsFrame::init() {
5149
// bool useSphere = qRelightApp->project().spheres.size();

relightlab/lightsframe.h

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class LightsFrame: public QFrame {
2121
LightsFrame();
2222

2323
public slots:
24-
void newSphere();
2524
void clear();
2625
void init();
2726
void setPixelSize();

relightlab/spherepanel.cpp

+8-5
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ SpherePanel::SpherePanel(QWidget *parent): QGroupBox("Reflective spheres", paren
2020

2121
QFrame *spheres_frame = new QFrame;
2222

23-
QScrollArea *sphere_area = new QScrollArea;
24-
sphere_area->setWidget(spheres_frame);
25-
sphere_area->setWidgetResizable(true);
26-
27-
content->addWidget(sphere_area);
23+
QPushButton *sphere = new QPushButton(QIcon::fromTheme("folder"), "New reflective sphere...");
24+
sphere->setProperty("class", "large");
25+
sphere->setMinimumWidth(200);
26+
sphere->setMaximumWidth(300);
27+
connect(sphere, SIGNAL(clicked()), this, SLOT(newSphere()));
28+
content->addWidget(sphere, 0, Qt::AlignTop);
29+
30+
content->addWidget(spheres_frame);
2831

2932
spheres = new QVBoxLayout(spheres_frame);
3033

0 commit comments

Comments
 (0)