KineticCursor/src/mainwindow.cpp

20 lines
595 B
C++

#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
ui->setupUi(this);
QObject::connect(this, &MainWindow::angleUpdated, this->ui->dial, &QDial::setValue);
QObject::connect(this, &MainWindow::newImage, this->ui->label, &QLabel::setPixmap);
QObject::connect(this->ui->resetButton, &QPushButton::clicked, this, &MainWindow::reset);
}
MainWindow::~MainWindow() {
delete ui;
}
void MainWindow::setForce(QPointF force) {
this->ui->forceX->setValue(force.x());
this->ui->forceY->setValue(-force.y());
}