]> git.sur5r.net Git - fstl/blobdiff - src/window.h
New upstream version 0.9.4
[fstl] / src / window.h
index fd0a77001e4eac827951c8fa9344c6c268d2a10e..8619b4d96d323a1deaeda786636279c602b04884 100644 (file)
@@ -4,6 +4,7 @@
 #include <QMainWindow>
 #include <QActionGroup>
 #include <QFileSystemWatcher>
+#include <QCollator>
 
 class Canvas;
 
@@ -13,10 +14,13 @@ class Window : public QMainWindow
 public:
     explicit Window(QWidget* parent=0);
     bool load_stl(const QString& filename, bool is_reload=false);
+    bool load_prev(void);
+    bool load_next(void);
 
 protected:
-    void dragEnterEvent(QDragEnterEvent* event);
-    void dropEvent(QDropEvent* event);
+    void dragEnterEvent(QDragEnterEvent* event) override;
+    void dropEvent(QDropEvent* event) override;
+    void keyPressEvent(QKeyEvent* event) override;
 
 public slots:
     void on_open();
@@ -33,28 +37,40 @@ public slots:
 
 private slots:
     void on_projection(QAction* proj);
+    void on_drawMode(QAction* mode);
     void on_watched_change(const QString& filename);
     void on_reload();
     void on_autoreload_triggered(bool r);
     void on_clear_recent();
     void on_load_recent(QAction* a);
-
+    void on_loaded(const QString& filename);
+    void on_save_screenshot();
+       
 private:
     void rebuild_recent_files();
+    void sorted_insert(QStringList& list, const QCollator& collator, const QString& value);
+    void build_folder_file_list();
+    QPair<QString, QString> get_file_neighbors();
 
     QAction* const open_action;
     QAction* const about_action;
     QAction* const quit_action;
     QAction* const perspective_action;
     QAction* const orthogonal_action;
+    QAction* const shaded_action;
+    QAction* const wireframe_action;
     QAction* const reload_action;
     QAction* const autoreload_action;
+    QAction* const save_screenshot_action;
 
     QMenu* const recent_files;
     QActionGroup* const recent_files_group;
     QAction* const recent_files_clear_action;
     const static int MAX_RECENT_FILES=8;
     const static QString RECENT_FILE_KEY;
+    QString current_file;
+    QString lookup_folder;
+    QStringList lookup_folder_files;
 
     QFileSystemWatcher* watcher;