X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fmainwindow.h;h=47d3e66d0cad0efa131b7a72b4d796026966eb34;hp=df7d86f5f3151b0a399a0c45bdf7eba1a7965799;hb=de1d99bbe58f825e30048baa48a9439c01686f10;hpb=e072efc8aa62ff67bc7270515159e2f71f43d9f0 diff --git a/pv/mainwindow.h b/pv/mainwindow.h index df7d86f5..47d3e66d 100644 --- a/pv/mainwindow.h +++ b/pv/mainwindow.h @@ -21,6 +21,8 @@ #ifndef PULSEVIEW_PV_MAINWINDOW_H #define PULSEVIEW_PV_MAINWINDOW_H +#include + #include #include "sigsession.h" @@ -35,7 +37,9 @@ class QWidget; namespace pv { +namespace toolbars { class SamplingBar; +} namespace view { class View; @@ -46,47 +50,65 @@ class MainWindow : public QMainWindow Q_OBJECT public: - explicit MainWindow(QWidget *parent = 0); + explicit MainWindow(const char *open_file_name = NULL, + QWidget *parent = 0); private: void setup_ui(); + void scan_devices(); + + void session_error(const QString text, const QString info_text); + +private slots: + void load_file(QString file_name); + + + void show_session_error( + const QString text, const QString info_text); + + void on_actionOpen_triggered(); + void on_actionQuit_triggered(); + + void on_actionConnect_triggered(); + + void on_actionViewZoomIn_triggered(); + + void on_actionViewZoomOut_triggered(); + + void on_actionViewShowCursors_triggered(); + + void on_actionAbout_triggered(); + + void run_stop(); + + void capture_state_changed(int state); private: SigSession _session; + std::list _devices; + pv::view::View *_view; + QMenuBar *_menu_bar; + QMenu *_menu_file; QAction *_action_open; + QAction *_action_connect; + QAction *_action_quit; + + QMenu *_menu_view; QAction *_action_view_zoom_in; QAction *_action_view_zoom_out; QAction *_action_view_show_cursors; - QAction *_action_about; - QMenuBar *_menu_bar; - QMenu *_menu_file; - QMenu *_menu_view; QMenu *_menu_help; + QAction *_action_about; QWidget *_central_widget; QVBoxLayout *_vertical_layout; QToolBar *_toolbar; - SamplingBar *_sampling_bar; - QStatusBar *_status_bar; - -private slots: - - void on_actionOpen_triggered(); - - void on_actionViewZoomIn_triggered(); - - void on_actionViewZoomOut_triggered(); - - void on_actionViewShowCursors_triggered(); - - void on_actionAbout_triggered(); - - void run_stop(); + toolbars::SamplingBar *_sampling_bar; }; } // namespace pv