]> git.sur5r.net Git - fstl/blobdiff - src/window.h
Allow dropping of files onto window
[fstl] / src / window.h
index 55298da5bd5aa8dfa2a4b9a7968f95df1bb89d57..cb92ebb4708d2d68c52b3a1af82915c2b31c3940 100644 (file)
@@ -10,16 +10,25 @@ class Window : public QMainWindow
     Q_OBJECT
 public:
     explicit Window(QWidget* parent=0);
-    void load_stl(const QString& filename);
+    bool load_stl(const QString& filename);
+
+protected:
+    void dragEnterEvent(QDragEnterEvent* event);
+    void dropEvent(QDropEvent* event);
 
 public slots:
     void on_open();
     void on_about();
+    void on_ascii_stl();
+    void on_bad_stl();
+
+    void enable_open();
+    void disable_open();
 
 private:
-    QAction* open_action;
-    QAction* about_action;
-    QAction* quit_action;
+    QAction* const open_action;
+    QAction* const about_action;
+    QAction* const quit_action;
 
     Canvas* canvas;
 };