Interactive Mandelbrot viewer with Qt and OpenGL.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QSlider>
|
|
|
|
#include <iostream>
|
|
|
|
#include "../headers/MainWindow.h"
|
|
|
|
|
|
|
|
MainWindow::MainWindow() {
|
|
|
|
buildUI();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::buildUI() {
|
|
|
|
resize(700, 700);
|
|
|
|
|
|
|
|
auto sizeSlider = new QSlider(Qt::Horizontal);
|
|
|
|
sizeSlider->setRange(100, 800);
|
|
|
|
QSlider::connect(sizeSlider, &QSlider::valueChanged, this, &MainWindow::sizeSliderChanged);
|
|
|
|
sizeSlider->setValue(500);
|
|
|
|
|
|
|
|
auto controls = new QGridLayout;
|
|
|
|
controls->addWidget(sizeSlider);
|
|
|
|
|
|
|
|
auto lyt = new QVBoxLayout(this);
|
|
|
|
lyt->addWidget(outputWidget);
|
|
|
|
lyt->addLayout(controls);
|
|
|
|
}
|
|
|
|
|
|
|
|
//TODO Handle size change
|
|
|
|
void MainWindow::sizeSliderChanged(int newValue) {
|
|
|
|
|
|
|
|
}
|