Mostly complete from the Python original

This commit is contained in:
Matt Keeter 2014-03-03 21:14:16 -05:00
commit 97cf902b87
18 changed files with 527 additions and 0 deletions

26
src/window.cpp Normal file
View file

@ -0,0 +1,26 @@
#include "window.h"
#include "canvas.h"
#include "loader.h"
Window::Window(QWidget *parent) :
QMainWindow(parent)
{
setWindowTitle("fstl");
QGLFormat format;
format.setVersion(2, 1);
format.setSampleBuffers(true);
canvas = new Canvas(format, this);
setCentralWidget(canvas);
}
void Window::load_stl(const QString &filename)
{
Loader* loader = new Loader(this, filename);
connect(loader, SIGNAL(got_mesh(Mesh*)),
canvas, SLOT(load_mesh(Mesh*)));
connect(loader, SIGNAL(finished()),
loader, SLOT(deleteLater()));
loader->start();
}