| 1249 | } |
| 1250 | |
| 1251 | void 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 | |
| 1282 | void MainWindow::on_actionShowThumbnails_triggered(bool checked) |
nothing calls this directly
no test coverage detected