]> git.sur5r.net Git - fstl/blobdiff - src/loader.h
New upstream version 0.10.0
[fstl] / src / loader.h
index fb0c8d81eb10bf8a610fb38a4345dfa2f65ce6ea..6f5942f0bf9733322208f14e01401ff7755580dd 100644 (file)
@@ -9,22 +9,28 @@ class Loader : public QThread
 {
     Q_OBJECT
 public:
-    explicit Loader(QObject* parent, const QString& filename);
+    explicit Loader(QObject* parent, const QString& filename, bool is_reload);
     void run();
 
 protected:
     Mesh* load_stl();
 
+    /*  Reads an ASCII stl, starting from the start of the file*/
+    Mesh* read_stl_ascii(QFile& file);
+    /*  Reads a binary stl, assuming we're at the end of the header */
+    Mesh* read_stl_binary(QFile& file);
+
 signals:
     void loaded_file(QString filename);
-    void got_mesh(Mesh* m);
+    void got_mesh(Mesh* m, bool is_reload);
 
-    void error_ascii_stl();
     void error_bad_stl();
+    void error_empty_mesh();
+    void error_missing_file();
 
 private:
     const QString filename;
-
+    bool is_reload;
 };
 
 #endif // LOADER_H