summaryrefslogtreecommitdiff
path: root/mainwin.cc
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2009-12-12 22:04:32 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2009-12-12 22:04:32 (GMT)
commit4564d9d4a2370bec2da0aca36e192c7d5da472d7 (patch)
treee3d7dfe8360a1009a4b6b8b3630419e4cceaefc9 /mainwin.cc
parent6e32acbe6591f967453ef09efed9d08642bff9db (diff)
Added simple about box
git-svn-id: http://svn.clifford.at/openscad/trunk@165 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'mainwin.cc')
-rw-r--r--mainwin.cc29
1 files changed, 22 insertions, 7 deletions
diff --git a/mainwin.cc b/mainwin.cc
index 4fdc001..9bd6889 100644
--- a/mainwin.cc
+++ b/mainwin.cc
@@ -40,6 +40,7 @@
#include <QMimeData>
#include <QUrl>
#include <QTimer>
+#include <QMessageBox>
//for chdir
#include <unistd.h>
@@ -63,6 +64,15 @@
#endif
+static char helptext[] =
+ "OpenSCAD (www.openscad.org)\n"
+ "Copyright (C) 2009 Clifford Wolf <clifford@clifford.at>\n"
+ "\n"
+ "This program is free software; you can redistribute it and/or modify"
+ "it under the terms of the GNU General Public License as published by"
+ "the Free Software Foundation; either version 2 of the License, or"
+ "(at your option) any later version.";
+
QPointer<MainWindow> MainWindow::current_win = NULL;
MainWindow::MainWindow(const char *filename)
@@ -191,16 +201,14 @@ MainWindow::MainWindow(const char *filename)
// viewActionCGALGrid = menu->addAction("CGAL Grid Only", this, SLOT(viewModeCGALGrid()), QKeySequence(Qt::Key_F11));
// #endif
+ // Help menu
+ connect(this->helpActionAbout, SIGNAL(triggered()), this, SLOT(helpAbout()));
+
+
console->setReadOnly(true);
current_win = this;
- PRINT("OpenSCAD (www.openscad.at)");
- PRINT("Copyright (C) 2009 Clifford Wolf <clifford@clifford.at>");
- PRINT("");
- PRINT("This program is free software; you can redistribute it and/or modify");
- PRINT("it under the terms of the GNU General Public License as published by");
- PRINT("the Free Software Foundation; either version 2 of the License, or");
- PRINT("(at your option) any later version.");
+ PRINT(helptext);
PRINT("");
editor->setTabStopWidth(30);
@@ -1322,3 +1330,10 @@ void MainWindow::dropEvent(QDropEvent *event)
current_win = NULL;
}
+void
+MainWindow::helpAbout()
+{
+ qApp->setWindowIcon(QApplication::windowIcon());
+ QMessageBox::information(this, "About OpenSCAD", helptext);
+}
+
contact: Jan Huwald // Impressum