]> git.sur5r.net Git - fstl/blobdiff - src/loader.h
Update upstream source from tag 'upstream/0.9.3'
[fstl] / src / loader.h
index fb0c8d81eb10bf8a610fb38a4345dfa2f65ce6ea..006f1d1d1469a5524c4d2fdc0a1c7168aad4639d 100644 (file)
@@ -9,21 +9,32 @@ 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 warning_confusing_stl();
+    void error_missing_file();
 
 private:
     const QString filename;
+    bool is_reload;
+
+    /*  Used to warn on binary STLs that begin with the word 'solid'" */
+    bool confusing_stl;
 
 };