From 5ca04e5b2ec8eef88df6cbd4e3d09ac7dab55c0d Mon Sep 17 00:00:00 2001 From: Julian T Date: Fri, 14 Aug 2020 18:53:08 +0200 Subject: Added multithreading --- app/mainwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/mainwindow.cpp') diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index a365f38..3fcc9c5 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -18,9 +18,16 @@ MainWindow::MainWindow(Renderer r) saveAct->setStatusTip(tr("Save the rendered image")); connect(saveAct, &QAction::triggered, this, &MainWindow::saveimage); + auto stopAct = new QAction(tr("&Stop"), this); + stopAct->setStatusTip(tr("Stop and sync threads")); + QObject::connect(stopAct, &QAction::triggered, &m_render, &RenderCoordinator::stop); + fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->addAction(saveAct); + fileMenu = menuBar()->addMenu(tr("&Render")); + fileMenu->addAction(stopAct); + helpMenu = menuBar()->addMenu(tr("&Help")); helpMenu->addAction(tr("About Qt"), qApp, &QApplication::aboutQt); -- cgit v1.2.3