28 lines
570 B
C++
28 lines
570 B
C++
#include "main_window.hxx"
|
|
|
|
#include "ui_main_window.h"
|
|
|
|
ParticleMatter::ParticleMatter(QWidget* parent)
|
|
: QMainWindow(parent),
|
|
m_ui(new Ui::MainWindow) {
|
|
m_ui->setupUi(this);
|
|
updateView();
|
|
}
|
|
|
|
ParticleMatter::~ParticleMatter() = default;
|
|
|
|
void ParticleMatter::updateView() {
|
|
const auto color = m_ui->inBackground->color();
|
|
RedrawArgs args{
|
|
.background = { color.redF(), color.greenF(), color.blueF(), 1.00 },
|
|
};
|
|
m_ui->viewport->setView(args);
|
|
}
|
|
|
|
void ParticleMatter::updateViewIf(bool update) {
|
|
if (update)
|
|
updateView();
|
|
}
|
|
|
|
#include "moc_main_window.cpp"
|