jfjoch_viewer: Show detected GPUs in the about box
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "JFJochViewerWindow.h"
|
||||
#include "../common/GitInfo.h"
|
||||
#include "../common/CUDAWrapper.h"
|
||||
|
||||
JFJochViewerMenu::JFJochViewerMenu(QWidget *parent) : QMenuBar(parent) {
|
||||
// Create "File" menu
|
||||
@@ -85,15 +86,21 @@ void JFJochViewerMenu::aboutSelected() {
|
||||
QMessageBox aboutBox(this);
|
||||
aboutBox.setWindowTitle("About");
|
||||
|
||||
// Set detailed text with proper spacing and structure
|
||||
aboutBox.setText(
|
||||
"<h3>Jungfraujoch Image Viewer</h3>" // Use HTML for improved style
|
||||
QString about_text = "<h3>Jungfraujoch Image Viewer</h3>" // Use HTML for improved style
|
||||
"<p><b>Version:</b> " + version + "</p>"
|
||||
"<p><b>Copyright:</b> 2019-2025 Paul Scherrer Institute</p>"
|
||||
"<p><b>Author:</b> Filip Leonarski <filip.leonarski@psi.ch></p>"
|
||||
"<p><b>Links:</b> <a href='https://jungfraujoch.readthedocs.io'>Documentation</a>, "
|
||||
"<a href='https://gitea.psi.ch/mx/jungfraujoch'>Repository</a></p>"
|
||||
);
|
||||
"<a href='https://gitea.psi.ch/mx/jungfraujoch'>Repository</a></p>";
|
||||
|
||||
#ifdef JFJOCH_USE_CUDA
|
||||
about_text += QString("<p>Compiled with CUDA support. %1 GPU(s) detected</p>")
|
||||
.arg(QString::number(get_gpu_count()));
|
||||
#else
|
||||
about_text += "<p><b>Note:</b> CUDA is not available on this system.</p>";
|
||||
#endif
|
||||
// Set detailed text with proper spacing and structure
|
||||
aboutBox.setText(about_text);
|
||||
|
||||
// Optional: Add a larger informative text, if needed
|
||||
aboutBox.setInformativeText(
|
||||
|
||||
Reference in New Issue
Block a user