From f17b64e9f589291c310be3ab11da26f22ebdcbdc Mon Sep 17 00:00:00 2001 From: canpadawan Date: Wed, 15 Jun 2016 18:31:44 +0200 Subject: [PATCH] renamed an signal --- mainwindow.cpp | 9 +++------ mainwindow.h | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 68e27c0..b456467 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -181,6 +181,7 @@ MainWindow::MainWindow(QWidget *parent) : //Automatically create the connection window so it can be updated even if we never opened it. connectionWindow = new ConnectionWindow(model); connect(connectionWindow, SIGNAL(updateConnectionSettings(QString,QString,int,int)), this, SLOT(updateConnectionSettings(QString,QString,int,int))); + connect(this, SIGNAL(suspendCapturing(bool)), connectionWindow, SLOT(setSuspendAll(bool))); } MainWindow::~MainWindow() @@ -713,15 +714,11 @@ void MainWindow::toggleCapture() { allowCapture = !allowCapture; if (allowCapture) - { ui->btnCaptureToggle->setText("Suspend Capturing"); - emit startFrameCapturing(); - } else - { ui->btnCaptureToggle->setText("Restart Capturing"); - emit stopFrameCapturing(); - } + + emit suspendCapturing(!allowCapture); } void MainWindow::connectionSucceeded(int baud0, int baud1) diff --git a/mainwindow.h b/mainwindow.h index cbe0c0d..191008a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -92,8 +92,7 @@ public slots: signals: void sendCANFrame(const CANFrame *, int); - void stopFrameCapturing(); - void startFrameCapturing(); + void suspendCapturing(bool); //-1 = frames cleared, -2 = a new file has been loaded (so all frames are different), otherwise # of new frames void framesUpdated(int numFrames); //something has updated the frame list