]> sigrok.org Git - pulseview.git/blobdiff - pv/mainwindow.hpp
Add shortcuts to + and - buttons for zooming in and out horizontally
[pulseview.git] / pv / mainwindow.hpp
index bf8be0ade1caa3b40caa765c721ebd71bcffc8ca..6f2fded904d426a57257780c8be62b461c680c17 100644 (file)
@@ -92,8 +92,7 @@ public:
 
        void remove_session(shared_ptr<Session> session);
 
-       void add_session_with_file(string open_file_name,
-               string open_file_format,
+       void add_session_with_file(string open_file_name, string open_file_format,
                string open_setup_file_name);
 
        void add_default_session();
@@ -109,6 +108,8 @@ private:
        void save_ui_settings();
        void restore_ui_settings();
 
+       void zoom_current_view(double steps);
+
        shared_ptr<Session> get_tab_session(int index) const;
 
        void closeEvent(QCloseEvent *event);
@@ -149,6 +150,9 @@ private Q_SLOTS:
        void on_settingViewShowSamplingPoints_changed(const QVariant new_value);
        void on_settingViewShowAnalogMinorGrid_changed(const QVariant new_value);
 
+       void on_zoom_out_shortcut_triggered();
+       void on_zoom_in_shortcut_triggered();
+
        void on_close_current_tab();
 
 private:
@@ -178,6 +182,8 @@ private:
        QShortcut *run_stop_shortcut_;
        QShortcut *close_application_shortcut_;
        QShortcut *close_current_tab_shortcut_;
+       QShortcut *zoom_in_shortcut_;
+       QShortcut *zoom_out_shortcut_;
 };
 
 } // namespace pv