Mostly complete from the Python original
This commit is contained in:
commit
97cf902b87
18 changed files with 527 additions and 0 deletions
26
src/window.cpp
Normal file
26
src/window.cpp
Normal 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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue