diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/MainWindow.h | 2 | ||||
-rw-r--r-- | src/MainWindow.ui | 6 | ||||
-rw-r--r-- | src/mainwin.cc | 21 |
3 files changed, 21 insertions, 8 deletions
diff --git a/src/MainWindow.h b/src/MainWindow.h index 5546290..226689a 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -157,7 +157,7 @@ public slots: void helpAbout(); void helpHomepage(); void helpManual(); - void helpOpenGL(); + void helpLibrary(); void quit(); void actionReloadCompile(); void checkAutoReload(); diff --git a/src/MainWindow.ui b/src/MainWindow.ui index f89e0d4..13bb226 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -222,7 +222,7 @@ <addaction name="helpActionAbout"/> <addaction name="helpActionHomepage"/> <addaction name="helpActionManual"/> - <addaction name="helpActionOpenGLInfo"/> + <addaction name="helpActionLibraryInfo"/> </widget> <addaction name="menu_File"/> <addaction name="menu_Edit"/> @@ -671,9 +671,9 @@ <string>Export as CSG...</string> </property> </action> - <action name="helpActionOpenGLInfo"> + <action name="helpActionLibraryInfo"> <property name="text"> - <string>OpenGL info</string> + <string>Library info</string> </property> </action> </widget> diff --git a/src/mainwin.cc b/src/mainwin.cc index 2fd75c9..9b24eea 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -323,7 +323,7 @@ MainWindow::MainWindow(const QString &filename) connect(this->helpActionAbout, SIGNAL(triggered()), this, SLOT(helpAbout())); connect(this->helpActionHomepage, SIGNAL(triggered()), this, SLOT(helpHomepage())); connect(this->helpActionManual, SIGNAL(triggered()), this, SLOT(helpManual())); - connect(this->helpActionOpenGLInfo, SIGNAL(triggered()), this, SLOT(helpOpenGL())); + connect(this->helpActionLibraryInfo, SIGNAL(triggered()), this, SLOT(helpLibrary())); setCurrentOutput(); @@ -1699,15 +1699,28 @@ MainWindow::helpManual() QDesktopServices::openUrl(QUrl("http://en.wikibooks.org/wiki/OpenSCAD_User_Manual")); } -void MainWindow::helpOpenGL() +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) +void MainWindow::helpLibrary() { + QString libinfo; + libinfo.sprintf("Boost version: %s\n" + "Eigen version: %d.%d.%d\n" + "CGAL version: %s\n" + "OpenCSG version: %s\n\n", + BOOST_LIB_VERSION, + EIGEN_WORLD_VERSION, EIGEN_MAJOR_VERSION, EIGEN_MINOR_VERSION, + TOSTRING(CGAL_VERSION), + OPENCSG_VERSION_STRING); + if (!this->openglbox) { this->openglbox = new QMessageBox(QMessageBox::Information, - "OpenGL Info", "Detailed OpenGL Info", + "OpenGL Info", "Detailed Library Info", QMessageBox::Ok, this); } - this->openglbox->setDetailedText(this->glview->getRendererInfo()); + + this->openglbox->setDetailedText(libinfo + this->glview->getRendererInfo()); this->openglbox->show(); } |