46 lines
886 B
C++
46 lines
886 B
C++
#include "mainwindow.h"
|
|
#include "ui_mainwindow.h"
|
|
#include <QPainter>
|
|
|
|
MainWindow::MainWindow(QWidget *parent) :
|
|
QMainWindow(parent),
|
|
ui(new Ui::MainWindow)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
MainWindow::~MainWindow()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void MainWindow::paintEvent(QPaintEvent* event)
|
|
{
|
|
QPainter painter{this};
|
|
painter.setBrush(QColor{26,25,25});
|
|
}
|
|
|
|
void MainWindow::on_btnAstroid_clicked()
|
|
{
|
|
this->ui->renderArea->setShape(RenderArea::Astroid);
|
|
this->ui->renderArea->repaint();
|
|
}
|
|
|
|
void MainWindow::on_btnCicloid_clicked()
|
|
{
|
|
this->ui->renderArea->setShape(RenderArea::Cycloid);
|
|
this->ui->renderArea->repaint();
|
|
}
|
|
|
|
void MainWindow::on_btnHuygens_clicked()
|
|
{
|
|
this->ui->renderArea->setShape(RenderArea::HuygensCycloid);
|
|
this->ui->renderArea->repaint();
|
|
}
|
|
|
|
void MainWindow::on_btnHypo_clicked()
|
|
{
|
|
this->ui->renderArea->setShape(RenderArea::HypoCycloid);
|
|
this->ui->renderArea->repaint();
|
|
}
|