made toggleAnimation a slot

master
Benjamin Kraft 3 years ago
parent e798cf894a
commit 0e80fcc93f
  1. 3
      headers/Mandelbrot.h
  2. 6
      src/MainWindow.cpp

@ -10,12 +10,13 @@ public:
void init(GLuint); void init(GLuint);
void draw(); void draw();
void updateAnimation(); void updateAnimation();
void toggleAnimation();
void setMaxIterations(int); void setMaxIterations(int);
void translateRelative(QVector2D); void translateRelative(QVector2D);
void zoomRelative(int, QVector2D); void zoomRelative(int, QVector2D);
void resizeRelative(QVector2D); void resizeRelative(QVector2D);
bool initShader(); bool initShader();
public slots:
void toggleAnimation();
private: private:
int maxIterations = 0; int maxIterations = 0;
float hueAdd = 0; float hueAdd = 0;

@ -50,10 +50,8 @@ void MainWindow::buildUI() {
connect( connect(
animButton, animButton,
&QPushButton::clicked, &QPushButton::clicked,
this, &outputWidget.getMandelbrot(),
[this](){ &Mandelbrot::toggleAnimation);
this->outputWidget.getMandelbrot().toggleAnimation();
});
auto controls = new QGridLayout; auto controls = new QGridLayout;
controls->addWidget(maxIterationsCaption, 1, 1); controls->addWidget(maxIterationsCaption, 1, 1);

Loading…
Cancel
Save