#include <QMenuBar>
+#include <QMessageBox>
#include <QFileDialog>
#include "window.h"
QObject::connect(quit_action, SIGNAL(triggered()),
this, SLOT(close()));
+ about_action = new QAction("About", this);
+ QObject::connect(about_action, SIGNAL(triggered()),
+ this, SLOT(on_about()));
+
auto file_menu = menuBar()->addMenu("File");
file_menu->addAction(open_action);
file_menu->addAction(quit_action);
+ auto help_menu = menuBar()->addMenu("Help");
+ help_menu->addAction(about_action);
+
resize(600, 400);
}
}
}
+void Window::on_about()
+{
+ QMessageBox::about(this, "About fstl", "<b>fstl</b><br><br>"
+ "A fast viewer for <code>.stl</code> files.<br>"
+ "<a href=\"https://github.com/mkeeter/fstl\">https://github.com/mkeeter/fstl</a><br><br>"
+ "© 2014 Matthew Keeter<br>"
+ "<a href=\"mailto:matt.j.keeter@gmail.com\">matt.j.keeter@gmail.com</a><br>");
+}
+
void Window::enable_open_action()
{