summaryrefslogtreecommitdiff
path: root/openscad.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-23 19:56:46 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-23 19:56:46 (GMT)
commit4daae374011de97aafa999f2353e2c7d17511046 (patch)
treebc51daf75fb7d4be3d17ed4fd3206f08bf7d0aee /openscad.cc
parent0fcdcb6bd6117e8e8ccaff15b0a083c2f76266a6 (diff)
Clifford Wolf:
Added GUI git-svn-id: http://svn.clifford.at/openscad/trunk@13 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'openscad.cc')
-rw-r--r--openscad.cc31
1 files changed, 27 insertions, 4 deletions
diff --git a/openscad.cc b/openscad.cc
index 988b4c2..64eb5bf 100644
--- a/openscad.cc
+++ b/openscad.cc
@@ -18,22 +18,43 @@
*
*/
-#define INCLUDE_ABSTRACT_NODE_DETAILS
+// #define INCLUDE_ABSTRACT_NODE_DETAILS
#include "openscad.h"
+#include <QApplication>
+
+#if 0
void report_func(const class AbstractNode*, void*, int mark)
{
printf("CSG rendering progress: %.2f%%\n", (mark*100.0) / progress_report_count);
}
+#endif
-int main()
+int main(int argc, char **argv)
{
- int rc = 0;
+ int rc;
initialize_builtin_functions();
initialize_builtin_modules();
+ QApplication a(argc, argv);
+ MainWindow *m;
+
+ if (argc > 1)
+ m = new MainWindow(argv[1]);
+ else
+ m = new MainWindow();
+
+ m->show();
+ m->resize(800, 600);
+ m->s1->setSizes(QList<int>() << 400 << 400);
+ m->s2->setSizes(QList<int>() << 400 << 200);
+
+ a.connect(m, SIGNAL(destroyed()), &a, SLOT(quit()));
+ rc = a.exec();
+
+#if 0
Context root_ctx(NULL);
root_ctx.functions_p = &builtin_functions;
root_ctx.modules_p = &builtin_modules;
@@ -67,11 +88,13 @@ int main()
}
outFile << P;
+ delete root_node;
delete root_module;
+#endif
destroy_builtin_functions();
destroy_builtin_modules();
- return rc;
+ return rc;
}
contact: Jan Huwald // Impressum