MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / closeEvent

Method closeEvent

ImagePlay/src/MainWindow.cpp:1251–1279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1249}
1250
1251void MainWindow::closeEvent(QCloseEvent* e)
1252{
1253 QMessageBox question(QMessageBox::Question, "Quit", "Do you want to quit ImagePlay?", QMessageBox::Yes | QMessageBox::No, this);
1254 question.setIconPixmap(QPixmap(":/question.png").scaledToWidth(48, Qt::SmoothTransformation));
1255
1256 int reply = question.exec();
1257 if (reply == QMessageBox::Yes)
1258 {
1259 writeSettings();
1260
1261 ui->graphicsView->stopExecution();
1262 ui->graphicsView->terminate();
1263 //_pluginManager->unloadPlugins();
1264
1265 //TODO: Application crashed here (update calls after the deallocation). Further investigation might be necessary.
1266// delete _imageViewer;
1267// _imageViewer->deleteLater();
1268// _imageViewer = NULL;
1269
1270 // try closing any videocapture items
1271 IPLCameraIO::release();
1272
1273 QApplication::quit();
1274 }
1275 else
1276 {
1277 e->ignore();
1278 }
1279}
1280
1281
1282void MainWindow::on_actionShowThumbnails_triggered(bool checked)

Callers

nothing calls this directly

Calls 2

stopExecutionMethod · 0.80
terminateMethod · 0.80

Tested by

no test coverage detected