]> git.sur5r.net Git - fstl/blob - src/app.cpp
Start with status as ' ' to precache font
[fstl] / src / app.cpp
1 #include <QDebug>
2 #include <QFileOpenEvent>
3
4 #include "app.h"
5 #include "window.h"
6
7 App::App(int argc, char *argv[]) :
8     QApplication(argc, argv), window(new Window())
9 {
10     window->show();
11     window->load_stl(":gl/sphere.stl");
12 }
13
14 bool App::event(QEvent* e)
15 {
16     if (e->type() == QEvent::FileOpen)
17     {
18         window->load_stl(static_cast<QFileOpenEvent*>(e)->file());
19         return true;
20     }
21     else
22     {
23         return QApplication::event(e);
24     }
25 }