return false;
}
+void MainWindow::on_run_stop_clicked()
+{
+ shared_ptr<Session> session = last_focused_session_;
+
+ if (!session)
+ return;
+
+ switch (session->get_capture_state()) {
+ case Session::Stopped:
+ session->start_capture([&](QString message) {
+ show_session_error("Capture failed", message); });
+ break;
+ case Session::AwaitingTrigger:
+ case Session::Running:
+ session->stop_capture();
+ break;
+ }
+}
+
void MainWindow::on_add_view(views::ViewType type, Session *session)
{
// We get a pointer and need a reference
add_session();
}
-void MainWindow::on_run_stop_clicked()
-{
- shared_ptr<Session> session = last_focused_session_;
-
- if (!session)
- return;
-
- switch (session->get_capture_state()) {
- case Session::Stopped:
- session->start_capture([&](QString message) {
- show_session_error("Capture failed", message); });
- break;
- case Session::AwaitingTrigger:
- case Session::Running:
- session->stop_capture();
- break;
- }
-}
-
-void MainWindow::on_external_trigger()
-{
- on_run_stop_clicked();
-}
-
void MainWindow::on_settings_clicked()
{
dialogs::Settings dlg(device_manager_);
virtual bool restoreState(const QByteArray &state, int version = 0);
+public Q_SLOTS:
+ void on_run_stop_clicked();
+
private Q_SLOTS:
void on_add_view(ViewType type, Session *session);
void on_focused_session_changed(shared_ptr<Session> session);
void on_new_session_clicked();
- void on_run_stop_clicked();
void on_settings_clicked();
void on_session_name_changed();
void on_close_current_tab();
-public Q_SLOTS:
- void on_external_trigger();
-
private:
DeviceManager &device_manager_;